home | list info | list archive | date index | thread index

[OCLUG-Tech] what does my kernel need to see the SD/MMC slot on my laptop?

  • Subject: [OCLUG-Tech] what does my kernel need to see the SD/MMC slot on my laptop?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Mon, 3 Jun 2013 16:34:28 -0400 (EDT)
  ok, a really specific question as i'm slowly going bonkers trying to
debug something that *should* be easy, and i'm out of ideas.

  scenario: my 64-bit asus g74s laptop (running ubuntu) has an SD card
slot, and when i boot using the latest official ubuntu kernel release:

$ uname -a
Linux oneiric 3.2.0-43-generic #68-Ubuntu SMP Wed May 15 03:33:33 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux
$

my SD card slot works perfectly. however, when i boot to my
hand-rolled 3.10.0-rc4, everything else works fine but the SD card
slot becomes utterly non-functional -- no kernel log messages, no
udevadm verification, nothing. so here's the short form of the
question -- anyone know what kernel feature i have failed to select to
get a working SD card slot on this particular laptop?

  and now, the long form with much more detail.

currently running the official, earlier and working kernel and i've
taken some snapshots of system state before and after plugging in an
SD card to see any difference. so here's what i've got.

  here's the difference in lsmod, but nothing there seems SD-card
related, it's more filesystem related:

1a2,5
> nls_iso8859_1          12713  1
> nls_cp437              16991  1
> vfat                   17585  1
> fat                    61512  1 vfat
45c49
< rts5139               351188  0
---
> rts5139               351188  2

  although i'm not sure about that rts5139 module, that's in "staging"
and i'd be surprised if that was the problem but it's possible.

  here's the difference in the output from "mount":

> /dev/sdc1 on /media/BEAGLE_BONE type vfat
(rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)
> /dev/sdc2 on /media/eMMC-Flasher type ext4
(rw,nosuid,nodev,uhelper=udisks)

and the observation there is that udev was clearly involved given the
"uhelper" info.  but let's move on.

  here's the tail end of /var/log/kern.log showing success:

Jun  3 16:04:15 oneiric kernel: [  696.443451] sd 6:0:0:0: [sdc] 7741440 512-byte logical blocks: (3.96 GB/3.69 GiB)
Jun  3 16:04:15 oneiric kernel: [  696.443533] sd 6:0:0:0: [sdc] Cache data unavailable
Jun  3 16:04:15 oneiric kernel: [  696.443538] sd 6:0:0:0: [sdc] Assuming drive cache: write through
Jun  3 16:04:15 oneiric kernel: [  696.444463] sd 6:0:0:0: [sdc] Cache data unavailable
Jun  3 16:04:15 oneiric kernel: [  696.444468] sd 6:0:0:0: [sdc] Assuming drive cache: write through
Jun  3 16:04:15 oneiric kernel: [  696.445803]  sdc: sdc1 sdc2
Jun  3 16:04:16 oneiric kernel: [  696.886387] EXT4-fs (sdc2): recovery complete
Jun  3 16:04:16 oneiric kernel: [  696.886393] EXT4-fs (sdc2): mounted filesystem with ordered data mode. Opts: (null)

and, finally, here's the output from "udevadm monitor --kernel
--property" which i think is the most important since i want to verify
proper uevents coming from the kernel:

KERNEL[1047.021135] change
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/host6/target6:0:0/6:0:0:0/block/sdc
(block)
ACTION=change
DEVNAME=sdc
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/host6/target6:0:0/6:0:0:0/block/sdc
DEVTYPE=disk
MAJOR=8
MINOR=32
SEQNUM=2542
SUBSYSTEM=block
UDEV_LOG=3

KERNEL[1047.021350] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/host6/target6:0:0/6:0:0:0/block/sdc/sdc1
(block)
ACTION=add
DEVNAME=sdc1
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/host6/target6:0:0/6:0:0:0/block/sdc/sdc1
DEVTYPE=partition
MAJOR=8
MINOR=33
SEQNUM=2543
SUBSYSTEM=block
UDEV_LOG=3

KERNEL[1047.021511] add
/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/host6/target6:0:0/6:0:0:0/block/sdc/sdc2
(block)
ACTION=add
DEVNAME=sdc2
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/host6/target6:0:0/6:0:0:0/block/sdc/sdc2
DEVTYPE=partition
MAJOR=8
MINOR=34
SEQNUM=2544
SUBSYSTEM=block
UDEV_LOG=3

... end of udevadm output for that action.

  in short, under the earlier, official ubuntu kernel release, the
slot works fine.

  just rebooted to my newer kernel and ... nothing. inserting the same
SD card produces nothing in the kernel log file and nothing from
"udevadm". i'm at a loss.

  it's possible that the newer kernel now has some sort of
incompatibility with the older udev rules so a uevent is going
unrecognized but i can't see anything like that.

  thoughts?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================