On Mon, 30 Jun 2003 [EMAIL PROTECTED] wrote:

> Alan,
> thank you *.debug works and *.* doesnt.
> Here are the debug messages from kernel 2.4.21:
> 
> 1. bootmessages regarding usb:

Boot messages are fine.

> 2. Now I connect the device:

That's also fine.

> 3. Now I mount the device and get the message "Device not ready. Make sure
> there is a disc in the drive." but it works.
> ----------------------
> Jun 30 20:50:25 debian kernel: usb-storage: queuecommand() called
> Jun 30 20:50:25 debian kernel: usb-storage: *** thread awakened.
> Jun 30 20:50:25 debian kernel: usb-storage: Command TEST_UNIT_READY (6
> bytes)
> Jun 30 20:50:25 debian kernel: usb-storage: 00 00 00 00 00 00 11 da 00 5e e4
> db
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk command S 0x43425355 T 0x7
> Trg 0 LUN 0 L 0 F 0 CL 6
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk command transfer result=0
> Jun 30 20:50:25 debian kernel: usb-storage: Attempting to get CSW...
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk status result = 0
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk status Sig 0x53425355 T 0x7
> R 0 Stat 0x0
> Jun 30 20:50:25 debian kernel: usb-storage: scsi cmd done, result=0x0
> Jun 30 20:50:25 debian kernel: usb-storage: *** thread sleeping.

Okay.  That TEST-UNIT-READY command got a Status of 0, meaning the device
really is okay.

The next command is ALLOW-MEDIUM-REMOVAL.  In this case it's actually
"disallow"; the system is trying to prevent you from removing the card 
during the time that it's mounted.  On a CD-ROM drive, for example, this 
would cause the drive to lock the door so you couldn't open it.

> Jun 30 20:50:25 debian kernel: usb-storage: queuecommand() called
> Jun 30 20:50:25 debian kernel: usb-storage: *** thread awakened.
> Jun 30 20:50:25 debian kernel: usb-storage: Command ALLOW_MEDIUM_REMOVAL (6
> bytes)
> Jun 30 20:50:25 debian kernel: usb-storage: 1e 00 00 00 01 00 27 c0 46 c3 13
> c0
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk command S 0x43425355 T 0x8
> Trg 0 LUN 0 L 0 F 0 CL 6
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk command transfer result=0
> Jun 30 20:50:25 debian kernel: usb-storage: Attempting to get CSW...
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk status result = 0
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk status Sig 0x53425355 T 0x8
> R 0 Stat 0x1
> Jun 30 20:50:25 debian kernel: usb-storage: -- transport indicates command
> failure

The Status code indicates that your drive didn't like the 
ALLOW-MEDIUM-REMOVAL command, probably because there's no way for it to 
lock any sort of door or do anything else.

> Jun 30 20:50:25 debian kernel: usb-storage: Issuing auto-REQUEST_SENSE
> Jun 30 20:50:25 debian kernel: usb-storage: Bulk command S 0x43425355 T 0x9
> Trg 0 LUN 0 L 18 F 128 CL 6
> Jun 30 20:50:26 debian kernel: usb-storage: Bulk command transfer result=0
> Jun 30 20:50:26 debian kernel: usb-storage: usb_stor_transfer_partial():
> xfer 18 bytes
> Jun 30 20:50:26 debian kernel: usb-storage: usb_stor_bulk_msg() returned 0
> xferred 18/18
> Jun 30 20:50:26 debian kernel: usb-storage: usb_stor_transfer_partial():
> transfer complete
> Jun 30 20:50:26 debian kernel: usb-storage: Bulk data transfer result 0x0
> Jun 30 20:50:26 debian kernel: usb-storage: Attempting to get CSW...
> Jun 30 20:50:26 debian kernel: usb-storage: Bulk status result = 0
> Jun 30 20:50:26 debian kernel: usb-storage: Bulk status Sig 0x53425355 T 0x9
> R 0 Stat 0x0
> Jun 30 20:50:26 debian kernel: usb-storage: -- Result from auto-sense is 0
> Jun 30 20:50:26 debian kernel: usb-storage: -- code: 0x70, key: 0x2, ASC:
> 0x0, ASCQ: 0x0
> Jun 30 20:50:26 debian kernel: usb-storage: Not Ready: no additional sense
> information

When usb-storage asked your drive why it didn't like that command, the
drive replied with key=2, meaning "Not Ready", and with no other details
to explain why not.

> Jun 30 20:50:26 debian kernel: usb-storage: scsi cmd done, result=0x2
> Jun 30 20:50:26 debian kernel: usb-storage: *** thread sleeping.
> Jun 30 20:50:26 debian kernel: Device not ready.  Make sure there is a disc
> in the drive.

Seeing that "Not Ready" reply, the SCSI driver naturally produces this log 
message.

Reading/writing all seemed to work okay.

> 4. Now I umount the device:
> ------------------------
> Jun 30 20:51:33 debian kernel: usb-storage: queuecommand() called
> Jun 30 20:51:33 debian kernel: usb-storage: *** thread awakened.
> Jun 30 20:51:33 debian kernel: usb-storage: Command ALLOW_MEDIUM_REMOVAL (6
> bytes)
> Jun 30 20:51:33 debian kernel: usb-storage: 1e 00 00 00 00 00 12 c0 00 00 00
> 00
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk command S 0x43425355 T 0x2c
> Trg 0 LUN 0 L 0 F 0 CL 6
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk command transfer result=0
> Jun 30 20:51:33 debian kernel: usb-storage: Attempting to get CSW...
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk status result = 0
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk status Sig 0x53425355 T
> 0x2c R 0 Stat 0x1
> Jun 30 20:51:33 debian kernel: usb-storage: -- transport indicates command
> failure

The same thing happened again.  This time the system is trying to tell
your drive to allow you to remove the medium, by unlocking a door for
example.  Again, your drive didn't like the command.

> Jun 30 20:51:33 debian kernel: usb-storage: Issuing auto-REQUEST_SENSE
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk command S 0x43425355 T 0x2d
> Trg 0 LUN 0 L 18 F 128 CL 6
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk command transfer result=0
> Jun 30 20:51:33 debian kernel: usb-storage: usb_stor_transfer_partial():
> xfer 18 bytes
> Jun 30 20:51:33 debian kernel: usb-storage: usb_stor_bulk_msg() returned 0
> xferred 18/18
> Jun 30 20:51:33 debian kernel: usb-storage: usb_stor_transfer_partial():
> transfer complete
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk data transfer result 0x0
> Jun 30 20:51:33 debian kernel: usb-storage: Attempting to get CSW...
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk status result = 0
> Jun 30 20:51:33 debian kernel: usb-storage: Bulk status Sig 0x53425355 T
> 0x2d R 0 Stat 0x0
> Jun 30 20:51:33 debian kernel: usb-storage: -- Result from auto-sense is 0
> Jun 30 20:51:33 debian kernel: usb-storage: -- code: 0x70, key: 0x2, ASC:
> 0x0, ASCQ: 0x0
> Jun 30 20:51:33 debian kernel: usb-storage: Not Ready: no additional sense
> information

Again, the only status information your drive supplied was "Not Ready".

> Jun 30 20:51:33 debian kernel: usb-storage: scsi cmd done, result=0x2
> Jun 30 20:51:34 debian kernel: usb-storage: *** thread sleeping.
> Jun 30 20:51:34 debian kernel: Device not ready.  Make sure there is a disc
> in the drive.

So again, naturally you get this warning message in the log.

> Alan, what do you think?

Ultimately the fault lies with your drive.  Instead of just reporting "Not 
Ready", it should provide a code that indicates it really is ready but is 
unable to carry out the ALLOW-MEDIUM-REMOVAL command.

However, it's harmless because everything else still works correctly.  My 
advice is just go ahead and ignore those warning messages, since you know 
that it really is working okay.

Alan Stern



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to