Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* SCSI cmds from the kernel
@ 1998-09-28  4:00 Charles M. Richmond
  0 siblings, 0 replies; only message in thread
From: Charles M. Richmond @ 1998-09-28  4:00 UTC (permalink / raw)



From inside of a driver, I need to issue a inquiry cmd for 128 bytes
(which includes the extended inquiry data), a reserve cmd and a release
cmd.

Digital Unix specifies kernel calls such as: 

   ccmn_open(dev_t dev,int flags, ??fmt?? ) /* fmt is in *some* docs*/

   ccmn_io_ccb_bld ( dev_t dev, u_char *data_addr, u_long data_len,
		     u_short sense_len, u_long cam_flags,
		     void (*comp_func)(), u_char tag_action, 
		     u_long timeout, struct buf *bp)

   int ccmn_DoSpecialCmd (dev_t dev,int cmd,caddr_t data,
		    int flags, CCB_SCSIIO *ccb, int sflags)

   int ccmn_SysSpecialCmd (dev_t dev,int cmd,caddr_t data, 
                    int flags, CCB_SCSIIO *ccb, int sflags)

There are also a large set of SCSI3 cmds like:

   int cccmn_SysSpecialCmd3(SCSI_TRANS *scsi_trans, int cmd 
        caddr_t data, int flags, CCB_SCSIIO *ccb, int sflags);

If someone has some code that actually gets the above to work, I would
really like to see it. Otherwise here is a list of questions.

1. The docs imply that ccmn_open needs to be called twice. Is that 
   really true?

2. Is the data area in the ccb the same as the one listed in the
parameters of the ccmn_DoSpecialCmd/ccmn_SysSpecialCmd?

 a. If so, why and if not what, is the purpose of each? 


3. How does one extrapolate/fill a SCSI_TRANS structure for the SCSI3
   cmds? (ie cccmn_SysSpecialCmd3(SCSI_TRANS *scsi_trans,...)

4. Is the macro GET_PDRV_PTR(dev) the correct macro to use to get the
   first argument to ccmn_send_ccb_wait(pd, ...) ?

TIA !!!

***********************************************************************
*  Charles Richmond    Integrated International Systems Corporation   *
*  cmr@iisc.com        cmr@koibito.iisc.com  cmr@shore.net            *
*  UNIX Internals, I18N, L10N, X, Realtime Imaging, and  Custom S/W   *
*  One Longfellow Place Suite 3309 , Boston , Ma. USA 02114-2431      *
*  (617) 723 7695    (617) 367 3151        FAX (617) 723 6861         *
***********************************************************************




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-09-28  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-28  4:00 SCSI cmds from the kernel Charles M. Richmond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox