Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2010 02:47:09 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r212720 - stable/8/sys/dev/ata/chipsets
Message-ID:  <201009160247.o8G2l9ti058714@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Sep 16 02:47:09 2010
New Revision: 212720
URL: http://svn.freebsd.org/changeset/base/212720

Log:
  MFC r212146:
  Add workaround for SiI3114 and SiI3512 chips bug, which caused sending
  R_ERR in response to DMA activate FIS under certain circumstances. This is
  recommended fix from chip datasheet. If triggered, this bug most likely
  caused write command timeout.

Modified:
  stable/8/sys/dev/ata/chipsets/ata-siliconimage.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c	Thu Sep 16 02:44:23 2010	(r212719)
+++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c	Thu Sep 16 02:47:09 2010	(r212720)
@@ -365,7 +365,15 @@ ata_sii_status(device_t dev)
 static void
 ata_sii_reset(device_t dev)
 {
+    struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
     struct ata_channel *ch = device_get_softc(dev);
+    int offset = ((ch->unit & 1) << 7) + ((ch->unit & 2) << 8);
+    uint32_t val;
+
+    /* Apply R_ERR on DMA activate FIS errata workaround. */
+    val = ATA_INL(ctlr->r_res2, 0x14c + offset);
+    if ((val & 0x3) == 0x1)
+	ATA_OUTL(ctlr->r_res2, 0x14c + offset, val & ~0x3);
 
     if (ata_sata_phy_reset(dev, -1, 1))
 	ata_generic_reset(dev);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009160247.o8G2l9ti058714>