1scsi_transport(9F) Kernel Functions for Drivers scsi_transport(9F)
2
3
4
6 scsi_transport - request by a SCSI target driver to start a command
7
9 #include <sys/scsi/scsi.h>
10
11
12
13 int scsi_transport(struct scsi_pkt *pkt);
14
15
17 Solaris DDI specific (Solaris DDI).
18
20 pkt Pointer to a scsi_pkt(9S) structure.
21
22
24 Target drivers use scsi_transport() to request the host adapter driver
25 to transport a command to the SCSI target device specified by pkt. The
26 target driver must obtain resources for the packet using
27 scsi_init_pkt(9F) prior to calling this function. The packet may be
28 initialized using one of the makecom(9F) functions. scsi_transport()
29 does not wait for the SCSI command to complete. See scsi_poll(9F) for a
30 description of polled SCSI commands. Upon completion of the SCSI com‐
31 mand the host adapter calls the completion routine provided by the tar‐
32 get driver in the pkt_comp member of the scsi_pkt pointed to by pkt.
33
35 The scsi_transport() function returns:
36
37 TRAN_ACCEPT The packet was accepted by the transport layer.
38
39
40 TRAN_BUSY The packet could not be accepted because there was
41 already a packet in progress for this target/lun,
42 the host adapter queue was full, or the target
43 device queue was full.
44
45
46 TRAN_BADPKT The DMA count in the packet exceeded the DMA
47 engine's maximum DMA size.
48
49
50 TRAN_FATAL_ERROR A fatal error has occurred in the transport layer.
51
52
54 The scsi_transport() function can be called from user, interrupt, or
55 kernel context.
56
58 Example 1 Using scsi_transport()
59
60 if ((status = scsi_transport(rqpkt)) != TRAN_ACCEPT) {
61 scsi_log(devp, sd_label, CE_WARN,
62 "transport of request sense pkt fails (0x%x)\n", status);
63 }
64
65
67 tran_start(9E), makecom(9F), scsi_init_pkt(9F), scsi_pktalloc(9F),
68 scsi_poll(9F), scsi_pkt(9S)
69
70
71 Writing Device Drivers
72
73
74
75SunOS 5.11 16 Jan 2006 scsi_transport(9F)