Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: "Charles M. Richmond" <cmr@koibito.iisc.com>
Subject: SCSI cmds from the kernel
Date: 1998/09/28	[thread overview]
Message-ID: <Pine.OSF.3.96.980928123127.14828A-100000@koibito.iisc.com> (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         *
***********************************************************************




                 reply	other threads:[~1998-09-28  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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