Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250493 - [2.6.27 regression] various Nokia phones report wrong capacity
Summary: [2.6.27 regression] various Nokia phones report wrong capacity
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://bugzilla.kernel.org/show_bug.c...
Whiteboard: linux-2.6.27-regression
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-10 08:43 UTC by Maciej Mrozowski
Modified: 2008-12-14 18:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Mrozowski gentoo-dev 2008-12-10 08:43:00 UTC
It's a regression in kernel, in USB storage driver, affecting a few models of Nokia phones (in USB data mode, models 3110, 5200, 5300, 5610 6300, 6500 and probably some other). Hard to tell, whether it's actually bug in kernel or in phone firmawe, nevertheless the effect is - that USB data mode doesn't work for those models on kernel >= 2.6.27.

So far I gathered two links (for nokia 6300 and 5300)
http://bugzilla.kernel.org/show_bug.cgi?id=11768
http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-07/msg12252.html

Patch for 6300 solved problem for me:

Index: usb-2.6/drivers/usb/storage/unusual_devs.h
===================================================================
--- usb-2.6.orig/drivers/usb/storage/unusual_devs.h
+++ usb-2.6/drivers/usb/storage/unusual_devs.h
@@ -240,7 +240,7 @@ UNUSUAL_DEV(  0x0421, 0x04b9, 0x0551, 0x
                US_FL_FIX_CAPACITY ),

 /* Reported by Richard Nauber <RichardNauber@web.de> */
-UNUSUAL_DEV(  0x0421, 0x04fa, 0x0601, 0x0601,
+UNUSUAL_DEV(  0x0421, 0x04fa, 0x0601, 0x0660,
                "Nokia",
                "6300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,


Patch for 5300 (worked for someone - from second link)

Index: usb-2.6/drivers/usb/storage/unusual_devs.h
===================================================================
--- usb-2.6.orig/drivers/usb/storage/unusual_devs.h
+++ usb-2.6/drivers/usb/storage/unusual_devs.h
@@ -225,6 +225,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64 ),

+/* Reported by Cedric Godin <cedric@xxxxxxxxxx> */
+UNUSUAL_DEV( 0x0421, 0x04b9, 0x0551, 0x0551,
+ "Nokia",
+ "5300",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
/* Reported by Olaf Hering <olh@xxxxxxx> from novell bug #105878 */ UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210,
"SMSC",
Comment 1 Axel Dyks 2008-12-11 20:06:01 UTC
There's some stuff currently going into 2.6.27.9 review

  [patch 40/83] USB: storage: update unusual_devs entries for Nokia 5300 and 5310
  --> http://lkml.org/lkml/2008/12/11/255

  [patch 39/83] USB: storage: updates unusual_devs entry for the Nokia 6300
  --> http://lkml.org/lkml/2008/12/11/254

  [patch 38/83] USB: unusual devs patch for Nokia 7610 Supernova
  --> http://lkml.org/lkml/2008/12/11/253
Comment 2 Maciej Mrozowski gentoo-dev 2008-12-12 16:30:17 UTC
Who changed summary to "[2.6.27 regression] various Nokia phones report wrong capacity" ?

Does any part of following dmesg log suggest anything about 'report wrong capacity' ?

Nov 14 02:06:37 aegir kernel: usb 1-1.1: new full speed USB device using
ehci_hcd and address 4
Nov 14 02:06:37 aegir kernel: usb 1-1.1: configuration #1 chosen from 2 choices
Nov 14 02:06:37 aegir kernel: scsi3 : SCSI emulation for USB Mass Storage
devices
Nov 14 02:06:37 aegir kernel: usb 1-1.1: New USB device found, idVendor=0421,
idProduct=003b
Nov 14 02:06:37 aegir kernel: usb 1-1.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=3
Nov 14 02:06:37 aegir kernel: usb 1-1.1: Product: Nokia 6500c
Nov 14 02:06:37 aegir kernel: usb 1-1.1: Manufacturer: Nokia
Nov 14 02:06:37 aegir kernel: usb 1-1.1: SerialNumber: 358666013388778
Nov 14 02:06:37 aegir kernel: usb-storage: device found at 4
Nov 14 02:06:37 aegir kernel: usb-storage: waiting for device to settle before
scanning
Nov 14 02:06:42 aegir kernel: usb-storage: device scan complete
Nov 14 02:06:42 aegir kernel: scsi 3:0:0:0: Direct-Access     Nokia    Nokia
6500c      0000 PQ: 0 ANSI: 4
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] 2007041 512-byte hardware
sectors (1028 MB)
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] Write Protect is off
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] Mode Sense: 04 00 00 00
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] Assuming drive cache: write
through
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] 2007041 512-byte hardware
sectors (1028 MB)
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] Write Protect is off
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] Mode Sense: 04 00 00 00
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] Assuming drive cache: write
through
Nov 14 02:06:42 aegir kernel:  sdc:
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: [sdc] Attached SCSI removable disk
Nov 14 02:06:42 aegir kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Sense Key : No Sense [current] 
Nov 14 02:06:43 aegir kernel: sd 3:0:0:0: [sdc] Add. Sense: No additional sense
information
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2008-12-12 16:42:07 UTC
I changed it. Yes, your logs indicate that the phone says it has 1 more sector than it actually does. And the patch which you said fixed your problem simply makes the kernel subtract 1 sector from the reported count, further confirming that off-by-one capacity is the cause of this problem.
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2008-12-14 18:09:30 UTC
Fixed in gentoo-sources-2.6.27-r6, thanks for the bug report