home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ssssccccssssiiii____ccccoooommmmmmmmaaaannnndddd((((DDDD3333XXXX)))) ssssccccssssiiii____ccccoooommmmmmmmaaaannnndddd((((DDDD3333XXXX))))
-
-
-
- NNNNAAAAMMMMEEEE
- scsi_command - issue a command to a SCSI device
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssccccssssiiii....hhhh>>>>
-
- vvvvooooiiiidddd
- ((((****ssssccccssssiiii____ccccoooommmmmmmmaaaannnndddd))))((((ssssttttrrrruuuucccctttt ssssccccssssiiii____rrrreeeeqqqquuuueeeesssstttt ****_r_e_q))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The host adapter driver _s_c_s_i__c_o_m_m_a_n_d function issues a command to a SCSI
- device. The caller (a kernel level SCSI device driver) fills out a
- scsi_request structure and passes a pointer to it.
-
- There is no kernel object called scsi_command; rather, there is a pointer
- to each host adapter's scsi_command function in the sci_command field of
- the scsi_ctlr_info structure, which is attached to the vertex
- corresponding to the host adapter.
-
- The _s_r__l_u_n__v_h_d_l field of the request structure must contain the vertex
- handle of the device. A kernel panic will result if this is not done.
-
- The _s_r__n_o_t_i_f_y field (address of call back function) must be filled in.
- Calls with NULL in _s_r__n_o_t_i_f_y return with a failure indication in the
- _s_r__s_t_a_t_u_s field. Earlier versions of IRIX allowed the driver to pass a
- NULL callback address in _s_r__n_o_t_i_f_y as a way of asking _s_c_s_i__c_o_m_m_a_n_d to
- suspend the caller until the command completed. Now if the driver needs
- to sleep until the command completes, create a semaphore that is posted
- from the callback function.
-
- Other fields of the request structure are also required in order to make
- a successful request; see the SCSI chapter of the _I_R_I_X _D_e_v_i_c_e _D_r_i_v_e_r
- _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e and the comments in the scsi.h header file.
-
- Success or failure of the request is indicated by values returned in
- fields in the request structure.
-
- NNNNOOOOTTTTEEEESSSS
- _s_c_s_i__c_o_m_m_a_n_d is stored as a function pointer in the information hanging
- off the vertex handle corresponding to the host adapter in the hwgraph.
- Given a _l_u_n__v_h_d_l (vertex handle of the device) the scsi_command function
- can be called as follows:
-
- scsi_lun_info_t *scsi_lun_info;
- ...
- scsi_lun_info = scsi_lun_info_get(lun_vhdl);
- SLI_COMMAND(scsi_lun_info)(scsi_request);
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ssssccccssssiiii____ccccoooommmmmmmmaaaannnndddd((((DDDD3333XXXX)))) ssssccccssssiiii____ccccoooommmmmmmmaaaannnndddd((((DDDD3333XXXX))))
-
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- comments in /usr/include/sys/scsi.h, hwgraph.intro(D4X), scsi_alloc(D3X),
- scsi_free(D3X), scsi_info(D3X), scsi_ioctl(D3X), scsi_abort(D3X), SCSI
- chapter of the IRIX Device Driver Programmer's Guide
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-