Module Name: src
Committed By: jakllsch
Date: Mon Apr 24 21:19:21 UTC 2017
Modified Files:
src/sys/dev/ic [jdolecek-ncq]: siisata.c
Log Message:
Merge HEAD.
To generate a diff of this commit:
cvs rdiff -u -r1.30.4.13 -r1.30.4.14 src/sys/dev/ic/siisata.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/ic/siisata.c
diff -u src/sys/dev/ic/siisata.c:1.30.4.13 src/sys/dev/ic/siisata.c:1.30.4.14
--- src/sys/dev/ic/siisata.c:1.30.4.13 Mon Apr 24 13:24:33 2017
+++ src/sys/dev/ic/siisata.c Mon Apr 24 21:19:21 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.30.4.13 2017/04/24 13:24:33 jakllsch Exp $ */
+/* $NetBSD: siisata.c,v 1.30.4.14 2017/04/24 21:19:21 jakllsch Exp $ */
/* from ahcisata_core.c */
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.13 2017/04/24 13:24:33 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.14 2017/04/24 21:19:21 jakllsch Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -557,7 +557,7 @@ siisata_reset_drive(struct ata_drive_dat
DELAY(10);
prb = schp->sch_prb[slot];
- memset(prb, 0, sizeof(struct siisata_prb));
+ memset(prb, 0, SIISATA_CMD_SIZE);
prb->prb_control =
htole16(PRB_CF_SOFT_RESET | PRB_CF_INTERRUPT_MASK);
KASSERT(drvp->drive <= PMP_PORT_CTL);
@@ -692,7 +692,7 @@ siisata_probe_drive(struct ata_channel *
& PR_PS_PORT_READY))
DELAY(10);
prb = schp->sch_prb[slot];
- memset(prb, 0, sizeof(struct siisata_prb));
+ memset(prb, 0, SIISATA_CMD_SIZE);
prb->prb_control = htole16(PRB_CF_SOFT_RESET);
prb->prb_fis[rhd_c] = PMP_PORT_CTL;
@@ -827,14 +827,12 @@ siisata_cmd_start(struct ata_channel *ch
chp->ch_error = 0;
prb = schp->sch_prb[slot];
- memset(prb, 0, sizeof(struct siisata_prb));
+ memset(prb, 0, SIISATA_CMD_SIZE);
satafis_rhd_construct_cmd(ata_c, prb->prb_fis);
KASSERT(xfer->c_drive <= PMP_PORT_CTL);
prb->prb_fis[rhd_c] |= xfer->c_drive;
- memset(prb->prb_atapi, 0, sizeof(prb->prb_atapi));
-
if (ata_c->r_command == ATA_DATA_SET_MANAGEMENT) {
prb->prb_control |= htole16(PRB_CF_PROTOCOL_OVERRIDE);
prb->prb_protocol_override |= htole16(PRB_PO_WRITE);
@@ -1036,14 +1034,12 @@ siisata_bio_start(struct ata_channel *ch
chp->ch_error = 0;
prb = schp->sch_prb[slot];
- memset(prb, 0, sizeof(struct siisata_prb));
+ memset(prb, 0, SIISATA_CMD_SIZE);
satafis_rhd_construct_bio(xfer, prb->prb_fis);
KASSERT(xfer->c_drive <= PMP_PORT_CTL);
prb->prb_fis[rhd_c] |= xfer->c_drive;
- memset(prb->prb_atapi, 0, sizeof(prb->prb_atapi));
-
if (siisata_dma_setup(chp, slot, ata_bio->databuf, ata_bio->bcount,
(ata_bio->flags & ATA_READ) ? BUS_DMA_READ : BUS_DMA_WRITE)) {
ata_bio->error = ERR_DMA;
@@ -1217,9 +1213,6 @@ siisata_dma_setup(struct ata_channel *ch
schp->sch_datad[slot]->dm_mapsize,
(op == BUS_DMA_READ) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
- /* make sure it's clean */
- memset(prbp->prb_sge, 0, SIISATA_NSGE * sizeof(struct siisata_prb));
-
SIISATA_DEBUG_PRINT(("%s: %d segs, %ld count\n", __func__,
schp->sch_datad[slot]->dm_nsegs, (long unsigned int) count),
DEBUG_FUNCS | DEBUG_DEBUG);
@@ -1573,8 +1566,7 @@ siisata_atapi_start(struct ata_channel *
chp->ch_error = 0;
prbp = schp->sch_prb[slot];
- memset(prbp, 0, sizeof(struct siisata_prb));
-
+ memset(prbp, 0, SIISATA_CMD_SIZE);
/* fill in direction for ATAPI command */
if ((sc_xfer->xs_control & XS_CTL_DATA_IN))