sata_via: apply magic FIFO fix to vt6420 too

vt6420 has the same FIFO overflow problem as vt6421 when combined with
certain devices. This patch applies the magic fix to vt6420 too.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Martin Qvist <q@maq.dk>
Reported-by: Peter Zijlstra <peterz@infradead.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by Tejun Heo and committed by Jeff Garzik b1353e4f 589136bf

+5 -4
+5 -4
drivers/ata/sata_via.c
··· 538 return 0; 539 } 540 541 - static void svia_configure(struct pci_dev *pdev) 542 { 543 u8 tmp8; 544 ··· 577 } 578 579 /* 580 - * vt6421 has problems talking to some drives. The following 581 * is the fix from Joseph Chan <JosephChan@via.com.tw>. 582 * 583 * When host issues HOLD, device may send up to 20DW of data ··· 596 * 597 * https://bugzilla.kernel.org/show_bug.cgi?id=15173 598 * http://article.gmane.org/gmane.linux.ide/46352 599 */ 600 - if (pdev->device == 0x3249) { 601 pci_read_config_byte(pdev, 0x52, &tmp8); 602 tmp8 |= 1 << 2; 603 pci_write_config_byte(pdev, 0x52, tmp8); ··· 653 if (rc) 654 return rc; 655 656 - svia_configure(pdev); 657 658 pci_set_master(pdev); 659 return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
··· 538 return 0; 539 } 540 541 + static void svia_configure(struct pci_dev *pdev, int board_id) 542 { 543 u8 tmp8; 544 ··· 577 } 578 579 /* 580 + * vt6420/1 has problems talking to some drives. The following 581 * is the fix from Joseph Chan <JosephChan@via.com.tw>. 582 * 583 * When host issues HOLD, device may send up to 20DW of data ··· 596 * 597 * https://bugzilla.kernel.org/show_bug.cgi?id=15173 598 * http://article.gmane.org/gmane.linux.ide/46352 599 + * http://thread.gmane.org/gmane.linux.kernel/1062139 600 */ 601 + if (board_id == vt6420 || board_id == vt6421) { 602 pci_read_config_byte(pdev, 0x52, &tmp8); 603 tmp8 |= 1 << 2; 604 pci_write_config_byte(pdev, 0x52, tmp8); ··· 652 if (rc) 653 return rc; 654 655 + svia_configure(pdev, board_id); 656 657 pci_set_master(pdev); 658 return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,