pst-pci.c (230132) | pst-pci.c (254263) |
---|---|
1/*- 2 * Copyright (c) 2001,2002,2003 S��ren Schmidt <sos@FreeBSD.org> 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 --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001,2002,2003 S��ren Schmidt <sos@FreeBSD.org> 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 --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/pst/pst-pci.c 230132 2012-01-15 13:23:18Z uqs $"); | 30__FBSDID("$FreeBSD: head/sys/dev/pst/pst-pci.c 254263 2013-08-12 23:30:01Z scottl $"); |
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/module.h> 36#include <sys/bus.h> 37#include <sys/bio.h> 38#include <sys/malloc.h> --- 44 unchanged lines hidden (view full) --- 83 if (!sc->r_mem) 84 return 0; 85 86 rid = 0x00; 87 sc->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, 88 RF_SHAREABLE | RF_ACTIVE); 89 90 /* now setup the infrastructure to talk to the device */ | 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/module.h> 36#include <sys/bus.h> 37#include <sys/bio.h> 38#include <sys/malloc.h> --- 44 unchanged lines hidden (view full) --- 83 if (!sc->r_mem) 84 return 0; 85 86 rid = 0x00; 87 sc->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, 88 RF_SHAREABLE | RF_ACTIVE); 89 90 /* now setup the infrastructure to talk to the device */ |
91 pci_write_config(dev, PCIR_COMMAND, 92 pci_read_config(dev, PCIR_COMMAND, 1) | 93 PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN, 1); | 91 pci_enable_busmaster(dev); |
94 95 sc->ibase = rman_get_virtual(sc->r_mem); 96 sc->reg = (struct i2o_registers *)sc->ibase; 97 sc->dev = dev; 98 mtx_init(&sc->mtx, "pst lock", NULL, MTX_DEF); 99 100 if (!iop_init(sc)) 101 return 0; --- 31 unchanged lines hidden --- | 92 93 sc->ibase = rman_get_virtual(sc->r_mem); 94 sc->reg = (struct i2o_registers *)sc->ibase; 95 sc->dev = dev; 96 mtx_init(&sc->mtx, "pst lock", NULL, MTX_DEF); 97 98 if (!iop_init(sc)) 99 return 0; --- 31 unchanged lines hidden --- |