Bug 171687

Summary: Ricoh SD/SDIO/MMC/MS/MSPro Host Adapter not working properly
Product: [Fedora] Fedora Reporter: Rodd Clarkson <rodd>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: davidz, katzj, matthias, ncunning, notting, shillman, zcerza
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-20 06:20:04 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Rodd Clarkson 2005-10-25 06:26:14 EDT
Description of problem:

When I stick a SD card into the 'unit' it is not detected, or at least not mounted.

Here's some information that might be useful.

lspci -vv shows:

03:01.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev
17) (prog-if 01)
        Subsystem: Dell: Unknown device 0189
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 64
        Interrupt: pin C routed to IRQ 10
        Region 0: Memory at dcffc700 (32-bit, non-prefetchable) [size=256]
        Capabilities: <available only to root>

lshal shows:

udi = '/org/freedesktop/Hal/devices/pci_1180_476'
  info.udi = '/org/freedesktop/Hal/devices/pci_1180_476'  (string)
  linux.subsystem = 'pci'  (string)
  linux.hotplug_type = 1  (0x1)  (int)
  pci.subsys_product = 'Unknown (0x0189)'  (string)
  pci.subsys_vendor = 'Dell'  (string)
  info.product = 'RL5c476 II'  (string)
  pci.product = 'RL5c476 II'  (string)
  info.vendor = 'Ricoh Co Ltd'  (string)
  pci.vendor = 'Ricoh Co Ltd'  (string)
  pci.device_protocol = 0  (0x0)  (int)
  pci.device_subclass = 7  (0x7)  (int)
  pci.device_class = 6  (0x6)  (int)
  pci.subsys_vendor_id = 4136  (0x1028)  (int)
  pci.subsys_product_id = 393  (0x189)  (int)
  pci.vendor_id = 4480  (0x1180)  (int)
  pci.product_id = 1142  (0x476)  (int)
  info.linux.driver = 'yenta_cardbus'  (string)
  pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:03:01.0' 
(string)
  info.parent = '/org/freedesktop/Hal/devices/pci_8086_2448'  (string)
  info.bus = 'pci'  (string)
  linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1e.0/0000:03:01.0'
 (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:03:01.0'  (string)


Version-Release number of selected component (if applicable):

hal-0.5.4-3


How reproducible:

Always


Steps to Reproduce:
1. Insert SD Card into the 'slot'


Actual results:

Nothing appears in computer.
No entry is added to /etc/fstab


Expected results:

The 'device' should be mounted and appear on the desktop (which won't happen at
the moment due to another bug (see:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=170068) but at least it
should appear in /etc/fstab and be mounted /media/???
Comment 1 Rodd Clarkson 2006-01-22 20:25:01 EST
Apparently support for this is/has been developed:

see: http://mmc.drzeus.cx/wiki/Linux/Drivers/sdhci

I'm not sure what sort of time line they are looking at for inclusion in the
kernel, but I'm signing on to the mailing list to find out more.
Comment 2 Trond Danielsen 2006-08-05 17:22:10 EDT
My laptop (asus s5a) has the same flash card reader, and it is working if I
manually modprobe mmc_block first. I only have mmc cards, so I have not tested
with anything else, but the card is detected as /dev/mmcblk0p1 and working ok.
Comment 3 Matthias Saou 2006-08-23 18:27:29 EDT
*** Bug 185546 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Saou 2006-08-23 18:33:30 EDT
I have a Dell Latitude X1 laptop with that same Ricoh SD/MMC reader, and last I
tried with FC development, when I put an SD card inside, "something happened"
but I couldn't see any /dev/something listed in dmesg output, so I didn't know
how to mount its content. Note that the driver seems to not like suspend on this
laptop. I don't have any more SD or MMC card at hand to reproduce, unfortunately.
Comment 5 David Zeuthen 2006-09-28 19:36:56 EDT
Does this work with latest rawhide?
Comment 6 Matthias Saou 2006-09-29 04:48:30 EDT
Hmmm, maybe I should go buy a cheap SD card to test it... or Rodd? Any news?
Comment 7 Rodd Clarkson 2006-10-01 19:18:46 EDT
It works well with one exception.

I had to `modprobe mmc_block` before the card was automatically detected.

Otherwise it worked a treat.  The card appeared in the Computer folder, in
Places and in the Disk Mounter applet in the panel.

File activity was quick and worked!

Apart from the need to modprobe mmc_block it's all looking good.  Is there
anyway that this can automatically happen when you insert a card?  
Comment 8 Bill Nottingham 2006-10-03 15:39:45 EDT
Can you do the following:

- eject card
- rmmod mmc_block
- run 'udevmonitor'
- insert card

Do you get any events from udevmonitor?
Comment 9 David Zeuthen 2006-10-03 15:44:06 EDT
Glad to hear it works with HAL. Reassigning to udev as we probably need a rule
to load the appropriate modules.
Comment 10 Zack Cerza 2006-10-03 16:02:15 EDT
After (and only after) I loaded mmc_core, my Thinkpad X41 (not tablet) properly
detected, mounted and unmounted both an MMC and an SD card via gnome-volume-manager.
Comment 11 Jeremy Katz 2006-10-03 16:08:57 EDT
Putting 
  ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" 
in /etc/udev/rules.d/50-udev.rules makes things work automagically
Comment 12 Jeremy Katz 2006-10-03 16:20:14 EDT
Building a udev with the rule added
Comment 13 David Zeuthen 2006-10-03 16:23:28 EDT
Zack, does the udev rule in comment 11 make things work for you?
Comment 14 Zack Cerza 2006-10-03 17:23:44 EDT
Why yes it does! :)
Comment 15 Rodd Clarkson 2006-10-04 18:32:47 EDT
(In reply to comment #8)
> Can you do the following:
> 
> - eject card
> - rmmod mmc_block
> - run 'udevmonitor'
> - insert card
> 
> Do you get any events from udevmonitor?

[root@localhost ~]# lsmod | grep mmc
mmc_core               31049  1 sdhci
[root@localhost ~]# udevmonitor 
udevmonitor prints the received event from the kernel [UEVENT]
and the event which udev sends out after rule processing [UDEV]

UEVENT[1160037028.030612]
add@/devices/pci0000:00/0000:00:1e.0/0000:03:01.2/mmc0:0001
UDEV  [1160037028.178345]
add@/devices/pci0000:00/0000:00:1e.0/0000:03:01.2/mmc0:0001

UEVENT[1160037108.387855]
remove@/devices/pci0000:00/0000:00:1e.0/0000:03:01.2/mmc0:0001
UDEV  [1160037108.387855]
remove@/devices/pci0000:00/0000:00:1e.0/0000:03:01.2/mmc0:0001


The first set of two is when I stick the card in, the second set when I pull the
card out.
Comment 16 Rodd Clarkson 2006-10-04 18:36:05 EDT
(In reply to comment #11)
> Putting 
>   ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" 
> in /etc/udev/rules.d/50-udev.rules makes things work automagically

I added this to (almost) the end of the file and it "works like a bought one".

Comment 17 Daryll 2006-11-08 15:16:47 EST
MMC cards work fine on my new HP laptop using the Ricoh device on FC6. When the
card is added, the module loads, udev creates /dev/mmcblk0 and /dev/mmcblk0p1,
and I can then manually mount the partition

Can gnome-volume-manager be modified to recognize the device and mount the
partition automatically under /media? That would finish the process nicely.