diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index c9682ef674b5..16c85f177ecc 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -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); diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index 692211d0eb65..82ecf4ad066b 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -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);