From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3c931d051b674f3b,start X-Google-Attributes: gidfee84,public X-Google-Thread: 10650a,3c931d051b674f3b,start X-Google-Attributes: gid10650a,public From: "Charles M. Richmond" Subject: SCSI cmds from the kernel Date: 1998/09/28 Message-ID: #1/1 X-Deja-AN: 395690945 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: abuse@shore.net X-Trace: news.shore.net 907003944 198.5.5.5 (Mon, 28 Sep 1998 13:32:24 EDT) Organization: Shore.Net/Eco Software, Inc; (info@shore.net) MIME-Version: 1.0 NNTP-Posting-Date: Mon, 28 Sep 1998 13:32:24 EDT Newsgroups: comp.unix.internals,comp.unix.osf.osf1 >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 * ***********************************************************************