LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem mounting mobile phone's mass storage (https://www.linuxquestions.org/questions/linux-general-1/problem-mounting-mobile-phones-mass-storage-864453/)

maxx223 02-23-2011 01:44 AM

Problem mounting mobile phone's mass storage
 
Hi,

I have a problem when trying to mount a memory card in my cell phone. I connect the phone with an USB cable, select mass storage as the phone prompts it, but no luck.

dmesg shows
Code:

[  200.673190] usb 3-1: new full speed USB device using ohci_hcd and address 4
[  200.823377] usb 3-1: New USB device found, idVendor=05c6, idProduct=1000
[  200.823386] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  200.823393] usb 3-1: Product: USB MMC Storage
[  200.823398] usb 3-1: Manufacturer: SAMSUNG Electronics Co.,Ltd.
[  200.823403] usb 3-1: SerialNumber: 000000000002
[  200.831545] scsi7 : usb-storage 3-1:1.0
[  201.838429] scsi 7:0:0:0: Direct-Access    SAMSUNG  GT-S5600        2.31 PQ: 0 ANSI: 2
[  201.838984] sd 7:0:0:0: Attached scsi generic sg3 type 0
[  201.858343] sd 7:0:0:0: [sdc] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)
[  201.868370] sd 7:0:0:0: [sdc] Write Protect is off
[  201.868380] sd 7:0:0:0: [sdc] Mode Sense: 0b 00 00 08
[  201.868386] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  201.896402] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  201.906420]  sdc:
[  201.934336] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  201.934341] sd 7:0:0:0: [sdc] Attached SCSI removable disk

lsusb:

Code:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c040 Logitech, Inc. Corded Tilt-Wheel Mouse
Bus 003 Device 004: ID 05c6:1000 Qualcomm, Inc. Mass Storage Device

I have tried a couple of kernel versions and even though one can clearly see that the memory card is recognized as a mass storage device and registered as such by the kernel, even the raw /dev/sdc device isn't created.

Just to be sure I tried the same thing with FreeBSD, though I knew from past experiences what to expect from it. It just worked(tm) flawlessly, but I'd rather not keep FreeBSD just for the sake of one device I can't seem to get working with Linux. All I can guess it must either be a kernel bug that has persisted for far too long or a faulty udev rule.

Thanks in advance if someone knows how to resolve this or give any pointers on what to try.

corp769 02-23-2011 02:32 AM

How exactly are you trying to mount it?

maxx223 02-23-2011 03:30 AM

Sorry for the misinformation. There isn't a way I can mount it as of now since the device node isn't created
maybe I could create it manually with MAKEDEV, but I would still need the major/minor numbers...

The other thing is that I find odd that the kernel prints the device information, assigns a node to it but never creates anything under /dev. Even if it can't find any partitions on it, it should AFAIK at least create the raw device node?

corp769 02-23-2011 03:34 AM

According to your /var/log/messages, sdc is there. Can you post the output of ls -al /dev/sd* ? I don't see why it isn't either...

maxx223 02-23-2011 04:03 AM

brw-rw---- 1 root disk 8, 0 Feb 23 11:18 /dev/sda
brw-rw---- 1 root disk 8, 1 Feb 23 11:18 /dev/sda1
brw-rw---- 1 root disk 8, 2 Feb 23 11:18 /dev/sda2
brw-rw---- 1 root disk 8, 3 Feb 23 11:18 /dev/sda3
brw-rw---- 1 root disk 8, 4 Feb 23 11:18 /dev/sda4
brw-rw---- 1 root disk 8, 16 Feb 23 11:18 /dev/sdb
brw-rw---- 1 root disk 8, 17 Feb 23 11:18 /dev/sdb1
brw-rw---- 1 root disk 8, 18 Feb 23 11:18 /dev/sdb2
brw-rw---- 1 root disk 8, 19 Feb 23 11:18 /dev/sdb3

maxx223 02-23-2011 07:00 AM

Does anyone know any program that could be used to monitor what udev and the kernel are doing whilst connecting the device?

corp769 02-23-2011 11:23 AM

Are you getting anything weird in dmesg?

maxx223 02-23-2011 03:09 PM

Nothing particularly interesting, but I did further testing

udevadm monitor shows

Code:

monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1298494568.160599] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2 (usb)
KERNEL[1298494568.162511] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0 (usb)
KERNEL[1298494568.175516] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12 (scsi)
KERNEL[1298494568.175537] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/scsi_host/host12 (scsi_host)
UDEV  [1298494568.405766] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2 (usb)
UDEV  [1298494568.409711] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0 (usb)
UDEV  [1298494568.410427] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12 (scsi)
UDEV  [1298494568.410849] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/scsi_host/host12 (scsi_host)
KERNEL[1298494569.184572] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0 (scsi)
KERNEL[1298494569.184594] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0 (scsi)
KERNEL[1298494569.184603] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_disk/12:0:0:0 (scsi_disk)
KERNEL[1298494569.184611] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_device/12:0:0:0 (scsi_device)
KERNEL[1298494569.184621] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_generic/sg3 (scsi_generic)
KERNEL[1298494569.184631] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/bsg/12:0:0:0 (bsg)
UDEV  [1298494569.184981] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0 (scsi)
UDEV  [1298494569.185191] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0 (scsi)
UDEV  [1298494569.185804] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_device/12:0:0:0 (scsi_device)
UDEV  [1298494569.186185] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_disk/12:0:0:0 (scsi_disk)
UDEV  [1298494569.186648] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_generic/sg3 (scsi_generic)
UDEV  [1298494569.186792] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/bsg/12:0:0:0 (bsg)
KERNEL[1298494569.214347] add      /devices/virtual/bdi/8:32 (bdi)
UDEV  [1298494569.215610] add      /devices/virtual/bdi/8:32 (bdi)
KERNEL[1298494569.218335] change  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0 (scsi)
UDEV  [1298494569.218860] change  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0 (scsi)
KERNEL[1298494569.259355] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/block/sdc (block)
UDEV  [1298494570.137872] add      /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/block/sdc (block)
KERNEL[1298494572.698989] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/bsg/12:0:0:0 (bsg)
KERNEL[1298494572.699010] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_generic/sg3 (scsi_generic)
KERNEL[1298494572.699019] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_device/12:0:0:0 (scsi_device)
KERNEL[1298494572.699027] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_disk/12:0:0:0 (scsi_disk)
UDEV  [1298494572.699200] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/bsg/12:0:0:0 (bsg)
UDEV  [1298494572.699373] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_generic/sg3 (scsi_generic)
UDEV  [1298494572.699504] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_device/12:0:0:0 (scsi_device)
UDEV  [1298494572.699617] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/scsi_disk/12:0:0:0 (scsi_disk)
KERNEL[1298494572.701468] remove  /devices/virtual/bdi/8:32 (bdi)
KERNEL[1298494572.701749] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/block/sdc (block)
UDEV  [1298494572.701761] remove  /devices/virtual/bdi/8:32 (bdi)
UDEV  [1298494572.701969] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0/block/sdc (block)
KERNEL[1298494572.702201] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0 (scsi)
UDEV  [1298494572.702213] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0/12:0:0:0 (scsi)
KERNEL[1298494572.702276] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0 (scsi)
UDEV  [1298494572.702354] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/target12:0:0 (scsi)
KERNEL[1298494572.702877] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/scsi_host/host12 (scsi_host)
UDEV  [1298494572.703302] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12/scsi_host/host12 (scsi_host)
KERNEL[1298494572.703441] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12 (scsi)
UDEV  [1298494572.703532] remove  /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/host12 (scsi)

It seems that for some odd reason the kernel/udev is unplugging the device right after it is found, can you think of anything that would cause this kind of behavior?


All times are GMT -5. The time now is 10:41 PM.