1scsi_reset_notify(9F)    Kernel Functions for Drivers    scsi_reset_notify(9F)
2
3
4

NAME

6       scsi_reset_notify - notify target driver of bus resets
7

SYNOPSIS

9       #include <sys/scsi/scsi.h>
10
11
12
13       void scsi_reset_notify(struct scsi_address *ap, int flag,
14            void (*callback)(caddr_t), caddr_t arg);
15
16

INTERFACE LEVEL

18       Solaris DDI specific (Solaris DDI).
19

PARAMETERS

21       ap          Pointer to the scsi_address structure.
22
23
24       flag        A flag indicating registration or cancellation of the noti‐
25                   fication request.
26
27
28       callback    A pointer to the target driver's reset  notification  func‐
29                   tion.
30
31
32       arg         The callback function argument.
33
34

DESCRIPTION

36       The  scsi_reset_notify()  function  is  used by a target driver when it
37       needs to be notified of a bus reset. The bus reset could be  issued  by
38       the  transport  layer  (e.g.  the host bus adapter (HBA) driver or con‐
39       troller) or by another initiator.
40
41
42       The  argument flag is used to register or cancel the notification.  The
43       supported values for flag are as follows:
44
45       SCSI_RESET_NOTIFY    Register  callback as the reset notification func‐
46                            tion for the target driver.
47
48
49       SCSI_RESET_CANCEL    Cancel the reset notification request.
50
51
52
53       Target drivers can find out whether the HBA driver and controller  sup‐
54       port  reset notification by checking the  reset-notification capability
55       using the scsi_ifgetcap(9F) function.
56

RETURN VALUES

58       If flag is SCSI_RESET_NOTIFY, scsi_reset_notify() returns:
59
60       DDI_SUCCESS    The notification request has been accepted.
61
62
63       DDI_FAILURE    The transport layer does not support reset  notification
64                      or could not accept this request.
65
66
67
68       If flag is SCSI_RESET_CANCEL, scsi_reset_notify() returns:
69
70       DDI_SUCCESS    The notification request has been canceled.
71
72
73       DDI_FAILURE    No notification request was registered.
74
75

CONTEXT

77       The scsi_reset_notify() function can be called from user, interrupt, or
78       kernel context.
79

SEE ALSO

81       scsi_address(9S), scsi_ifgetcap(9F)
82
83
84       Writing Device Drivers
85
86
87
88SunOS 5.11                        16 Jan 2006            scsi_reset_notify(9F)
Impressum