Kernel Functions for Drivers scsitransport(9F)
NAME
scsitransport - request by a SCSI target driver to start a
command
SYNOPSIS
#include
int scsitransport(struct scsipkt *pkt);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
pkt Pointer to a scsipkt(9S) structure.
DESCRIPTION
Target drivers use scsitransport() to request the host
adapter driver to transport a command to the SCSI target
device specified by pkt. The target driver must obtain
resources for the packet using scsiinitpkt(9F) prior to
calling this function. The packet may be initialized using
one of the makecom(9F) functions. scsitransport() does not
wait for the SCSI command to complete. See scsipoll(9F) for
a description of polled SCSI commands. Upon completion of
the SCSI command the host adapter calls the completion rou-
tine provided by the target driver in the pktcomp member of
the scsipkt pointed to by pkt.
RETURN VALUES
The scsitransport() function returns:
TRANACEPT The packet was accepted by the transport
layer.
TRANBUSY The packet could not be accepted because
there was already a packet in progress
for this target/lun, the host adapter
queue was full, or the target device
queue was full.
TRANBADPKT The DMA count in the packet exceeded the
DMA engine's maximum DMA size.
TRANFATALEROR A fatal error has occurred in the tran-
sport layer.
SunOS 5.11 Last change: 16 Jan 2006 1
Kernel Functions for Drivers scsitransport(9F)
CONTEXT
The scsitransport() function can be called from user,
interrupt, or kernel context.
EXAMPLES
Example 1 Using scsitransport()
if ((status = scsitransport(rqpkt)) != TRANACEPT) {
scsilog(devp, sdlabel, CEWARN,
"transport of request sense pkt fails (0x%x)\n", status);
}
SEE ALSO
transtart(9E), makecom(9F), scsiinitpkt(9F),
scsipktalloc(9F), scsipoll(9F), scsipkt(9S)
Writing Device Drivers
SunOS 5.11 Last change: 16 Jan 2006 2
|