Bug 121105
Summary: | [patch] USB storage detected, but inaccessible | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Aleksey Nogin <aleksey> | ||||
Component: | kernel | Assignee: | Pete Zaitcev <zaitcev> | ||||
Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | wtogami, zaitcev | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
URL: | http://linux.bkbits.net:8080/linux-2.5/cset@4097a5f543zLiP03I-UHaBQxnuCsRQ | ||||||
Whiteboard: | |||||||
Fixed In Version: | 2.6.6-1.427 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2004-06-13 06:33:59 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Aleksey Nogin
2004-04-17 08:55:43 UTC
Has this worked with any previous kernel? I do not know as I have not used my camera for a few months. Please search LKML and Google, and perhaps ask on USB or camera oriented mailing lists to see if anybody else found a fix yet. It is unlikely Red Hat can look at this problem before FC2, but if you find the fix it is more likely it can be included. I tried searching and I just emailed linux-usb-users list. Have not found anything useful yet... How do I go about debugging this? I do not understand how it is possible that (according to /proc/scsi/usb-storage/0) usb-storage knows there is a USB storage device attached, does not propagate that to the SCSI subsystem (at least it does not make it to /proc/scsi/scsi) and still it does not print any error messages that would explain why it failed to do so? I have compiled 2.6.5-1.327 with CONFIG_USB_STORAGE_DEBUG enambled. Now when I plugged the camera I saw the following: usb 1-1.3: new full speed USB device using address 5 Initializing USB Mass Storage driver... usb-storage: USB Mass Storage device detected usb-storage: altsetting is 0, id_index is 112 usb-storage: -- associate_dev usb-storage: Transport: Control/Bulk/Interrupt usb-storage: Protocol: 8070i usb-storage: Endpoints: In: 0xdfc3c2c0 Out: 0xdfc3c2d4 Int: 0xdfc3c2e8 (Period 1) usb-storage: *** thread sleeping. scsi0 : SCSI emulation for USB Mass Storage devices usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Command INQUIRY (6 bytes) usb-storage: 12 00 00 00 24 00 usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=12 usb-storage: Status code 0; transferred 12/12 usb-storage: -- transfer complete usb-storage: Call to usb_stor_ctrl_transfer() returned 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: CBI data stage result is 0x0 usb-storage: usb_stor_intr_transfer: xfer 2 bytes usb-storage: Status code 0; transferred 2/2 usb-storage: -- transfer complete usb-storage: Got interrupt data (0x29, 0x0) usb-storage: CBI IRQ data showed reserved bType 0x29 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: -- transport indicates command failure usb-storage: Issuing auto-REQUEST_SENSE usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=12 usb-storage: Status code 0; transferred 12/12 usb-storage: -- transfer complete usb-storage: Call to usb_stor_ctrl_transfer() returned 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: CBI data stage result is 0x0 usb-storage: usb_stor_intr_transfer: xfer 2 bytes usb-storage: Status code 0; transferred 2/2 usb-storage: -- transfer complete usb-storage: Got interrupt data (0x0, 0x0) usb-storage: -- Result from auto-sense is 0 usb-storage: -- code: 0x70, key: 0x6, ASC: 0x29, ASCQ: 0x0 usb-storage: Unit Attention: Power on, reset, or bus device reset occurred usb-storage: scsi cmd done, result=0x2 usb-storage: *** thread sleeping. 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 Mass Storage device found at 5 usbcore: registered new driver usb-storage USB Mass Storage support registered. Does this help? Any hints what to try next? Thanks a lot! *** Partial success *** I have been successfull in making camera work, but _only_ when it is connected directly to the computer, not via a hub with other devices attached. My setup (which used to work under FC1) is a follows: I have an external hub connected to my laptop and I have a mouse, a printer and the camera is question connected to the hub. I have tried the following: 0) Using it w/o any changes to the kernel - both via hub and connecting directly. It did not work (see previous comments for details). 1) I added an entry to unusual_dev.h for the camera with the following: US_SC_DEVICE, US_PR_CB, NULL, 0 and connecting the camera via the hub. After that the camera would be recognized fine, but once I have coipied about 300KB of data off of it, the whole USB hub would go "crazy", the copying would get stuck, then it would think that _all_ the devices (mouse, etc) somehow disappeared, then it would start crashing. 2) I tried using US_PR_BULK instead of CB - the device would not be recognized by SCSI (with somewhat different messages than in 0). 3) I tried using US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY but still connecting via the hub. The results were pretty much the same as in case 1. 4) I tried using the same line as in 3, but this time connection directly (and not plugging any other USB devices). This time it worked perfectly! P.S. While it is still far from working correctly, I do have a workaround that sort of works for me. I would be happy to participate in debugging it further, but this is as far as I am willing to experiment on my own without any help from somebody more knowledgeable than I am. The relevant usb-linux-devel thread is at http://marc.theaimsgroup.com/?t=108248734000003&r=1&w=2 Created attachment 99611 [details]
Patch to scsi_scan that solves this problem
Alan Stern (stern at rowland.harvard.edu) figured out how to solve this problem
- patch attached. The camera still only works correctly when attached directly
and gets stuck when attached via a hub, but that appears to be a separate
problem.
okay, now convince upstream to include this patch in vanilla. Dharm is still the key person, even if Stern drops the ball either Alexey or I should keep on it. Don't close the bug until this recirculates through upstream and returns. The bitkeeper URL for this fix is http://linux.bkbits.net:8080/linux-2.5/cset@4097a5f543zLiP03I-UHaBQxnuCsRQ This patch is included in 2.6.6-1.427. |