linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]: atiixp : Enabling UDMA5 on IXP200
@ 2005-10-10 12:02 Velu Erwan
  2005-10-13 15:14 ` Velu Erwan
  0 siblings, 1 reply; 5+ messages in thread
From: Velu Erwan @ 2005-10-10 12:02 UTC (permalink / raw)
  To: linux-ide

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

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,

[-- Attachment #2: atiixp.patch --]
[-- Type: text/x-patch, Size: 1244 bytes --]

--- linux/drivers/ide/pci/atiixp.c.old	2005-10-09 18:02:16.136305632 +0200
+++ linux/drivers/ide/pci/atiixp.c	2005-10-09 19:38:37.917876664 +0200
@@ -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 (erwan.velu@free.fr)
+ *  Version 0.01-bart2		Initial Release
  *  Copyright (C) 2003 ATI Inc. <hyu@ati.com>
  *  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;
 }
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH]: atiixp : Enabling UDMA5 on IXP200
  2005-10-10 12:02 [PATCH]: atiixp : Enabling UDMA5 on IXP200 Velu Erwan
@ 2005-10-13 15:14 ` Velu Erwan
  2005-10-13 17:58   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 5+ messages in thread
From: Velu Erwan @ 2005-10-13 15:14 UTC (permalink / raw)
  To: linux-ide

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH]: atiixp : Enabling UDMA5 on IXP200
  2005-10-13 15:14 ` Velu Erwan
@ 2005-10-13 17:58   ` Bartlomiej Zolnierkiewicz
  2005-10-14  3:47     ` Erwan Velu
  2005-10-22  7:22     ` Erwan Velu
  0 siblings, 2 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-10-13 17:58 UTC (permalink / raw)
  To: Velu Erwan; +Cc: linux-ide

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

On 10/13/05, Velu Erwan <erwan@seanodes.com> wrote:
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH]: atiixp : Enabling UDMA5 on IXP200
  2005-10-13 17:58   ` Bartlomiej Zolnierkiewicz
@ 2005-10-14  3:47     ` Erwan Velu
  2005-10-22  7:22     ` Erwan Velu
  1 sibling, 0 replies; 5+ messages in thread
From: Erwan Velu @ 2005-10-14  3:47 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide

Bartlomiej Zolnierkiewicz wrote:

>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 :(

>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 ?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH]: atiixp : Enabling UDMA5 on IXP200
  2005-10-13 17:58   ` Bartlomiej Zolnierkiewicz
  2005-10-14  3:47     ` Erwan Velu
@ 2005-10-22  7:22     ` Erwan Velu
  1 sibling, 0 replies; 5+ messages in thread
From: Erwan Velu @ 2005-10-22  7:22 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide

Bartlomiej Zolnierkiewicz wrote:

>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  ?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-22  7:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-10 12:02 [PATCH]: atiixp : Enabling UDMA5 on IXP200 Velu Erwan
2005-10-13 15:14 ` Velu Erwan
2005-10-13 17:58   ` Bartlomiej Zolnierkiewicz
2005-10-14  3:47     ` Erwan Velu
2005-10-22  7:22     ` Erwan Velu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).