Commit b1353e4f40f6179ab26a3bb1b2e1fe29ffe534f5

Authored by Tejun Heo
Committed by Jeff Garzik
1 parent 589136bfa7

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>

Showing 1 changed file with 5 additions and 4 deletions Side-by-side Diff

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