All of lore.kernel.org
 help / color / mirror / Atom feed
From: Velu Erwan <erwan@seanodes.com>
To: linux-ide@vger.kernel.org
Subject: [PATCH]: atiixp : Enabling UDMA5 on IXP200
Date: Mon, 10 Oct 2005 14:02:05 +0200	[thread overview]
Message-ID: <434A583D.2030401@seanodes.com> (raw)

[-- 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;
 }
 

             reply	other threads:[~2005-10-10 12:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-10 12:02 Velu Erwan [this message]
2005-10-13 15:14 ` [PATCH]: atiixp : Enabling UDMA5 on IXP200 Velu Erwan
2005-10-13 17:58   ` Bartlomiej Zolnierkiewicz
2005-10-14  3:47     ` Erwan Velu
2005-10-22  7:22     ` Erwan Velu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=434A583D.2030401@seanodes.com \
    --to=erwan@seanodes.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.