1 From b1353e4f40f6179ab26a3bb1b2e1fe29ffe534f5 Mon Sep 17 00:00:00 2001
2 From: Tejun Heo <tj@kernel.org>
3 Date: Fri, 19 Nov 2010 15:29:19 +0100
4 Subject: sata_via: apply magic FIFO fix to vt6420 too
6 From: Tejun Heo <tj@kernel.org>
8 commit b1353e4f40f6179ab26a3bb1b2e1fe29ffe534f5 upstream.
10 vt6420 has the same FIFO overflow problem as vt6421 when combined with
11 certain devices. This patch applies the magic fix to vt6420 too.
13 Signed-off-by: Tejun Heo <tj@kernel.org>
14 Reported-by: Martin Qvist <q@maq.dk>
15 Reported-by: Peter Zijlstra <peterz@infradead.org>
16 Cc: Joseph Chan <JosephChan@via.com.tw>
17 Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21 drivers/ata/sata_via.c | 9 +++++----
22 1 file changed, 5 insertions(+), 4 deletions(-)
24 --- a/drivers/ata/sata_via.c
25 +++ b/drivers/ata/sata_via.c
26 @@ -538,7 +538,7 @@ static int vt8251_prepare_host(struct pc
30 -static void svia_configure(struct pci_dev *pdev)
31 +static void svia_configure(struct pci_dev *pdev, int board_id)
35 @@ -577,7 +577,7 @@ static void svia_configure(struct pci_de
39 - * vt6421 has problems talking to some drives. The following
40 + * vt6420/1 has problems talking to some drives. The following
41 * is the fix from Joseph Chan <JosephChan@via.com.tw>.
43 * When host issues HOLD, device may send up to 20DW of data
44 @@ -596,8 +596,9 @@ static void svia_configure(struct pci_de
46 * https://bugzilla.kernel.org/show_bug.cgi?id=15173
47 * http://article.gmane.org/gmane.linux.ide/46352
48 + * http://thread.gmane.org/gmane.linux.kernel/1062139
50 - if (pdev->device == 0x3249) {
51 + if (board_id == vt6420 || board_id == vt6421) {
52 pci_read_config_byte(pdev, 0x52, &tmp8);
54 pci_write_config_byte(pdev, 0x52, tmp8);
55 @@ -652,7 +653,7 @@ static int svia_init_one(struct pci_dev
59 - svia_configure(pdev);
60 + svia_configure(pdev, board_id);
63 return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,