home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / scsi_ioctl.z / scsi_ioctl
Encoding:
Text File  |  2001-04-17  |  4.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ssssccccssssiiii____iiiiooooccccttttllll((((DDDD3333XXXX))))                                                ssssccccssssiiii____iiiiooooccccttttllll((((DDDD3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      scsi_ioctl - perform host adapter ioctl
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssccccssssiiii....hhhh>>>>
  14.  
  15.      iiiinnnntttt
  16.      ((((****ssssccccssssiiii____iiiiooooccccttttllll))))(((( vvvveeeerrrrtttteeeexxxx____hhhhddddllll____tttt _c_t_l_r__v_h_d_l,,,,
  17.                       uuuuiiiinnnntttt _c_o_m_m_a_n_d,,,,
  18.                       ssssttttrrrruuuucccctttt ssssccccssssiiii____hhhhaaaa____oooopppp ****_o_p_e_r_a_n_d))));;;;
  19.      The host adapter _s_c_s_i__i_o_c_t_l interface is used by user level
  20.      administrative applications (with privileged access) to perform
  21.      operations on a scsi bus, fibre channel loop, or directly to a host
  22.      adapter.
  23.  
  24.      There is no kernel object called scsi_ioctl; rather, there is a pointer
  25.      to each host adapter's scsi_ioctl function in the sci_ioctl field of the
  26.      scsi_ctlr_info structure, which is attached to the vertex corresponding
  27.      to the host adapter.
  28.  
  29. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.      The _c_t_l_r__v_h_d_l argument specifies the hwgraph vertex for the SCSI host
  31.      adapter.  The _c_o_m_m_a_n_d argument specifies what operation is requested.
  32.      There is a list of these operations in /usr/include/sys/scsi.h, all of
  33.      which have a name of the form SOP_*.  See scsiha(7m) for additional
  34.      information.  The _o_p_e_r_a_n_d argument is a pointer to a scsi_ha_op
  35.      structure, which is used to supply additional information to the
  36.      _s_c_s_i__i_o_c_t_l function.  Two adapter-specific ioctls have been defined:
  37.      SOP_GETDATA and SOP_SENDDATA.  With them an application and driver can
  38.      perform activities beyond those defined by the other SOP_* ioctls.
  39.  
  40. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  41.      _s_c_s_i__i_o_c_t_l returns 0 if there is no error.  Otherwise, it returns a
  42.      standard error number (see /usr/include/sys/errno.h).
  43.  
  44. NNNNOOOOTTTTEEEESSSS
  45.      _s_c_s_i__i_o_c_t_l is stored as a function pointer in the scsi_ctlr_info_t
  46.      structure, which is associated with the scsi host adapter vertex in the
  47.      hwgraph.  The information structure in the scsi target vertex also has a
  48.      pointer to the scsi_ctlr_info_t of the host adapter that the target is
  49.      connected to.  Given a _l_u_n__v_h_d_l (vertex handle of the device) the
  50.      _s_c_s_i__a_l_l_o_c function can be called as follows:
  51.  
  52.               scsi_lun_info_t *scsi_lun_info;
  53.             ...
  54.               scsi_lun_info = scsi_lun_info_get(lun_vhdl);
  55.               SLI_IOCTL(scsi_lun_info)(lun_vhdl,option,callback_function);
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssccccssssiiii____iiiiooooccccttttllll((((DDDD3333XXXX))))                                                ssssccccssssiiii____iiiiooooccccttttllll((((DDDD3333XXXX))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      comments in /usr/include/sys/scsi.h, hwgraph.intro(D4X), scsi_alloc(D3X),
  76.      scsi_free(D3X), scsi_info(D3X), scsi_command(D3X), scsi_abort(D3X), SCSI
  77.      chapter of the IRIX Device Driver Programmer's Guide.
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.