ida_pci.c (49195) | ida_pci.c (49860) |
---|---|
1/*- 2 * Copyright (c) 1999 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1999 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: ida_pci.c,v 1.2 1999/07/03 20:17:02 peter Exp $ | 26 * $Id: ida_pci.c,v 1.3 1999/07/29 01:03:02 mdodd Exp $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/malloc.h> 32#include <sys/kernel.h> 33 34#include <sys/buf.h> --- 105 unchanged lines hidden (view full) --- 140 ida->regs_res_id = IDA_PCI_MEMADDR; 141 ida->regs = bus_alloc_resource(dev, ida->regs_res_type, 142 &ida->regs_res_id, 0, ~0, 1, RF_ACTIVE); 143 if (ida->regs == NULL) { 144 device_printf(dev, "can't allocate register resources\n"); 145 return (ENOMEM); 146 } 147 | 27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/malloc.h> 32#include <sys/kernel.h> 33 34#include <sys/buf.h> --- 105 unchanged lines hidden (view full) --- 140 ida->regs_res_id = IDA_PCI_MEMADDR; 141 ida->regs = bus_alloc_resource(dev, ida->regs_res_type, 142 &ida->regs_res_id, 0, ~0, 1, RF_ACTIVE); 143 if (ida->regs == NULL) { 144 device_printf(dev, "can't allocate register resources\n"); 145 return (ENOMEM); 146 } 147 |
148 error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/0, | 148 error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, |
149 /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, 150 /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, 151 /*maxsize*/MAXBSIZE, /*nsegments*/IDA_NSEG, 152 /*maxsegsize*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, 153 &ida->parent_dmat); 154 if (error != 0) { 155 device_printf(dev, "can't allocate DMA tag\n"); 156 ida_free(ida); --- 31 unchanged lines hidden --- | 149 /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, 150 /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, 151 /*maxsize*/MAXBSIZE, /*nsegments*/IDA_NSEG, 152 /*maxsegsize*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, 153 &ida->parent_dmat); 154 if (error != 0) { 155 device_printf(dev, "can't allocate DMA tag\n"); 156 ida_free(ida); --- 31 unchanged lines hidden --- |