# Problems with USB Mass Storage and cell phone

## Diovanti

I have a Samsung SCH-U450 cell phone with a 16GB SDHC card running in USB mass storage mode.  I cannot mount it in linux, but it works on windows.  (Also, fdisk can read the partition table, but for some reason cfdisk cannot.) The memory card mounts and works fine in linux when removed from the phone and placed into a usb memory card reader.  I'd like to be able to mount the phone directly, rather than having to remove the memory card every time I want to access the data on my memory card.  Any suggestions on how to get this working?

```
Bad_Religion linux # uname -a

Linux Bad_Religion 2.6.32.9 #2 SMP PREEMPT Tue May 11 12:55:32 EDT 2010 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 6000+ AuthenticAMD GNU/Linux

Bad_Religion linux # dmesg | tail

sd 3:0:0:0: [sdc] Media Changed

sd 3:0:0:0: [sdc] Result: hostbyte=0x00 driverbyte=0x08

sd 3:0:0:0: [sdc] Sense Key : 0x6 [current]

sd 3:0:0:0: [sdc] ASC=0x0 ASCQ=0x0

sd 3:0:0:0: [sdc] CDB: cdb[0]=0x28: 28 00 01 da cc 00 00 00 01 00

end_request: I/O error, dev sdc, sector 31116288

Buffer I/O error on device sdc, logical block 31116288

sd 3:0:0:0: [sdc] Assuming drive cache: write through

sd 3:0:0:0: [sdc] Assuming drive cache: write through

 sdc: sdc1

Bad_Religion linux # lsusb

Bus 001 Device 015: ID 05c6:1000 Qualcomm, Inc.

Bus 001 Device 007: ID 0a5c:2148 Broadcom Corp.

Bus 001 Device 006: ID 0a5c:4503 Broadcom Corp.

Bus 001 Device 005: ID 0a5c:4502 Broadcom Corp.

Bus 001 Device 004: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)

Bus 001 Device 003: ID 0abe:0101 Stereo-Link SL1200 DAC

Bus 001 Device 002: ID 047d:1020 Kensington Expert Mouse Trackball

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bad_Religion linux # fdisk /dev/sdc -l

Platte /dev/sdc: 15.9 GByte, 15931539968 Byte

64 Köpfe, 32 Sektoren/Spur, 15193 Zylinder

Einheiten = Zylinder von 2048 × 512 = 1048576 Bytes

Disk identifier: 0x00000000

    Gerät  boot.     Anfang        Ende     Blöcke   Id  System

/dev/sdc1               1       15193    15557616    c  W95 FAT32 (LBA)

Bad_Religion linux # mount /dev/sdc1 /mnt/test/ -t vfat

mount: Gerätedatei /dev/sdc1 existiert nicht
```

----------

## Diovanti

I've tried upgrading the kernel to 2.6.34 and enabling verbose SCSI debugging messages; I still can't mount the phone. Here's some more info though:

```

sd 5:0:0:0: [sdd] Media Changed

sd 5:0:0:0: [sdd] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE

sd 5:0:0:0: [sdd] Sense Key : Unit Attention [current]

sd 5:0:0:0: [sdd] Add. Sense: No additional sense information

sd 5:0:0:0: [sdd] CDB: Read(10): 28 00 01 da cc 00 00 00 01 00

end_request: I/O error, dev sdd, sector 31116288

Buffer I/O error on device sdd, logical block 31116288

sd 5:0:0:0: [sdd] Assuming drive cache: write through

sd 5:0:0:0: [sdd] Assuming drive cache: write through

 sdd: sdd1

```

----------

## Diovanti

Another bump... this turns out to be a kernel problem?  Booting an old 2008 gentoo livecd running kernel 2.6.24-gentoo7 works fine and allows me to mount the phone.  I'm trying different modern kernels hopping to find one that will work.  Perhaps its a bug or this can solved by changing a config option?  Any ideas?

----------

## s4e8

15931539968 bytes == 31116289 sectors.

the sector 31116288 aka last sector is unreadable.

many buggy controller mis-report/calculate capacity and make last sector unreadable.

----------

## Diovanti

 *s4e8 wrote:*   

> 15931539968 bytes == 31116289 sectors.
> 
> the sector 31116288 aka last sector is unreadable.
> 
> many buggy controller mis-report/calculate capacity and make last sector unreadable.

 

Is there a workaround?  I guess I don't really need that last sector anyway  :Smile: 

I later found an old post with a similar problem here, but I don't see a workaround listed: http://fixunix.com/kernel/380429-pr...unreadable.html

----------

## lxg

Have you activated the "probe all LUNs" option in your kernel?

I had a similar problem with my SGH-D600 in 2006. Back then, I activated the above and a bunch of other kernel options, and suddenly, it worked. I think it was the "probe all LUNs" thing.

http://www.zirona.com/blog/wissenswertes/a-beautiful-friendship-linux-and-samsung-sgh-d600/

----------

## Diovanti

 *lxg wrote:*   

> Have you activated the "probe all LUNs" option in your kernel?
> 
> I had a similar problem with my SGH-D600 in 2006. Back then, I activated the above and a bunch of other kernel options, and suddenly, it worked. I think it was the "probe all LUNs" thing.
> 
> http://www.zirona.com/blog/wissenswertes/a-beautiful-friendship-linux-and-samsung-sgh-d600/

 

I tried setting "probe all LUNs"; I still get the same error.

----------

