Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2014 02:13:09 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270833 - head/sys/dev/ahci
Message-ID:  <201408300213.s7U2D95I023102@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Sat Aug 30 02:13:09 2014
New Revision: 270833
URL: http://svnweb.freebsd.org/changeset/base/270833

Log:
  We were returning 20 bytes as the FIS size to send, but only
  initializing 16. Initialize all 20 so we don't send garbage in the
  Auxiliary register. The SATA standard mandates a 5 dword length for
  the Host to Device FIS.
  
  Sponsored by: Netflix

Modified:
  head/sys/dev/ahci/ahci.c

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Sat Aug 30 02:13:04 2014	(r270832)
+++ head/sys/dev/ahci/ahci.c	Sat Aug 30 02:13:09 2014	(r270833)
@@ -2764,7 +2764,7 @@ ahci_setup_fis(device_t dev, struct ahci
 	struct ahci_channel *ch = device_get_softc(dev);
 	u_int8_t *fis = &ctp->cfis[0];
 
-	bzero(ctp->cfis, 16);
+	bzero(fis, 20);
 	fis[0] = 0x27;  		/* host to device */
 	fis[1] = (ccb->ccb_h.target_id & 0x0f);
 	if (ccb->ccb_h.func_code == XPT_SCSI_IO) {



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