** This is the quasi-official and semi-temporary T13 email list server. ** > However I do not know much about USB but does > USB have a problem similar to 1394 SPB-2? Yes. By the way, I'm arguing that Atapi has this problem too. As does Scsi. As does Ata. We've just been ignoring it in Ata land with more or less success. I hear the problem is least important on Ata - unless you think significant the general industry direction away from removable Ata as an indication that Ata flatly can't handle troubles of this nature. > In SPB-2 the SPB-2 command packet > that includes the SCSI CDB data also > includes a SPB-2 transport data direction bit. Aye. > Of course this bit (whose value is determine > by the 'host' when it builds the SPB-2 command packet) Aye. This is the EXPECTED direction. > Of course ... should be set appropriately and correctly. This is a very very very broad statement about plug 'n pray. Yea sure, "of course" the host should know all it needs to know about the device's varying-thru-time interpretations of cb's (aka command block aka command descriptor block aka command packet). Meanwhile, we all have to ship product. > However, SPB-2 does not explain what a device > should do if this bit does not agree with the > data direction required by the SCSI command. This is a deep evil. SPB-2 also does not provide a mechanism for the device to report how much data it did move. SPB-2 also does not provide guidance for what a device should do if it has too much data to move. SPB-2 also does not always immediately communicate the byte count of data involved. Any transfer can be, and any transfer over 64K must be, expressed as a scatter/gather list. To know how many bytes the host expects to move, you have to sum up the lengths of the elements of the scatter/gather list. > I am sure there are many vendor specific solutions > for this problem. Aye. Many of which involve the reckless choice of letting the device decide what host memory to stomp on. > ... SPB-2 does not explain ... The most creative choice I've seen lately is for the device to require that the max permitted data length expressed by SBP-2 precisely equal the max permitted data length expressed by the cb as interpreted by the device. We didn't have the guts to make the spec this tight in Usb Mass land. > Pat, does USB have a problem similar to this? No. Usb Mass expresses both the data direction and 32-bit byte count unambiguously, completely separated from the cb. Usb Mass says to run fast only if the host and the device agree completely. Usb Mass says to slow down, complain, and cope if the device wants to move less than the expected data in the expected direction. Usb Mass says to choke and require reset if the device wants to move data the wrong way or more than the expected amount. Pat LaVarre -- If you have any questions or wish to unsubscribe send a message to Hale Landis, [EMAIL PROTECTED] To post to this list server send your message to [EMAIL PROTECTED] For questions concerning Thistle Grove Industries or TGI's list services please send email to [EMAIL PROTECTED]
