Bug 42886 - PCI O2Micro no longer works within 3.x kernel
Summary: PCI O2Micro no longer works within 3.x kernel
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: MMC/SD (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_mmc-sd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-07 21:29 UTC by buildyear68
Modified: 2012-08-31 16:38 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.0.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg kernel 3.0.1 with CONFIG_MMC_DEBUG=y (64.55 KB, text/plain)
2012-03-07 22:01 UTC, buildyear68
Details

Description buildyear68 2012-03-07 21:29:23 UTC
Hi,
I've a Twinhead F11Y notebook with a PCI O2Micro MMC/SD Card Reader.

# lspci -n (shorten)
05:05.0 0c00: 1217:00f7 (rev 02)
05:05.2 0805: 1217:7120 (rev 01)
05:05.3 0180: 1217:7130 (rev 01)

# lspci (shorten)
05:05.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
05:05.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)
05:05.3 Mass storage controller: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)

The SD Host controller works until kernel 2.6.39.4 very fine, but since kernel 3.0.1 there is no change to get access to it.

fdisk -l in kernel 2.6.39.4 shows this:

Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes
49 heads, 48 sectors/track, 3292 cylinders, total 7744512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192     7744511     3868160    b  W95 FAT32



since kernel 3.0.1 fdisk -l do not show this disk.

I also checked it in current kernel 3.3rc6 but the result is the same, no mmc disk any longer.

I'm using Gentoo Linux.
Comment 1 Chris Ball 2012-03-07 21:33:15 UTC
Hi,

Thanks for the report.  Could you try turning on CONFIG_MMC_DEBUG=y and rebuilding your kernel, and show the output here?

You could also try a more fine-grained bisection between 2.6.39.4 and 3.0.1, to find the commit that broke things for you.
Comment 2 buildyear68 2012-03-07 21:41:41 UTC
I've already done a diff, but there are ~72 differences in the linux/drivers/mmc/host/sdhci.c file. 

I will now build 3.0.1 with CONFIG_MMC_DEBUG=y.
Comment 3 Chris Ball 2012-03-07 21:46:00 UTC
Hi,

"git bisect" can help you perform the optimal number of tests to narrow down the change that introduced the bug.
Comment 4 buildyear68 2012-03-07 22:01:25 UTC
Created attachment 72551 [details]
dmesg kernel 3.0.1 with CONFIG_MMC_DEBUG=y

dmesg with CONFIG_MMC_DEBUG=y
Comment 5 buildyear68 2012-03-07 22:10:03 UTC
Hi Chris, 'git bisect'?

my last known DVCS is mercurial. I don't know anything of git at the moment. I will read some tutorials.
Comment 6 Chris Ball 2012-03-07 22:17:09 UTC
Hi,

Thanks for the debug.  It doesn't tell me what's wrong, but it's helpful to know that we're failing to communicate with the controller.

We've had one other report of a failure with the same symptoms on your controller:

http://thread.gmane.org/gmane.linux.kernel.mmc/11973/focus=11996

and it included a patch to fix the problem for this user, but we've already merged the patch, so you should have it already:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=dd8df17fe83483d7ea06ff229895e35a42071599

Could you confirm that this patch is already applied for you?  We could also consider the reporter and check that 

Other than that, I think the bisection is the only thing I can think of for now.  (You can google [git bisect] to read more about how it works, and ask me questions if you need to).

We could also contact that reporter (Alexander) and check that 3.3-rc6 still works for him.
Comment 7 buildyear68 2012-03-10 08:18:02 UTC
Yes, I can confirm that the patch is in the source, but it doesn't work for my hardware O2micro chip. I've also removed the patch for test purpose but this also doesn't work for me.

Therefore I will do some tests with 2.6.39.4 and 3.0.1 maybe I find the problem.

Note You need to log in before you can comment on or make changes to this bug.