Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driversscsi_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);

INTERFACE LEVEL

 

Solaris DDI specific (Solaris DDI).

PARAMETERS

 
pkt
Pointer to the scsi_pkt(9S) structure.

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 0, the value of pkt_time 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. This function should not be called when the caller is executing timeout(9F) in the context of a thread.

SEE ALSO

 

makecom(9F), scsi_transport(9F), scsi_pkt(9S)

Writing Device Drivers

WARNINGS

 

Since scsi_poll() runs commands to completion before returning, it may require more time than is desirable when called from interrupt context. Therefore, calling scsi_poll from interrupt context is not recommended.


SunOS 5.9Go To TopLast Changed 30 Aug 1995

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.