1tran_reset(9E) Driver Entry Points tran_reset(9E)
2
3
4
6 tran_reset - reset a SCSI bus or target
7
9 #include <sys/scsi/scsi.h>
10
11
12
13 int prefixtran_reset(struct scsi_address *ap, int level);
14
15
17 Solaris architecture specific (Solaris DDI).
18
20 ap Pointer to the scsi_address(9S) structure.
21
22
23 level The level of reset required.
24
25
27 The tran_reset() vector in the scsi_hba_tran(9S) structure must be ini‐
28 tialized during the HBA driver's attach(9E) to point to an HBA entry
29 point to be called when a target driver calls scsi_reset(9F).
30
31
32 tran_reset() must reset either the SCSI bus, a SCSI target device, or a
33 SCSI logical unit as specified by level.
34
35
36 level must be one of the following:
37
38 RESET_ALL Reset the SCSI bus.
39
40
41 RESET_TARGET Reset the target specified by ap.
42
43
44 RESET_LUN Reset the logical unit specified by ap.
45
46
47
48 tran_reset should set the pkt_reason field of all outstanding packets
49 in the transport layer associated with each target or logical unit that
50 was successfully reset to CMD_RESET and the pkt_statistics field must
51 be OR'ed with either STAT_BUS_RESET (if the SCSI bus was reset) or
52 STAT_DEV_RESET (if the target or logical unit was reset).
53
54
55 The HBA driver should use a SCSI Bus Device Reset Message to reset a
56 target device. The HBA driver should use a SCSI Logical Unit Reset
57 Message to reset a logical unit.
58
59
60 Packets that are in the transport layer but not yet active on the bus
61 should be returned with pkt_reason set to CMD_RESET and pkt_statistics
62 OR'ed with STAT_ABORTED.
63
64
65 Support for RESET_LUN is optional but strongly encouraged for new and
66 updated HBA drivers. If an HBA driver provides RESET_LUN support, it
67 must also create the lun-reset capability with a value of zero for each
68 target device instance represented by a valid ap. The HBA is also
69 required to provide the means to return the current value of the lun-
70 reset capability in its tran_getcap(9E) routine, as well as the means
71 to change the value of the lun_reset capability in its tran_getcap(9E)
72 routine.
73
75 tran_reset() should return:
76
77 1 on success.
78
79
80 0 on failure.
81
82
84 The tran_reset() function can be called from user or interrupt context.
85 This requirement comes from scsi_reset().
86
88 attach(9E), ddi_dma_buf_setup(9F), scsi_hba_attach(9F), scsi_reset(9F),
89 scsi_address(9S), scsi_hba_tran(9S)
90
91
92 Writing Device Drivers
93
95 If pkt_reason already indicates that an earlier error had occurred for
96 a particular pkt, tran_reset() should not overwrite pkt_reason with
97 CMD_RESET.
98
99
100
101SunOS 5.11 17 Aug 2005 tran_reset(9E)