This message is from the T13 list server.
[ BC [EMAIL PROTECTED] ] > From: Harlan Andrews > Date: Tuesday - April 16, 2002 12:51 PM > Subject: Re: [t13] more: proposal to 'fix' ATAPI DMA ... > Simply The real world never is? > Inquiry ... it is safest > to request the length in one command > and get the full data in the next command. > However, this would also be true in PIO mode. I'm glad to hear you suggest this. I had heard other sources before now tell me that this false myth was current in the Apple community - maybe it even holds true there? But as for Windows ... > Simply break the Inquiry command into two chunks. Does your history of pain not agree with mine? My history tells me ... Of devices which do support op x12 Inquiry, the additionalLength at offset 4 is commonly wrong: off by one, zeroed, copied In at the wrong offset, ... I see this so commonly wrong that I have to conclude Windows almost never looks at this byte. The trace: http://members.aol.com/plscsi/20020316/win98inq.txt shows a Scsi-over-whatever device made by Microsoft that ZEROES the additionalLength. Microsoft glibly proceeds to treat the 8 bytes at offset 8 and the x10 bytes at offset 10 as vendor & product names, no worries. > Simply break the Inquiry command into two chunks. The first chunk must contain more than zero bytes. The command -x 12 0 0 0 00 0 is known to crash Atapi devices, no matter how useful it was in Scsi. I have to conclude Windows never sends this command. > Simply break the Inquiry command into two chunks. Of devices which do support op x12 Inquiry, many support no form of the Inquiry command other than -x 12 0 0 0 24 0 -i x24. [[[ By that concise (i.e. cryptic) notation I mean the 6 byte Cdb x 12 0 0 0 24 0 when sent along with perission to copy many as x24 bytes In. ]]] > Simply ... the Inquiry command ... Some devices choke over op x12 Inquiry altogether. Scsi-over-1394 devices in particular do this. I've heard Microsoft never sends them op x12 Inquiry, preferring instead to synthesise Scsi Inquiry data from other Scsi-over-1394 plug 'n pray data. [[[ Recently I've learned by "Scsi-over-1394" I mean "1394a Sbp2 normative Annex B". Saying "1394" or "1394 Sbp2" is sufficiently imprecise as to confuse folk. ]]] > We can't help it if Microsoft > chose to handle the situation > differently in there various implementations. Thanks for sharing my pain. We can embrace & extend the public de jure standard to describe the de facto Microsoft implementation. Surely you appreciate that many device designers wrongly think noone but Microsoft exists. I think the best defence is for folks who care about Apple & Linux & co. to ensure that the de jure public standard acknowledges that the de facto Microsoft implementation exists. Otherwise device designers adapt privately to an incomplete understanding of Microsoft's binary code only, and we all lose. > Simply break the ... command into two chunks. I hear host folk commonly reuse this model excessively. Op x03 Request Sense data can't reliably be copied in two chunks: the first copy erases all of it, so the second copy copies nothing. Op x37 ReadDefect data can't reliably be copied in two chunks. ReadDefect data varies over time. Pat LaVarre From: Harlan Andrews To: Pat LaVarre, EXAPI.API."[EMAIL PROTECTED]", Bruce Beeston, Paul Jackson, Hiromichi Oribe Date: Tuesday - April 16, 2002 12:51 PM Subject: Re: [t13] more: proposal to 'fix' ATAPI DMA This message is from the T13 list server. On 4/15/02, Pat LaVarre <> wrote (in response to Harlan's questions): >.... >> Where do 1F4 and 1F5 get involved ? >> Is it defined anywhere that they should have a particular value >> at the end of the transfe ? > >Not yet. > > >> > Microsoft Win95B >> I think the device did the correct thing to try to send 6 bytes (3 >> words). Did Microsoft actually round down and only request 4 bytes (2 >> words) ??? Seems 'odd' to me. > >Win95B did actually round down. This forced me to make only even amounts of >data available in the device e.g. for the Cdb -x 12 0 0 0 FF 0 my device only >asked to copy an even x7A count of bytes In, rather than the legacy odd count >of x79. > >Win98 & WinMe are ok here. > >.... Pat, We can't help it if Microsoft chose to handle the situation differently in there various implementations. The fact that they are now rounding UP suggests that they decided that was the correct way to go. Devices should round UP, not down. However, all is not lost. It is possible to make an Application which handles Inquiry on all the various Windows variations. Simply break the Inquiry command into two chunks. Request 6 bytes (or maybe 8 bytes) in the first chunk then analyze the length byte and request Inquiry again with the correct length. The command Cdb -x 12 0 0 0 FF 0 in Wide SCSI could result in Pad byte(s) being transferred across the bus. In order to handle 8-bit devices, 16-bit devices and 32-bit devices on the same SCSI bus, it is safest to request the length in one command and get the full data in the next command. However, this would also be true in PIO mode. ...Harlan
