Skip to contentSkip to conversation

: atiixp : Enabling UDMA5 on IXP200

PATCH In review Velu Erwan 2 participants 5 messages Oct 10, 2005 – Oct 22, 2005 libata

lore
Share & tools
lore

Velu Erwan

author
#0 lore raw

PATCH 1/1 : atiixp : Enabling UDMA5 on IXP200

Hi,

I'm an "Asus Pundit-R" owner, and like many of them I had troubles using the sata port (hdc). hparm -t /dev/hdc gave me 15MB/sec and hdparm -I gave me udma2.

I've read atiixp.c and found that in the IXP200 case, the eighty_ninty_three() call fails so the slowest mode is selected.

       if (!eighty_ninty_three(drive))
               mode = min(mode, (u8)1);
      }

It sounds like on the IXP200 we must skip this test to reach the udma5. I've tried manually and it works. I'm reaching 55MB/sec and hdparm -I give me udma5.

I've made a patch which match the IXP200 and "hdc" configuration. In that case only, I'm skipping the eighty_ninty_three() call. The patch works and apply to 2.6.10 -> 2.6.14-rc3.

I know that checking "hdc" is not very clean but I didn't find a more generic way to test if the "ide_drive_t *drive" is the sata port of the IXP200. In the "Pundit-R" case, that's always hdc.

What do you think about that ?
Please found attached, my patch for atiixp.c

Regards,

drivers/ide/pci/atiixp.c renamed from drivers/ide/pci/atiixp.c.old +17 -0
@@ -1,6 +1,10 @@
 /*
+ *  linux/drivers/ide/pci/atiixp.c	Version 0.02		Oct. 09, 2005
  *  linux/drivers/ide/pci/atiixp.c	Version 0.01-bart2	Feb. 26, 2004
  *
+ *  Version 0.02		Workarounding 80pin cable detection
+ *  				on IXP200 sata's port : hdc ([email protected])
+ *  Version 0.01-bart2		Initial Release
  *  Copyright (C) 2003 ATI Inc. <[email protected]>
  *  Copyright (C) 2004 Bartlomiej Zolnierkiewicz
  *
@@ -56,10 +60,23 @@
 
 static u8 atiixp_ratemask(ide_drive_t *drive)
 {
+	struct pci_dev *dev     = HWIF(drive)->pci_dev;
 	u8 mode = 3;
 
+	switch (dev->device) {
+	case PCI_DEVICE_ID_ATI_IXP200_IDE:
+		/* Workarounding ATI IXP200 SATA BUG */
+		/* IXP200 always tell that hdc (the sata port) is not having a 80pin cable */
+		/* We must force to mode=3 (udma5) */
+		if (strncmp(drive->name,"hdc",strlen("hdc")) == 0) {
+			printk("ATIIXP: SATA drive detected (%s) on a IXP200 IDE controller,\
+			skipping cable detection, using ATA-100 transfert rate\n",drive->name);
+			break;
+		}
+	default:
 	if (!eighty_ninty_three(drive))
 		mode = min(mode, (u8)1);
+	}
 	return mode;
 }
 
author
#1 lore raw

I've just sent this patch a few days ago but nobody seems to be interested in testing it nor integrating it. What could I do to help this process ?
Regards,
Erwan

#2 lore raw

Hi,

I've seen your patch but I'm still thinking how to solve this problem because we can't just check for PCI device ID as it is a PATA controller (I guess that there is some PATA-SATA bridge on this particular motherboard). One possible fix is to check if device is SATA using <linux/ata.h>:ata_id_is_sata() but I don't know how reliable it is, I need to check both ATA and SATA specs).

Bartlomiej

Quoted 5 lines · Velu Erwan

I've just sent this patch a few days ago but nobody seems to be interested in testing it nor integrating it.
What could I do to help this process ?
Regards,
Erwan

author
#3 lore raw
Quoted 7 lines · Bartlomiej Zolnierkiewicz

Hi,

I've seen your patch but I'm still thinking how to solve this problem because we can't just check for PCI device ID as it is a PATA controller (I guess that there is some PATA-SATA bridge on this particular motherboard).

By reading the pci device list, I can't find any of them :(

Quoted 6 lines

One possible fix is to check if device is SATA using <linux/ata.h>:ata_id_is_sata() but I don't know how reliable it is, I need to check both ATA and SATA specs).

Do you know how can I check that if this call works on my system ?

author
#4 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 10 lines · Bartlomiej Zolnierkiewicz

Hi,

I've seen your patch but I'm still thinking how to solve this problem because we can't just check for PCI device ID as it is a PATA controller (I guess that there is some PATA-SATA bridge on this particular motherboard). One possible fix is to check if device is SATA using <linux/ata.h>:ata_id_is_sata() but I don't know how reliable it is, I need to check both ATA and SATA specs).

Did you had any ideas on how to continue for fixing this issues with the atiixp 200 chipset ?