diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-01-20 22:02:04 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-01-20 22:02:04 +0000 |
commit | f0d48f87e2fca677ee8cf862dadddda3c3dd47ee (patch) | |
tree | 93a7f81c2c93f9632052b346c07bfbf8bce82214 /sys/dev/pci/if_nfe.c | |
parent | c6e008387ae44436a39082ee794cc142c5037b1c (diff) |
remove redundant code from nfe_attach().
ok jsg@
Diffstat (limited to 'sys/dev/pci/if_nfe.c')
-rw-r--r-- | sys/dev/pci/if_nfe.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index be294ded112..d72e7691e9a 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.7 2006/01/18 20:44:51 damien Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.8 2006/01/20 22:02:03 brad Exp $ */ /* * Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr> * Copyright (c) 2005, 2006 Jonathan Gray <jsg@openbsd.org> @@ -156,22 +156,10 @@ nfe_attach(struct device *parent, struct device *self, void *aux) const char *intrstr; struct ifnet *ifp; bus_size_t memsize; - pcireg_t command; /* * Map control/status registers. */ - command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); - command |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE; - - pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command); - command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); - - if (!(command & PCI_COMMAND_MEM_ENABLE)) { - printf(": mem space not enabled\n"); - return; - } - if (pci_mapreg_map(pa, NFE_PCI_BA, PCI_MAPREG_TYPE_MEM, 0, &sc->sc_memt, &sc->sc_memh, NULL, &memsize, 0) != 0) { printf(": can't map mem space\n"); |