usb-storage failure with 1.5TB drive and CONFIG_LBD=y

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I figured I'd post this just in case someone has a patch for this
already.  I'll starting looking at usb-storage as soon as I'm done with
this mail.

Willy, I don't think this is a SCSI issue, but you were hacking on this
read_capacity() stuff so I figured I'd cc you in case you had some
insight.

I think what I'm seeing is sign extension *somewhere* of
scsi_disk->capacity.  I added a printk() in read_capacity():

[  464.703347] sd 5:0:0:0: Attached scsi generic sg2 type 0
[  475.468176] sd 5:0:0:0: [sdb] read_capacity_10() sector size: 0x200/512
[  475.468180] sd 5:0:0:0: [sdb] capacity (in 512-byte blocks: ffffffffaea87b30
[  475.468188] sd 5:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).

read_capacity_10() looks OK (it's about 1.5*10^12/512), except it is
sign extended.  I'm only seeing it though because I managed to set
CONFIG_LBD=y.  Without that, I'm don't think we'd be seeing the sign
extension or this issue. 

.config:
http://www.sr71.net/~dave/linux/config-04-21-2009
$ git describe
v2.6.30-rc2

More complete dmesg:

Apr 21 10:31:47 nimitz kernel: [ 1620.103238] usb 1-4.3.3: new high speed USB device using ehci_hcd and address 17
Apr 21 10:31:47 nimitz kernel: [ 1620.209898] usb 1-4.3.3: configuration #1 chosen from 1 choice
Apr 21 10:31:47 nimitz kernel: [ 1620.215071] scsi7 : SCSI emulation for USB Mass Storage devices
Apr 21 10:31:47 nimitz kernel: [ 1620.215380] usb-storage: device found at 17
Apr 21 10:31:47 nimitz kernel: [ 1620.215382] usb-storage: waiting for device to settle before scanning
Apr 21 10:31:52 nimitz kernel: [ 1625.216253] usb-storage: device scan complete
Apr 21 10:31:52 nimitz kernel: [ 1625.217860] scsi 7:0:0:0: Direct-Access     Seagate  FreeAgent        102D PQ: 0 ANSI: 4
Apr 21 10:31:52 nimitz kernel: [ 1625.220288] sd 7:0:0:0: Attached scsi generic sg3 type 0
Apr 21 10:32:01 nimitz kernel: [ 1634.315203] sd 7:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
Apr 21 10:32:01 nimitz kernel: [ 1634.319130] sd 7:0:0:0: [sdc] Using 0xffffffff as device size
Apr 21 10:32:01 nimitz kernel: [ 1634.319137] sd 7:0:0:0: [sdc] 4294967296 512-byte hardware sectors: (2.19 TB/2.00 TiB)
Apr 21 10:32:01 nimitz kernel: [ 1634.320485] sd 7:0:0:0: [sdc] Write Protect is off
Apr 21 10:32:01 nimitz kernel: [ 1634.320488] sd 7:0:0:0: [sdc] Mode Sense: 1c 00 00 00
Apr 21 10:32:01 nimitz kernel: [ 1634.320490] sd 7:0:0:0: [sdc] Assuming drive cache: write through
Apr 21 10:32:01 nimitz kernel: [ 1634.334843] sd 7:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
Apr 21 10:32:01 nimitz kernel: [ 1634.338611] sd 7:0:0:0: [sdc] Using 0xffffffff as device size
Apr 21 10:32:01 nimitz kernel: [ 1634.339978] sd 7:0:0:0: [sdc] Assuming drive cache: write through
Apr 21 10:32:01 nimitz kernel: [ 1634.352191]  sdc: sdc1
Apr 21 10:32:01 nimitz kernel: [ 1634.362546] sd 7:0:0:0: [sdc] Attached SCSI disk
Apr 21 10:32:01 nimitz kernel: [ 1634.495212] sd 7:0:0:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 21 10:32:01 nimitz kernel: [ 1634.495219] sd 7:0:0:0: [sdc] Sense Key : Aborted Command [current] 
Apr 21 10:32:01 nimitz kernel: [ 1634.495225] sd 7:0:0:0: [sdc] Add. Sense: No additional sense information
Apr 21 10:32:01 nimitz kernel: [ 1634.495230] end_request: I/O error, dev sdc, sector 4294967168
Apr 21 10:32:01 nimitz kernel: [ 1634.506933] __ratelimit: 6 callbacks suppressed
Apr 21 10:32:01 nimitz kernel: [ 1634.506937] Buffer I/O error on device sdc, logical block 536870896
Apr 21 10:32:01 nimitz kernel: [ 1634.542837] sd 7:0:0:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 21 10:32:01 nimitz kernel: [ 1634.542844] sd 7:0:0:0: [sdc] Sense Key : Aborted Command [current] 
Apr 21 10:32:01 nimitz kernel: [ 1634.542859] sd 7:0:0:0: [sdc] Add. Sense: No additional sense information
Apr 21 10:32:01 nimitz kernel: [ 1634.542864] end_request: I/O error, dev sdc, sector 4294967168
Apr 21 10:32:02 nimitz kernel: [ 1634.554575] Buffer I/O error on device sdc, logical block 536870896
Apr 21 10:32:02 nimitz kernel: [ 1634.590460] sd 7:0:0:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 21 10:32:02 nimitz kernel: [ 1634.590468] sd 7:0:0:0: [sdc] Sense Key : Aborted Command [current] 
Apr 21 10:32:02 nimitz kernel: [ 1634.590477] sd 7:0:0:0: [sdc] Add. Sense: No additional sense information
Apr 21 10:32:02 nimitz kernel: [ 1634.590485] end_request: I/O error, dev sdc, sector 4294967280
Apr 21 10:32:02 nimitz kernel: [ 1634.602185] Buffer I/O error on device sdc, logical block 536870910
Apr 21 10:32:02 nimitz kernel: [ 1634.638475] sd 7:0:0:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 21 10:32:02 nimitz kernel: [ 1634.638483] sd 7:0:0:0: [sdc] Sense Key : Aborted Command [current] 
Apr 21 10:32:02 nimitz kernel: [ 1634.638490] sd 7:0:0:0: [sdc] Add. Sense: No additional sense information
Apr 21 10:32:02 nimitz kernel: [ 1634.638499] end_request: I/O error, dev sdc, sector 4294967280
...


-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux