First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 250406
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jaak Ristioja <Ristioja@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
lsusb-pentax lsusb output for the camera text/plain Jaak Ristioja 2008-12-09 15:56 0000 2.57 KB Details
kernel-config kernel configuration text/plain Jaak Ristioja 2008-12-09 15:58 0000 51.69 KB Details
dmesg2 kernel (debug) messages text/plain Jaak Ristioja 2008-12-10 11:24 0000 40.98 KB Details
pentax.patch possible fix patch Daniel Drake 2008-12-10 13:26 0000 999 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 250406 depends on: Show dependency tree
Bug 250406 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-12-09 15:55 0000
Here are the latest kernel messages:

usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi scan: INQUIRY result too short (5), using 36
scsi 4:0:0:0: Direct-Access     PENTAX   DIGITAL_CAMERA   1.00 PQ: 0 ANSI: 0
sd 4:0:0:0: [sdc] 3985409 512-byte hardware sectors (2041 MB)
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 0a 0a 00 01
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 4:0:0:0: [sdc] 3985409 512-byte hardware sectors (2041 MB)
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 0a 0a 00 01
sd 4:0:0:0: [sdc] Assuming drive cache: write through
 sdc: sdc1
sd 4:0:0:0: [sdc] Attached SCSI removable disk
sd 4:0:0:0: Attached scsi generic sg2 type 0
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4

However, no /dev/sdc exists for this what I think should be a mass storage
device. I'm using sys-fs/udev-124-r1 and sys-kernel/gentoo-sources-2.6.27-r5.

------- Comment #1 From Jaak Ristioja 2008-12-09 15:56:41 0000 -------
Created an attachment (id=174734) [details]
lsusb output for the camera

------- Comment #2 From Jaak Ristioja 2008-12-09 15:58:21 0000 -------
Created an attachment (id=174737) [details]
kernel configuration

------- Comment #3 From Jaak Ristioja 2008-12-09 16:20:52 0000 -------
In addition to the kernel messages above, the following kernel messages had
also appeared before I shut down the camera in the end:

usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
sd 4:0:0:0: [sdc] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK,SUGGEST_OK
end_request: I/O error, dev sdc, sector 3985408
Buffer I/O error on device sdc, logical block 3985408
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
sd 4:0:0:0: [sdc] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK,SUGGEST_OK
end_request: I/O error, dev sdc, sector 3985408
Buffer I/O error on device sdc, logical block 3985408
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
sd 4:0:0:0: [sdc] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK,SUGGEST_OK
end_request: I/O error, dev sdc, sector 3985408
Buffer I/O error on device sdc, logical block 3985408
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
sd 4:0:0:0: [sdc] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK,SUGGEST_OK
end_request: I/O error, dev sdc, sector 3985408
Buffer I/O error on device sdc, logical block 3985408
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: reset full speed USB device using uhci_hcd and address 4
usb 2-1: USB disconnect, address 4
scsi 4:0:0:0: [sdc] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK
end_request: I/O error, dev sdc, sector 3985408
Buffer I/O error on device sdc, logical block 3985408
scsi 4:0:0:0: [sdc] Result: hostbyte=DID_NO_CONNECT
driverbyte=DRIVER_OK,SUGGEST_OK
end_request: I/O error, dev sdc, sector 735
Buffer I/O error on device sdc1, logical block 488
Buffer I/O error on device sdc1, logical block 489
Buffer I/O error on device sdc1, logical block 490
Buffer I/O error on device sdc1, logical block 491
Buffer I/O error on device sdc1, logical block 492
Buffer I/O error on device sdc1, logical block 493
Buffer I/O error on device sdc1, logical block 494
Buffer I/O error on device sdc1, logical block 495
Buffer I/O error on device sdc1, logical block 496
scsi 4:0:0:0: rejecting I/O to dead device

PS: The device shows no problems on Windows XP, although I don't know whether
that specific windows installation had any Pentax drivers installed (if such
drivers exist at all).

------- Comment #4 From Panagiotis Christopoulos 2008-12-10 10:21:00 0000 -------
I don't believe that this has something to do with our gentoo-sources or udev.
Probably, your usb physical connection(cable, connectors etc.) is problematic.
Try to CONFIG_USB_DEBUG=y and CONFIG_USB_STORAGE_DEBUG=y in order to see some
more verbose messages about what really happens. Maybe you need to enable
CONFIG_USB_<something> or CONFIG_USB_STORAGE_<something>. I don't want to
assign any bug to the kernel team before we 're sure that this isn't a
misconfiguration or something of your side(cables etc.). Reply here when you're
sure that it's a bug in udev or gentoo-sources. 

------- Comment #5 From Jaak Ristioja 2008-12-10 11:24:53 0000 -------
Created an attachment (id=174848) [details]
kernel (debug) messages

Ok, I recompiled the kernel with USB and USB mass storage verbose debug
messages. Here are all kernel messages that I think might be related to this
case. This is what I changed in the kernel configuration just in case. I'm
quite certain the other USB options presented by the kernels xconfig are
irrelevant.

CONFIG_USB_DEBUG=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_LD=y

According to drivers/usb/storage/unusual_devs.h, some Pentax Cameras have also
been found not strictly follow the USB mass storage specifications. Perhaps
that's the case?

------- Comment #6 From Panagiotis Christopoulos 2008-12-10 13:09:42 0000 -------
I still don't believe that this is gentoo specific. Probably you would
experience the same problem with vanilla-sources. But I'm not a kernel expert,
so I will let the proper team to reply. Assigned to kernel team.

------- Comment #7 From Daniel Drake 2008-12-10 13:26:02 0000 -------
Created an attachment (id=174857) [details]
possible fix

Thanks for the detailed debugging logs - helps us get straight to the problem.
Your device is crashing when Linux tries to access the very final sector. This
is a common problem where the device doesn't follow the SCSI specs -- it is
supposed to report the address of the final sector, but it instead reports the
number of sectors on the device (which is 1 higher, because sectors start at
0).

This patch should fix it, please give it a go.

------- Comment #8 From Daniel Drake 2008-12-10 13:28:26 0000 -------
Please also post the /proc/bus/usb/devices entry for your device (you have
already posted equivalent info, but this is the form that kernel developers
prefer to see included in the patch description)

------- Comment #9 From Jaak Ristioja 2008-12-10 19:04:38 0000 -------
The patch works like a charm. Thanks! =)

Here's the entry from /proc/bus/usb/devices:

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0a17 ProdID=006e Rev= 1.00
S:  Manufacturer=PENTAX Corporation
S:  Product=K10D
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=100ms

------- Comment #10 From Daniel Drake 2008-12-12 12:25:18 0000 -------
Patch was acked by upstream, so I've included it for the next 2.6.26/2.6.27
releases

------- Comment #11 From Daniel Drake 2008-12-14 18:16:14 0000 -------
Fixed in gentoo-sources-2.6.27-r6, closing this bug now as I don't think we'll
do more 2.6.26 releases. (but if we do, this patch will be in there)

First Last Prev Next    No search results available      Search page      Enter new bug