aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorPaul Richards <paul@FreeBSD.org>1999-05-10 22:39:37 +0000
committerPaul Richards <paul@FreeBSD.org>1999-05-10 22:39:37 +0000
commit9adcb188e5ea96cf32e74797cba120879987f94c (patch)
treef13d03fb492df7540c42f1b7138ae4ebe1cda763 /sys/dev
parente948f24a53d3cf319bfc07cc73cac803c12816da (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/lnc/if_lnc_pci.c15
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 6b9605dab72b1..0bdedd88df63b 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;