Bug 8052
Summary: | tifm_7xx1 broken as of 2.6.20 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Andreas Steinmetz (ast) |
Component: | MMC/SD | Assignee: | Alex Dubov (oakad) |
Status: | CLOSED CODE_FIX | ||
Severity: | high | CC: | gentoo_bugzilla, kernel, ynvich |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.20.1 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Bug Depends on: | 8411 | ||
Bug Blocks: | 8393 | ||
Attachments: |
Smiffy's debug logs from 2.6.21-rc4
Possible fix for 2.6.21 compilation Driver release 0.8e |
Description
Andreas Steinmetz
2007-02-21 16:51:34 UTC
I can confirm this bug; I have had a bug open on the Gentoo Bugzilla http://bugs.gentoo.org/show_bug.cgi?id=171123 as moving from the 2.6.19 series to 2.6.20 series broke the tifm MMC/SD functionality on my Thinkpad Z61m. After some testing (lots of dmsg dumps posted to Gentoo bug), I have been asked to submit this here as an upstream bug and I am posting against this one, as it would appear to me to be the same issue. As part of the testing process, I was asked to test with 2.6.21-rc4 which I can confirm is still broken. Created attachment 10938 [details]
Smiffy's debug logs from 2.6.21-rc4
2.6.21-rc4 seems to do better than 2.6.20: the logs here suggest that media has
been detected, but then it decides that the card is not responding and gives
up.
The problems in question are probably fixed in the external version. http://download.berlios.de/tifmxx/tifm-0.8d.tar.bz2 It was not submitted, because mmc maintainer is busy with other matters. All differences in behaviour between 2.6.20 and 2.6.21 are purely accidental. I have tried to build the external version mentioned, but got an error: tifm_sd.c: In function 'tifm_sd_probe': tifm_sd.c:987: error: 'struct mmc_host' has no member named 'max_sectors' As I know no more about kernel modules other than how to type "make", I can test no further with this. I did this against 2.6.21-rc4, if that is of any significance. Yes, it will compile only against 2.6.20. 2.6.21 has incompatible changes and unless mmc maintainer will be willing to process my patches sooner, I'll only fix this on 2.6.21 release (-rc kernels change so fast that chasing them with out-of-tree driver is pointless). OK, I have tried again with 2.6.20 (Gentoo 2.6.20-r3), with MMC Support checked in the kernel config (built-in) and TI Flash Media MMC/SD Interface support unchecked completely. Make gives me some warnings: make -C /lib/modules/2.6.20-gentoo-r3/build M=/home/smith/tmp/tifm make[1]: Entering directory `/usr/src/linux-2.6.20-gentoo-r3' Building modules, stage 2. MODPOST 3 modules WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_alloc_adapter' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_add_adapter' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_remove_adapter' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_free_adapter' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_free_device' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_alloc_device' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_eject' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_map_sg' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_unmap_sg' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_register_driver' exported twice. Previous export was in vmlinux WARNING: /home/smith/tmp/tifm/tifm_core: 'tifm_unregister_driver' exported twice. Previous export was in vmlinux make[1]: Leaving directory `/usr/src/linux-2.6.20-gentoo-r3' If I do modprobe tifm_7xx1, I get the following error which would appear to reflect the above: tifm_core: exports duplicate symbol tifm_alloc_adapter (owned by kernel) tifm_7xx1: Unknown symbol tifm_queue_work It appears that the above build/modprobe errors were due to the fact that menuconfig had left a couple of TIFM bits with value 'y', after I thought I had disabled it. I have now edited .config manually, rebuilt the kernel, successfully built and modprobed the modules and now get in dmesg: tifm_core: MMC/SD card detected in socket 0:1 mmcblk0: mmc0:b368 SD064 61312KiB mmcblk0: p1 ...and best of all: brw-rw---- 1 root disk 254, 0 Mar 27 13:03 mmcblk0 brw-rw---- 1 root disk 254, 1 Mar 27 13:03 mmcblk0p1 So, I can confirm this to work with the Gentoo-patched 2.6.20-r3 kernel. Alex, is it possible to isolate the fix for this bug from the above tarball? Also, if you have time I would suggest that you send a patch to upgrade the driver to Andrew Morton for -mm inclusion while Pierre is busy. That way the fixed version at least gets some air time (and I would have found it before suggesting that Smiffy took his issue to this bug tracker). oh and if it's too much work to isolate the specific fix, I am happy to take care of the 2.6.21 port and -mm submission, as I am planning to backport this to Gentoo's 2.6.20 and 2.6.21 kernel trees anyway. Created attachment 10969 [details]
Possible fix for 2.6.21 compilation
The fix for 2.6.21 kernels may be as simple as this (other problems may surface
though).
I was more curious if the fix for this specific bug is available as an individual isolated patch, which is the nicer approach to take at fixing this in 2.6.20/2.6.21 Unfortunately, "tifm_7xx1 broken as of 2.6.20" does not constitutes a "specific bug". You may even notice that I have not asked for any clarification on its behalf. In fact, there were several problems in 0.7 that together prevented many cards from working. The irony is that 0.7 had spent a whole release cycle in the -mm before going to the mainstream and there were no bug reports for it during that time (that's, of course, because 0.6 was rather stable - lets hope the same will be true for 0.8). *** Bug 8352 has been marked as a duplicate of this bug. *** Created attachment 11312 [details]
Driver release 0.8e
This is a diff against v2.6.21.1. It is practically fine. I will file a
dependent bug with details.
Alex, I think you can mark this bug resolved.
The source for release 0.8e can be downloaded at: http://download.berlios.de/tifmxx/tifm-0.8e.tar.bz2 This bug will be marked as resolved when the driver will be available in the main kernel tree. Otherwise, the bug remains valid, to my opinion. This is fixed in Linus' tree, 2.6.22-rc1 confirmed working on downstream gentoo bug. Thanks. |