3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright (c) 1998 by Sun Microsystems, Inc.
24 * All rights reserved.
25 */
26
27 #ifndef _SYS_SCSI_RESET_NOTIFY_H
28 #define _SYS_SCSI_RESET_NOTIFY_H
29
30 #pragma ident "%Z%%M% %I% %E% SMI"
31
32 #include <sys/note.h>
33 #include <sys/scsi/scsi_types.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /*
40 * SCSI Control Information for Reset Notification.
41 */
42
43 /*
44 * adapter drivers use the following structure to record the notification
45 * requests from target drivers.
46 */
47 struct scsi_reset_notify_entry {
48 struct scsi_address *ap;
49 void (*callback)(caddr_t);
50 caddr_t arg;
51 struct scsi_reset_notify_entry *next;
52 };
53
54 #ifdef __lock_lint
55 _NOTE(SCHEME_PROTECTS_DATA("protected by lock passed as arg",
56 scsi_reset_notify_entry::ap
57 scsi_reset_notify_entry::callback
58 scsi_reset_notify_entry::arg
59 scsi_reset_notify_entry::next))
60 #endif
61
62 #ifdef _KERNEL
63 #ifdef __STDC__
64 extern int scsi_hba_reset_notify_setup(struct scsi_address *, int,
65 void (*)(caddr_t), caddr_t, kmutex_t *,
66 struct scsi_reset_notify_entry **);
67 extern void scsi_hba_reset_notify_tear_down(
68 struct scsi_reset_notify_entry *listp);
69 extern void scsi_hba_reset_notify_callback(kmutex_t *mutex,
70 struct scsi_reset_notify_entry **listp);
71 #else /* __STDC__ */
72 extern int scsi_hba_reset_notify_setup();
73 extern void scsi_hba_reset_notify_tear_down();
74 extern void scsi_hba_reset_notify_callback();
75 #endif /* __STDC__ */
76
77 #endif /* _KERNEL */
78
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif /* _SYS_SCSI_RESET_NOTIFY_H */
|
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 *
25 * Copyright (c) 1998 by Sun Microsystems, Inc.
26 * All rights reserved.
27 */
28
29 #ifndef _SYS_SCSI_RESET_NOTIFY_H
30 #define _SYS_SCSI_RESET_NOTIFY_H
31
32 #include <sys/note.h>
33 #include <sys/scsi/scsi_types.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /*
40 * SCSI Control Information for Reset Notification.
41 */
42
43 /*
44 * adapter drivers use the following structure to record the notification
45 * requests from target drivers.
46 */
47 struct scsi_reset_notify_entry {
48 struct scsi_address *ap;
49 void (*callback)(caddr_t);
50 caddr_t arg;
51 struct scsi_reset_notify_entry *next;
52 };
53
54 #ifdef __lock_lint
55 _NOTE(SCHEME_PROTECTS_DATA("protected by lock passed as arg",
56 scsi_reset_notify_entry::ap
57 scsi_reset_notify_entry::callback
58 scsi_reset_notify_entry::arg
59 scsi_reset_notify_entry::next))
60 #endif
61
62 #ifdef _KERNEL
63 extern int scsi_hba_reset_notify_setup(struct scsi_address *, int,
64 void (*)(caddr_t), caddr_t, kmutex_t *,
65 struct scsi_reset_notify_entry **);
66 extern void scsi_hba_reset_notify_tear_down(
67 struct scsi_reset_notify_entry *listp);
68 extern void scsi_hba_reset_notify_callback(kmutex_t *mutex,
69 struct scsi_reset_notify_entry **listp);
70
71 #endif /* _KERNEL */
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif /* _SYS_SCSI_RESET_NOTIFY_H */
|