diff options
author | paul <paul@FreeBSD.org> | 1999-05-10 22:39:37 +0000 |
---|---|---|
committer | paul <paul@FreeBSD.org> | 1999-05-10 22:39:37 +0000 |
commit | 981e54ef4459cae15ed91dc7b0ff2d44d13dc0ad (patch) | |
tree | 22eba2ceb60a54ab46e3839e04b02f9947f62610 /sys/dev/lnc/if_lnc_pci.c | |
parent | 9823b675036c761fc8ec44156c06c7aea58265df (diff) | |
download | FreeBSD-src-981e54ef4459cae15ed91dc7b0ff2d44d13dc0ad.zip FreeBSD-src-981e54ef4459cae15ed91dc7b0ff2d44d13dc0ad.tar.gz |
Set the bus master bit.
Submitted by: Ted Faber
Diffstat (limited to 'sys/dev/lnc/if_lnc_pci.c')
-rw-r--r-- | sys/dev/lnc/if_lnc_pci.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/lnc/if_lnc_pci.c b/sys/dev/lnc/if_lnc_pci.c index 6b9605d..0bdedd8 100644 --- a/sys/dev/lnc/if_lnc_pci.c +++ b/sys/dev/lnc/if_lnc_pci.c @@ -17,7 +17,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: if_lnc_p.c,v 1.8 1999/04/24 20:14:00 peter Exp $ + * $Id: if_lnc_p.c,v 1.9 1999/05/09 17:06:55 peter Exp $ */ #include "pci.h" @@ -72,17 +72,24 @@ lnc_pci_attach(config_id, unit) int unit; { unsigned iobase; + unsigned data; /* scratch to make this device a bus master*/ void *lnc; /* device specific data for interrupt handler ... */ - /* pci_map_port correctly initializes bridge chips -- tvf */ - if ( !pci_map_port(config_id,PCI_MAP_REG_START,(u_short *)&iobase) ) printf("lnc%d: pci_port_map_attach failed?!\n",unit); + + /* Make this device a bus master. This was implictly done by + pci_map_port under 2.2.x -- tvf */ + + data = pci_cfgread(config_id, PCIR_COMMAND, 4); + data |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN; + pci_cfgwrite(config_id, PCIR_COMMAND, data, 4); + lnc = lnc_attach_ne2100_pci(unit, iobase); + if (!lnc) return; - if(!(pci_map_int(config_id, lncintr_sc, (void *)lnc, &net_imask))) { free (lnc, M_DEVBUF); return; |