All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jeff Garzik <jeff@garzik.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	JosephChan@via.com.tw
Cc: sjorrit@gmail.com, stable@kernel.org
Subject: [PATCH #upstream-fixes] sata_via: magic vt6421 fix for transmission problems w/ WD drives
Date: Mon, 31 May 2010 16:26:48 +0200	[thread overview]
Message-ID: <4C03C728.9080107@kernel.org> (raw)

vt6421 has problems talking to recent WD drives.  It causes a lot of
transmission errors while high bandwidth transfer as reported in the
following bugzilla entry.

  https://bugzilla.kernel.org/show_bug.cgi?id=15173

Joseph Chan provided the following fix.  I don't have any idea what it
does but I can verify the issue is gone with the patch applied.

Signed-off-by: Tejun Heo <tj@kernel.org>
Originally-from: Joseph Chan <JosephChan@via.com.tw>
Reported-by: Jorrit Tijben <sjorrit@gmail.com>
Cc: stable@kernel.org
---
Joseph, can you please add some documentation of what it does and why?

Thanks.

 drivers/ata/sata_via.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 101d8c2..0ecd0f6 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -575,6 +575,19 @@ static void svia_configure(struct pci_dev *pdev)
 		tmp8 |= NATIVE_MODE_ALL;
 		pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
 	}
+
+	/*
+	 * vt6421 has problems talking to some drives.  The following
+	 * is the magic fix from Joseph Chan <JosephChan@via.com.tw>.
+	 * Please add proper documentation if possible.
+	 *
+	 * https://bugzilla.kernel.org/show_bug.cgi?id=15173
+	 */
+	if (pdev->device == 0x3249) {
+		pci_read_config_byte(pdev, 0x52, &tmp8);
+		tmp8 |= 1 << 2;
+		pci_write_config_byte(pdev, 0x52, tmp8);
+	}
 }

 static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)

             reply	other threads:[~2010-05-31 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31 14:26 Tejun Heo [this message]
2010-06-02 17:51 ` [PATCH #upstream-fixes] sata_via: magic vt6421 fix for transmission problems w/ WD drives Jeff Garzik
2010-06-03  1:49   ` JosephChan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C03C728.9080107@kernel.org \
    --to=tj@kernel.org \
    --cc=JosephChan@via.com.tw \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=sjorrit@gmail.com \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.