From: Paul Schilling <paul.s.schilling@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>,
"David S. Miller" <davem@davemloft.net>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org
Cc: Paul Schilling <Paul.S.Schilling@gmail.com>,
Paul Schilling <paul.s.schilling@gmail.com>
Subject: [PATCH 02/15] ATA : vortex86 : fix vortex86dx/sx hardware CRC bug.
Date: Sun, 23 Oct 2011 00:05:00 -0500 [thread overview]
Message-ID: <1319346300-18151-1-git-send-email-paul.s.schilling@gmail.com> (raw)
In-Reply-To: <fix vortex86>
This fixes a DMA issue related to a CRC bug on
the RDC pata peripherial found on the vortex86sx and vortex86dx.
Signed-off-by: Paul Schilling <paul.s.schilling@gmail.com>
---
drivers/ata/pata_it821x.c | 22 ++++++++++++++++++----
drivers/ata/pata_rdc.c | 29 ++++++++++++++++++++++++-----
drivers/ide/it821x.c | 9 +++++++--
include/linux/pci_ids.h | 2 ++
4 files changed, 51 insertions(+), 11 deletions(-)
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index c5532b9..5f8a54a 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -897,7 +897,16 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
static const struct ata_port_info info_rdc_11 = {
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO4,
- .mwdma_mask = ATA_MWDMA2,
+ .mwdma_mask = 0,
+ .udma_mask = 0,
+ /* No UDMA */
+ .port_ops = &it821x_rdc_port_ops
+ };
+ static const struct ata_port_info info_rdc_01 = {
+ .flags = ATA_FLAG_SLAVE_POSS,
+ .pio_mask = ATA_PIO4,
+ .mwdma_mask = 0,
+ .udma_mask = 0,
/* No UDMA */
.port_ops = &it821x_rdc_port_ops
};
@@ -911,11 +920,16 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return rc;
if (pdev->vendor == PCI_VENDOR_ID_RDC) {
- /* Deal with Vortex86SX */
- if (pdev->revision == 0x11)
+ if (((pdev->revision == 0x11) || (pdev->revision == 0x13)) &&
+ (pdev->device == PCI_DEVICE_ID_RDC_D1010)) {
+ /* Deal with Vortex86SX */
ppi[0] = &info_rdc_11;
- else
+ printk(KERN_INFO DRV_NAME
+ ": Detected Vortex86SX/DX Bug.\n");
+ printk(KERN_INFO DRV_NAME ": Disabling UDMA.\n");
+ } else {
ppi[0] = &info_rdc;
+ }
} else {
/* Force the card into bypass mode if so requested */
if (it8212_noraid) {
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c
index 2b38127..441521c 100644
--- a/drivers/ata/pata_rdc.c
+++ b/drivers/ata/pata_rdc.c
@@ -290,6 +290,16 @@ static struct ata_port_info rdc_port_info = {
.port_ops = &rdc_pata_ops,
};
+static struct ata_port_info vortex_port_info = {
+ .flags = ATA_FLAG_SLAVE_POSS,
+ .pio_mask = ATA_PIO4,
+ .mwdma_mask = 0,
+ .udma_mask = 0,
+ /* No UDMA */
+ .port_ops = &rdc_pata_ops,
+};
+
+
static struct scsi_host_template rdc_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -322,16 +332,25 @@ static int __devinit rdc_init_one(struct pci_dev *pdev,
ata_print_version_once(&pdev->dev, DRV_VERSION);
- port_info[0] = rdc_port_info;
- port_info[1] = rdc_port_info;
-
- port_flags = port_info[0].flags;
-
/* enable device and prepare host */
rc = pcim_enable_device(pdev);
if (rc)
return rc;
+ if ((pdev->revision == 0x01) &&
+ (pdev->device == PCI_DEVICE_ID_RDC_D1011)) {
+ /* Deal with Vortex86DX */
+ port_info[0] = vortex_port_info;
+ port_info[1] = vortex_port_info;
+ printk(KERN_INFO DRV_NAME ": Detected Vortex86DX Bug.\n");
+ printk(KERN_INFO DRV_NAME ": Disabling UDMA.\n");
+ } else {
+ port_info[0] = rdc_port_info;
+ port_info[1] = rdc_port_info;
+ }
+
+ port_flags = port_info[0].flags;
+
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
if (!hpriv)
return -ENOMEM;
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c
index 2e3169f..82c6bc7 100644
--- a/drivers/ide/it821x.c
+++ b/drivers/ide/it821x.c
@@ -581,10 +581,14 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
hwif->ultra_mask = ATA_UDMA6;
hwif->mwdma_mask = ATA_MWDMA2;
- /* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */
+ /* Vortex86SX and Vortex86DX quirk: prevent
+ * Ultra-DMA mode to fix BadCRC issue when
+ * using DMA mode */
if (idev->quirks & QUIRK_VORTEX86) {
- if (dev->revision == 0x11)
+ if (((dev->revision == 0x11) || (dev->revision == 0x13))
+ || (dev->revision == 0x01)) {
hwif->ultra_mask = 0;
+ }
}
}
@@ -680,6 +684,7 @@ 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 },
+ { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1011), QUIRK_VORTEX86 },
{ 0, },
};
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ae96bbe..237da92 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2259,6 +2259,8 @@
#define PCI_DEVICE_ID_RDC_R6060 0x6060
#define PCI_DEVICE_ID_RDC_R6061 0x6061
#define PCI_DEVICE_ID_RDC_D1010 0x1010
+#define PCI_DEVICE_ID_RDC_D1011 0x1011
+#define PCI_DEVICE_ID_RDC_D1012 0x1012
#define PCI_VENDOR_ID_LENOVO 0x17aa
--
1.7.6.4
next parent reply other threads:[~2011-10-23 6:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fix vortex86>
2011-10-23 5:05 ` Paul Schilling [this message]
2011-10-23 8:20 ` Rolf Eike Beer
2011-10-23 16:26 ` Paul Schilling
2011-10-26 4:16 ` Paul Schilling
2011-10-27 7:43 ` Alan Cox
2011-10-27 18:55 ` Paul Schilling
2011-10-27 19:03 ` Paul Schilling
2011-10-28 18:27 ` Alan Cox
2011-10-31 19:07 ` Paul Schilling
2011-11-01 1:02 ` Alan Cox
2011-11-03 22:58 ` Paul Schilling
2011-11-03 23:19 ` Alan Cox
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=1319346300-18151-1-git-send-email-paul.s.schilling@gmail.com \
--to=paul.s.schilling@gmail.com \
--cc=davem@davemloft.net \
--cc=jbarnes@virtuousgeek.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®