home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ssssccccssssiiii____aaaalllllllloooocccc((((DDDD3333XXXX)))) ssssccccssssiiii____aaaalllllllloooocccc((((DDDD3333XXXX))))
-
-
-
- NNNNAAAAMMMMEEEE
- scsi_alloc - allocate communication channel to host adapter driver
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssccccssssiiii....hhhh>>>>
-
- iiiinnnntttt
- ((((****ssssccccssssiiii____aaaalllllllloooocccc))))(((( vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt _l_u_n__v_h_d_l,,,,
- iiiinnnntttt _o_p_t_i_o_n,,,,
- vvvvooooiiiidddd ((((****_c_a_l_l_b_a_c_k__f_u_n_c_t_i_o_n))))((((vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt,,,, cccchhhhaaaarrrr ****))))))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- A kernel level SCSI device driver calls the host adapter _s_c_s_i__a_l_l_o_c
- function to initialize a communication connection between itself and a
- host adapter driver, in preparation for issuing SCSI commands.
-
- There is no kernel object called scsi_alloc; rather, there is a pointer
- to each host adapter's scsi_alloc function in the sci_alloc field of the
- scsi_ctlr_info structure, which is attached to the vertex corresponding
- to the host adapter.
-
- The _l_u_n__v_h_d_l argument specifies the hwgraph vertex for the device. The
- _o_p_t_i_o_n argument currently has two fields:
-
- +o SCSIALLOC_EXCLUSIVE indicates that the driver needs exclusive use
- with the device.
-
- +o SCSIALLOC_QDEPTH is an 8-bit mask specifying the maximum number of
- commands that the device driver will want to queue. It is advisory
- only and may be ignored by the host adapter driver.
-
- The _c_a_l_l_b_a_c_k__f_u_n_c_t_i_o_n may be useful for drivers that don't use the
- SCSIALLOC_EXCLUSIVE option. When _c_a_l_l_b_a_c_k__f_u_n_c_t_i_o_n is NULL, it is
- ignored. When non-NULL, it specifies a function to call whenever there
- is sense data from device. It can be useful when more than one device
- driver will talk to a SCSI device, but one of the drivers needs to know
- about things like media removals. Only one device driver may specify a
- callback_function for a given device. The callback function is called
- with two arguments, the vertex handle corresponding to the SCSI lun and
- the sense data. The vertex handle allows a driver to know which device
- the callback pertains to.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- _s_c_s_i__a_l_l_o_c returns 0 if a communication connection could not be
- established, or if the arguments are invalid, or if the device was
- already allocated in exclusive use mode, or if this request was for
- exclusive use and the device is already allocated (including possibly
- earlier requests by the same driver). Otherwise, it returns a positive
- value.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ssssccccssssiiii____aaaalllllllloooocccc((((DDDD3333XXXX)))) ssssccccssssiiii____aaaalllllllloooocccc((((DDDD3333XXXX))))
-
-
-
- NNNNOOOOTTTTEEEESSSS
- _s_c_s_i__a_l_l_o_c is stored as a function pointer in the scsi_ctlr_info_t
- structure, which is associated with the scsi host adapter vertex in the
- hwgraph. The information structure in the scsi target vertex also has a
- pointer to the scsi_ctlr_info_t of the host adapter that the target is
- connected to. Given a _l_u_n__v_h_d_l (vertex handle of the device) the
- _s_c_s_i__a_l_l_o_c function can be called as follows:
-
- scsi_lun_info_t *scsi_lun_info;
- ...
- scsi_lun_info = scsi_lun_info_get(lun_vhdl);
- SLI_ALLOC(scsi_lun_info)(lun_vhdl,option,callback_function);
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- comments in /usr/include/sys/scsi.h, hwgraph.intro(D4X), scsi_free(D3X),
- scsi_info(D3X), scsi_command(D3X), scsi_ioctl(D3X), scsi_abort(D3X), SCSI
- chapter of the IRIX Device Driver Programmer's Guide.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-