On Tue, 2012-05-29 at 17:15 +0100, Bryn M. Reeves wrote: > On 05/29/2012 04:15 PM, Arthur Dent wrote: > > I have never used udevadm before. If I have read the man page > > correctly, all I need to do is to initiate "udevadm monitor" and > > then plug in the card, is that right? > > Yes - just run the command as root and it will continue running and > printing events to the terminal until you interrupt it with Ctrl-C. > > Here's some sample output showing an add/remove cycle for a USB flash > device (although this machine has an SD reader I don't have a card on > me right now so a USB stick was the closest I could get): > > http://fpaste.org/UwHH > > > I will have to do that when I get home this evening. I am SSH'd > > into the box at the moment, but it's a bit difficult to put a card > > in a slot from 35 miles away! > > Been there :-) > > > In the meantime is there anything else I can check from a SSH > > connection - drivers / modules etc? > > Make sure the usb-storage module is loaded and check to see if a SCSI > host exists for the storage device. To do this you need to look for an > entry in /sys/class/scsi_host that corresponds to the USB bus address > of the card reader. > > E.g. the key from the example above shows up like this: > > $ ls -l /sys/class/scsi_host/ | sed 's/.*\ host/host/' > total 0 > host0 -> ../../devices/pci0000:00/0000:00:1f.2/host0/scsi_host/host0 > host1 -> ../../devices/pci0000:00/0000:00:1f.2/host1/scsi_host/host1 > host2 -> ../../devices/pci0000:00/0000:00:1f.2/host2/scsi_host/host2 > host3 -> ../../devices/pci0000:00/0000:00:1f.2/host3/scsi_host/host3 > host4 -> ../../devices/pci0000:00/0000:00:1f.2/host4/scsi_host/host4 > host5 -> ../../devices/pci0000:00/0000:00:1f.2/host5/scsi_host/host5 > host9 -> > ../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host9/scsi_host/host9 > > That last one is the one we're interested in. > > $ ls -l /sys/class/scsi_host/host9 > lrwxrwxrwx. 1 root root 0 May 29 17:07 /sys/class/scsi_host/host9 -> > ../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host9/scsi_host/host9 > > If you've no other USB storage on the system this is easy enough to > spot. If you do then you'll need to look at the PCI addresses and USB > addresses to figure it out. If in doubt look at the info option to > udevadm - it can print out all the attributes it can find for a device > and often there's something in there that will identify the thing. Well here's an odd thing... I've just got home and I decided to try this. Out of curiosity (and because the thing was easier to get) I opened up my old digital camera and found a 512mb SD card inside. I set up udevadm monitor and popped the card in. Guess what? # udevadm monitor monitor will print the received events for: UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent <<in>> KERNEL[183.649491] change /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf (block) KERNEL[183.700490] change /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf (block) KERNEL[183.701200] add /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf/sdf1 (block) UDEV [183.966232] change /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf (block) UDEV [184.257171] change /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf (block) UDEV [184.532025] add /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf/sdf1 (block) <<out>> KERNEL[588.259613] change /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf (block) UDEV [588.288069] change /devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2:1.0/host4/target4:0:0/4:0:0:3/block/sdf (block) Moreover the Gnome notifier popped up asking me if I wanted to open the files in shotwell or in the file browser. All excited, I disentangled the SD card from the Pi and plugged that in instead. Nothing! Nothing at all in dmesg, /var/log/messages or udevadm. The two cards are identical form factor. The working one is made by Kingston, is 512Mb and does not have a "class" stamp on it (though it does have 3.3V printed in tiny letters). The one for the Pi is made by Integral, is 4Gb and is class 4. So why does one work and the other not? Thanks again for all the help so far. Much appreciated... Mark
Attachment:
signature.asc
Description: This is a digitally signed message part
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org