Created attachment 22055 [details] kern.log: USB connect - disconnect Latest working kernel version: none Earliest failing kernel version: vanilla 2.6.{9,18,29,30} confirmed Distribution: Debian Hardware Environment: Intel Core 2 Quad (32bit) Software Environment: Debian Testing Problem Description: USB mass-storage mode failing with "Medium not present" Steps to reproduce: Switch phone into (optionally automatic) "Mass storage" USB mode, connect USB cable. No (auto)mouting or user-space manipulation / intervention. The same procedure works fine with default installation of WinXP and even with WinXP micro image (everything except the most basic drivers stripped down) within Linux-hosted VirtualBox. No extra Nokia drivers, plain mass storage behaviour. I have tried to apply all possible usb-storage quirks (especially US_FL_FIX_CAPACITY), raised delay_use, but without any success. Bug #11066 seems similar, but it's actually a different issue (Sense Key: "Medium not present" vs. "Medium Error"). An important fact: this phone used to work even with Linux. Two days after the purchase, I reset the phone to factory settings (via menu) and used the built-in "card format" function. I think that's when Linux kernel stopped working for me. I tried different & pristine cards since then, but the result is the same: Linux not ok, Windows ok. Current kernel output (see attachment for the full version): [22740.736064] usb 1-3: new high speed USB device using ehci_hcd and address 4 [22740.868985] usb 1-3: New USB device found, idVendor=0421, idProduct=010d [22740.868988] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [22740.868991] usb 1-3: Product: Nokia E75 [22740.868993] usb 1-3: Manufacturer: Nokia [22740.868995] usb 1-3: SerialNumber: 35xxxxxxxxxxxxx [22740.869103] usb 1-3: configuration #1 chosen from 1 choice [22740.870734] scsi4 : SCSI emulation for USB Mass Storage devices [22740.871111] usb-storage: device found at 4 [22740.871114] usb-storage: waiting for device to settle before scanning [22745.868431] usb-storage: device scan complete [22745.868934] scsi 4:0:0:0: Direct-Access Nokia S60 1.0 PQ: 0 ANSI: 0 [22745.870489] sd 4:0:0:0: [sdb] Attached SCSI removable disk [22745.870565] sd 4:0:0:0: Attached scsi generic sg2 type 0 [22745.937533] sd 4:0:0:0: [sdb] 7729152 512-byte hardware sectors: (3.95 GB/3.68 GiB) [22745.937902] sd 4:0:0:0: [sdb] Write Protect is off [22745.937904] sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00 [22745.937907] sd 4:0:0:0: [sdb] Assuming drive cache: write through [22745.939154] sd 4:0:0:0: [sdb] 7729152 512-byte hardware sectors: (3.95 GB/3.68 GiB) [22745.939526] sd 4:0:0:0: [sdb] Write Protect is off [22745.939529] sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00 [22745.939531] sd 4:0:0:0: [sdb] Assuming drive cache: write through [22745.939535] sdb: [22746.895552] sd 4:0:0:0: [sdb] Device not ready [22746.895556] sd 4:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK [22746.895560] sd 4:0:0:0: [sdb] Sense Key : Not Ready [current] [22746.895565] sd 4:0:0:0: [sdb] Add. Sense: Medium not present [22746.895571] end_request: I/O error, dev sdb, sector 7729024 [22746.895575] Buffer I/O error on device sdb, logical block 966128 [22746.897676] sd 4:0:0:0: [sdb] Device not ready [22746.897680] sd 4:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK [22746.897685] sd 4:0:0:0: [sdb] Sense Key : Not Ready [current] [22746.897689] sd 4:0:0:0: [sdb] Add. Sense: Medium not present [22746.897694] end_request: I/O error, dev sdb, sector 7729136 [22746.897697] Buffer I/O error on device sdb, logical block 966142 [22746.899172] sd 4:0:0:0: [sdb] Device not ready [22746.899174] sd 4:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK [22746.899178] sd 4:0:0:0: [sdb] Sense Key : Not Ready [current] [22746.899182] sd 4:0:0:0: [sdb] Add. Sense: Medium not present [22746.899186] end_request: I/O error, dev sdb, sector 7729136 [22746.899189] Buffer I/O error on device sdb, logical block 966142 [22746.903421] sd 4:0:0:0: [sdb] Device not ready The "Device not ready" is repeated infinitely with occasional: [22747.592063] usb 1-3: reset high speed USB device using ehci_hcd and address 4 When the phone was working even in Linux (same kernel, phone, card): [84889.076050] usb 1-3: new high speed USB device using ehci_hcd and address 11 [84889.209024] usb 1-3: New USB device found, idVendor=0421, idProduct=010d [84889.209032] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [84889.209038] usb 1-3: Product: Nokia E75 [84889.209042] usb 1-3: Manufacturer: Nokia [84889.209047] usb 1-3: SerialNumber: 35xxxxxxxxxxxxx [84889.209209] usb 1-3: configuration #1 chosen from 1 choice [84889.217553] scsi9 : SCSI emulation for USB Mass Storage devices [84889.218387] usb-storage: device found at 11 [84889.218392] usb-storage: waiting for device to settle before scanning [84894.217740] usb-storage: device scan complete [84894.218356] scsi 9:0:0:0: Direct-Access Nokia S60 1.0 PQ: 0 ANSI: 0 [84894.222817] sd 9:0:0:0: [sdb] 7959552 512-byte hardware sectors: (4.07 GB/3.79 GiB) [84894.223304] sd 9:0:0:0: [sdb] Write Protect is off [84894.223311] sd 9:0:0:0: [sdb] Mode Sense: 03 00 00 00 [84894.223317] sd 9:0:0:0: [sdb] Assuming drive cache: write through [84894.226444] sd 9:0:0:0: [sdb] 7959552 512-byte hardware sectors: (4.07 GB/3.79 GiB) [84894.226931] sd 9:0:0:0: [sdb] Write Protect is off [84894.226938] sd 9:0:0:0: [sdb] Mode Sense: 03 00 00 00 [84894.226943] sd 9:0:0:0: [sdb] Assuming drive cache: write through [84894.226950] sdb: [84894.339889] sd 9:0:0:0: [sdb] Attached SCSI removable disk [84894.340035] sd 9:0:0:0: Attached scsi generic sg2 type 0 [84901.880952] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! Thank you
Created attachment 22066 [details] Windows XP usbsnoop output, gzipped Begins with phone USB connect. Windows initiates fs scan, etc, so parts of that are unfortunately present as well. I didn't know how to grab just the mass storage conversation and didn't want to remove something important.
Created attachment 22067 [details] Linux usbmon output Complete USB conversation. Seems kinda small, as if the data packets were truncated. This is my first usbmon capture, you're welcome to let me know how to do it properly. I did just this (#1 = E75): cat /sys/kernel/debug/usbmon/1u > tmp/usbmon1.log
I found a viable workaround, I guess it might come handy to other people searching the web for these error messages. Use external card reader and reformat your card, removing all partitions, with the filesystem directly on the device. This is not a solution, mass storage in Linux is still broken with valid single-partition cards in Symbian S60 9.3 FP2 devices, while Windows work fine.
Can you provide a usbmon log with a reformatted card, for comparison with the non-working card? It's interesting to note that the Windows usbsnoop log also shows a lot of "Medium not present" errors. In fact, essentially nothing worked until URB 145. Just prior to that the device reported "Not-ready to ready transition", which suggests that the previous error codes were all wrong -- they should have been "Logical unit is in process of becoming ready" instead of "Medium not present". It's also interesting to see that the usbmon log shows the device responded properly to a 32-sector read starting at sector 0, but then started reporting errors when asked to do an 8-sector read starting at sector 7729024 (out of 7959552). But when the kernel stopped trying to read sectors near the end, the device worked properly again. In the usbmon log I count a total of no more than 40 of those errors, lasting for about 1-1/2 seconds. That's a little better than "repeated infinitely". And at the end of the log, everything appeared to be working correctly. So are you sure this is really a problem? It appears that Windows had very similar or even worse problems, but the error messages weren't so readily visible. And have you tried reading sectors near the end of the card under Windows?
All USB bugs should be sent to the linux-usb@vger.kernel.org mailing list, and not entered into bugzilla. Please bring this issue up there, if it is still a problem in the latest kernel release.