Re: USB card reader - 32 GB SD card detected as 2 TB card

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

 



On Thursday 12 January 2012 21:31:13 Alan Stern wrote:
> On Thu, 12 Jan 2012, Tomasz Chmielewski wrote:
> > On 01/12/2012 08:19 PM, Alan Stern wrote:
> > >> Is there any way to get this to a usable state? I'm using Linux 3.2.
> > >
> > > Can you post a usbmon trace showing what happens when the reader is
> > > plugged in?
> >
> > Here it is, a link to usbmon output for a 32 GB SDHC; below, pasted
> > matching dmesg output:
> >
> > http://www.virtall.com/files/temp/32-GB-SDHC-broken.log
> >
> > [256998.807004] usb 2-1.2: new full-speed USB device number 26 using
> > ehci_hcd [256998.902962] scsi33 : usb-storage 2-1.2:1.0
> > [256998.918968] xhci_hcd 0000:03:00.0: PME# disabled
> > [256998.919005] xhci_hcd 0000:03:00.0: setting latency timer to 64
> > [256999.903126] scsi 33:0:0:0: Direct-Access     USB2.0   CARD-READER    
> >  1.01 PQ: 0 ANSI: 2 [256999.904814] sd 33:0:0:0: Attached scsi generic
> > sg1 type 0
> > [256999.911725] sd 33:0:0:0: [sdb] Attached SCSI removable disk
> > [256999.930286] sd 33:0:0:0: [sdb] 4290410496 512-byte logical blocks:
> > (2.19 TB/1.99 TiB) [256999.931445] sd 33:0:0:0: [sdb] No Caching mode
> > page present
> > [256999.931455] sd 33:0:0:0: [sdb] Assuming drive cache: write through
> > [256999.935162] sd 33:0:0:0: [sdb] No Caching mode page present
> > [256999.935169] sd 33:0:0:0: [sdb] Assuming drive cache: write through
> > [256999.940502]  sdb: sdb1
> > [257001.553979] xhci_hcd 0000:03:00.0: PME# enabled
> > [257030.601695] usb 2-1.2: reset full-speed USB device number 26 using
> > ehci_hcd [257061.680843] usb 2-1.2: reset full-speed USB device number 26
> > using ehci_hcd [257092.632102] usb 2-1.2: reset full-speed USB device
> > number 26 using ehci_hcd
> >
> >
> >
> > Here, the same action for a 2 GB SD card (working correctly), and a
> > matching dmesg:
> >
> > http://www.virtall.com/files/temp/2GB-SD-working.log
> >
> > [256730.780984] usb 2-1.2: new full-speed USB device number 20 using
> > ehci_hcd [256730.875977] scsi27 : usb-storage 2-1.2:1.0
> > [256730.892967] xhci_hcd 0000:03:00.0: PME# disabled
> > [256730.893004] xhci_hcd 0000:03:00.0: setting latency timer to 64
> > [256731.873595] scsi 27:0:0:0: Direct-Access     USB2.0   CARD-READER    
> >  1.01 PQ: 0 ANSI: 2 [256731.877195] sd 27:0:0:0: Attached scsi generic
> > sg1 type 0
> > [256731.883371] sd 27:0:0:0: [sdb] Attached SCSI removable disk
> > [256731.903746] sd 27:0:0:0: [sdb] 3981312 512-byte logical blocks: (2.03
> > GB/1.89 GiB) [256731.904950] sd 27:0:0:0: [sdb] No Caching mode page
> > present
> > [256731.904961] sd 27:0:0:0: [sdb] Assuming drive cache: write through
> > [256731.909074] sd 27:0:0:0: [sdb] No Caching mode page present
> > [256731.909085] sd 27:0:0:0: [sdb] Assuming drive cache: write through
> > [256731.914959]  sdb: sdb1
> > [256732.908506] xhci_hcd 0000:03:00.0: PME# enabled
>
> Judging by the log, the reader isn't able to handle such a large card.
> It reported a total capacity of 0xffba7800 sectors, about 2 TB as shown
> in the dmesg log.  The correct value should have been somewhere around
> 0x03b9aca0.  Then when the computer took the reader at its word and
> asked for the contents of sector 0xffba7780, the reader flipped out,
> requiring a reset.  Things went downhill from there.
>
> With the 2-GB card, the reported capacity was 0x003cc000, which is
> about right as shown in the dmesg log.
>
> Unfortunately there is no way to override a device capacity.  It
> doesn't look like you'll be able to use this reader with that card.
>
> By the way, what happens if you try to repartition the 32-GB card using
> this reader under a different OS?

I've had similar problem with one USB mass storage device before - it was 
buggy firmware in Sony Ericsson phone that reported the capacity doubled. It 
worked in Windows because Windows never accesses anything outside the 
partition by itself. Of course, Disk Management showed the doubled capacity 
and it broke when the repartitioned to "full" doubled device size.


-- 
Ondrej Zary
--
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