Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jdolecek-ncq]: src/sys/dev/ic Merge HEAD.
details: https://anonhg.NetBSD.org/src/rev/4770c856df5c
branches: jdolecek-ncq
changeset: 352660:4770c856df5c
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Apr 24 21:19:21 2017 +0000
description:
Merge HEAD.
diffstat:
sys/dev/ic/siisata.c | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
diffs (88 lines):
diff -r 10a57902b931 -r 4770c856df5c sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c Mon Apr 24 18:22:31 2017 +0000
+++ b/sys/dev/ic/siisata.c Mon Apr 24 21:19:21 2017 +0000
@@ -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 @@
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 @@
& 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 @@
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 @@
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 @@
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 @@
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))
Home |
Main Index |
Thread Index |
Old Index