Module Name: src Committed By: snj Date: Mon Sep 28 00:13:52 UTC 2009
Modified Files: src/sys/dev/ata [netbsd-5]: satafis_subr.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/dev/ata/satafis_subr.c: revision 1.2 Have the FIS code pre-zero the FIS. To generate a diff of this commit: cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/dev/ata/satafis_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ata/satafis_subr.c diff -u src/sys/dev/ata/satafis_subr.c:1.3.2.2 src/sys/dev/ata/satafis_subr.c:1.3.2.3 --- src/sys/dev/ata/satafis_subr.c:1.3.2.2 Mon Sep 28 00:13:02 2009 +++ src/sys/dev/ata/satafis_subr.c Mon Sep 28 00:13:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: satafis_subr.c,v 1.3.2.2 2009/09/28 00:13:02 snj Exp $ */ +/* $NetBSD: satafis_subr.c,v 1.3.2.3 2009/09/28 00:13:52 snj Exp $ */ /*- * Copyright (c) 2009 Jonathan A. Kollasch. @@ -56,9 +56,10 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: satafis_subr.c,v 1.3.2.2 2009/09/28 00:13:02 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: satafis_subr.c,v 1.3.2.3 2009/09/28 00:13:52 snj Exp $"); #include <sys/param.h> +#include <sys/systm.h> #include <sys/disklabel.h> @@ -75,6 +76,8 @@ void satafis_rhd_construct_cmd(struct ata_command *ata_c, uint8_t *fis) { + memset(fis, 0, RHD_FISLEN); + fis[fis_type] = RHD_FISTYPE; fis[rhd_cdpmp] = 0x80; /* xxx magic */ fis[rhd_command] = ata_c->r_command; @@ -97,6 +100,8 @@ nblks = xfer->c_bcount / ata_bio->lp->d_secsize; + memset(fis, 0, RHD_FISLEN); + fis[fis_type] = RHD_FISTYPE; fis[rhd_cdpmp] = 0x80; /* xxx magic */ if (ata_bio->flags & ATA_LBA48) { @@ -128,6 +133,8 @@ void satafis_rhd_construct_atapi(struct ata_xfer *xfer, uint8_t *fis) { + memset(fis, 0, RHD_FISLEN); + fis[fis_type] = RHD_FISTYPE; fis[rhd_cdpmp] = 0x80; /* xxx magic */ fis[rhd_command] = ATAPI_PKT_CMD;