scsi_poll(9F)
NAME
scsi_poll − run a polled SCSI command on behalf of a target driver
SYNOPSIS
#include <sys/scsi/scsi.h>
int scsi_poll(struct scsi_pkt ∗pkt);
ARGUMENTS
pkt Pointer to the scsi_pkt(9S) structure.
INTERFACE LEVEL
Solaris architecture specific (SunDDI).
DESCRIPTION
scsi_poll() requests the host adapter driver to run a polled command. Unlike scsi_transport(9F) which runs commands asynchronously, scsi_poll() runs commands to completion before returning. If the pkt_time member of pkt is zero it is defaulted to SCSI_POLL_TIMEOUT to prevent an indefinite hang of the system.
RETURN VALUES
scsi_poll() returns:
0 command completed successfully.
-1 command failed.
CONTEXT
scsi_poll () can be called from user or interrupt level.
SEE ALSO
makecom(9F), scsi_transport(9F), scsi_pkt(9S)
SunOS 5.1 Writing Device Drivers
WARNING
scsi_poll() might loop indefinitely waiting for a SCSI command to complete; hence it is not normally recommended to call it from interrupt context.
SunOS 5.2 — Last change: 21 Dec 1991