1scsi_abort(9F) Kernel Functions for Drivers scsi_abort(9F)
2
3
4
6 scsi_abort - abort a SCSI command
7
9 #include <sys/scsi/scsi.h>
10
11
12
13 intscsi_abort(struct scsi_address *ap, struct scsi_pkt *pkt);
14
15
17 Solaris DDI specific (Solaris DDI).
18
20 ap Pointer to a scsi_address structure.
21
22
23 pkt Pointer to a scsi_pkt(9S) structure.
24
25
27 The scsi_abort() function terminates a command that has been transā
28 ported to the host adapter driver. A NULL pkt causes all outstanding
29 packets to be aborted. On a successful abort, the pkt_reason is set to
30 CMD_ABORTED and pkt_statistics is OR'ed with STAT_ABORTED.
31
33 The scsi_abort() function returns:
34
35 1 on success.
36
37
38 0 on failure.
39
40
42 The scsi_abort() function can be called from user, interrupt, or kernel
43 context.
44
46 Example 1 Terminating a command.
47
48 if (scsi_abort(&devp->sd_address, pkt) == 0) {
49 (void) scsi_reset(&devp->sd_address, RESET_ALL);
50 }
51
52
54 tran_abort(9E), scsi_reset(9F), scsi_pkt(9S)
55
56
57 Writing Device Drivers
58
59
60
61SunOS 5.11 16 Jan 2006 scsi_abort(9F)