summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-03-12 13:16:05 +0000
committermav <mav@FreeBSD.org>2015-03-12 13:16:05 +0000
commit19c51041e76489eebb60a5f32f2cbab750826a8c (patch)
tree377197b6c59828e9d2e022852dc15a1d062e1122
parent86de47baf2c972658bde189dbaa24081439df055 (diff)
downloadFreeBSD-src-19c51041e76489eebb60a5f32f2cbab750826a8c.zip
FreeBSD-src-19c51041e76489eebb60a5f32f2cbab750826a8c.tar.gz
MFC r270833 (by imp):
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.
-rw-r--r--sys/dev/ahci/ahci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index 1b027b6..402810d 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -2794,7 +2794,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) {
OpenPOWER on IntegriCloud