Skip to contentSkip to conversation

libata critical fixes

PATCH New Jeff Garzik 1 participant 1 message Sep 2, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata critical fixes

Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus

to receive the following updates:

 drivers/ata/ata_piix.c |    5 ++++-
 drivers/ata/sata_via.c |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

Jeff Garzik (1):
[libata] ata_piix: properly terminate DMI system list

Ondrej Zary (1):
Fix sata_via write errors on PATA drive connected to VT6421

drivers/ata/ata_piix.c +4 -1
index e40c94f..3b8bf18 100644
@@ -955,7 +955,8 @@ static int piix_broken_suspend(void)
 				DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
 			},
 		},
-		{ }
+
+		{ }	/* terminate list */
 	};
 	static const char *oemstrs[] = {
 		"Tecra M3,",
@@ -1187,6 +1188,8 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
 				DMI_MATCH(DMI_PRODUCT_NAME, "M570U"),
 			},
 		},
+
+		{ }	/* terminate list */
 	};
 	u32 iocfg;
 
drivers/ata/sata_via.c +1 -1
index a4e6317..57fd30d 100644
@@ -371,7 +371,7 @@ static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 	static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 };
-	pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->pio_mode - XFER_UDMA_0]);
+	pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->dma_mode - XFER_UDMA_0]);
 }
 
 static const unsigned int svia_bar_sizes[] = {