ExpressCard CF adapter limited to UDMA/33

Bug #271700 reported by yannis
8
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Steps to reproduce :
*a laptop with an ExpressCard slot
*ExpressCard 54 CF adapter using PCI express link
*a Compact Flash with UDMA (i have a Transcend 300x)
*Using the last live CD

What is wrong :
Data rate is to slow

what i'm waiting for :
Data rate near 45 MB/s

ubuntu@ubuntu:~$ uname -a
Linux ubuntu 2.6.27-3-generic #1 SMP Wed Sep 10 16:02:00 UTC 2008 i686 GNU/Linux

ubuntu@ubuntu:~$ dmesg | grep "ata3"
[ 7.202820] ata3: PATA max UDMA/100 cmd 0x3010 ctl 0x3020 bmdma 0x3000 irq 16
[ 7.369350] ata3.00: ATA-4: TRANSCEND, 20080128, max UDMA/100
[ 7.369424] ata3.00: 15924384 sectors, multi 0: LBA
[ 7.369506] ata3.00: limited to UDMA/33 due to 40-wire cable
[ 7.389080] ata3.00: configured for UDMA/33

ubuntu@ubuntu:~$ sudo hdparm -i /dev/sda

/dev/sda:

 Model=TRANSCEND , FwRev=20080128, SerialNo=20030211 00000528
 Config={ HardSect NotMFM Fixed DTR>10Mbs }
 RawCHS=15798/16/63, TrkSize=0, SectSize=576, ECCbytes=4
 BuffType=DualPort, BuffSize=1kB, MaxMultSect=1, MultSect=?0?
 CurCHS=15798/16/63, CurSects=15924384, LBA=yes, LBAsects=15924384
 IORDY=no, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4
 DMA modes: mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5
 AdvancedPM=yes: disabled (255)
 Drive conforms to: Unspecified: ATA/ATAPI-4

 * signifies the current active mode

ubuntu@ubuntu:~$ lspci
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 671MX
00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SiS AGP Port (virtual PCI-to-PCI bridge)
00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS968 [MuTIOL Media IO] (rev 01)
00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 01)
00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f)
00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f)
00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller
00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] 191 Gigabit Ethernet Adapter (rev 02)
00:05.0 IDE interface: Silicon Integrated Systems [SiS] SATA Controller / IDE mode (rev 03)
00:06.0 PCI bridge: Silicon Integrated Systems [SiS] PCI-to-PCI bridge
00:07.0 PCI bridge: Silicon Integrated Systems [SiS] PCI-to-PCI bridge
00:09.0 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller
00:09.1 SD Host controller: ENE Technology Inc ENE PCI SmartMedia / xD Card Reader Controller
00:09.3 FLASH memory: ENE Technology Inc ENE PCI Secure Digital / MMC Card Reader Controller
00:0f.0 Audio device: Silicon Integrated Systems [SiS] Azalia Audio Controller
00:1f.0 PCI bridge: Silicon Integrated Systems [SiS] PCI-to-PCI bridge
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 771/671 PCIE VGA Display Adapter (rev 10)
09:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller

Revision history for this message
Frans (frans0023) wrote :

Hello,

I have this problem on an Thinkpad X40 and a Compact flash X233.
I use Ubuntu Jaunty 9.04 alpha 5 on the 2.6.28.8-generic kernel.
Can someone help me please ?

Thanks !

Revision history for this message
yannis (yannis-lg) wrote :

Try to add libata.force=80c in kernel options

Revision history for this message
Frans (frans0023) wrote :

Thank you so much Yannis ! It's working at UDMA/100 !!!

Revision history for this message
Davias (davias) wrote :

This is a very important matter for many. Can you be more specific on how to "add libata.force=80c in kernel options".

Do we have to recompile the kernel? Can you point to a simple howto?
TIA

Revision history for this message
Davias (davias) wrote :

OK, I solved with this:

found a workaround by forcing the 80c. But the problem is already an existing bug in the kernel, the cable detection is messed up.

eric@vishnu:~$ cat /etc/modprobe.d/options
# XXX: Ignore HPA by default. Needs to be revisted in jaunty
#options libata ignore_hpa=1
options libata force=80c

Save the file & sudo sudo update-initramfs -u
reboot system - OK!

UDMA5 is set!

Revision history for this message
szefu (marszew) wrote :

Hi all,

ASUS A6U laptop with SiS 760 chipset.
ATA device:
IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 01) (prog-if 80 [Master])
 Subsystem: ASUSTeK Computer Inc. Device 1977

Problem: ATA limited to UDMA/33 due to 40-wire cable

The solution provided by yannis (passing 'libata.force=80c' kernel parameter) works great and for convenience I am using it now, however before I found it I used to make slight modification of the 'drivers\ata\pata_sis.c' file and compile the kernel. I added the chip ID (which is: { 0x5513, 0x1043, 0x1977 } /*ASUS A6U*/) to the 'sis_laptop' structure. The structure now looks as:

static const struct sis_laptop sis_laptop[] = {
        /* devid, subvendor, subdev */
        { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
        { 0x5513, 0x1043, 0x1977 }, /* ASUS A6U */
        { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
        { 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */
        /* end marker */
        { 0, }
};

This also worked and enabled udma5 on the drive.
Hope it is useful to someone.

Revision history for this message
Davias (davias) wrote :

Thank you szefu for confirming that yannis solution works for you...

But can you help in explaining WHERE to put that kernel option?
With the previous solution I just edited /etc/modprobe.d/options file. With yannis's what I have to do? TIA

Revision history for this message
szefu (marszew) wrote :

Kernel parameters should be passed to the kernel:), which means that it should be added to the configuration file of your boot manager.

In Ubuntu default boot manager is grub, therefore in default configuration you'll have to edit '/boot/grub/menu.lst' file. Each entry looks like, notice the 'libata.force=80c ' added at the end of 'kernel' line:

title Ubuntu 9.04, kernel 2.6.28-11-generic #Name displayed in the menu
uuid b50d9919-fc3e-4402-*********** #ID of the partition where kernel is located
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=b50d9919-fc3e-4402-** ro quiet splash libata.force=80c #kernel file + options!!!
initrd /boot/initrd.img-2.6.28-11-generic
quiet

It is also convenient to add the same option to the line starting with (also found in '/boot/grub/menu.lst' file)
# defoptions=quiet splash
so changing it to
# defoptions=quiet splash libata.force=80c

(Notice # in the beggining). This is an option for update-grub script, which is called whenever new kernel is installed, thus will be automatically added for future updates. This solution should work the same as the one used by Davis (specifying 'libata' module option in the '/etc/modprobe.d/options' file), but should also work for statically compiled 'libata' module, though I don't know if Davis's won't work in this way too.

Revision history for this message
Davias (davias) wrote :

And thanks a lot indeed! Modified the /boot/grub/menu.lst as per your suggestions above and now both my disks are running at UDMA5!

Szefu, thank again for your precious help! Hope it helps others too!

Revision history for this message
kernel-janitor (kernel-janitor) wrote :

Hi yannis,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/ . Please then run following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 271700

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.