diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-06-30 16:51:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-06-30 16:51:31 +0000 |
commit | c5166c1010e74e5b65cb2fde0f5394353e5bd693 (patch) | |
tree | 0cb0555c3a7cbe330e78b667f75430f9f7eea1fb | |
parent | 4ad8e694b8309967f63abdfb9eaa593339e18e71 (diff) |
do not bother playing tag with the PCI_COMMAND_STATUS_REG
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index 8e2f0cfb268..39637a003c8 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.13 2006/06/27 07:09:49 brad Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.14 2006/06/30 16:51:30 deraadt Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -160,23 +160,11 @@ re_pci_attach(struct device *parent, struct device *self, void *aux) /* * Map control/status registers. */ - command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); - - if ((command & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) == 0) { - printf(": neither i/o nor mem enabled\n"); - return; - } - - if (command & PCI_COMMAND_MEM_ENABLE) { - if (pci_mapreg_map(pa, RL_PCI_LOMEM, PCI_MAPREG_TYPE_MEM, 0, - &sc->rl_btag, &sc->rl_bhandle, NULL, &iosize, 0)) { - printf(": can't map mem space\n"); - return; - } - } else { + if (pci_mapreg_map(pa, RL_PCI_LOMEM, PCI_MAPREG_TYPE_MEM, 0, + &sc->rl_btag, &sc->rl_bhandle, NULL, &iosize, 0)) { if (pci_mapreg_map(pa, RL_PCI_LOIO, PCI_MAPREG_TYPE_IO, 0, &sc->rl_btag, &sc->rl_bhandle, NULL, &iosize, 0)) { - printf(": can't map i/o space\n"); + printf(": can't map mem or i/o space\n"); return; } } |