1scsi_poll(9F)            Kernel Functions for Drivers            scsi_poll(9F)
2
3
4

NAME

6       scsi_poll - run a polled SCSI command on behalf of a target driver
7

SYNOPSIS

9       #include <sys/scsi/scsi.h>
10
11
12
13       int scsi_poll(struct scsi_pkt *pkt);
14
15

INTERFACE LEVEL

17       Solaris DDI specific (Solaris DDI).
18

PARAMETERS

20       pkt    Pointer to the scsi_pkt(9S) structure.
21
22

DESCRIPTION

24       The  scsi_poll()  function  requests  the  host adapter driver to run a
25       polled command. Unlike scsi_transport(9F)  which  runs  commands  asyn‐
26       chronously,  scsi_poll()  runs commands to completion before returning.
27       If the pkt_time member of pkt is 0, the value of  pkt_time is defaulted
28       to SCSI_POLL_TIMEOUT to prevent an indefinite hang of the system.
29

RETURN VALUES

31       The scsi_poll() function returns:
32
33       0     command completed successfully.
34
35
36       -1    command failed.
37
38

CONTEXT

40       The  scsi_poll() function can be called from user, interrupt, or kernel
41       context. This function should not be called when the caller is  execut‐
42       ing timeout(9F) in the context of a thread.
43

SEE ALSO

45       makecom(9F), scsi_transport(9F), scsi_pkt(9S)
46
47
48       Writing Device Drivers
49

WARNINGS

51       Since  scsi_poll() runs commands to completion before returning, it may
52       require more time than is desirable when called from interrupt context.
53       Therefore, calling scsi_poll from interrupt context is not recommended.
54
55
56
57SunOS 5.11                        16 Jan 2006                    scsi_poll(9F)
Impressum