Bug: usb-storage module

From: Patrick Finnegan (pat@purdueriots.com)
Date: Sun Feb 16 2003 - 20:07:43 EST


[1.] One line summary of the problem:
  Failure to 'read' from USB Storage Device

[2.] Full description of the problem/report:
  The kernel gives several I/O errors when my (Sony CyberShot DSC-P30) is
connected to my computer. This did not happen with earlier kernels,
including 2.4.x kernels and kernel 2.5.47.

[3.] Keywords (i.e., modules, networking, kernel):
  USB SCSI usb-storage

[4.] Kernel version (from /proc/version):
Linux version 2.5.61 (root@dualie) (gcc version 3.2.3 20030210 (Debian
prerelease)) #1 SMP Sun Feb 16 11:20:54 EST 2003

[5.] Output of Oops.. message (if applicable) with symbolic information
     resolved (see Documentation/oops-tracing.txt)

hub 1-0:0: new USB device on port 2, assigned address 4
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Sony Model: Sony DSC Rev: 3.22
  Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 126848 512-byte hdwr sectors (65 MB)
sda: test WP failed, assume Write Enabled
sda: asking for cache data failed
sda: assuming drive cache: write through
SCSI device (ioctl) reports ILLEGAL REQUEST.
SCSI device sda: 126848 512-byte hdwr sectors (65 MB)
sda: test WP failed, assume Write Enabled
sda: asking for cache data failed
sda: assuming drive cache: write through
SCSI device sda: 126848 512-byte hdwr sectors (65 MB)
sda: test WP failed, assume Write Enabled
sda: asking for cache data failed
sda: assuming drive cache: write through
 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sd(8,0),
logical block 0
Buffer I/O error on device sd(8,0), logical block 0
 unable to read partition table
 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sd(8,0),
logical block 0
 unable to read partition table
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4

[7.] Environment
[7.1.] Software (add the output of the ver_linux script here)

Linux dualie 2.5.61 #1 SMP Sun Feb 16 11:20:54 EST 2003 i686 unknown
unknown GNU/Linux

Gnu C 3.2.3
Gnu make 3.80
util-linux 2.11y
mount 2.11y
module-init-tools 0.9.9
e2fsprogs 1.32
Linux C Library 2.3.1
Dynamic linker (ldd) 2.3.1
Linux C++ Library ..
Procps 3.1.5
Net-tools 1.60
Console-tools 0.2.3
Sh-utils 4.5.7
Modules Loaded vfat fat smbfs ntfs usb_storage ohci_hcd usbcore
sd_mod sr_mod sg reiserfs 8139too crc32 ide_scsi scsi_mod snd_cmipci
snd_pcm snd_opl3_lib snd_timer snd_hwdep snd_mpu401_uart snd_rawmidi
snd_seq_device snd soundcore nfs lockd sunrpc mousedev dm_mod ide_floppy
ide_cd cdrom

[7.2.] Processor information (from /proc/cpuinfo):

vendor_id : AuthenticAMD
cpu family : 6
model : 6
model name : AMD Athlon(TM) XP 1700+
stepping : 2
cpu MHz : 1466.620
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 2875.39

processor : 1
vendor_id : AuthenticAMD
cpu family : 6
model : 6
model name : AMD Athlon(TM) XP 1700+
stepping : 2
cpu MHz : 1466.620
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 2924.54

[7.3.] Module information (from /proc/modules):

vfat 9984 0 - Live 0xe0975000
fat 36128 1 vfat, Live 0xe0a25000
smbfs 55408 0 - Live 0xe09e4000
ntfs 90768 1 - Live 0xe09cc000
usb_storage 21632 0 - Live 0xe0952000
ohci_hcd 12864 0 - Live 0xe0944000
usbcore 74932 4 usb_storage,ohci_hcd, Live 0xe0961000
sd_mod 11360 0 - Live 0xe091c000
sr_mod 11488 0 - Live 0xe0918000
sg 32268 0 - Live 0xe0924000
reiserfs 188784 0 - Live 0xe097e000
8139too 14272 1 - Live 0xe0913000
crc32 3136 1 8139too, Live 0xe08be000
ide_scsi 10752 0 - Live 0xe08a0000
scsi_mod 88356 5 usb_storage,sd_mod,sr_mod,sg,ide_scsi, Live 0xe092d000
snd_cmipci 17112 1 - Live 0xe08a7000
snd_pcm 63936 1 snd_cmipci, Live 0xe08e4000
snd_opl3_lib 6656 1 snd_cmipci, Live 0xe08a4000
snd_timer 12224 2 snd_pcm,snd_opl3_lib, Live 0xe087d000
snd_hwdep 3904 1 snd_opl3_lib, Live 0xe089e000
snd_mpu401_uart 3584 1 snd_cmipci, Live 0xe089c000
snd_rawmidi 14976 1 snd_mpu401_uart, Live 0xe088e000
snd_seq_device 3844 2 snd_opl3_lib,snd_rawmidi, Live 0xe088c000
snd 33924 9
snd_cmipci,snd_pcm,snd_opl3_lib,snd_timer,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device,
Live 0xe08da000
soundcore 4288 1 snd, Live 0xe0889000
nfs 78188 4 - Live 0xe08f6000
lockd 51536 2 nfs,[unsafe], Live 0xe08b0000
sunrpc 99972 4 nfs,lockd,[unsafe], Live 0xe08c0000
mousedev 5404 1 - Live 0xe0881000
dm_mod 25604 5 - Live 0xe0894000
ide_floppy 13952 0 - Live 0xe0884000
ide_cd 32704 0 - Live 0xe0869000
cdrom 29408 2 sr_mod,ide_cd, Live 0xe0874000

[7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)

0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
02f8-02ff : serial
0330-0331 : MPU401 UART
0376-0376 : ide1
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial
0cf8-0cff : PCI conf1
a000-afff : PCI Bus #02
  a400-a4ff : Realtek Semiconducto RTL-8139/8139C/8139C
    a400-a4ff : 8139too
  a800-a8ff : C-Media Electronics CM8738
    a800-a8ff : CMI8738-MC6
b800-b80f : Advanced Micro Devic AMD-768 [Opus] IDE
  b800-b807 : ide0
  b808-b80f : ide1
d000-dfff : PCI Bus #01
  d800-d8ff : ATI Technologies Inc Radeon RV200 QW [Rad
e800-e803 : Advanced Micro Devic AMD-760 MP [IGD4-2P]

00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-1ffebfff : System RAM
  00100000-0028e12d : Kernel code
  0028e12e-002e12c7 : Kernel data
1ffec000-1ffeefff : ACPI Tables
1ffef000-1fffefff : reserved
1ffff000-1fffffff : ACPI Non-volatile Storage
dd800000-deffffff : PCI Bus #02
  dd800000-dd8000ff : Realtek Semiconducto RTL-8139/8139C/8139C
    dd800000-dd8000ff : 8139too
  de000000-de000fff : Lucent Microelectron USS-312 USB Controll
    de000000-de000fff : ohci-hcd
df000000-dfefffff : PCI Bus #01
  df000000-df00ffff : ATI Technologies Inc Radeon RV200 QW [Rad
dff00000-ef7fffff : PCI Bus #01
  e0000000-e7ffffff : ATI Technologies Inc Radeon RV200 QW [Rad
ef800000-ef800fff : Advanced Micro Devic AMD-760 MP [IGD4-2P]
f0000000-f7ffffff : Advanced Micro Devic AMD-760 MP [IGD4-2P]
fec00000-fec00fff : reserved
fee00000-fee00fff : reserved
ffff0000-ffffffff : reserved

[7.5.] PCI information ('lspci -vvv' as root)

00:00.0 Host bridge: Advanced Micro Devices [AMD] AMD-760 MP [IGD4-2P]
System Controller (rev 11)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort+ >SERR- <PERR-
        Latency: 32
        Region 0: Memory at f0000000 (32-bit, prefetchable) [size=128M]
        Region 1: Memory at ef800000 (32-bit, prefetchable) [size=4K]
        Region 2: I/O ports at e800 [disabled] [size=4]
        Capabilities: [a0] AGP version 2.0
                Status: RQ=15 SBA+ 64bit- FW+ Rate=x1,x2,x4
                Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>

00:01.0 PCI bridge: Advanced Micro Devices [AMD] AMD-760 MP [IGD4-2P] AGP
Bridge (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 0
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: 0000d000-0000dfff
        Memory behind bridge: df000000-dfefffff
        Prefetchable memory behind bridge: dff00000-ef7fffff
        BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B-

00:07.0 ISA bridge: Advanced Micro Devices [AMD] AMD-768 [Opus] ISA (rev
04)
        Subsystem: Asustek Computer, Inc. A7M-D Mainboard
        Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 0

00:07.1 IDE interface: Advanced Micro Devices [AMD] AMD-768 [Opus] IDE
(rev 04) (prog-if 8a [Master SecP PriP])
        Subsystem: Advanced Micro Devices [AMD] AMD-768 [Opus] IDE
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32
        Region 4: I/O ports at b800 [size=16]

00:07.3 Bridge: Advanced Micro Devices [AMD] AMD-768 [Opus] ACPI (rev 03)
        Subsystem: Asustek Computer, Inc. A7M-D Mainboard
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-

00:10.0 PCI bridge: Advanced Micro Devices [AMD] AMD-768 [Opus] PCI (rev
04) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort+ >SERR- <PERR-
        Latency: 0
        Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
        I/O behind bridge: 0000a000-0000afff
        Memory behind bridge: dd800000-deffffff
        Prefetchable memory behind bridge: dff00000-dfefffff
        BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-

01:05.0 VGA compatible controller: ATI Technologies Inc Radeon RV200 QW
[Radeon 7500] (prog-if 00 [VGA])
        Subsystem: ATI Technologies Inc Radeon 7500
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping+ SERR- FastB2B-
        Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 64 (2000ns min), cache line size 08
        Interrupt: pin A routed to IRQ 11
        Region 0: Memory at e0000000 (32-bit, prefetchable) [size=128M]
        Region 1: I/O ports at d800 [size=256]
        Region 2: Memory at df000000 (32-bit, non-prefetchable) [size=64K]
        Expansion ROM at dffe0000 [disabled] [size=128K]
        Capabilities: [58] AGP version 2.0
                Status: RQ=47 SBA+ 64bit- FW- Rate=x1,x2,x4
                Command: RQ=0 SBA+ AGP- 64bit- FW- Rate=<none>
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

02:04.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev
10)
        Subsystem: Asustek Computer, Inc. CMI8738 6-channel audio
controller
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping+ SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (500ns min, 6000ns max)
        Interrupt: pin A routed to IRQ 10
        Region 0: I/O ports at a800 [size=256]
        Capabilities: [c0] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

02:06.0 USB Controller: Lucent Microelectronics USS-312 USB Controller
(rev 10) (prog-if 10 [OHCI])
        Subsystem: Lucent Microelectronics USS-312 USB Controller
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (750ns min, 21500ns max)
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at de000000 (32-bit, non-prefetchable) [size=4K]

02:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. RT8139
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (8000ns min, 16000ns max)
        Interrupt: pin A routed to IRQ 5
        Region 0: I/O ports at a400 [size=256]
        Region 1: Memory at dd800000 (32-bit, non-prefetchable) [size=256]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA
PME(D0-,D1+,D2+,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

[7.6.] SCSI information (from /proc/scsi/scsi)

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: Sony Model: Sony DSC Rev: 3.22
  Type: Direct-Access ANSI SCSI revision: 02

[7.7.] Other information that might be relevant to the problem
       (please look in /proc and include all information that you
       think to be relevant):

/proc/bus/usb/devices:

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 1, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.05
S: Manufacturer=Linux 2.5.61 ohci-hcd
S: Product=Lucent Microelectron USS-312 USB Controll
S: SerialNumber=02:06.0
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=058f ProdID=9254 Rev= 3.14
S: Manufacturer=ALCOR
S: Product=Generic USB Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=054c ProdID=0010 Rev= 3.22
S: Manufacturer=Sony
S: Product=Sony DSC
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=ff Prot=01 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=255ms

[X.] Other notes, patches, fixes, workarounds:

.config is attached

Pat

--
Purdue Universtiy ITAP/RCS
Information Technology at Purdue
Research Computing and Storage
http://www-rcd.cc.purdue.edu


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:16 EST