* it821x: Add ultra_mask quirk for Vortex86SX
@ 2009-01-05 16:58 Brandon Philips
2009-01-05 17:11 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Brandon Philips @ 2009-01-05 16:58 UTC (permalink / raw)
To: bzolnier; +Cc: linux-ide, Shawn Lin
On Vortex86SX with IDE controller revision 0x11 ultra DMA must be
disabled. This patch was tested by DMP and seems to work.
It is a cleaned up version of their older Kernel patch:
http://www.dmp.com.tw/tech/vortex86sx/patch-2.6.24-DMP.gz
Tested-by: Shawn Lin <shawn@dmp.com.tw>
Signed-off-by: Brandon Philips <bphilips@suse.de>
---
drivers/ide/it821x.c | 13 +++++++++++++
include/linux/pci_ids.h | 1 +
2 files changed, 14 insertions(+)
Index: linux-2.6/drivers/ide/it821x.c
===================================================================
--- linux-2.6.orig/drivers/ide/it821x.c
+++ linux-2.6/drivers/ide/it821x.c
@@ -68,6 +68,8 @@
#define DRV_NAME "it821x"
+#define QUIRK_VORTEX86 1
+
struct it821x_dev
{
unsigned int smart:1, /* Are we in smart raid mode */
@@ -79,6 +81,7 @@ struct it821x_dev
u16 pio[2]; /* Cached PIO values */
u16 mwdma[2]; /* Cached MWDMA values */
u16 udma[2]; /* Cached UDMA values (per drive) */
+ u16 quirks;
};
#define ATA_66 0
@@ -580,6 +583,13 @@ static void __devinit init_hwif_it821x(i
hwif->ultra_mask = ATA_UDMA6;
hwif->mwdma_mask = ATA_MWDMA2;
+
+ /* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */
+ if (idev->quirks & QUIRK_VORTEX86) {
+ pci_read_config_byte(dev, 0x08, &conf);
+ if (conf == 0x11)
+ hwif->ultra_mask = 0;
+ }
}
static void it8212_disable_raid(struct pci_dev *dev)
@@ -652,6 +662,8 @@ static int __devinit it821x_init_one(str
return -ENOMEM;
}
+ itdevs->quirks = id->driver_data;
+
rc = ide_pci_init_one(dev, &it821x_chipset, itdevs);
if (rc)
kfree(itdevs);
@@ -671,6 +683,7 @@ static void __devexit it821x_remove(stru
static const struct pci_device_id it821x_pci_tbl[] = {
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 },
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 },
+ { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1010), QUIRK_VORTEX86 },
{ 0, },
};
Index: linux-2.6/include/linux/pci_ids.h
===================================================================
--- linux-2.6.orig/include/linux/pci_ids.h
+++ linux-2.6/include/linux/pci_ids.h
@@ -2173,6 +2173,7 @@
#define PCI_DEVICE_ID_RDC_R6040 0x6040
#define PCI_DEVICE_ID_RDC_R6060 0x6060
#define PCI_DEVICE_ID_RDC_R6061 0x6061
+#define PCI_DEVICE_ID_RDC_D1010 0x1010
#define PCI_VENDOR_ID_LENOVO 0x17aa
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: it821x: Add ultra_mask quirk for Vortex86SX
2009-01-05 16:58 it821x: Add ultra_mask quirk for Vortex86SX Brandon Philips
@ 2009-01-05 17:11 ` Alan Cox
2009-01-05 19:08 ` [PATCH v2] " Brandon Philips
2009-01-05 19:10 ` [PATCH] it821x.c: use dev->revision instead of pci_read_config_byte Brandon Philips
0 siblings, 2 replies; 6+ messages in thread
From: Alan Cox @ 2009-01-05 17:11 UTC (permalink / raw)
To: Brandon Philips; +Cc: bzolnier, linux-ide, Shawn Lin
> + pci_read_config_byte(dev, 0x08, &conf);
> + if (conf == 0x11)
> + hwif->ultra_mask = 0;
NAK
Should use dev->revision as this is already kept by the kernel. Otherwise
looks fine. pata_it821x already knows about this but not that it's only a
bug in rev 0x11 so I'll propogate that bit up.
Alan
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] it821x: Add ultra_mask quirk for Vortex86SX
2009-01-05 17:11 ` Alan Cox
@ 2009-01-05 19:08 ` Brandon Philips
2009-01-07 20:21 ` Bartlomiej Zolnierkiewicz
2009-01-05 19:10 ` [PATCH] it821x.c: use dev->revision instead of pci_read_config_byte Brandon Philips
1 sibling, 1 reply; 6+ messages in thread
From: Brandon Philips @ 2009-01-05 19:08 UTC (permalink / raw)
To: Alan Cox; +Cc: bzolnier, linux-ide, Shawn Lin
On Vortex86SX with IDE controller revision 0x11 ultra DMA must be
disabled. This patch was tested by DMP and seems to work.
It is a cleaned up version of their older Kernel patch:
http://www.dmp.com.tw/tech/vortex86sx/patch-2.6.24-DMP.gz
Tested-by: Shawn Lin <shawn@dmp.com.tw>
Signed-off-by: Brandon Philips <bphilips@suse.de>
---
drivers/ide/it821x.c | 12 ++++++++++++
include/linux/pci_ids.h | 1 +
2 files changed, 13 insertions(+)
Index: linux-2.6/drivers/ide/it821x.c
===================================================================
--- linux-2.6.orig/drivers/ide/it821x.c
+++ linux-2.6/drivers/ide/it821x.c
@@ -68,6 +68,8 @@
#define DRV_NAME "it821x"
+#define QUIRK_VORTEX86 1
+
struct it821x_dev
{
unsigned int smart:1, /* Are we in smart raid mode */
@@ -79,6 +81,7 @@ struct it821x_dev
u16 pio[2]; /* Cached PIO values */
u16 mwdma[2]; /* Cached MWDMA values */
u16 udma[2]; /* Cached UDMA values (per drive) */
+ u16 quirks;
};
#define ATA_66 0
@@ -580,6 +583,12 @@ static void __devinit init_hwif_it821x(i
hwif->ultra_mask = ATA_UDMA6;
hwif->mwdma_mask = ATA_MWDMA2;
+
+ /* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */
+ if (idev->quirks & QUIRK_VORTEX86) {
+ if (dev->revision == 0x11)
+ hwif->ultra_mask = 0;
+ }
}
static void it8212_disable_raid(struct pci_dev *dev)
@@ -652,6 +661,8 @@ static int __devinit it821x_init_one(str
return -ENOMEM;
}
+ itdevs->quirks = id->driver_data;
+
rc = ide_pci_init_one(dev, &it821x_chipset, itdevs);
if (rc)
kfree(itdevs);
@@ -671,6 +682,7 @@ static void __devexit it821x_remove(stru
static const struct pci_device_id it821x_pci_tbl[] = {
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 },
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 },
+ { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1010), QUIRK_VORTEX86 },
{ 0, },
};
Index: linux-2.6/include/linux/pci_ids.h
===================================================================
--- linux-2.6.orig/include/linux/pci_ids.h
+++ linux-2.6/include/linux/pci_ids.h
@@ -2173,6 +2173,7 @@
#define PCI_DEVICE_ID_RDC_R6040 0x6040
#define PCI_DEVICE_ID_RDC_R6060 0x6060
#define PCI_DEVICE_ID_RDC_R6061 0x6061
+#define PCI_DEVICE_ID_RDC_D1010 0x1010
#define PCI_VENDOR_ID_LENOVO 0x17aa
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] it821x.c: use dev->revision instead of pci_read_config_byte
2009-01-05 17:11 ` Alan Cox
2009-01-05 19:08 ` [PATCH v2] " Brandon Philips
@ 2009-01-05 19:10 ` Brandon Philips
2009-01-07 20:22 ` Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 6+ messages in thread
From: Brandon Philips @ 2009-01-05 19:10 UTC (permalink / raw)
To: Alan Cox; +Cc: bzolnier, linux-ide, Shawn Lin
Minor cleanup.
Signed-off-by: Brandon Philips <bphilips@suse.de>
---
drivers/ide/it821x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: linux-2.6/drivers/ide/it821x.c
===================================================================
--- linux-2.6.orig/drivers/ide/it821x.c
+++ linux-2.6/drivers/ide/it821x.c
@@ -563,8 +563,7 @@ static void __devinit init_hwif_it821x(i
* this is necessary.
*/
- pci_read_config_byte(dev, 0x08, &conf);
- if (conf == 0x10) {
+ if (dev->revision == 0x10) {
idev->timing10 = 1;
hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA;
if (idev->smart == 0)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] it821x: Add ultra_mask quirk for Vortex86SX
2009-01-05 19:08 ` [PATCH v2] " Brandon Philips
@ 2009-01-07 20:21 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-01-07 20:21 UTC (permalink / raw)
To: Brandon Philips; +Cc: Alan Cox, linux-ide, Shawn Lin
On Monday 05 January 2009, Brandon Philips wrote:
> On Vortex86SX with IDE controller revision 0x11 ultra DMA must be
> disabled. This patch was tested by DMP and seems to work.
>
> It is a cleaned up version of their older Kernel patch:
> http://www.dmp.com.tw/tech/vortex86sx/patch-2.6.24-DMP.gz
>
> Tested-by: Shawn Lin <shawn@dmp.com.tw>
> Signed-off-by: Brandon Philips <bphilips@suse.de>
applied
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] it821x.c: use dev->revision instead of pci_read_config_byte
2009-01-05 19:10 ` [PATCH] it821x.c: use dev->revision instead of pci_read_config_byte Brandon Philips
@ 2009-01-07 20:22 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-01-07 20:22 UTC (permalink / raw)
To: Brandon Philips; +Cc: Alan Cox, linux-ide, Shawn Lin
On Monday 05 January 2009, Brandon Philips wrote:
> Minor cleanup.
>
> Signed-off-by: Brandon Philips <bphilips@suse.de>
applied
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-07 20:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-05 16:58 it821x: Add ultra_mask quirk for Vortex86SX Brandon Philips
2009-01-05 17:11 ` Alan Cox
2009-01-05 19:08 ` [PATCH v2] " Brandon Philips
2009-01-07 20:21 ` Bartlomiej Zolnierkiewicz
2009-01-05 19:10 ` [PATCH] it821x.c: use dev->revision instead of pci_read_config_byte Brandon Philips
2009-01-07 20:22 ` Bartlomiej Zolnierkiewicz
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).