From owner-svn-src-all@FreeBSD.ORG Sat Aug 30 02:13:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F00A4497; Sat, 30 Aug 2014 02:13:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC5691970; Sat, 30 Aug 2014 02:13:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7U2D9cb023103; Sat, 30 Aug 2014 02:13:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7U2D95I023102; Sat, 30 Aug 2014 02:13:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408300213.s7U2D95I023102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 30 Aug 2014 02:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270833 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2014 02:13:10 -0000 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) {