--- 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. * 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; }