Wed Jul 26 17:39:28 CDT 2006
SD Card Now Working
My Averate 3715-ed1 laptop built in sd card reader now works 2 kernel patches later.
I was able to get this to work through the good work of Pierre Ossman.
To get this thing to work, you need to upgrade to download version linux-2.6.17 of the kernel and upgrade to the release candidate version which you can do by downloading patch : patch-2.6.18-rc1 which will bring you to the 2.6.18-rc1 kernel version.
You then need to apply 2 patches, the first is to force the kernel to use your controller even though it does not recognize it :
http://list.drzeus.cx/pipermail/sdhci-devel/2006-June/001074.html
The link to the patch is :
http://list.drzeus.cx/pipermail/sdhci-devel/attachments/20060626/0c4c532c/attachment.bin
You then need to edit the file in the Linux source tree :
/drivers/mmc/sdhci.c
find the line :
static unsigned int debug_forceunknownvers = 0;
Change the 0 to a 1.
You then need to patch the kernel again to fix some timeout problems :
http://marc.theaimsgroup.com/?l=linux-kernel&m=115063418500228&w=2
Then build and install the kernel. Once the new kernel has been installed, you need to make a special device to access your SD card. Find the major number for your device, mine was 232. The number will be beside mmc in /proc/devices. Then as root :
mknod /dev/mmc0 b 252 0
252 was the number that I had in /proc/devices, it might be different for you.
You can now manipulate your SD card like any other device.
Please let me know if there are any questions on this process, I was happy to get it to work.
Mathieu
I was able to get this to work through the good work of Pierre Ossman.
To get this thing to work, you need to upgrade to download version linux-2.6.17 of the kernel and upgrade to the release candidate version which you can do by downloading patch : patch-2.6.18-rc1 which will bring you to the 2.6.18-rc1 kernel version.
You then need to apply 2 patches, the first is to force the kernel to use your controller even though it does not recognize it :
http://list.drzeus.cx/pipermail/sdhci-devel/2006-June/001074.html
The link to the patch is :
http://list.drzeus.cx/pipermail/sdhci-devel/attachments/20060626/0c4c532c/attachment.bin
You then need to edit the file in the Linux source tree :
/drivers/mmc/sdhci.c
find the line :
static unsigned int debug_forceunknownvers = 0;
Change the 0 to a 1.
You then need to patch the kernel again to fix some timeout problems :
http://marc.theaimsgroup.com/?l=linux-kernel&m=115063418500228&w=2
Then build and install the kernel. Once the new kernel has been installed, you need to make a special device to access your SD card. Find the major number for your device, mine was 232. The number will be beside mmc in /proc/devices. Then as root :
mknod /dev/mmc0 b 252 0
252 was the number that I had in /proc/devices, it might be different for you.
You can now manipulate your SD card like any other device.
Please let me know if there are any questions on this process, I was happy to get it to work.
Mathieu
Posted by Mathieu Allard
Wed Jul 18:27:12:40 CDT 2006
Linux Laptop Hibernation Problems
I tell this tale in the hopes that this will not happen to someone else. I don't know if this is a bug in the Linux kernel or if the issue is a problem with my setup, but I recently had a problem with hibernation in Linux.
What happened was that I tried to put my laptop into hibernation but this failed and I got an error saying that there was a problem getting the state of the fans in /proc and the computer was unable to hibernate.
I then put the laptop into suspend without a problem.
What happened next is that I took the laptop out of suspend, the laptop crashed shortly after so I had to reboot. When the laptop was rebooting it started to restore the session from the hibernation partition instead of going through the regular boot process which led to data corruption on my main file system. Not knowing what to do I shut off the computer, rebooted, took away the resume=/dev/hda2 option from my kernel boot parameters, ran fsck on my file system and recovered the data that I could. I guess that the moral of the story is to make sure that a Linux kernel does not try and recover from a hibernation partition when hibernation is not the state that the laptop was shutdown. I will be extremely careful in the future with Linux's hibernation feature.
Mathieu
What happened was that I tried to put my laptop into hibernation but this failed and I got an error saying that there was a problem getting the state of the fans in /proc and the computer was unable to hibernate.
I then put the laptop into suspend without a problem.
What happened next is that I took the laptop out of suspend, the laptop crashed shortly after so I had to reboot. When the laptop was rebooting it started to restore the session from the hibernation partition instead of going through the regular boot process which led to data corruption on my main file system. Not knowing what to do I shut off the computer, rebooted, took away the resume=/dev/hda2 option from my kernel boot parameters, ran fsck on my file system and recovered the data that I could. I guess that the moral of the story is to make sure that a Linux kernel does not try and recover from a hibernation partition when hibernation is not the state that the laptop was shutdown. I will be extremely careful in the future with Linux's hibernation feature.
Mathieu
Posted by Mathieu Allard
Sat Jul 8 16:36:37 CDT 2006
Averatec 3715-ed1 SD Card Reader Problem
I recently tested the SD card reader on my Averatec 3715-ed1 laptop and found that there are issues with it in Linux. The relevant output from dmesg:
//snip//
[4294832.599000] mmc0: Timeout waiting for hardware interrupt. Please report this to.
[4294832.599000] sdhci: ============== REGISTER DUMP ==============
[4294832.599000] sdhci: Sys addr: 0x1fd58f7c | Version: 0x00002010
[4294832.599000] sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000001
[4294832.599000] sdhci: Argument: 0x00000000 | Trn mode: 0x00000012
[4294832.599000] sdhci: Present: 0x01f70a02 | Host ctl: 0x00000001
[4294832.599000] sdhci: Power: 0x0000000f | Blk gap: 0x00000000
[4294832.599000] sdhci: Walk up: 0x00000000 | Clock: 0x00008007
[4294832.599000] sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[4294832.599000] sdhci: Int enab: 0x01ff00cf | Sig enab: 0x01ff00cf
[4294832.599000] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[4294832.599000] sdhci: Caps: 0x038021a1 | Max curr: 0x00ffffff
[4294832.599000] sdhci: ===========================================
//endsnip//
I also found that the keyboard stops responding for a few seconds after putting the card in. The kernel version that I was running that generated the output is the following :2.6.15-22-k7, the default Ubuntu Kernel. Other pertinent output would probably include lspci:
//snip// root@durnik:~# lspci
0000:00:00.0 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.1 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.2 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.3 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.4 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.7 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South]
0000:00:09.0 Network controller: RaLink Ralink RT2500 802.11 Cardbus Reference Card (rev 01)
0000:00:0a.0 CardBus bridge: O2 Micro, Inc. OZ711MP1/MS1 MemoryCardBus Controller (rev 21)
0000:00:0a.2 0805: O2 Micro, Inc.: Unknown device 7120 (rev 01)
0000:00:0a.3 Bridge: O2 Micro, Inc.: Unknown device 7130 (rev 01)
0000:00:0a.4 FireWire (IEEE 1394): O2 Micro, Inc.: Unknown device 00f7 (rev 02)
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
0000:00:11.6 Communication controller: VIA Technologies, Inc. AC'97 Modem Controller (rev 80)
0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
0000:01:00.0 VGA compatible controller: VIA Technologies, Inc. S3 Unichrome Pro VGA Adapter (rev 01) //endsnip//
Not wanting to needlessly disturb the developers, I upgraded to the most recent version of the Linux Kernel which at the time of testing is 2.6.17.4 but found that with this kernel version, when I put in the card the computer crashed. I plan on mailing the mailing list as per the kernel messages now, though I can't at the moment because I am currently offline.
//snip//
[4294832.599000] mmc0: Timeout waiting for hardware interrupt. Please report this to
[4294832.599000] sdhci: ============== REGISTER DUMP ==============
[4294832.599000] sdhci: Sys addr: 0x1fd58f7c | Version: 0x00002010
[4294832.599000] sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000001
[4294832.599000] sdhci: Argument: 0x00000000 | Trn mode: 0x00000012
[4294832.599000] sdhci: Present: 0x01f70a02 | Host ctl: 0x00000001
[4294832.599000] sdhci: Power: 0x0000000f | Blk gap: 0x00000000
[4294832.599000] sdhci: Walk up: 0x00000000 | Clock: 0x00008007
[4294832.599000] sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[4294832.599000] sdhci: Int enab: 0x01ff00cf | Sig enab: 0x01ff00cf
[4294832.599000] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[4294832.599000] sdhci: Caps: 0x038021a1 | Max curr: 0x00ffffff
[4294832.599000] sdhci: ===========================================
//endsnip//
I also found that the keyboard stops responding for a few seconds after putting the card in. The kernel version that I was running that generated the output is the following :2.6.15-22-k7, the default Ubuntu Kernel. Other pertinent output would probably include lspci:
//snip// root@durnik:~# lspci
0000:00:00.0 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.1 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.2 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.3 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.4 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:00.7 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South]
0000:00:09.0 Network controller: RaLink Ralink RT2500 802.11 Cardbus Reference Card (rev 01)
0000:00:0a.0 CardBus bridge: O2 Micro, Inc. OZ711MP1/MS1 MemoryCardBus Controller (rev 21)
0000:00:0a.2 0805: O2 Micro, Inc.: Unknown device 7120 (rev 01)
0000:00:0a.3 Bridge: O2 Micro, Inc.: Unknown device 7130 (rev 01)
0000:00:0a.4 FireWire (IEEE 1394): O2 Micro, Inc.: Unknown device 00f7 (rev 02)
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
0000:00:11.6 Communication controller: VIA Technologies, Inc. AC'97 Modem Controller (rev 80)
0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
0000:01:00.0 VGA compatible controller: VIA Technologies, Inc. S3 Unichrome Pro VGA Adapter (rev 01) //endsnip//
Not wanting to needlessly disturb the developers, I upgraded to the most recent version of the Linux Kernel which at the time of testing is 2.6.17.4 but found that with this kernel version, when I put in the card the computer crashed. I plan on mailing the mailing list as per the kernel messages now, though I can't at the moment because I am currently offline.
Posted by Mathieu Allard