diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/advansys/advansys.c | 4 | ||||
-rw-r--r-- | sys/dev/advansys/adwcam.c | 4 | ||||
-rw-r--r-- | sys/dev/aha/aha.c | 4 | ||||
-rw-r--r-- | sys/dev/ahb/ahb.c | 4 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_osm.c | 4 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx_osm.c | 4 | ||||
-rw-r--r-- | sys/dev/amd/amd.c | 4 | ||||
-rw-r--r-- | sys/dev/buslogic/bt.c | 4 | ||||
-rw-r--r-- | sys/dev/dpt/dpt_scsi.c | 4 | ||||
-rw-r--r-- | sys/dev/ida/ida.c | 6 | ||||
-rw-r--r-- | sys/dev/iir/iir.c | 4 | ||||
-rw-r--r-- | sys/dev/mpt/mpt_freebsd.c | 6 | ||||
-rw-r--r-- | sys/dev/sym/sym_hipd.c | 6 | ||||
-rw-r--r-- | sys/dev/trm/trm.c | 4 | ||||
-rw-r--r-- | sys/ia64/include/bus.h | 14 | ||||
-rw-r--r-- | sys/powerpc/include/bus.h | 14 | ||||
-rw-r--r-- | sys/sparc64/include/iommuvar.h | 2 |
17 files changed, 42 insertions, 50 deletions
diff --git a/sys/dev/advansys/advansys.c b/sys/dev/advansys/advansys.c index ed820aa..ad12847 100644 --- a/sys/dev/advansys/advansys.c +++ b/sys/dev/advansys/advansys.c @@ -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; diff --git a/sys/dev/advansys/adwcam.c b/sys/dev/advansys/adwcam.c index 4085f3b..ac80286 100644 --- a/sys/dev/advansys/adwcam.c +++ b/sys/dev/advansys/adwcam.c @@ -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; diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c index 7fe6f25..75cff34 100644 --- a/sys/dev/aha/aha.c +++ b/sys/dev/aha/aha.c @@ -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; diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index e6d715b..a60097f 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -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; diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c index c2bb23b..d6f2a49 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.c +++ b/sys/dev/aic7xxx/aic79xx_osm.c @@ -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 */ diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c index 91af8dd..8ce01a6 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.c +++ b/sys/dev/aic7xxx/aic7xxx_osm.c @@ -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; diff --git a/sys/dev/amd/amd.c b/sys/dev/amd/amd.c index ae8b8a8..e611acc 100644 --- a/sys/dev/amd/amd.c +++ b/sys/dev/amd/amd.c @@ -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; diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c index cfcf2e6..d7eb213 100644 --- a/sys/dev/buslogic/bt.c +++ b/sys/dev/buslogic/bt.c @@ -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; diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c index 33420aa..2c75285 100644 --- a/sys/dev/dpt/dpt_scsi.c +++ b/sys/dev/dpt/dpt_scsi.c @@ -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; diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index c141749..d45e74a 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -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; diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c index cb684d9..9b0afac 100644 --- a/sys/dev/iir/iir.c +++ b/sys/dev/iir/iir.c @@ -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)); diff --git a/sys/dev/mpt/mpt_freebsd.c b/sys/dev/mpt/mpt_freebsd.c index a3df9df..6361574 100644 --- a/sys/dev/mpt/mpt_freebsd.c +++ b/sys/dev/mpt/mpt_freebsd.c @@ -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; diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index fc52a6b..e378168 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -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)); } diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c index f803535..058fcde 100644 --- a/sys/dev/trm/trm.c +++ b/sys/dev/trm/trm.c @@ -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 diff --git a/sys/ia64/include/bus.h b/sys/ia64/include/bus.h index 7146ac7..61fc365 100644 --- a/sys/ia64/include/bus.h +++ b/sys/ia64/include/bus.h @@ -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) diff --git a/sys/powerpc/include/bus.h b/sys/powerpc/include/bus.h index fb40537..5104fcb 100644 --- a/sys/powerpc/include/bus.h +++ b/sys/powerpc/include/bus.h @@ -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. diff --git a/sys/sparc64/include/iommuvar.h b/sys/sparc64/include/iommuvar.h index 6638ce8..4584001 100644 --- a/sys/sparc64/include/iommuvar.h +++ b/sys/sparc64/include/iommuvar.h @@ -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 *, |