First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 191431
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: Ortwin Glueck <odi@odi.ch>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
nikon-d40.patch patch against 2.6.23-rc5 patch Ortwin Glueck 2007-09-05 20:44 0000 633 bytes Details | Diff
nikon-d40-2.6.22.patch Patch against 2.6.22.y patch Ortwin Glueck 2007-09-05 20:45 0000 687 bytes Details | Diff
nikon-d40x.patch D40X patch against 2.6.23 patch Ortwin Glueck 2007-10-11 15:24 0000 642 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 191431 depends on: Show dependency tree
Bug 191431 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: 2007-09-05 20:11 0000
After upgrading to udev-144 I could not mount my Nikon D40 camera as a USB
storage device any more. Turns out the device doesn't like it when one accesses
its last sector (or past last sector) and stops working from that moment on.
Subsequent reads will return IO errors. The problem is caused by RAID scans of
vol_id as RAID disks store a special block in their last sector. As it makes no
sense to scan for RAID on a camera, I just added --skip-raid to all vol_id
calls in /etc/udev/rules.d/. Then it worked.

There should be a way to disable the RAID checks per device, or globally or
some other way.  

Reproducible: Always

Steps to Reproduce:
1. Use udev-144
2. Plug in a NIKON camera
Actual Results:  
Sep  5 21:24:30 mithril scsi 4:0:0:0: Direct-Access     NIKON    D40           
  1.10 PQ: 0 ANSI: 2
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] 3970049 512-byte hardware sectors
(2033 MB)
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] Write Protect is off
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] Mode Sense: 0f 00 00 00
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] Assuming drive cache: write through
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] 3970049 512-byte hardware sectors
(2033 MB)
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] Write Protect is off
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] Mode Sense: 0f 00 00 00
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] Assuming drive cache: write through
Sep  5 21:24:30 mithril sdb: sdb1
Sep  5 21:24:30 mithril sd 4:0:0:0: [sdb] Attached SCSI removable disk
Sep  5 21:24:30 mithril sd 4:0:0:0: Attached scsi generic sg2 type 0
Sep  5 21:24:30 mithril usb-storage: device scan complete
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 3970048
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 3970048
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 3970048
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 3970048
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 3970048
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 3970048
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 3970048
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 3970048
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 3970048
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 3970048
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 3970048
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 3970048
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 3970048
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 3970048
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 40
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 40
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 41
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 41
Sep  5 21:24:30 mithril Buffer I/O error on device sdb, logical block 42
Sep  5 21:24:30 mithril end_request: I/O error, dev sdb, sector 40


Expected Results:  
Sep  5 21:55:21 mithril scsi 11:0:0:0: Direct-Access     NIKON    D40          
   1.10 PQ: 0 ANSI: 2
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] 3970049 512-byte hardware sectors
(2033 MB)
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] Write Protect is off
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] Mode Sense: 0f 00 00 00
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] Assuming drive cache: write through
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] 3970049 512-byte hardware sectors
(2033 MB)
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] Write Protect is off
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] Mode Sense: 0f 00 00 00
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] Assuming drive cache: write through
Sep  5 21:55:21 mithril sdb: sdb1
Sep  5 21:55:21 mithril sd 11:0:0:0: [sdb] Attached SCSI removable disk
Sep  5 21:55:21 mithril sd 11:0:0:0: Attached scsi generic sg2 type 0
Sep  5 21:55:21 mithril usb-storage: device scan complete
Sep  5 21:55:28 mithril hald: mounted /dev/sdb1 on behalf of uid 1000

------- Comment #1 From Jakub Moc (RETIRED) 2007-09-05 20:15:42 0000 -------
kernel is broken, not udev. Bug 185517, Bug 186326, Bug 188521 and we'll
probably a special one for every single type out there.

------- Comment #2 From Maarten Bressers 2007-09-05 20:42:49 0000 -------
Can you please attach the output of:

cat /proc/bus/usb/devices

with your Nikon D40 plugged in? Thanks.

------- Comment #3 From Ortwin Glueck 2007-09-05 20:44:34 0000 -------
Created an attachment (id=130114) [details]
patch against 2.6.23-rc5

You are right. The attached patch fixes the problem.

------- Comment #4 From Ortwin Glueck 2007-09-05 20:45:48 0000 -------
Created an attachment (id=130115) [details]
Patch against 2.6.22.y

------- Comment #5 From Ortwin Glueck 2007-09-05 20:47:16 0000 -------
from cat /proc/bus/usb/devices:

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=0413 Rev= 1.10
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D40
S:  SerialNumber=6149394
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

------- Comment #6 From Mike Pagano 2007-09-05 21:38:18 0000 -------
Ortwin,

Will you be submitting this upstream, or do you want us to do it on your
behalf?

------- Comment #7 From Ortwin Glueck 2007-09-05 21:56:46 0000 -------
Mike, I have submitted the patch to linux-usb-devel@lists.sourceforge.net with
a subject line "[PATCH] Nikon D40 Quirks" a couple of minutes ago.

------- Comment #8 From Ortwin Glueck 2007-09-13 23:15:22 0000 -------
Patch has been committed to mainline:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9374b9fd6cef7f8b75a543d044c5b0925aae08cd

Will be in 2.6.23

------- Comment #9 From Mike Pagano 2007-09-14 01:29:08 0000 -------
Reopened in anticipation of this patch eventually getting into genpatches for
2.6.22

Bug will be closed once the gentoo-sources revision containing the patch is
released.

------- Comment #10 From Daniel Drake 2007-09-22 14:08:10 0000 -------
fixed in genpatches-2.6.22-8 / gentoo-sources-2.6.22-r7

------- Comment #11 From Shan Destromp 2007-10-09 02:46:53 0000 -------
(In reply to comment #10)
> fixed in genpatches-2.6.22-8 / gentoo-sources-2.6.22-r7
> 

Could the bug maintainer get the following added to unusual_devs.h as well, it
adds in support for the newer D40X with 1.00 firmware revs

UNUSUAL_DEV(  0x04b0, 0x0417, 0x0100, 0x0100,
                "NIKON",
                "NIKON DSC D40X",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),

I've been fighting for the past few weeks to get my new camera working and
couldn't for the life of me figure out why adding an "X" to the model
descriptor of the entry for the standard D40 until I realized the last two hex
codes were revision markers.

As of today (2007.10.08) on vanilla-sources 2.6.23-rc9 this works fine.

ryn ~ # lsusb -v -s 001:005

Bus 001 Device 005: ID 04b0:0417 Nikon Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x04b0 Nikon Corp.
  idProduct          0x0417
  bcdDevice            1.00
  iManufacturer           1 NIKON
  iProduct                2 NIKON DSC D40X
  iSerial                 3 3161862
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

------- Comment #12 From Mike Pagano 2007-10-09 11:59:43 0000 -------
Shan,

Please post the output of:

cat /proc/bus/usb/devices

with your Nikon D40X plugged in.

------- Comment #13 From Mike Pagano 2007-10-09 12:00:23 0000 -------
Reopened and waiting for user response. Sorry for bugspam.

------- Comment #14 From Ortwin Glueck 2007-10-11 15:24:39 0000 -------
Created an attachment (id=133142) [details]
D40X patch against 2.6.23

Patch to submit upstream

------- Comment #15 From Ortwin Glueck 2007-10-11 16:04:12 0000 -------
Submitted upstream:

http://marc.info/?l=linux-usb-devel&m=119211659617632&w=2

------- Comment #16 From Greg Kroah-Hartman 2007-10-11 16:06:55 0000 -------
Already checked into the usb git kernel tree and will show up in the 2.6.24
release.  I can add this to the .23 stable if needed.

------- Comment #17 From Mike Pagano 2007-10-24 23:32:39 0000 -------
Patched commited to genpatches for 2.6.22 and 2.6.23 so they will be in the
next patch released for both versions when that occurs.

Bug will be closed once the gentoo-sources revision containing the patch is
released.

------- Comment #18 From Mike Pagano 2007-11-02 17:27:50 0000 -------
Please note that genpatches-2.6.23-2 has been released with this patch
included, gentoo-sources-2.6.23-r1 is using it.

------- Comment #19 From Daniel Drake 2007-11-07 13:17:16 0000 -------
also fixed in gentoo-sources-2.6.22-r10

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