Article View: vmsnet.misc
Article #11Re: Format of SCSI commands to GKDRIVER.
From: mark
Date: Tue, 03 Nov 1992 00:03
Date: Tue, 03 Nov 1992 00:03
40 lines
2247 bytes
2247 bytes
In article <1992Nov2.154711.4667@dmc.com>, munroe@dmc.com (Dick Munroe) writes: > GKDRIVER question: > > SCSI is bigendian, VAXen are little endian, I assume that the GKDRIVER simply > takes the commands and arguments given it and transmits them blindly (after > all, it IS a pass through driver). Which should mean that when I write SCSI > commands, I have to worry about swapping bytes in portions of the commands that > take words, etc. > > Is this assumption correct? It may or may not. I never looked at it from that perspective. As far as I can remember, every SCSI device manual I've ever examined including the ANSI specs, always clearly spelled out the contents of each BYTE of the command. In general non byte quantities are relatively rare or and are used consistently in each "group" of related commands that have a similar/identical parameter (i.e. read/write/seek all specify a LBN and do it exactly the same way for the Group 0 commands, and do it exactly the same way for the Group 1 commands). Take for example, a Group 0 WRITE command setup given LBA is the block number to write and LEN is the number of blocks to write: cdb[0] = 0x0A; cdb[1] = (LBA>>16)&0x1f; cdb[2] = (LBA>>8)&0xff; cdb[3] = LBA&0xff; cdb[4] = LEN; Although technically this implies big-endian interpretation, it certainly isn't quite a byte swap operation since it involves parts of various bytes, AND not an even number of bytes. Note the above command sets 21 bits of LBA. Given 512 byte blocks, this is maximally 30 bits of addressability which is exactly the 1 GB limit the VMS DKDRIVER had pre VMS V5.4. -- Mark Pizzolato - INFO COMM Computer Consulting, Redwood City, Ca PHONE: (415)369-9366 UUCP: decwrl!infopiz!mark or uunet!lupine!infopiz!mark DOMAIN: mark@infocomm.com
Technical Details
Message-ID:
<1992Nov2.170318.18028@infocomm.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!hri.com!ukma!asuvax!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!decwrl!infopiz!markReferences:
<1992Nov2.154711.4667@dmc.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!hri.com!ukma!asuvax!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!decwrl!infopiz!mark From: mark@infocomm.com Newsgroups: vmsnet.misc Subject: Re: Format of SCSI commands to GKDRIVER. Message-ID: <1992Nov2.170318.18028@infocomm.com> Date: 3 Nov 92 00:03:18 GMT References: <1992Nov2.154711.4667@dmc.com> Organization: INFO COMM - Computer Consulting, Redwood City, Ca Lines: 40