scsi_slave(9f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

scsi_slave(9f)

scsi_slave(9F)                 Kernel Functions                 scsi_slave(9F)



NAME
       scsi_slave  - utility for SCSI target drivers to establish the presence
       of a target

SYNOPSIS
       #include <sys/scsi/scsi.h>

       int scsi_slave(struct scsi_device *devp, int (*callback)(void));

INTERFACE LEVEL
       The scsi_slave() function is obsolete. This function has been  replaced
       by scsi_probe(9F).

PARAMETERS
       devp        Pointer to a scsi_device(9S) structure.


       callback    Pointer to a callback function, NULL_FUNC or SLEEP_FUNC.


DESCRIPTION
       scsi_slave()  checks  for the presence of a SCSI device. Target drivers
       may use this function in their probe(9E) routines. scsi_slave()  deter‐
       mines  if the device is present by using a Test Unit Ready command fol‐
       lowed by an Inquiry command. If scsi_slave()  is  successful,  it  will
       fill  in  the scsi_inquiry structure, which is the sd_inq member of the
       scsi_device(9S) structure, and return SCSI_PROBE_EXISTS. This  informa‐
       tion  can be used to determine if the target driver has probed the cor‐
       rect SCSI device type. callback indicates what the  allocator  routines
       should do when DMA resources are not available:

       NULL_FUNC       Do not wait for resources. Return a NULL pointer.


       SLEEP_FUNC      Wait indefinitely for resources.


       Other Values    callback  points  to  a  function  which is called when
                       resources may have  become  available.  callback   must
                       return  either 0 (indicating that it attempted to allo‐
                       cate resources but again failed to  do  so),  in  which
                       case it is put back on a list to be called again later,
                       or 1 indicating either success in allocating  resources
                       or indicating that it no longer cares for a retry.


RETURN VALUES
       scsi_slave() returns:

       SCSIPROBE_NOMEM      No space available for structures.


       SCSIPROBE_EXISTS     Device exists and inquiry data is valid.


       SCSIPROBE_NONCCS     Device exists but inquiry data is not valid.


       SCSIPROBE_FAILURE    Polled command failure.


       SCSIPROBE_NORESP     No response to TEST UNIT READY.


CONTEXT
       scsi_slave()  is  normally called from the target driver's probe(9E) or
       attach(9E) routine. In any case, this routine should not be called from
       interrupt  context, because it can sleep waiting for memory to be allo‐
       cated.

ATTRIBUTES
       See attributes(7) for a description of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Stability LevelObsolete


SEE ALSO
       scsi_device(9S),       attributes(7),       attach(9E),      probe(9E),
       ddi_iopb_alloc(9F),  makecom(9F),  scsi_dmaget(9F),  scsi_ifgetcap(9F),
       scsi_pktalloc(9F), scsi_poll(9F), scsi_probe(9F)


         ANSI Small Computer System Interface-2 (SCSI-2)


       Writing Device Drivers in Oracle Solaris 11.4

NOTES
       The  scsi_slave()  function  is  obsolete and will be discontinued in a
       future release. This function has been replaced by scsi_probe(9F).



Oracle Solaris 11.4               27 Sep 2002                   scsi_slave(9F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3