提交 8ffff94d 编写于 作者: T Terry Suereth 提交者: Tejun Heo

libata: apply behavioral quirks to sil3826 PMP

Fixing support for the Silicon Image 3826 port multiplier, by applying
to it the same quirks applied to the Silicon Image 3726.  Specifically
fixes the repeated timeout/reset process which previously afflicted
the 3726, as described from line 290.  Slightly based on notes from:

https://bugzilla.redhat.com/show_bug.cgi?id=890237Signed-off-by: NTerry Suereth <terry.suereth@gmail.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
上级 8c427f06
...@@ -289,24 +289,24 @@ static int sata_pmp_configure(struct ata_device *dev, int print_info) ...@@ -289,24 +289,24 @@ static int sata_pmp_configure(struct ata_device *dev, int print_info)
/* Disable sending Early R_OK. /* Disable sending Early R_OK.
* With "cached read" HDD testing and multiple ports busy on a SATA * With "cached read" HDD testing and multiple ports busy on a SATA
* host controller, 3726 PMP will very rarely drop a deferred * host controller, 3x26 PMP will very rarely drop a deferred
* R_OK that was intended for the host. Symptom will be all * R_OK that was intended for the host. Symptom will be all
* 5 drives under test will timeout, get reset, and recover. * 5 drives under test will timeout, get reset, and recover.
*/ */
if (vendor == 0x1095 && devid == 0x3726) { if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) {
u32 reg; u32 reg;
err_mask = sata_pmp_read(&ap->link, PMP_GSCR_SII_POL, &reg); err_mask = sata_pmp_read(&ap->link, PMP_GSCR_SII_POL, &reg);
if (err_mask) { if (err_mask) {
rc = -EIO; rc = -EIO;
reason = "failed to read Sil3726 Private Register"; reason = "failed to read Sil3x26 Private Register";
goto fail; goto fail;
} }
reg &= ~0x1; reg &= ~0x1;
err_mask = sata_pmp_write(&ap->link, PMP_GSCR_SII_POL, reg); err_mask = sata_pmp_write(&ap->link, PMP_GSCR_SII_POL, reg);
if (err_mask) { if (err_mask) {
rc = -EIO; rc = -EIO;
reason = "failed to write Sil3726 Private Register"; reason = "failed to write Sil3x26 Private Register";
goto fail; goto fail;
} }
} }
...@@ -383,8 +383,8 @@ static void sata_pmp_quirks(struct ata_port *ap) ...@@ -383,8 +383,8 @@ static void sata_pmp_quirks(struct ata_port *ap)
u16 devid = sata_pmp_gscr_devid(gscr); u16 devid = sata_pmp_gscr_devid(gscr);
struct ata_link *link; struct ata_link *link;
if (vendor == 0x1095 && devid == 0x3726) { if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) {
/* sil3726 quirks */ /* sil3x26 quirks */
ata_for_each_link(link, ap, EDGE) { ata_for_each_link(link, ap, EDGE) {
/* link reports offline after LPM */ /* link reports offline after LPM */
link->flags |= ATA_LFLAG_NO_LPM; link->flags |= ATA_LFLAG_NO_LPM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册