On Thu, 19 May 2005, Garnet Ulrich wrote:
> Alan, I've sent you the output of the long "just for kicks" command
> separately. For anyone else investigating the problem, here is the
> output of a couple of shorter commands and the start of the long output:
>
> # ./plscsi -v -x "12 0 0 0 24 0" -i x24 /dev/scd0
> x 00000000 12 00:00:00 24 00 .. .. .. .. .. .. .. .. .. .. "R@@@$@"
> x 00000000 05:80:00:32 5B:00:00:00 48:4C:2D:44 54:2D:53:54 "E@@2[@@@HL-
> DT-ST"
> x 00000010 44:56:44:52 41:4D:20:47 53:41:2D:35 31:32:30:44 "DVDRAM
> GSA-5120D"
> x 00000020 41:31:31:35 .. .. .. .. .. .. .. .. .. .. .. .. "A115"
> // 0 = plscsi.main exit int
That's the standard INQUIRY information. Among other things it contains
the vendor string, product string, and revision string.
> # ./plscsi -v -x "3c 0 0 0 0 0 0 0 4 0" -i 4 /dev/scd0
> x 00000000 3C 00 00:00:00:00 00 00:04 00 .. .. .. .. .. .. "<@@@@@@@D@"
> x 00000000 00:1E:00:00 .. .. .. .. .. .. .. .. .. .. .. .. "@^@@"
Okay. This says that the buffer capacity is 0x1e0000 bytes, which is a
little less than 2 MB. So the size of the requested transfer (64512)
should not have caused any overflow.
> # ./plscsi -v -x "3c 0 0 0 0 0 0 fb fe 0" -i 64510 -t /dev/null -X ti me
> 5 /dev/scd0
> x 00000000 3C 00 00:00:00:00 00 FB:FE 00 .. .. .. .. .. .. "<@@@@@@{~@"
> x 00000000 00:1E:00:00 00:FF:FF:FF FF:FF:FF:FF FF:FF:FF:00
> "@^@@@??????????@"
...
The actual data is meaningless, except for the first four bytes. What I
really wanted to know was whether the command would work.
You could try some variations. For example, the command that failed under
cdrecord was essentially this (leave off the -v if you're not interested
in all that meaningless data):
plscsi -x '3c 0 0 0 0 0 0 fc 0 0' -i 64512 -t /dev/null -X time 5,0 /dev/sg0
(I'm a little surprised that it worked using /dev/scd0 instead of
/dev/sg0. That's the CD driver rather than the SCSI generic driver, so it
shouldn't accept these commands.)
You can try doing even longer transfers, or shorter ones. Maybe there's
some sort of pattern to which ones succeed and which fail. All you need
to know is that the transfer length goes in the -x argument in big-endian
order hex bytes at the 7th, 8th, and 9th positions, and you have to
specify the transfer length again in the -i option (you can give it in hex
if you prefer, such as -i xfc00 instead of -i 64512). The two length
values must agree.
Alan Stern
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users