I deserve a big pointy hat for having missed all those references

to bus_dmasync_op_t in my last commit.
This commit is contained in:
mux 2003-04-10 23:50:06 +00:00
parent bdd588c882
commit f81b8b1670
17 changed files with 42 additions and 50 deletions

View File

@ -568,7 +568,7 @@ adv_execute_ccb(void *arg, bus_dma_segment_t *dm_segs,
scsiq.q2.vm_id = 0;
if (nsegments != 0) {
bus_dmasync_op_t op;
int op;
scsiq.q1.data_addr = dm_segs->ds_addr;
scsiq.q1.data_cnt = dm_segs->ds_len;
@ -1130,7 +1130,7 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat,
LIST_REMOVE(&ccb->ccb_h, sim_links.le);
untimeout(adv_timeout, ccb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;

View File

@ -255,7 +255,7 @@ adwexecuteacb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
}
if (nseg != 0) {
bus_dmasync_op_t op;
int op;
acb->queue.data_addr = dm_segs[0].ds_addr;
acb->queue.data_cnt = ccb->csio.dxfer_len;
@ -1334,7 +1334,7 @@ adw_intr(void *arg)
ccb = acb->ccb;
untimeout(adwtimeout, acb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;

View File

@ -1115,7 +1115,7 @@ ahaexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
aha_sg_t *sg;
bus_dma_segment_t *end_seg;
bus_dmasync_op_t op;
int op;
end_seg = dm_segs + nseg;
@ -1254,7 +1254,7 @@ ahadone(struct aha_softc *aha, struct aha_ccb *accb, aha_mbi_comp_code_t comp_co
}
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;

View File

@ -788,7 +788,7 @@ ahbdone(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
LIST_REMOVE(&ccb->ccb_h, sim_links.le);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
@ -912,7 +912,7 @@ ahbexecuteecb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
ahb_sg_t *sg;
bus_dma_segment_t *end_seg;
bus_dmasync_op_t op;
int op;
end_seg = dm_segs + nseg;

View File

@ -215,7 +215,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
untimeout(ahd_timeout, (caddr_t)scb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
@ -1056,7 +1056,7 @@ ahd_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments,
scb->sg_count = 0;
if (nsegments != 0) {
void *sg;
bus_dmasync_op_t op;
int op;
u_int i;
/* Copy the segments into our SG list */

View File

@ -284,7 +284,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
untimeout(ahc_timeout, (caddr_t)scb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
@ -1107,7 +1107,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments,
if (nsegments != 0) {
struct ahc_dma_seg *sg;
bus_dma_segment_t *end_seg;
bus_dmasync_op_t op;
int op;
end_seg = dm_segs + nsegments;

View File

@ -328,7 +328,7 @@ amdexecutesrb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
struct amd_sg *sg;
bus_dma_segment_t *end_seg;
bus_dmasync_op_t op;
int op;
end_seg = dm_segs + nseg;
@ -1888,7 +1888,7 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB)
("SRBdone - TagNumber %d\n", pSRB->TagNumber));
if ((pccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;

View File

@ -1471,7 +1471,7 @@ btexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
bt_sg_t *sg;
bus_dma_segment_t *end_seg;
bus_dmasync_op_t op;
int op;
end_seg = dm_segs + nseg;
@ -1608,7 +1608,7 @@ btdone(struct bt_softc *bt, struct bt_ccb *bccb, bt_mbi_comp_code_t comp_code)
}
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;

View File

@ -746,7 +746,7 @@ dptexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
dpt_sg_t *sg;
bus_dma_segment_t *end_seg;
bus_dmasync_op_t op;
int op;
end_seg = dm_segs + nseg;
@ -1695,7 +1695,7 @@ dpt_intr(void *arg)
ccb = dccb->ccb;
untimeout(dpttimeout, dccb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;

View File

@ -324,7 +324,7 @@ ida_command(struct ida_softc *ida, int command, void *data, int datasize,
{
struct ida_hardware_qcb *hwqcb;
struct ida_qcb *qcb;
bus_dmasync_op_t op;
int op;
int s, error;
s = splbio();
@ -377,7 +377,7 @@ ida_construct_qcb(struct ida_softc *ida)
{
struct ida_hardware_qcb *hwqcb;
struct ida_qcb *qcb;
bus_dmasync_op_t op;
int op;
struct bio *bp;
bp = bioq_first(&ida->bio_queue);
@ -501,7 +501,7 @@ ida_done(struct ida_softc *ida, struct ida_qcb *qcb)
* finish up command
*/
if (qcb->flags & DMA_DATA_TRANSFER) {
bus_dmasync_op_t op;
int op;
op = qcb->flags & DMA_DATA_IN ?
BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE;

View File

@ -1294,7 +1294,7 @@ gdtexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
}
if (nseg != 0) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_PREREAD;
@ -1747,7 +1747,7 @@ gdt_sync_event(struct gdt_softc *gdt, int service,
u_int8_t index, struct gdt_ccb *gccb)
{
union ccb *ccb;
bus_dmasync_op_t op;
int op;
GDT_DPRINTF(GDT_D_INTR,
("gdt_sync_event(%p, %d, %d, %p)\n", gdt,service,index,gccb));

View File

@ -224,7 +224,7 @@ mpt_execute_req(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg > MPT_NSGL_FIRST(mpt)) {
int i, nleft = nseg;
u_int32_t flags;
bus_dmasync_op_t op;
int op;
SGE_CHAIN32 *ce;
mpt_req->DataLength = ccb->csio.dxfer_len;
@ -305,7 +305,7 @@ mpt_execute_req(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
} else if (nseg > 0) {
int i;
u_int32_t flags;
bus_dmasync_op_t op;
int op;
mpt_req->DataLength = ccb->csio.dxfer_len;
flags = MPI_SGE_FLAGS_SIMPLE_ELEMENT;
@ -878,7 +878,7 @@ mpt_done(mpt_softc_t *mpt, u_int32_t reply)
untimeout(mpttimeout, ccb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
op = BUS_DMASYNC_POSTREAD;

View File

@ -7496,7 +7496,7 @@ static void sym_complete_error (hcb_p np, ccb_p cp)
*/
if (cp->dmamapped) {
bus_dmamap_sync(np->data_dmat, cp->dmamap,
(bus_dmasync_op_t)(cp->dmamapped == SYM_DMA_READ ?
(cp->dmamapped == SYM_DMA_READ ?
BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE));
}
#endif
@ -7568,7 +7568,7 @@ static void sym_complete_ok (hcb_p np, ccb_p cp)
*/
if (cp->dmamapped) {
bus_dmamap_sync(np->data_dmat, cp->dmamap,
(bus_dmasync_op_t)(cp->dmamapped == SYM_DMA_READ ?
(cp->dmamapped == SYM_DMA_READ ?
BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE));
}
#endif
@ -8045,7 +8045,7 @@ sym_execute_ccb(void *arg, bus_dma_segment_t *psegs, int nsegs, int error)
*/
if (cp->dmamapped) {
bus_dmamap_sync(np->data_dmat, cp->dmamap,
(bus_dmasync_op_t)(cp->dmamapped == SYM_DMA_READ ?
(cp->dmamapped == SYM_DMA_READ ?
BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE));
}

View File

@ -434,7 +434,7 @@ trm_ExecuteSRB(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
PSEG psg;
bus_dma_segment_t *end_seg;
bus_dmasync_op_t op;
int op;
/* Copy the segments into our SG list */
end_seg = dm_segs + nseg;
@ -2504,7 +2504,7 @@ trm_SRBdone(PACB pACB, PDCB pDCB, PSRB pSRB)
target_id = pSRB->pccb->ccb_h.target_id;
target_lun = pSRB->pccb->ccb_h.target_lun;
if ((pccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
bus_dmasync_op_t op;
int op;
if ((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
else

View File

@ -1112,16 +1112,12 @@ struct mbuf;
struct uio;
/*
* bus_dmasync_op_t
*
* Operations performed by bus_dmamap_sync().
*/
typedef enum {
BUS_DMASYNC_PREREAD,
BUS_DMASYNC_POSTREAD,
BUS_DMASYNC_PREWRITE,
BUS_DMASYNC_POSTWRITE
} bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
#define BUS_DMASYNC_POSTWRITE 8
/*
* bus_dma_tag_t
@ -1251,7 +1247,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
/*
* Perform a syncronization operation on the given map.
*/
void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
#define bus_dmamap_sync(dmat, dmamap, op) \
if ((dmamap) != NULL) \
_bus_dmamap_sync(dmat, dmamap, op)

View File

@ -643,16 +643,12 @@ struct mbuf;
struct uio;
/*
* bus_dmasync_op_t
*
* Operations performed by bus_dmamap_sync().
*/
typedef enum {
BUS_DMASYNC_PREREAD,
BUS_DMASYNC_POSTREAD,
BUS_DMASYNC_PREWRITE,
BUS_DMASYNC_POSTWRITE
} bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
#define BUS_DMASYNC_POSTWRITE 8
/*
* bus_dma_tag_t
@ -781,7 +777,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
/*
* Perform a syncronization operation on the given map.
*/
void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
/*
* Release the mapping held by map.

View File

@ -94,7 +94,7 @@ int iommu_dvmamap_load_uio(bus_dma_tag_t, bus_dma_tag_t, struct iommu_state *,
void iommu_dvmamap_unload(bus_dma_tag_t, bus_dma_tag_t, struct iommu_state *,
bus_dmamap_t);
void iommu_dvmamap_sync(bus_dma_tag_t, bus_dma_tag_t, struct iommu_state *,
bus_dmamap_t, bus_dmasync_op_t);
bus_dmamap_t, int);
int iommu_dvmamem_alloc_size(bus_dma_tag_t, bus_dma_tag_t, struct iommu_state *,
void **, int, bus_dmamap_t *, bus_size_t size);
int iommu_dvmamem_alloc(bus_dma_tag_t, bus_dma_tag_t, struct iommu_state *,