diff mbox

Don't use UDMA on VIA UDMA33 controller with Transcend SSD

Message ID 201110121638.09605.bzolnier@gmail.com
State Rejected
Delegated to: David Miller
Headers show

Commit Message

Bartlomiej Zolnierkiewicz Oct. 12, 2011, 2:38 p.m. UTC
Alan Cox wrote:

> On Tue, 11 Oct 2011 15:05:04 -0400 (EDT)
> David Miller <davem@davemloft.net> wrote:
> 
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Date: Tue, 11 Oct 2011 19:12:01 +0200
> > 
> > > Still valid for 3.1.  Dave, ping?
> > 
> > Feedback given and changes requested/required, patch was not updated
> > and resubmitted by the author:
> > 
> > http://patchwork.ozlabs.org/patch/38764/
> 
> The last state on this I saw it seemd that exactly one person had seen it
> on exactly one machine ? Has that changed ?

No, you're right here.

Here is updated patch:

From: Mikulas Patocka <mpatocka@redhat.com>
Subject: [PATCH] via82cxxx: don't use UDMA on VIA UDMA33 controller with Transcend SSD

Don't use UDMA on VIA UDMA33 controller with Transcend SSD.

The computer locks up if Transcend SSD runs in any of UDMA modes.
It doesn't lockup with different brand SSD, so this is specific to Transcend.

bzolnier:
- limit it to VT82C586A/B + TS64GSSD25-M (per commit 10734fc ("pata_via:
  Blacklist some combinations of Transcend Flash and via")) for now
- add warning message

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: David Miller <davem@davemloft.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/via82cxxx.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Alan Cox Oct. 12, 2011, 5:59 p.m. UTC | #1
> > The last state on this I saw it seemd that exactly one person had seen it
> > on exactly one machine ? Has that changed ?
> 
> No, you're right here.

So as far as is known its a weird glitch on one persons box with one
device with one firmware that's not been replicated ?

That's not a patch candidate really is it.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bartlomiej Zolnierkiewicz Oct. 13, 2011, 10:35 a.m. UTC | #2
Alan Cox wrote:

> > > The last state on this I saw it seemd that exactly one person had seen it
> > > on exactly one machine ? Has that changed ?
> > 
> > No, you're right here.
> 
> So as far as is known its a weird glitch on one persons box with one
> device with one firmware that's not been replicated ?
> 
> That's not a patch candidate really is it.

Should we revert following commit then?

commit 10734fc8d5fbf89e88519d72e58cce83be21941a
Author: Alan Cox <alan@linux.intel.com>
Date:   Mon Nov 30 13:22:43 2009 +0000

    pata_via: Blacklist some combinations of Transcend Flash and via
    
    Reported by Mikulas Patocka.
    
    VIA VT82C586B + Transcend TS64GSSD25-M v0826 does not work in UDMA mode
    
    Signed-off-by: Alan Cox <alan@linux.intel.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: b/drivers/ide/via82cxxx.c
===================================================================
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -220,6 +220,24 @@  static void via_set_pio_mode(ide_hwif_t
 	via_set_drive(hwif, drive);
 }
 
+static u8 via_udma_filter(ide_drive_t *drive)
+{
+	ide_hwif_t *hwif = drive->hwif;
+	struct pci_dev *dev = to_pci_dev(hwif->dev);
+	struct ide_host *host = pci_get_drvdata(dev);
+	struct via82cxxx_dev *vdev = host->host_priv;
+	char *m = (char *)&drive->id[ATA_ID_PROD];
+
+	if (vdev->via_config->id == PCI_DEVICE_ID_VIA_82C586_0 &&
+	    strcmp(m, "TS64GSSD25-M") == 0) {
+		printk(KERN_WARNING "%s: disabling UDMA mode due to reported "
+			"lockups with this device.\n", drive->name);
+		return 0;
+	}
+
+	return hwif->ultra_mask;
+}
+
 static struct via_isa_bridge *via_config_find(struct pci_dev **isa)
 {
 	struct via_isa_bridge *via_config;
@@ -401,6 +419,7 @@  static const struct ide_port_ops via_por
 	.set_pio_mode		= via_set_pio_mode,
 	.set_dma_mode		= via_set_drive,
 	.cable_detect		= via82cxxx_cable_detect,
+	.udma_filter		= via_udma_filter,
 };
 
 static const struct ide_port_info via82cxxx_chipset __devinitdata = {