Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87922 - Error after inserting USB mass storage divice usb-storage: Bad target number (1:0)
Summary: Error after inserting USB mass storage divice usb-storage: Bad target number ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-04 09:12 UTC by Zak Peirce
Modified: 2005-04-05 12:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zak Peirce 2005-04-04 09:12:48 UTC
When i insert my  Genesys Logic, Inc. SIIG US2256 CompactFlash Card Reader dmesg gives errors and i cannot mount it.

Here is my kernel config

Code:


SCSI device support  --->
 [*]   legacy /proc/scsi/ suppor
---   SCSI support type (disk, tape, CD-ROM)
<*>   SCSI disk support
<*>   SCSI generic support


Code:

USB support  --->
---   Miscellaneous USB options
[*]   USB device filesystem     
<*> EHCI HCD (USB 2.0) support
<*> UHCI HCD (most Intel and VIA) support
--- NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also
<*> USB Mass Storage support
[*]   USB Mass Storage verbose debug
--- USB Input Devices
<*> USB Human Interface Device (full HID) support
[*]   HID input layer support


Code:

MMC/SD Card support  --->
<*> MMC support
[*]   MMC debugging
<*>   MMC block device driver
<M>   Winbond W83L51xD SD/MMC Card Interface support



Here is dmesg any help would be appreciated.

Code:

usb 3-1: new full speed USB device using uhci_hcd and address 3
usb-storage: USB Mass Storage device detected
usb-storage: -- associate_dev
usb-storage: Vendor: 0x05e3, Product: 0x0700, Revision: 0x0113
usb-storage: Interface Subclass: 0x06, Protocol: 0x50
usb-storage: Vendor: Unknown,  Product: USB Storage Device
usb-storage: Transport: Bulk
usb-storage: Protocol: Transparent SCSI
usb-storage: usb_stor_control_msg: rq=fe rqtype=a1 value=0000 index=00 len=1
usb-storage: GetMaxLUN command result is -32, data is 85
usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
usb-storage: usb_stor_clear_halt: result = 0
usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=02 len=0
usb-storage: usb_stor_clear_halt: result = 0
usb-storage: *** thread sleeping.
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3usb-storage: waiting for device to settle before scanning
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command INQUIRY (6 bytes)
usb-storage:  12 00 00 00 24 00
usb-storage: Bulk Command S 0x43425355 T 0x4c L 36 F 128 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_buf: xfer 36 bytes
usb-storage: Status code 0; transferred 36/36
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x4c R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
  Vendor: Generic   Model: STORAGE DEVICE    Rev: 0.01
  Type:   Direct-Access                      ANSI SCSI revision: 00
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage:  00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x4d L 0 F 0 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x4d R 0 Stat 0x1
usb-storage: -- transport indicates command failure
usb-storage: Issuing auto-REQUEST_SENSE
usb-storage: Bulk Command S 0x43425355 T 0x8000004d L 18 F 128 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes
usb-storage: Status code 0; transferred 18/18
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x8000004d R 0 Stat 0x0
usb-storage: -- Result from auto-sense is 0
usb-storage: -- code: 0x70, key: 0x2, ASC: 0x3a, ASCQ: 0x0
usb-storage: (Unknown Key): (unknown ASC/ASCQ)
usb-storage: scsi cmd done, result=0x2
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage:  00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x4e L 0 F 0 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x4e R 0 Stat 0x1
usb-storage: -- transport indicates command failure
usb-storage: Issuing auto-REQUEST_SENSE
usb-storage: Bulk Command S 0x43425355 T 0x8000004e L 18 F 128 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes
usb-storage: Status code 0; transferred 18/18
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x8000004e R 0 Stat 0x0
usb-storage: -- Result from auto-sense is 0
usb-storage: -- code: 0x70, key: 0x2, ASC: 0x3a, ASCQ: 0x0
usb-storage: (Unknown Key): (unknown ASC/ASCQ)
usb-storage: scsi cmd done, result=0x2
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage:  00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x4f L 0 F 0 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x4f R 0 Stat 0x1
usb-storage: -- transport indicates command failure
usb-storage: Issuing auto-REQUEST_SENSE
usb-storage: Bulk Command S 0x43425355 T 0x8000004f L 18 F 128 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes
usb-storage: Status code 0; transferred 18/18
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x8000004f R 0 Stat 0x0
usb-storage: -- Result from auto-sense is 0
usb-storage: -- code: 0x70, key: 0x2, ASC: 0x3a, ASCQ: 0x0
usb-storage: (Unknown Key): (unknown ASC/ASCQ)
usb-storage: scsi cmd done, result=0x2
usb-storage: *** thread sleeping.
Attached scsi removable disk sda at scsi3, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi3, channel 0, id 0, lun 0,  type 0
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (1:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (2:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (3:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (4:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (5:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (6:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (7:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: device scan complete
bash-2.05b$ 

Reproducible: Always
Steps to Reproduce:
1.Plug in the Genesys Logic, Inc. SIIG US2256 CompactFlash Card Reader
2.Look at Dmesg
3.

Actual Results:  
Errors in dmesg then there is an inability to mount the CF drive

Expected Results:  
No Errors in dmesg and able to mount the CF reader
Comment 1 junkmail 2005-04-04 16:42:23 UTC
I have a Genesys Logic Inc USB multi-functional card reader. If the device is attached at startup with a SecureDigital memory card inserted, the device is recognised and assigned to /dev/sda1. This can be mounted as normal by a user according to the rules I setup in /etc/fstab.

However, if at startup, the device is inserted into a USB port, and there is no card in the reader, then the device does not become assigned to /dev/sda1, even when a memory card is inserted. If (as root) I attempt to mount /dev/sda using the following code:

mount -t vfat /dev/sda /mnt/usb

this generates an error (as expected), but /dev/sda1 then magically appears, and can be mounted by any user. Alternatively, physically disconnecting the device by unplugging the USB cable, and then re-connecting also allows a normal mount process to occur, as long as a memory card is in the device when it is attached.

In summary, I can only mount the device if a memory card is inserted *before* it is attached to the PC, unless I first attempt to mount /dev/sda as root.

I am using kernel 2.6.11-gentoo-r4, with hotplug and coldplug installed on a Pentium III 700MHz PC.
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2005-04-05 12:01:34 UTC
junkmail@hesketh-family.co.uk: Please don't pollute bugs with unrelated problems. But if you do some research, you'll find that these cheap usb devices don't inform the host of media change, if you want it automatically then you need to set up some software which polls for it. You'll also notice that *any* activity on /dev/sda, even a simple "touch", will force it to re-read the media status and partition table. So this is not a bug.

Zak: Just to confirm, you definately do have media inserted right? You also neglected to post the "emerge info" output despite the input form asking you to. Which is the last good kernel which worked?
Comment 3 Zak Peirce 2005-04-05 12:50:06 UTC
Daniel,

Thank you for your reply I noticed after the comments by junkmail@hesketh-family.co.uk that if i boot up with the drive in i do not get the same error.  I also noticed after more research that in dmesg it does say sda so if i do a cfdisk /dev/sda then i see that the actual file system is /dev/sda1 and i am able to mount that.

I am sorry that i wasted your time on this and it is now working.

Thank you for investigating.
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2005-04-05 12:59:17 UTC
OK, I didn't think that this was the same bug for both people, sorry about my last comment!

To explain a bit further, once you have inserted, removed, or replaced a card, simply run:
   touch /dev/sda

before trying to mount /dev/sda1 or whichever partition you want.

Many of these automounting tools (e.g. HAL+gnome-volume-manager+udev) automatically poll the /dev/sda node so things like this become transparent to the user.