Bug 596475
Summary: | ricoh e822 sdhci device not working | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Gregg Lebovitz <gregg> | ||||||||||||||||||||
Component: | kernel | Assignee: | Stanislaw Gruszka <sgruszka> | ||||||||||||||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||||||||||
Priority: | low | ||||||||||||||||||||||
Version: | 13 | CC: | accounts+redhat, alex, anton, Brice.Goglin, bugs, Colin.Simpson, CyberCastle, dmsmith555, dougsland, dylan.semler, gansalmon, itamar, jonathan, kai.kasurinen, kernel-maint, reinouts, sergio, sgruszka, thomas | ||||||||||||||||||||
Target Milestone: | --- | ||||||||||||||||||||||
Target Release: | --- | ||||||||||||||||||||||
Hardware: | All | ||||||||||||||||||||||
OS: | Linux | ||||||||||||||||||||||
Whiteboard: | |||||||||||||||||||||||
Fixed In Version: | kernel-2.6.35.6-48.fc14 | Doc Type: | Bug Fix | ||||||||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||||||||
Clone Of: | |||||||||||||||||||||||
: | 644280 (view as bug list) | Environment: | |||||||||||||||||||||
Last Closed: | 2010-10-28 06:09:52 UTC | Type: | --- | ||||||||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||||||
Embargoed: | |||||||||||||||||||||||
Bug Depends On: | |||||||||||||||||||||||
Bug Blocks: | 644280 | ||||||||||||||||||||||
Attachments: |
|
Description
Gregg Lebovitz
2010-05-26 19:35:05 UTC
This exact problem exists in the Fedora 12 distribution. Bug report version is F-13, this is mistake or on F-13 sd card not work as well? We need clarification, if this is only F-12 problem, or F-12 and F-13 problem. Info if card works on rawhide will be useful as well. this both a F12 and F13 problem. I will try rawhide when I get the chance [Possible FIX] I modified the patch posted here (http://thread.gmane.org/gmane.linux.kernel.commits.mm/62262) to support this device. Attached are the files modified to be compiled into the kernel 2.6.1934. Tested on OpenSuSE 11.3 RC2 P.D.: I'm sorry for my bad english. Created attachment 429415 [details]
sdhci c file
Created attachment 429416 [details]
sdhci-pci.c
Created attachment 429417 [details]
sdhci.c
Created attachment 429418 [details]
sdhci.h
Tested on Dell Precision M4500 This patch doesn't work against the Fedora 13 kernels. I can't' get it to build. Created attachment 432147 [details]
mmc-make-sdhci-work-with-ricoh-mmc-controller-2.6.33.patch
CyberCastle,
Thank you very much for your help. Normally we use patches for kernel source changes not single files. I prepared this patch for 2.6.33 kernel. It generate different files than yours attached here?
Gregg,
Could you test this patch?
applied the patch to my sdhci.c sdhci.h and sdhci-pci.c and I don't see any change in behavior. The patch posted by Stanislaw Gruszka is incomplete, because it doesn't refer to this device (Ricoh E822) Test with my patch.... Created attachment 433467 [details]
mmc-ricoh_E822.diff
I applied the diffs as well as I could to the Fedora 2.6.33.5-124 kernel and it appears to work. There were some differences, likely because the Fedora kernel is older than the one you are patching. now we need to figure out how to get the patches into the kernel. Gregg Created attachment 433567 [details]
2.6.33.5-124 kernel patches to fix ricoh 822 sdhci card reader
CyberCastle's patches applied to the sdhci.c sdhci.h sdhci-pci.c in the Fedora 2.6.33.5-124 kernel.
(In reply to comment #14) > The patch posted by Stanislaw Gruszka is incomplete, because it doesn't refer > to this device (Ricoh E822) Thanks again, I'm reassigning bug to you :-) (In reply to comment #16) > now we need to figure out how to get the patches into the kernel. Since this is support for new device, this it will get fedora by that long way: mm tree -> linus tree -> fedora rawhide -> fedora release. Actually bug can be closed with UPSTREAM resolution, but please post patch upstream with missing parts (against mm tree). Let me know if you need help with that. Hi CyberCastle,
Any news about upstream posting to mm tree. BTW: it seems only below hunk need to be posted:
> + {
> + .vendor = PCI_VENDOR_ID_RICOH,
> + .device = 0xe822,
> + .subvendor = PCI_ANY_ID,
> + .subdevice = PCI_ANY_ID,
> + .driver_data = (kernel_ulong_t)&sdhci_ricoh_mmc,
> + },
stanislaw, You still have to add the sdhci_ricoh_mmc methods ricoh_mmc_probe_slot ricoh_mmc_resume and struct sdhci_pci_fixes sdhci_ricoh_mmc Gregg Yes, these things are missing in linux-2.6, but proper patches are already in mm tree http://userweb.kernel.org/~akpm/mmotm/ . I will post missing hunk today. (In reply to comment #21) > Yes, these things are missing in linux-2.6, but proper patches are already in > mm tree http://userweb.kernel.org/~akpm/mmotm/ . > > I will post missing hunk today. Where is or what is the completed patch for fedora kernels ? Thanks, Created attachment 446174 [details]
f12-add-ricoh-e822.patch
Patch for fedora 12
Patch from above comment 23 apples also on F-13 2.6.34 kernel. I will post patches to fedora mailing list to make device work on F-12,13,14 and rawhide. (In reply to comment #25) > I will post patches to fedora mailing list to make device work on F-12,13,14 Actually since bug is reported against F-13, I will not touch F-12. I've rebuilt kernel-2.6.34.6-47.fc13.src.rpm including the patch in attachment 446174 [details], and the SD reader on my Dell Precision M4500 now works fine.
Unless I am mistaken, this patch is in 2.6.36. But .36-rc3 doesn't work on my Dell E6410. It just say: mmc0: new high speed SD card at address b368 and nothing else happens. Is there anything to do apart from using the right kernel? Putting 0x40 in sdhci debug_quirks in modprobe helped in the past. Is any of this still needed nowadays? (In reply to comment #28) > Unless I am mistaken, this patch is in 2.6.36. Yes, patches are there. > But .36-rc3 doesn't work > on my Dell E6410. It just say: > mmc0: new high speed SD card at address b368 > and nothing else happens. Some SD cards do not work. We have RHEL6 bug report about that (Bug 623631), but closed as INSUFFICIENT DATA. > Is there anything to do apart from using the right kernel? Putting 0x40 in > sdhci debug_quirks in modprobe helped in the past. Is any of this still needed > nowadays? Please try :-) Do you have kernel compiled with CONFIG_DYNAMIC_DEBUG=y . If so please do: > # mount -t debugfs debugfs /sys/kernel/debug/ > # find /lib/modules/`uname -r`/kernel/drivers/mmc -name "*.ko" -exec basename {} .ko \; | while read m ; do echo "module $m +p" ; done > /sys/kernel/debug/dynamic_debug/control and put card in, and provide dmesg output. Created attachment 447442 [details]
dmesg after inserting the card with debug enabled
Could you tell what is exact card model/type (SDIO, SDHC, SD ...)? Seems for unknown reason for me, this card is recognized as MMC, what is wrong. Do you have information if that card works with other MMC/SD readers in linux. The card is a regular SD card with nothing interesting to say about it. I don't have another machine at hand to try another reader, I'll let you know when I'll find something to test on. I can give this new kernel patch a try this weekend. Since I have a working driver in my 2.6.33 kernel, we can use this as a reference. I also have a 6410 laptop. (In reply to comment #31) > Seems for > unknown reason for me, this card is recognized as MMC, what is wrong. No, driver do proper SD card initialization sequence, but there is something wrong when reading card parameters. Brice, since this is upstream problem too, could you please report it on linux-mmc.org mailing list ? FWIW, the card works fine on Dell Latitude E6500 (older model) with Ubuntu 10.4, 03:01.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21) So I guess the problem is in the reader, not in the card itself. I'll mail the MMC ML, thanks. kernel-2.6.35.6-46.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/kernel-2.6.35.6-46.fc14 kernel-2.6.34.7-61.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/kernel-2.6.34.7-61.fc13 kernel-2.6.32.23-170.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/kernel-2.6.32.23-170.fc12 Brice, for your issue I going to open a new bug report, any news from upstream? I never got any reply to my mail to the mailing list. I've got a Dell Latitude E6410 and FC14 kernel 2.6.35.6-45.fc14.x86_64. Upon inserting a SD card (actually an SD card adapter for a micro SD card), nothing seems to happen. Dmesg shows this error each time I insert it: [12930.177557] mmc0: ADMA error [12930.179608] mmc0: Got data interrupt 0x02000000 even though no data operation was in progress. [12930.179615] sdhci: ============== REGISTER DUMP ============== [12930.179625] sdhci: Sys addr: 0x00000000 | Version: 0x00000402 [12930.179634] sdhci: Blk size: 0x00007008 | Blk cnt: 0x00000001 [12930.179643] sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 [12930.179652] sdhci: Present: 0x01ff0000 | Host ctl: 0x00000011 [12930.179660] sdhci: Power: 0x0000000f | Blk gap: 0x00000000 [12930.179669] sdhci: Wake-up: 0x00000000 | Clock: 0x00004007 [12930.179678] sdhci: Timeout: 0x0000000a | Int stat: 0x00000000 [12930.179686] sdhci: Int enab: 0x02ff00cb | Sig enab: 0x02ff00cb [12930.179695] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000 [12930.179703] sdhci: Caps: 0x21e832b2 | Max curr: 0x00000040 [12930.179712] sdhci: ADMA Err: 0x00000001 | ADMA Ptr: 0x022d7804 [12930.179717] sdhci: =========================================== [12930.180804] mmc0: error -5 whilst initialising SD card We have this issue too with RHEL5 on Dell laptops. The RHEL5 kernel looks way too far behind to make the patch easy to apply, but maybe looks not impossible, just time consuming. Anyone tried/succeeded on RHEL5? I suppose an RFE from RH on this is out of the question, the answer might be RHEL6 I guess. (In reply to comment #37) > kernel-2.6.34.7-61.fc13 has been submitted as an update for Fedora 13. > https://admin.fedoraproject.org/updates/kernel-2.6.34.7-61.fc13 Result with Dell M4500. This patch does not work in every case for me. 8GB SD - Works Kingston 2GB SD - Works A-Data 16GB SDHC - Does not (same "kernel: mmc0: error -110 whilst initialising SD card" error) Tried patching kernel-2.6.34.7-56.fc13.x86_64 with f12-add-ricoh-e822.patch. And tried kernel-2.6.34.7-61.fc13.x86_64 from comment 37. I get the same result with both. Anyone else experiencing a similar problem with this patch? kernel-2.6.35.6-48.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/kernel-2.6.35.6-48.fc14 kernel-2.6.34.7-61.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. kernel-2.6.35.6-48.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. kernel-2.6.32.23-170.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. I have a patch (and compiled kernel with patch) that could possibly fix remaining problems with e822. Please test, also if you have already ricoh controller working, to see if it not causing regression. https://bugzilla.redhat.com/show_bug.cgi?id=644280#c6 |