Reformat arguments bus_dma_tag_create().
This commit is contained in:
parent
58a6bbdf3c
commit
e49536d312
@ -207,25 +207,40 @@ ida_init(struct ida_softc *ida)
|
||||
*/
|
||||
|
||||
/* DMA tag for our hardware QCB structures */
|
||||
error = bus_dma_tag_create(ida->parent_dmat,
|
||||
/*alignment*/1, /*boundary*/0,
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR,
|
||||
/*filter*/NULL, /*filterarg*/NULL,
|
||||
IDA_QCB_MAX * sizeof(struct ida_hardware_qcb),
|
||||
/*nsegments*/1, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT,
|
||||
/*flags*/0, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant,
|
||||
&ida->hwqcb_dmat);
|
||||
error = bus_dma_tag_create(
|
||||
/* parent */ ida->parent_dmat,
|
||||
/* alignment */ 1,
|
||||
/* boundary */ 0,
|
||||
/* lowaddr */ BUS_SPACE_MAXADDR,
|
||||
/* highaddr */ BUS_SPACE_MAXADDR,
|
||||
/* filter */ NULL,
|
||||
/* filterarg */ NULL,
|
||||
/* maxsize */ IDA_QCB_MAX * sizeof(struct ida_hardware_qcb),
|
||||
/* nsegments */ 1,
|
||||
/* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT,
|
||||
/* flags */ 0,
|
||||
/* lockfunc */ busdma_lock_mutex,
|
||||
/* lockarg */ &Giant,
|
||||
&ida->hwqcb_dmat);
|
||||
if (error)
|
||||
return (ENOMEM);
|
||||
|
||||
/* DMA tag for mapping buffers into device space */
|
||||
error = bus_dma_tag_create(ida->parent_dmat,
|
||||
/*alignment*/1, /*boundary*/0,
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR,
|
||||
/*filter*/NULL, /*filterarg*/NULL,
|
||||
/*maxsize*/MAXBSIZE, /*nsegments*/IDA_NSEG,
|
||||
/*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0,
|
||||
/*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, &ida->buffer_dmat);
|
||||
error = bus_dma_tag_create(
|
||||
/* parent */ ida->parent_dmat,
|
||||
/* alignment */ 1,
|
||||
/* boundary */ 0,
|
||||
/* lowaddr */ BUS_SPACE_MAXADDR,
|
||||
/* highaddr */ BUS_SPACE_MAXADDR,
|
||||
/* filter */ NULL,
|
||||
/* filterarg */ NULL,
|
||||
/* maxsize */ MAXBSIZE,
|
||||
/* nsegments */ IDA_NSEG,
|
||||
/* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT,
|
||||
/* flags */ 0,
|
||||
/* lockfunc */ busdma_lock_mutex,
|
||||
/* lockarg */ &Giant,
|
||||
&ida->buffer_dmat);
|
||||
if (error)
|
||||
return (ENOMEM);
|
||||
|
||||
|
@ -264,12 +264,21 @@ ida_pci_attach(device_t dev)
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
||||
error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1,
|
||||
/*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL,
|
||||
/*maxsize*/MAXBSIZE, /*nsegments*/IDA_NSEG,
|
||||
/*maxsegsize*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW,
|
||||
/*lockfunc*/NULL, /*lockarg*/NULL, &ida->parent_dmat);
|
||||
error = bus_dma_tag_create(
|
||||
/* parent */ NULL,
|
||||
/* alignment */ 1,
|
||||
/* boundary */ 0,
|
||||
/* lowaddr */ BUS_SPACE_MAXADDR_32BIT,
|
||||
/* highaddr */ BUS_SPACE_MAXADDR,
|
||||
/* filter */ NULL,
|
||||
/* filterarg */ NULL,
|
||||
/* maxsize */ MAXBSIZE,
|
||||
/* nsegments */ IDA_NSEG,
|
||||
/* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT,
|
||||
/* flags */ BUS_DMA_ALLOCNOW,
|
||||
/* lockfunc */ NULL,
|
||||
/* lockarg */ NULL,
|
||||
&ida->parent_dmat);
|
||||
if (error != 0) {
|
||||
device_printf(dev, "can't allocate DMA tag\n");
|
||||
ida_free(ida);
|
||||
|
Loading…
Reference in New Issue
Block a user