You are not logged in.

#1 2013-04-15 11:40:01

pgzh
Member
Registered: 2013-03-20
Posts: 19

[SOLVED] USB Mass Storage only partially working

Hi guys,

I just stumbled upon a very annoying problem. I'm using my Corsair USB Flash drive quite often and everything is just working fine. Today I wanted to connect my smartphone (Android, Mass Storage Mode, working on the same computer with Debian LiveCD!), but the partitions won't get recognized.
Here's the dmesg output:

Corsair Flash drive (WORKING):

[  268.316683] usb 1-4: new high-speed USB device number 4 using ehci-pci
[  268.441529] scsi8 : usb-storage 1-4:1.0
[  269.445444] scsi 8:0:0:0: Direct-Access     Corsair  Voyager GT 3.0   1.00 PQ: 0 ANSI: 4
[  269.446242] sd 8:0:0:0: Attached scsi generic sg6 type 0
[  269.446700] sd 8:0:0:0: [sdf] 62607360 512-byte logical blocks: (32.0 GB/29.8 GiB)
[  269.447310] sd 8:0:0:0: [sdf] Write Protect is off
[  269.447315] sd 8:0:0:0: [sdf] Mode Sense: bf 00 00 00
[  269.447674] sd 8:0:0:0: [sdf] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  269.450559]  sdf: sdf1
[  269.452559] sd 8:0:0:0: [sdf] Attached SCSI removable disk

Smartphone, Mass Storage Mode (NOT WORKING):

[   38.520032] usb 1-1: new high-speed USB device number 3 using ehci-pci
[   38.646727] scsi7 : usb-storage 1-1:1.0
[   39.651632] scsi 7:0:0:0: Direct-Access     Samsung  File-CD Gadget   0000 PQ: 0 ANSI: 2
[   39.652000] scsi 7:0:0:1: Direct-Access     Samsung  File-CD Gadget   0000 PQ: 0 ANSI: 2
[   39.652732] sd 7:0:0:0: Attached scsi generic sg3 type 0
[   39.652998] sd 7:0:0:1: Attached scsi generic sg4 type 0
[   39.656860] sd 7:0:0:1: [sde] 15589376 512-byte logical blocks: (7.98 GB/7.43 GiB)
[   39.657484] sd 7:0:0:0: [sdd] Attached SCSI removable disk
[   39.658114] sd 7:0:0:1: [sde] Write Protect is off
[   39.658117] sd 7:0:0:1: [sde] Mode Sense: 0f 00 00 00
[   39.659481] sd 7:0:0:1: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   39.665105]  sde:
[   39.668866] sd 7:0:0:1: [sde] Attached SCSI removable disk
[   48.403503] sde: detected capacity change from 7981760512 to 0
[   61.203999] sd 7:0:0:0: [sdd] 24133632 512-byte logical blocks: (12.3 GB/11.5 GiB)
[   61.205499] sd 7:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   61.318379]  sdd:
[   67.603388] sd 7:0:0:1: [sde] 15589376 512-byte logical blocks: (7.98 GB/7.43 GiB)
[   67.610884]  sde:

fdisk -l shows the following:

Disk /dev/sdd: 12.4 GB, 12356419584 bytes, 24133632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd4               0           0           0    0  Empty

Disk /dev/sde: 7981 MB, 7981760512 bytes, 15589376 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdf: 32.1 GB, 32054968320 bytes, 62607360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0d0c0b0a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          63    62605304    31302621    c  W95 FAT32 (LBA)

With sdd/sde being the phone, sdf being the flash drive.

Does anyone have an idea what might be wrong here and how I can fix this??

As already mentioned, the same phone works perfectly well as mass storage device on the same computer with an old Debian LiveCD and on my Laptop running Debian.

Last edited by pgzh (2013-04-15 18:49:36)

Offline

#2 2013-04-15 12:44:58

brebs
Member
Registered: 2007-04-03
Posts: 3,401

Re: [SOLVED] USB Mass Storage only partially working

pgzh wrote:

sde: detected capacity change from 7981760512 to 0

That sounds bad.

Offline

#3 2013-04-15 16:32:24

ght
Member
From: Germany
Registered: 2013-04-13
Posts: 3

Re: [SOLVED] USB Mass Storage only partially working

brebs wrote:
pgzh wrote:

sde: detected capacity change from 7981760512 to 0

That sounds bad.

The message is not as bad as it sounds; I get same line in dmesg when I tap "Turn off USB storage" on my Android (4.1.2) while it's connected (umount before doing this).
That is probably the same setting you referred to with "Mass Storage Mode", so maybe double check that. The ~10sec delay between you plugged it and it detects the capacity change makes me suspect something is timing out there.

Offline

#4 2013-04-15 17:41:13

pgzh
Member
Registered: 2013-03-20
Posts: 19

Re: [SOLVED] USB Mass Storage only partially working

Just tried another smartphone (Android 4.2.2, the one before was 2.3.6) with about the same result:

[   35.883368] usb 1-1: new high-speed USB device number 3 using ehci-pci
[   36.008227] scsi7 : usb-storage 1-1:1.0
[   37.010778] scsi 7:0:0:0: Direct-Access     Samsung  File-CD Gadget   0000 PQ: 0 ANSI: 2
[   37.011434] sd 7:0:0:0: Attached scsi generic sg4 type 0
[   37.012508] sd 7:0:0:0: [sdd] 61306880 512-byte logical blocks: (31.3 GB/29.2 GiB)
[   37.013139] sd 7:0:0:0: [sdd] Write Protect is off
[   37.013143] sd 7:0:0:0: [sdd] Mode Sense: 0f 00 00 00
[   37.013763] sd 7:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   37.026265]  sdd:
[   37.029519] sd 7:0:0:0: [sdd] Attached SCSI removable disk

Seems the capacity change does not occur here, but still I get no /dev/sdd1 device as I would with Debian.
Is it possible that I am missing some packet or this is a udev configuration issue? I just don't understand why the flash drive works flawlessly and the phone does not.
Both phones were definitely configured for mass storage mode, no MTP or other mode was selected!

I tried with both the stock Arch 3.8.6 kernel and a self-compiled 3.8.7, it does not make any difference. Flash drive works, phone doesn't.

Last edited by pgzh (2013-04-15 17:42:03)

Offline

#5 2013-04-15 18:08:16

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,835

Re: [SOLVED] USB Mass Storage only partially working

My Galaxy S2 (Android 4.0.3) shows up as sdb: and sdc: (internal and external cards respectively), with the same dmesg entries as yours above. It mounts just fine. Have you actually tried mounting yours?

In case you aren't already aware, it is possible to format the whole device e.g. /dev/sdb , without creating a partition e.g. /dev/sdb1. This is what happens in my case, and I'm guessing yours too.

Offline

#6 2013-04-15 18:16:28

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,109
Website

Re: [SOLVED] USB Mass Storage only partially working

Not an Installation issue, moving to Kernel and Hardware...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#7 2013-04-15 18:48:46

pgzh
Member
Registered: 2013-03-20
Posts: 19

Re: [SOLVED] USB Mass Storage only partially working

tomk wrote:

My Galaxy S2 (Android 4.0.3) shows up as sdb: and sdc: (internal and external cards respectively), with the same dmesg entries as yours above. It mounts just fine. Have you actually tried mounting yours?

In case you aren't already aware, it is possible to format the whole device e.g. /dev/sdb , without creating a partition e.g. /dev/sdb1. This is what happens in my case, and I'm guessing yours too.

I can't actually believe I missed that...I've been working with all kinds of Linux for years and actually knew that before - but it just did not cross my mind to try that and for some reason I've been looking for the configuration problem for the past day missing the obvious. I actually feel ashamed right now.
Sometimes you just miss the forest for the trees...

Thank you all - and especially tomk - so much helping me to find the problem sitting between the screen and chair once again. :-P

Offline

Board footer

Powered by FluxBB