From 0375d6f5f9f27448298624c52d5ae94c6b40ec80 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 30 Aug 2014 02:13:09 +0000 Subject: 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 --- sys/dev/ahci/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/ahci/ahci.c') diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 0691b77489fd..b2148339e5b1 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2764,7 +2764,7 @@ ahci_setup_fis(device_t dev, struct ahci_cmd_tab *ctp, union ccb *ccb, int tag) 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) { -- cgit v1.2.3