# HAL and a device that acts as two mass storages <SOLVED>

## Zucca

(Moderator/admin, move this thread if I have posted this into a wrong section)

I first asked this on IRC but no one seemed to know the ansver. So here it goes:

 *Quote:*   

> 12:44:17 < Zucca> Hi guys. I have an usb device (Nokia N900) that acts as _two_ usb mass storage devices. Hal only recognizes one. Do you know that might cause this behaviour?
> 
> 

 

When I plug my N900 in, /dev/sdc will only appear. I can mount it with my fm (PCManFM) and when I look for mounts /dev/sdc has been mounted to "/media/Nokia N900".

However there should be another mass storege device too - the memory card (sdc being the internal storage on my N900).

Some interesting points I have noticed:N900 unmounts this mmc memory card from its system (Maemo) when I plug it in, so it must be at least offering the second mass storage device for my laptop (/dev/sdd, which never appears)

N900's internal storage appears only as /dev/sdc and the same device node is directly mounted when I click on it from fm (/dev/sdc1 is the one that should be mounted?!?)

This is the only thing that works on Windows but on on my Gentoo

dmesg:

```
[3675905.398413] sd 19:0:0:0: [sdc] 56631296 512-byte hardware sectors: (28.9 GB/27.0 GiB)

[3675905.398891] sd 19:0:0:0: [sdc] Assuming drive cache: write through

[3675905.400647] sd 19:0:0:0: [sdc] Assuming drive cache: write through

[3675905.400655]  sdc:

[3675905.912607] usb 1-7:1.0: uevent

[3675905.912765] usb 1-7: uevent

[3675905.944869] usb 1-7:1.0: uevent

[3675906.076582] usb 1-7:1.0: uevent

[3675906.076717] usb 1-7: uevent

[3675906.078609] usb 1-7:1.0: uevent

[3678276.402471] hub 1-0:1.0: state 7 ports 8 chg 0000 evt ff80

[3678276.402495] ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001002 POWER sig=se0 CSC

[3678276.402512] hub 1-0:1.0: port 7, status 0100, change 0001, 12 Mb/s

[3678276.402521] usb 1-7: USB disconnect, address 17

[3678276.402527] usb 1-7: unregistering device

[3678276.402533] usb 1-7: usb_disable_device nuking all URBs

[3678276.402546] usb 1-7: unregistering interface 1-7:1.0

[3678276.403283] usb 1-7:1.0: uevent

[3678276.403412] usb 1-7: uevent

[3678276.507091] hub 1-0:1.0: debounce: port 7: total 100ms stable 100ms status 0x100

[3716176.971154] hub 1-0:1.0: state 7 ports 8 chg 0000 evt ff80

[3716176.971181] ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001803 POWER sig=j CSC CONNECT

[3716176.971199] hub 1-0:1.0: port 7, status 0501, change 0001, 480 Mb/s

[3716176.997121] ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001002 POWER sig=se0 CSC

[3716177.101122] hub 1-0:1.0: debounce: port 7: total 125ms stable 100ms status 0x100

[3716177.101140] hub 1-0:1.0: state 7 ports 8 chg 0000 evt fe80

[3716177.320597] hub 1-0:1.0: state 7 ports 8 chg 0000 evt ff80

[3716177.320625] ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001803 POWER sig=j CSC CONNECT

[3716177.320643] hub 1-0:1.0: port 7, status 0501, change 0001, 480 Mb/s

[3716177.424085] hub 1-0:1.0: debounce: port 7: total 100ms stable 100ms status 0x501

[3716177.475318] ehci_hcd 0000:00:1d.7: port 7 high speed

[3716177.475333] ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001005 POWER sig=se0 PE CONNECT

[3716177.526139] usb 1-7: new high speed USB device using ehci_hcd and address 18

[3716177.577318] ehci_hcd 0000:00:1d.7: port 7 high speed

[3716177.577334] ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001005 POWER sig=se0 PE CONNECT

[3716177.641657] usb 1-7: default language 0x0409

[3716177.642363] usb 1-7: New USB device found, idVendor=0421, idProduct=01c7

[3716177.642373] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[3716177.642381] usb 1-7: Product: N900 (Storage Mode)

[3716177.642387] usb 1-7: Manufacturer: Nokia

[3716177.642393] usb 1-7: SerialNumber: 372041756775

[3716177.642559] usb 1-7: uevent

[3716177.642601] usb 1-7: usb_probe_device

[3716177.642609] usb 1-7: configuration #1 chosen from 2 choices

[3716177.644247] usb 1-7: adding 1-7:1.0 (config #1, interface 0)

[3716177.644485] usb 1-7:1.0: uevent

[3716177.644538] usb-storage 1-7:1.0: usb_probe_interface

[3716177.644553] usb-storage 1-7:1.0: usb_probe_interface - got id

[3716177.644801] scsi20 : SCSI emulation for USB Mass Storage devices

[3716177.645530] usb-storage: device found at 18

[3716177.645536] usb-storage: waiting for device to settle before scanning

[3716177.645683] drivers/usb/core/inode.c: creating file '018'

[3716178.096400] usb 1-7: uevent

[3716182.646088] scsi 20:0:0:0: Direct-Access     Nokia    N900              031 PQ: 0 ANSI: 2

[3716182.646510] sd 20:0:0:0: Attached scsi generic sg3 type 0

[3716182.656642] usb-storage: device scan complete

[3716182.660529] sd 20:0:0:0: [sdc] Attached SCSI removable disk

[3716182.664813] usb 1-7:1.0: uevent

[3716182.665102] usb 1-7: uevent

[3716182.698247] usb 1-7:1.0: uevent

[3718087.398890] sd 20:0:0:0: [sdc] 56631296 512-byte hardware sectors: (28.9 GB/27.0 GiB)

[3718087.399353] sd 20:0:0:0: [sdc] Assuming drive cache: write through

[3718087.400751] sd 20:0:0:0: [sdc] Assuming drive cache: write through

[3718087.400760]  sdc:

[3718087.413333] usb 1-7:1.0: uevent

[3718087.413617] usb 1-7: uevent

[3718087.418610] usb 1-7:1.0: uevent

[3718087.920712] usb 1-7:1.0: uevent

[3718087.921023] usb 1-7: uevent

[3718087.924689] usb 1-7:1.0: uevent

```

As you see - no sign of sdd. :(

----------

## Gusar

This has nothing to do with HAL actually. Do you have "Probe all LUNs" (CONFIG_SCSI_MULTI_LUN=y) in your kernel? If no, that's likely your problem.

----------

## toralf

 *Gusar wrote:*   

> This has nothing to do with HAL actually. Do you have "Probe all LUNs" (CONFIG_SCSI_MULTI_LUN=y) in your kernel? If no, that's likely your problem.

 I've that option enabled, but for my external USB drive (2 partitions, 1st is NTFS, the 2nd is encrypted) the KDE device plugin notifier reports only the first partition.UpdateNow it does it - probably update of coreutils to 8.5 made it./UpdateLast edited by toralf on Thu Jul 15, 2010 6:01 pm; edited 2 times in total

----------

## Zucca

 *Gusar wrote:*   

> This has nothing to do with HAL actually. Do you have "Probe all LUNs" (CONFIG_SCSI_MULTI_LUN=y) in your kernel? If no, that's likely your problem.

 

Thanks for the quick ansver!

```
# zgrep MULTI_LUN /proc/config.gz 

# CONFIG_SCSI_MULTI_LUN is not set
```

It maybe and propably is that what you said. :)

 *toralf wrote:*   

> I've that option enabled, but for my external USB drive (2 partitions, 1st is NTFS, the 2nd is encrypted) the KDE device plugin notifier reports only the first partition.

 In this case your device still acts as a single mass storage device but with two partitions. I guess it's because the second partition is encrypted.

----------

## Zucca

Yup. It works now. Thanks!

----------

