Date: Mon, 29 Mar 1999 15:57:44 -0700 (MST) From: "Kenneth D. Merry" <ken@plutotech.com> To: cc@137.org (Chris Csanady) Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: CAM/SCSI command references? Message-ID: <199903292257.PAA11175@panzer.plutotech.com> In-Reply-To: <19990328200517.EB895142@friley-185-205.res.iastate.edu> from Chris Csanady at "Mar 28, 1999 2: 5:17 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Chris Csanady wrote... > I am looking for online SCSI command references and was wondering > if anyone had any pointers. Also I am interested in the various > vender specific commands relating to CDDA functions. I know very > little about the command formats and codes, so just about anything > will help. Matt has already pointed out the SCSI specs online. If you're looking for information on vendor-specific CDDA functions, the best thing to do is look in the source for tosha, cdd, cdda2wav, etc. > Also, what is the standard API that one should code new software > to in FreeBSD? I imagine cam(3) at the very least--what about > cam_cdbparse(3)? > > In the cam_cdbparse man page, it mentions that some of the commands > are meant to provide an easy migration path, although it does not > specify explicitly which ones. It points to cam_fill_csio() and > scsi_read_write() being desireable, although I have not found these > formally documented anywhere. I think you should probably stay away from the routines in cam_cdbparse(3). They are generally intended to help people migrate from the old libscsi interface. In fact, the man page was largely taken from the old scsi(3) man page. They won't be going away, as far as I can see, but the standard FreeBSD/CAM routines are generally easier to use. There isn't any documentation on the new routines yet. The best thing to do is figure out what SCSI command you're trying to send, and then see if there is a corresponding function declared in scsi_all.h, scsi_sa.h, cam_ccb.h, etc. If there isn't a function, like scsi_start_stop() or scsi_read_write(), you've got two choices: - Write your own CCB/CDB building function. I would advise this if you're going to send the same SCSI CDB more than once. - Use cam_fill_csio() to build the CCB. Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903292257.PAA11175>