Comment 12 for bug 953160

Daniel Manrique (roadmr) wrote :

I was thinking whether we can discern what kind of device actually got plugged in by looking at the log. I did some investigation:

my laptop has the card reader show as a USB device, and on the Unity dash I do see a usb-stick thingy. When I pop the card in I see:

Mar 12 17:33:54 snowflake kernel: [30664.180413] usbcore: registered new interface driver uas
Mar 12 17:33:54 snowflake kernel: [30664.203955] Initializing USB Mass Storage driver...
Mar 12 17:33:54 snowflake kernel: [30664.204163] scsi4 : usb-storage 2-1.4:1.0
Mar 12 17:33:54 snowflake kernel: [30664.204289] usbcore: registered new interface driver usb-storage
Mar 12 17:33:54 snowflake kernel: [30664.204291] USB Mass Storage support registered.
Mar 12 17:33:55 snowflake kernel: [30665.205091] scsi 4:0:0:0: Direct-Access Generic STORAGE DEVICE 0207 PQ: 0 ANSI: 0
Mar 12 17:33:55 snowflake kernel: [30665.647366] sd 4:0:0:0: Attached scsi generic sg2 type 0
Mar 12 17:33:55 snowflake kernel: [30665.650211] sd 4:0:0:0: [sdb] 246016 512-byte logical blocks: (125 MB/120 MiB)
Mar 12 17:33:55 snowflake kernel: [30665.651586] sd 4:0:0:0: [sdb] Write Protect is off
Mar 12 17:33:55 snowflake kernel: [30665.651590] sd 4:0:0:0: [sdb] Mode Sense: 0b 00 00 08
Mar 12 17:33:55 snowflake kernel: [30665.652861] sd 4:0:0:0: [sdb] No Caching mode page present
Mar 12 17:33:55 snowflake kernel: [30665.652865] sd 4:0:0:0: [sdb] Assuming drive cache: write through
Mar 12 17:33:55 snowflake kernel: [30665.656968] sd 4:0:0:0: [sdb] No Caching mode page present
Mar 12 17:33:55 snowflake kernel: [30665.656972] sd 4:0:0:0: [sdb] Assuming drive cache: write through
Mar 12 17:33:55 snowflake kernel: [30665.658102] sdb: sdb1
Mar 12 17:33:55 snowflake kernel: [30665.661830] sd 4:0:0:0: [sdb] No Caching mode page present
Mar 12 17:33:55 snowflake kernel: [30665.661834] sd 4:0:0:0: [sdb] Assuming drive cache: write through
Mar 12 17:33:55 snowflake kernel: [30665.661837] sd 4:0:0:0: [sdb] Attached SCSI removable disk

So there is indeed no way to tell this from a USB stick, from the kernel's point of view :( I'm sure Firewire and eSATA would not be conflated with USB, as some SD card readers are, but for SD/USB, we seem to be out of luck :(