LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-20-2008, 10:48 AM   #1
cferron
Member
 
Registered: Jan 2006
Location: Trois-Rivières, Québec, Canada
Distribution: Slackware, Ubuntu
Posts: 74

Rep: Reputation: 15
Question USB flash card reader problem.


For some reason when I connect my USB compact Flash reader in any USB port I get this message from the kernel. It always reset the device!?!

Code:
reset high speed USB device using ehci_hcd and address 8
hub 3-0:1.0: port 4 disabled by hub (EMI?), re-enabling...
Then puts it back in the low speed configuration
Code:
usb 1-1: not running at top speed; connect to a high speed hub
Any idea what could cause that?

Uname -a
Linux toshiba 2.6.23.14-smp #6 SMP Tue Jan 29 13:13:22 EST 2008 i686 Intel(R) Celeron(R) M CPU 430 @ 1.73GHz GenuineIntel GNU/Linux

Thanks

Claude

DMESG message when connecting:
Code:
usb 3-1: new high speed USB device using ehci_hcd and address 8
usb 3-1: configuration #1 chosen from 1 choice
scsi9 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 8
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
usb 3-1: reset high speed USB device using ehci_hcd and address 8
usb 3-1: reset high speed USB device using ehci_hcd and address 8
usb 3-1: reset high speed USB device using ehci_hcd and address 8
usb 3-1: reset high speed USB device using ehci_hcd and address 8
hub 3-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
usb 3-1: USB disconnect, address 8
usb 1-1: new full speed USB device using ohci_hcd and address 4
usb 1-1: not running at top speed; connect to a high speed hub
usb 1-1: configuration #1 chosen from 1 choice
scsi10 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 10:0:0:0: Direct-Access     OEI-USB2 CompactFlash     2.22 PQ: 0 ANSI: 0
sd 10:0:0:0: [sdb] Attached SCSI removable disk
sd 10:0:0:0: Attached scsi generic sg1 type 0
sd 10:0:0:0: [sdb] 3940272 512-byte hardware sectors (2017 MB)
sd 10:0:0:0: [sdb] Write Protect is off
sd 10:0:0:0: [sdb] Mode Sense: 0b 00 00 08
sd 10:0:0:0: [sdb] Assuming drive cache: write through
sd 10:0:0:0: [sdb] 3940272 512-byte hardware sectors (2017 MB)
sd 10:0:0:0: [sdb] Write Protect is off
sd 10:0:0:0: [sdb] Mode Sense: 0b 00 00 08
sd 10:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1

Last edited by cferron; 03-20-2008 at 11:45 AM.
 
Old 03-30-2008, 06:54 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
as no better reply exists as yet....it may be your hardware or the kernel driver.

1) pls provide full details of the card reader......(b) search HCL to see if someone already has it working.

2) I run a vanilla kernel and once I know your hw...I or others will check to see if there is a new driver for it.

3) it may also be impacted on your udev and hal rules but lets look at the hw first?
 
Old 03-30-2008, 07:38 AM   #3
cferron
Member
 
Registered: Jan 2006
Location: Trois-Rivières, Québec, Canada
Distribution: Slackware, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
Talking

Quote:
Originally Posted by aus9 View Post
(b) search HCL to see if someone already has it working.
What is HCL if I can ask before we start???
What is a Vanilla Kernel, does it taste good ?

Edit--> Ok, got my answer for the Vanilla Kernel... Well this is what I'm using, the latest from kernel.org. I guess that this is the Vanilla kernel...???

Thanks

Claude

Last edited by cferron; 03-30-2008 at 08:26 AM. Reason: Found one answer
 
Old 03-30-2008, 06:57 PM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
ok please post the full make model etc of your reader.....

2) look at this page...there is box top RH cnr called main menu...click the HCL = hardware compatibility list...search your device in external storage

but still post your hw here pls even if your device is not listed.
 
Old 03-30-2008, 07:59 PM   #5
cferron
Member
 
Registered: Jan 2006
Location: Trois-Rivières, Québec, Canada
Distribution: Slackware, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
Post

Quote:
Originally Posted by aus9 View Post
ok please post the full make model etc of your reader.....
Can't seem to find it... Here are the details...
===========================================
READER = CompuApps OmniFlash Uno CF 2.0! (USB2-UDMA40)
Controller: OnSpec xSil251-G
OM-U2-CFU4 / Part No.: CF06-11
Source: http://www.hjreggel.net/cardspeed/
===========================================

I have created this new rules for udev:

SYSFS{idVendor}=="55aa", SYSFS{idProduct}=="2b00", NAME="flashport1", MODE="0644", OPTIONS+="all_partitions"

It matches the reader vendor and idproduct (got those with lsusb command) and create the /dev/flashport entry with no problem when I connect the reader to any USB port. It seems to be stable and working for now, but it normally happend when I upload lots of card (35 and more in a day...)

UPDATE: I created a new rules files ex 55-myrules.rules in the /etc/udev/rules.d/ directory.... that seem to be causing a problem (lsusb was not giving any output + I was unable to mount my CF card, I wonder why?). I have put back my rules in the original 50-udev.rules and it seem to be working.


Content of 50-udev.rules
Code:
# /etc/udev/udev.rules:  device naming rules for udev

#Reader Uno2!
SYSFS{idVendor}=="55aa", SYSFS{idProduct}=="2b00", NAME="flashport1", MODE="0644"

#Reader Lexar Media
SYSFS{idVendor}=="05dc", SYSFS{idProduct}=="b020", NAME="flashport1", MODE="0644"


=====My Udev rules + EXAMPLE START====
#BUS=="usb", SYSFS{product}=="USB Storage Device", SYMLINK+="cfrdr%n", OPTIONS+="all_partitions"

#BUS="usb", KERNEL="sd*", SYSFS{product}="Lexar", NAME="%k", SYMLINK="usbhd%n"

#udevinfo -a -p $(udevinfo -q path -n /dev/sdb1)

#BUS=="usb", ID=="6-4:1.0", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions"
#BUS=="usb", ID=="6-3:1.0", NAME="flashport2" MODE="0644" OPTIONS+="all_partitions"
#BUS=="usb", ID=="1-3:1.0", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions"
#BUS=="usb", ID=="1-4:1.0", NAME="flashport2" MODE="0644" OPTIONS+="all_partitions"
#BUS=="usb", ID=="3-3:1.0", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions"
#BUS=="usb", ID=="3-4:1.0", NAME="flashport2" MODE="0644" OPTIONS+="all_partitions"

#BUS=="usb", ATTRS{vendor}=="OEI-USB2", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions"
#KERNEL="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 CompactFlash Reader", SYMLINK+="cfrdr%n", OPTIONS+="all_partitions
#KERNEL="sd*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="OEI-USB2", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions
#KERNEL=="sd?1", SUBSYSTEMS=="scsi", ATTRS{vendor}=="OEI-USB2", NAME="flashport1" MODE="0644"
#SUBSYSTEMS=="usb", ATTRS{product}=="Palm Handheld", KERNEL=="ttyUSB*", SYMLINK+="pilot""

#=====MY OLD RULES + EXAMPLE END=====


# sysfs is populated after the event is sent
ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"

# all block devices
SUBSYSTEM=="block", GROUP="disk"

# permissions for IDE floppy devices
SUBSYSTEMS=="ide", KERNEL=="*[!0-9]", ENV{DRIVER}=="ide-floppy*", NAME="%k", GROUP="floppy", MODE="0660"

# permissions for SCSI sg/tape devices
SUBSYSTEMS=="scsi", KERNEL=="s[gt][0-9]*", ATTRS{type}=="5", NAME="%k", GROUP="cdrom", MODE="0660"

# load modules to scsi disks, if they aren't in kernel
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1", RUN+="/sbin/modprobe st"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"

# disk devices
KERNEL=="sd*",		NAME="%k", GROUP="disk"
KERNEL=="ataraid*",	NAME="%k", GROUP="disk"

# put all removable devices in group "plugdev"
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev"
KERNEL=="sd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev"
KERNEL=="sd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev"

# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}

ACTION!="add", GOTO="persistent_storage_end"

KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"

# type 8 devices are "Medium Changers"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"

SUBSYSTEM!="block", GOTO="persistent_storage_end"

# skip rules for inappropriate block devices
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"

# never access removable ide devices, the drivers are causing event loops on open()
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"

# for partitions import parent information
KERNEL=="*[0-9]", IMPORT{parent}="ID_*"

# by-id (hardware serial number)
KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"

KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"

# libata compat (links like hd*)
KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"

KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"

# by-path (shortest physical path)
KERNEL=="*[!0-9]|sr*", IMPORT{program}="path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
KERNEL=="st*", IMPORT{program}="path_id %p", SYMLINK+="tape/by-path/$env{ID_PATH}"
KERNEL=="sr*|st*", GOTO="persistent_storage_end"
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"

# by-label/by-uuid (filesystem properties)
KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"
IMPORT{program}="vol_id --export $tempnode"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_SAFE}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_SAFE}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"

# BIOS Enhanced Disk Device
KERNEL=="*[!0-9]", IMPORT{program}="edd_id --export $tempnode"
KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"

LABEL="persistent_storage_end"

# import optical drive properties and set CD partitions
KERNEL=="scd[a-z]|sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", NAME="%k", GROUP="cdrom", MODE="0660", RUN+="cdrom-symlinks.sh %k"

# ALSA devices
SUBSYSTEM=="sound", 		GROUP="audio"
SUBSYSTEM=="snd", 		GROUP="audio"
KERNEL=="controlC[0-9]*",	NAME="snd/%k", MODE="0666"
KERNEL=="hw[CD0-9]*",		NAME="snd/%k", MODE="0662"
KERNEL=="pcm[CD0-9]*c",		NAME="snd/%k", MODE="0662"
KERNEL=="pcm[CD0-9]*p",		NAME="snd/%k", MODE="0666"
KERNEL=="midiC[D0-9]*",		NAME="snd/%k", MODE="0666"
KERNEL=="timer",		NAME="snd/%k", MODE="0666"
KERNEL=="seq",			NAME="snd/%k", MODE="0666"

# IEEE1394 raw devices (often used for video)
KERNEL=="raw1394", NAME="%k", GROUP="video"
KERNEL=="dv1394*", NAME="dv1394/%n", GROUP="video"
KERNEL=="video1394*", NAME="video1394/%n", GROUP="video"

# capi devices
KERNEL=="capi",		NAME="capi20", SYMLINK+="isdn/capi20"
KERNEL=="capi*",	NAME="capi/%n"

# cpu devices
KERNEL=="cpu[0-9]*",	NAME="cpu/%n/cpuid"
KERNEL=="msr[0-9]*",	NAME="cpu/%n/msr"
KERNEL=="microcode",	NAME="cpu/microcode"

# floppy devices
KERNEL=="fd[0-9]*", NAME="floppy/%n", SYMLINK+="%k", GROUP="floppy", PROGRAM="/lib/udev/floppy-extra-devs.sh %k %b %n"

# i2c devices
KERNEL=="i2c-[0-9]*",	NAME="i2c/%n", SYMLINK+="%k"

# persistent input links: /dev/input/{by-id,by-path}

ACTION!="add", GOTO="persistent_input_end"
SUBSYSTEM!="input", GOTO="persistent_input_end"
KERNEL=="input[0-9]*", GOTO="persistent_input_end"

# usb devices
SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x"
SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"

# other devices
DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"

ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="", ENV{ID_SERIAL}="noserial"

# by-id
KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"

# by-path
IMPORT{program}="path_id %p"
ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"

LABEL="persistent_input_end"

# input devices
KERNEL=="mice",		NAME="input/%k", MODE="0644", SYMLINK+="mouse"
KERNEL=="mouse*",	NAME="input/%k", MODE="0644"
KERNEL=="event*",	NAME="input/%k", MODE="0640"
KERNEL=="js*",		NAME="input/%k", MODE="664"
KERNEL=="ts*",		NAME="input/%k", MODE="0600"
KERNEL=="input[0-9]*", ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev"

# loop devices
KERNEL=="loop[0-9]*",	NAME="loop/%n", SYMLINK+="%k", GROUP="disk"

# md block devices
KERNEL=="md[0-9]*",	NAME="md/%n", SYMLINK+="%k", GROUP="disk"

# aoe char devices,
SUBSYSTEM=="aoe", KERNEL=="discover",	NAME="etherd/%k", GROUP="disk", MODE="0220"
SUBSYSTEM=="aoe", KERNEL=="err",	NAME="etherd/%k", GROUP="disk", MODE="0440"
SUBSYSTEM=="aoe", KERNEL=="interfaces",	NAME="etherd/%k", GROUP="disk", MODE="0220"

# netlink devices
KERNEL=="route",	NAME="netlink/%k"
KERNEL=="skip",		NAME="netlink/%k"
KERNEL=="usersock",	NAME="netlink/%k"
KERNEL=="fwmonitor",	NAME="netlink/%k"
KERNEL=="tcpdiag",	NAME="netlink/%k"
KERNEL=="nflog",	NAME="netlink/%k"
KERNEL=="xfrm",		NAME="netlink/%k"
KERNEL=="arpd",		NAME="netlink/%k"
KERNEL=="route6",	NAME="netlink/%k"
KERNEL=="ip6_fw",	NAME="netlink/%k"
KERNEL=="dnrtmsg",	NAME="netlink/%k"
KERNEL=="tap*",		NAME="netlink/%k"

# ramdisk devices
KERNEL=="ram[0-9]*",	NAME="rd/%n", SYMLINK+="%k"

# raw devices
KERNEL=="raw[0-9]*",	NAME="raw/%k", GROUP="disk"
KERNEL=="ram*",		NAME="%k", GROUP="disk"

# sound devices
KERNEL=="adsp",			NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="adsp[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="audio",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="audio[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="dsp",			NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="dsp[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="mixer",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="mixer[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="sequencer",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="sequencer[0-9]*",	NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"

# tty devices
KERNEL=="console",	NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="tty",		NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="tty[0-9]*",	NAME="vc/%n",  SYMLINK+="%k", GROUP="tty"

# serial or dialout devices
KERNEL=="ttyS[0-9]*",	NAME="tts/%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ttyUSB[0-9]*",	NAME="tts/USB%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ippp0",	NAME="%k", GROUP="uucp"
KERNEL=="isdn*",	NAME="%k", GROUP="uucp"
KERNEL=="dcbri*",	NAME="%k", GROUP="uucp"
KERNEL=="ircomm*",	NAME="%k", GROUP="uucp"

# pty devices
KERNEL=="ptmx",			NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="pty[p-za-e][0-9a-f]*",	NAME="pty/m%m", SYMLINK+="%k", GROUP="tty"
KERNEL=="tty[p-za-e][0-9a-f]*",	NAME="pty/s%m", SYMLINK+="%k", GROUP="tty"

# vc devices
KERNEL=="vcs",		NAME="vcc/0",	SYMLINK+="%k", GROUP="tty"
KERNEL=="vcs[0-9]*",	NAME="vcc/%n",	SYMLINK+="%k", GROUP="tty"
KERNEL=="vcsa",		NAME="vcc/a0",	SYMLINK+="%k", GROUP="tty"
KERNEL=="vcsa[0-9]*",	NAME="vcc/a%n",	SYMLINK+="%k", GROUP="tty"

# memory devices
KERNEL=="random",	NAME="%k", MODE="0664"
KERNEL=="urandom",	NAME="%k", MODE="0664"
KERNEL=="mem",		NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="kmem",		NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="port",		NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="nvram",	NAME="%k", GROUP="kmem", MODE="600"
KERNEL=="full",		NAME="%k", MODE="0666"
KERNEL=="null",		NAME="%k", MODE="0666"
KERNEL=="zero",		NAME="%k", MODE="0666"

# misc devices
KERNEL=="agpgart",	NAME="misc/%k", SYMLINK+="%k"
KERNEL=="psaux",	NAME="misc/%k", SYMLINK+="%k"
KERNEL=="rtc",		NAME="misc/%k", SYMLINK+="%k", MODE="0664"
KERNEL=="uinput",	NAME="misc/%k", SYMLINK+="%k"
KERNEL=="inotify",	NAME="misc/%k", SYMLINK+="%k", MODE="0666"

# usb devices
KERNEL=="hiddev*",		NAME="usb/%k"
KERNEL=="auer*",		NAME="usb/%k"
KERNEL=="legousbtower*",	NAME="usb/%k"
KERNEL=="dabusb*",		NAME="usb/%k"

# fb devices
KERNEL=="fb[0-9]*",	NAME="fb/%n", SYMLINK+="%k", GROUP="video"

# DRI devices
KERNEL=="card*",	NAME="dri/card%n", GROUP="video"
KERNEL=="nvidia*",	NAME="%k", GROUP="video"
KERNEL=="3dfx*",	NAME="%k", GROUP="video"

# v4l devices
KERNEL=="video[0-9]*",	NAME="v4l/video%n", SYMLINK+="video%n", GROUP="video"
KERNEL=="radio[0-9]*",	NAME="v4l/radio%n", SYMLINK+="radio%n", GROUP="video"
KERNEL=="vbi[0-9]*",	NAME="v4l/vbi%n", SYMLINK+="vbi%n", GROUP="video"
KERNEL=="vtx[0-9]*",	NAME="v4l/vtx%n", GROUP="video"

# dvb devices
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'X=%k; X=$${X#dvb}; A=$${X%%%%.*}; D=$${X#*.}; echo dvb/adapter$$A/$$D'", NAME="%c", GROUP="video"

# Asterix Zaptel devices
KERNEL=="zapctl",	NAME="zap/ctl"
KERNEL=="zaptimer",	NAME="zap/timer"
KERNEL=="zapchannel",	NAME="zap/channel"
KERNEL=="zappseudo",	NAME="zap/pseudo"
KERNEL=="zap[0-9]*",	NAME="zap/%n"

# pilot/palm devices
KERNEL=="pilot",	NAME="%k", GROUP="uucp"

# jaz devices
KERNEL=="jaz*",		NAME="%k", GROUP="disk"

# zip devices
KERNEL=="pocketzip*",	NAME="%k", GROUP="disk"
KERNEL=="zip*",		NAME="%k", GROUP="disk"

# ls120 devices
KERNEL=="ls120",	NAME="%k", GROUP="disk"

# lp devices
KERNEL=="irlpt",	NAME="%k", GROUP="lp", MODE="0664"
SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp", MODE="0664"
SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp", MODE="0664"
KERNEL=="parport*",	NAME="%k", GROUP="lp", MODE="0664"

# tape devices
KERNEL=="ht*",		NAME="%k"
KERNEL=="nht*",		NAME="%k"
KERNEL=="pt*",		NAME="%k"
KERNEL=="npt*",		NAME="%k"
KERNEL=="st*",		NAME="%k"
KERNEL=="nst*",		NAME="%k"
KERNEL=="osst*",	NAME="%k"
KERNEL=="nosst*",	NAME="%k"

# diskonkey devices
KERNEL=="diskonkey*",	NAME="%k", GROUP="disk"

# rem_ide devices
KERNEL=="microdrive*",	NAME="%k", GROUP="disk"

# kbd devices
KERNEL=="kbd",		NAME="%k", MODE="0664"

# Sony Vaio Jogdial sonypi device
KERNEL=="sonypi",	NAME="%k", MODE="0666"

# packet devices
KERNEL=="pktcdvd",		NAME="pktcdvd/control", GROUP="cdrom", MODE="0660"
KERNEL=="pktcdvd[0-9]*",	NAME="pktcdvd/pktcdvd%n", GROUP="cdrom", MODE="0660"

# infiniband devices
KERNEL=="umad*",	NAME="infiniband/%k"
KERNEL=="issm*", NAME="infiniband/%k"

# i82365 is broken, and puts udev in a terrible loop.  To fix that, we
# will ignore the platform provided module, and stop the loop:
SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="load_modules_end"

# PnP
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \
        RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'"

# firewire
SUBSYSTEM=="ieee1394", ENV{MODALIAS}!="?*", IMPORT{program}="modalias_ieee1394"

# libusb device access
DEVPATH=="/module/usbcore", ACTION=="add", \
              RUN+="/bin/sh -c 'sleep 1; /bin/mount none -t usbfs /proc/bus/usb -o devmode=0666,devgid=10'"
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev}; B=$${X%%%%.*}; D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"

# firmware loader
SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"

# Platform
SUBSYSTEM=="platform", ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/lib/udev/modprobe.sh $env{MODALIAS}", GOTO="load_modules_end"

# load module
ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"

LABEL="load_modules_end"

# network devices
KERNEL=="tun", NAME="net/%k"

SUBSYSTEM=="net", ACTION=="add", RUN+="nethelper.sh $env{INTERFACE} start"
SUBSYSTEM=="net", ACTION=="remove", RUN+="nethelper.sh $env{INTERFACE} stop"

# catch the event in udevmonitor
RUN+="socket:/org/kernel/udev/monitor"
uname outout:
Code:
Linux VSS 2.6.22.1-smp #21 SMP
Hope this help.

Claude
 
Old 03-30-2008, 08:35 PM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
you have done better than me so I think you are almost there. My puny search of HCL was a zero.

2)
ok that link to readers also shows it PID 2B00

so going to controller gives us
xSil 251 (LQFP48) [PID 2B00] - CF/HDD Controller
PIO 0-6, MDMA 0-2, UDMA 0-4

I do not have your hw, but the info you have found and linked to should be enough to now make "persistent" rules

http://www.linuxjournal.com/article/7496

ahh well you have already tried that...but try again?
 
Old 03-30-2008, 11:51 PM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
USB Card Reader

USB card readers (CompactFlash, SmartMedia, etc) are yet another range of USB storage devices which have different usage requirements.

These devices typically do not inform the host computer upon media change. So, if you plug in the device with no media, and then insert a card, the computer does not realise, and you do not have your mountable sdb1 partition node for the media.

One possible solution is to take advantage of the all_partitions option, which will create 16 partition nodes for every block device that the rule matches:
KERNEL="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 CompactFlash Reader", SYMLINK+="cfrdr%n", OPTIONS+="all_partitions"
You will now have nodes named: cfrdr, cfrdr1, cfrdr2, cfrdr3, ..., cfrdr15.

from
http://www.reactivated.net/writing_udev_rules.html
 
Old 03-31-2008, 10:15 AM   #8
cferron
Member
 
Registered: Jan 2006
Location: Trois-Rivières, Québec, Canada
Distribution: Slackware, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by aus9 View Post
KERNEL="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 CompactFlash Reader", SYMLINK+="cfrdr%n", OPTIONS+="all_partitions"
You will now have nodes named: cfrdr, cfrdr1, cfrdr2, cfrdr3, ..., cfrdr15.
Thanks for the time you put in that aus9, I really appreciate it!

Will try the above rule.

I'm just trying to understand what I'm doing here...

I have /dev entry created at every boot (/etc/rc.d/rc.local)
/bin/mknod /dev/sdb1 b 8 1
/bin/mknod /dev/sdc1 b 8 1
/bin/mknod /dev/sdd1 b 8 1
/bin/mknod /dev/sde1 b 8 1

Don't ask me why there is a 8 1 there, just don<t understand the minor or major number...


I have my /etc/fstab that has:
/dev/flashport1 /mnt/flash1 vfat user,ro,noatime,noauto 0 0


I have a udev rule that goes like this:
#Reader Uno2!
SYSFS{idVendor}=="55aa", SYSFS{idProduct}=="2b00", NAME="flashport1", MODE="0644"

Is that ok, or there are "cleaner" way to do what I<m doing right now.
How does linux know that /dev/sdb1 is related to /dev/flashport1????


Thanks again.
Claude, desperate to understand more
 
Old 03-31-2008, 11:21 AM   #9
machines
LQ Newbie
 
Registered: Mar 2008
Distribution: slackware 12
Posts: 21

Rep: Reputation: 15
im just going to throw this in, and its not a solution at all, but i bought a bytestor card reader and got the same sort of error messages you have, i then bought a kingston card reader and it worked perfectly.
 
Old 03-31-2008, 11:22 AM   #10
ciden
Member
 
Registered: Dec 2006
Location: New Delhi, India
Distribution: PCLinuxOS 2010
Posts: 246
Blog Entries: 1

Rep: Reputation: 31
What is your problem, basically?

If it is that your device is not running at its full capable speed,
maybe you dont have usb 2.0 ports on your PC.
Your specs are reminescent of an old box.
 
Old 03-31-2008, 11:24 AM   #11
cferron
Member
 
Registered: Jan 2006
Location: Trois-Rivières, Québec, Canada
Distribution: Slackware, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by machines View Post
im just going to throw this in, and its not a solution at all, but i bought a bytestor card reader and got the same sort of error messages you have, i then bought a kingston card reader and it worked perfectly.
I have 10 readers and they all did the same thing.... But since I change therules in udev, everything seem to be stable! I cross my finger, maybe my problem is solved? The reader I have is the faster on the market, speed is critical for us. As for machine spec, 100% certain they have USB2 (Dual quad core XEON) running ehci driver....



Claude

Last edited by cferron; 03-31-2008 at 11:38 AM.
 
Old 04-01-2008, 12:19 PM   #12
ciden
Member
 
Registered: Dec 2006
Location: New Delhi, India
Distribution: PCLinuxOS 2010
Posts: 246
Blog Entries: 1

Rep: Reputation: 31
Keeping my fingers crossed too.
This discussion's too technical for me though.
 
  


Reply

Tags
ehci, flash, kernel, usb



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Multi-card Flash Reader in Kernel 2.6.19 sausagejohnson Linux - Hardware 20 02-01-2007 08:20 PM
USB flash card reader in Mandrake 10.1 enrico14569 Linux - Hardware 4 10-02-2005 06:57 PM
USB Flash card reader probs Randomcasualty Linux - Hardware 15 08-09-2005 08:20 PM
JFFS2 on USB Card Reader Flash Denes Linux - Hardware 1 07-14-2005 01:41 PM
Need a little help getting USB flash card reader to work Electrode Linux - Hardware 13 10-20-2003 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration