Correctly sync the MPT request buffers, and remove BUS_DMA_COHERENT
from the mapping of those buffers.
This commit is contained in:
parent
60c3e62a42
commit
81a8dadfcf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mpt.c,v 1.1 2003/04/16 22:02:59 thorpej Exp $ */
|
||||
/* $NetBSD: mpt.c,v 1.2 2003/04/16 23:02:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 by Greg Ansley
|
||||
@ -277,10 +277,7 @@ mpt_send_cmd(mpt_softc_t *mpt, request_t *req)
|
||||
mpt_prt(mpt, "%08x %08x %08x %08x",
|
||||
pReq[12], pReq[13], pReq[14], pReq[15]);
|
||||
}
|
||||
#if 0 /* XXXJRT */
|
||||
bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap,
|
||||
BUS_DMASYNC_PREWRITE);
|
||||
#endif
|
||||
MPT_SYNC_REQ(mpt, req, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
|
||||
req->debug = REQ_ON_CHIP;
|
||||
mpt_write(mpt, MPT_OFFSET_REQUEST_Q, (u_int32_t) req->req_pbuf);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mpt_netbsd.c,v 1.1 2003/04/16 22:03:00 thorpej Exp $ */
|
||||
/* $NetBSD: mpt_netbsd.c,v 1.2 2003/04/16 23:02:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -204,8 +204,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt)
|
||||
}
|
||||
|
||||
error = bus_dmamem_map(mpt->sc_dmat, &request_seg, request_rseg,
|
||||
MPT_REQ_MEM_SIZE(mpt), (caddr_t *) &mpt->request,
|
||||
BUS_DMA_COHERENT/*XXX*/);
|
||||
MPT_REQ_MEM_SIZE(mpt), (caddr_t *) &mpt->request, 0);
|
||||
if (error) {
|
||||
aprint_error("%s: unable to map request area, error = %d\n",
|
||||
mpt->sc_dev.dv_xname, error);
|
||||
@ -451,6 +450,7 @@ mpt_done(mpt_softc_t *mpt, uint32_t reply)
|
||||
return;
|
||||
}
|
||||
|
||||
MPT_SYNC_REQ(mpt, req, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
|
||||
mpt_req = req->req_vbuf;
|
||||
|
||||
/* Short cut for task management replies; nothing more for us to do. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mpt_netbsd.h,v 1.1 2003/04/16 22:03:00 thorpej Exp $ */
|
||||
/* $NetBSD: mpt_netbsd.h,v 1.2 2003/04/16 23:02:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -242,6 +242,11 @@ typedef struct mpt_softc {
|
||||
void (*sc_set_config_regs)(struct mpt_softc *);
|
||||
} mpt_softc_t;
|
||||
|
||||
#define MPT_SYNC_REQ(mpt, req, ops) \
|
||||
bus_dmamap_sync((mpt)->sc_dmat, (mpt)->request_dmap, \
|
||||
(req)->req_pbuf - (mpt)->request_phys, \
|
||||
MPT_REQUEST_AREA, (ops))
|
||||
|
||||
#define mpt_read(mpt, reg) \
|
||||
bus_space_read_4((mpt)->sc_st, (mpt)->sc_sh, (reg))
|
||||
#define mpt_write(mpt, reg, val) \
|
||||
|
Loading…
Reference in New Issue
Block a user