Gentoo Archives: gentoo-user

From: KH <gentoo-user@××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] udev rule question and SonyEricsson K810
Date: Fri, 20 Mar 2009 09:17:12
Message-Id: 49C35F13.80104@konstantinhansen.de
Hi,

I do have a SonyEricsson K810. Connecting the phone by USB to my Gentoo
PC I am able to mount the internal phone-disk as well as the m2 Memory Sick.

# mount /dev/sdf1 /mnt/floppy/
# mount /dev/sdg1 /mnt/usb/
df -h

/dev/sdf1              68M  7,7M   60M  12% /mnt/floppy
/dev/sdg1             950M  512K  950M   1% /mnt/usb

This is dmesg:

usb 1-3.3: new full speed USB device using ehci_hcd and address 4
usb 1-3.3: configuration #3 chosen from 1 choice
usb 1-3.3: New USB device found, idVendor=0fce, idProduct=d0a1
usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3.3: Product: Sony Ericsson K810
usb 1-3.3: Manufacturer: Sony Ericsson
usb 1-3.3: SerialNumber: 3531530220722190
usb 1-3.3: USB disconnect, address 4
usb 1-3.3: new full speed USB device using ehci_hcd and address 5
usb 1-3.3: configuration #2 chosen from 1 choice
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi7 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
usb 1-3.3: New USB device found, idVendor=0fce, idProduct=e0a1
usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3.3: Product: Memory Stick
usb 1-3.3: Manufacturer: Sony Ericsson
usb 1-3.3: SerialNumber: 3531530220722190
scsi 6:0:0:0: Direct-Access     Sony Eri Memory Stick     0000 PQ: 0 ANSI: 0
sd 6:0:0:0: [sdf] 168000 512-byte hardware sectors (86 MB)
sd 6:0:0:0: [sdf] Test WP failed, assume Write Enabled
sd 6:0:0:0: [sdf] Assuming drive cache: write through
scsi 7:0:0:0: Direct-Access     Sony Eri Memory Stick     0000 PQ: 0 ANSI: 0
sd 7:0:0:0: [sdg] Attached SCSI removable disk
sd 7:0:0:0: Attached scsi generic sg6 type 0
sd 6:0:0:0: [sdf] 168000 512-byte hardware sectors (86 MB)
usb-storage: device scan complete
sd 6:0:0:0: [sdf] Test WP failed, assume Write Enabled
sd 6:0:0:0: [sdf] Assuming drive cache: write through
 sdf: sdf1
sd 6:0:0:0: [sdf] Attached SCSI removable disk
sd 6:0:0:0: Attached scsi generic sg7 type 0
usb-storage: device scan complete

Now I want to have a udev rule. Those are the udev rules already
existing in /etc/udev/rules.d/10-udev.rules:


BUS=="usb", KERNEL=="sd?1", ATTRS{serial}=="5B760D88CCFF",
ATTRS{idProduct}=="1d00", NAME="lanze"
BUS=="usb", KERNEL=="sd?1", ATTRS{serial}=="3547160198371480",
ATTRS{idProduct}=="e039", NAME="sek800i"
BUS=="usb", KERNEL=="sd?", ATTRS{serial}=="000A2700111242C0",
ATTRS{idProduct}=="1301", NAME="ipod"
BUS=="usb", KERNEL=="sd?", ATTRS{serial}=="070B00011452C90",
ATTRS{idProduct}=="b113", NAME="stachel"
BUS=="usb", KERNEL=="sd?1", ATTRS{serial}=="B40DB05H",
ATTRS{idProduct}=="7100", NAME="silber"

sek800i is my old mobile which is still be used, but without memory stick.

This is the new udev rule:

BUS=="usb", KERNEL=="sd?1", ATTRS{serial}=="3531530220722190",
ATTRS{idProduct}=="d0a1", NAME="sek810"
BUS=="usb", KERNEL=="sd?1", ATTRS{serial}=="3531530220722190",
ATTRS{idProduct}=="e0a1", NAME="sek810m2"

This is fstab:

/dev/sek810             /mnt/k810           auto           
noauto,user     0 0
/dev/sek810m2        /mnt/m2sek810  auto            noauto,user     0 0

Connecting the phone to my box using the udev rules the memory stick
wont work:

# mount /mnt/k810/
mount: Gerätedatei /dev/sek810 existiert nicht  (does not exist)
# mount /mnt/m2sek810/ && df -h
/dev/sek810m2          68M  7,7M   60M  12% /mnt/m2sek810

The internal disk is working but dmesg goes wild and I get a lot of the
following:

attempt to access beyond end of device
sdg: rw=0, want=1945599, limit=1945231
attempt to access beyond end of device
sdg: rw=0, want=1945600, limit=1945231
attempt to access beyond end of device
sdg: rw=0, want=1945594, limit=1945231
attempt to access beyond end of device
sdg: rw=0, want=1945595, limit=1945231
attempt to access beyond end of device


Where is my udev rule wrong?

Thanks for help.

kh