summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-08-09 04:10:14 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-08-09 04:10:14 +0000
commit8acbfa59711c28388979dd47c85ac8fda2aef774 (patch)
tree0a8f13a9f8aea3ce00fc1186bafa554451900d2b /sys/dev
parentea9360cd901a644039d864bec59eb393c782c450 (diff)
do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in pcisubmatch(); kettenis@ testing; brad@ ok
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/aac_pci.c7
-rw-r--r--sys/dev/pci/adw_pci.c17
-rw-r--r--sys/dev/pci/ahc_pci.c8
-rw-r--r--sys/dev/pci/ahd_pci.c7
-rw-r--r--sys/dev/pci/ami_pci.c7
-rw-r--r--sys/dev/pci/auich.c7
-rw-r--r--sys/dev/pci/autri.c10
-rw-r--r--sys/dev/pci/bha_pci.c7
-rw-r--r--sys/dev/pci/cac_pci.c7
-rw-r--r--sys/dev/pci/ciss_pci.c7
-rw-r--r--sys/dev/pci/cs4280.c7
-rw-r--r--sys/dev/pci/cs4281.c8
-rw-r--r--sys/dev/pci/dpt_pci.c8
-rw-r--r--sys/dev/pci/eap.c8
-rw-r--r--sys/dev/pci/ehci_pci.c8
-rw-r--r--sys/dev/pci/emuxki.c5
-rw-r--r--sys/dev/pci/esa.c8
-rw-r--r--sys/dev/pci/eso.c8
-rw-r--r--sys/dev/pci/gtp.c8
-rw-r--r--sys/dev/pci/i82365_pci.c7
-rw-r--r--sys/dev/pci/if_an_pci.c8
-rw-r--r--sys/dev/pci/if_ath_pci.c8
-rw-r--r--sys/dev/pci/if_atw_pci.c9
-rw-r--r--sys/dev/pci/if_bce.c13
-rw-r--r--sys/dev/pci/if_bge.c16
-rw-r--r--sys/dev/pci/if_dc_pci.c14
-rw-r--r--sys/dev/pci/if_de.c8
-rw-r--r--sys/dev/pci/if_em.c11
-rw-r--r--sys/dev/pci/if_ep_pci.c7
-rw-r--r--sys/dev/pci/if_fxp_pci.c7
-rw-r--r--sys/dev/pci/if_ipw.c7
-rw-r--r--sys/dev/pci/if_iwi.c7
-rw-r--r--sys/dev/pci/if_le_pci.c9
-rw-r--r--sys/dev/pci/if_lge.c6
-rw-r--r--sys/dev/pci/if_lmc_obsd.c7
-rw-r--r--sys/dev/pci/if_mtd_pci.c3
-rw-r--r--sys/dev/pci/if_ne_pci.c9
-rw-r--r--sys/dev/pci/if_nge.c6
-rw-r--r--sys/dev/pci/if_ral_pci.c8
-rw-r--r--sys/dev/pci/if_re_pci.c6
-rw-r--r--sys/dev/pci/if_rtw_pci.c9
-rw-r--r--sys/dev/pci/if_sf.c6
-rw-r--r--sys/dev/pci/if_sis.c8
-rw-r--r--sys/dev/pci/if_ste.c8
-rw-r--r--sys/dev/pci/if_vge.c7
-rw-r--r--sys/dev/pci/if_wb.c8
-rw-r--r--sys/dev/pci/if_xl_pci.c6
-rw-r--r--sys/dev/pci/iha_pci.c8
-rw-r--r--sys/dev/pci/iop_pci.c7
-rw-r--r--sys/dev/pci/ises.c6
-rw-r--r--sys/dev/pci/isp_pci.c4
-rw-r--r--sys/dev/pci/maestro.c9
-rw-r--r--sys/dev/pci/mpt_pci.c12
-rw-r--r--sys/dev/pci/neo.c8
-rw-r--r--sys/dev/pci/nofn.c6
-rw-r--r--sys/dev/pci/ohci_pci.c9
-rw-r--r--sys/dev/pci/pciide.c13
-rw-r--r--sys/dev/pci/pcscp.c7
-rw-r--r--sys/dev/pci/safe.c5
-rw-r--r--sys/dev/pci/sv.c8
-rw-r--r--sys/dev/pci/trm_pci.c12
-rw-r--r--sys/dev/pci/twe_pci.c8
-rw-r--r--sys/dev/pci/ubsec.c5
-rw-r--r--sys/dev/pci/uhci_pci.c8
-rw-r--r--sys/dev/pci/yds.c10
65 files changed, 81 insertions, 444 deletions
diff --git a/sys/dev/pci/aac_pci.c b/sys/dev/pci/aac_pci.c
index abdbf8dd51e..161b78354d2 100644
--- a/sys/dev/pci/aac_pci.c
+++ b/sys/dev/pci/aac_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac_pci.c,v 1.14 2004/11/23 04:02:25 marco Exp $ */
+/* $OpenBSD: aac_pci.c,v 1.15 2005/08/09 04:10:10 mickey Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -208,7 +208,7 @@ aac_pci_attach(parent, self, aux)
struct pci_attach_args *pa = aux;
pci_chipset_tag_t pc = pa->pa_pc;
struct aac_softc *sc = (void *)self;
- u_int16_t command;
+ pcireg_t command;
bus_addr_t membase;
bus_size_t memsize;
pci_intr_handle_t ih;
@@ -236,9 +236,6 @@ aac_pci_attach(parent, self, aux)
* Verify that the adapter is correctly set up in PCI space.
*/
command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= 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);
AAC_DPRINTF(AAC_D_MISC, ("pci command status reg 0x08x "));
if (!(command & PCI_COMMAND_MASTER_ENABLE)) {
printf("can't enable bus-master feature\n");
diff --git a/sys/dev/pci/adw_pci.c b/sys/dev/pci/adw_pci.c
index d75cea1094b..05c60b10315 100644
--- a/sys/dev/pci/adw_pci.c
+++ b/sys/dev/pci/adw_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw_pci.c,v 1.12 2002/11/19 18:40:16 jason Exp $ */
+/* $OpenBSD: adw_pci.c,v 1.13 2005/08/09 04:10:10 mickey Exp $ */
/* $NetBSD: adw_pci.c,v 1.7 2000/05/26 15:13:46 dante Exp $ */
/*
@@ -119,7 +119,7 @@ adw_pci_attach(parent, self, aux)
bus_space_handle_t ioh;
pci_intr_handle_t ih;
pci_chipset_tag_t pc = pa->pa_pc;
- u_int32_t command;
+ pcireg_t command;
const char *intrstr;
/*
@@ -144,17 +144,10 @@ adw_pci_attach(parent, self, aux)
return;
}
- /*
- * Make sure IO/MEM/MASTER are enabled
- */
- command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE |
- PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command);
-
- if ( (command & PCI_COMMAND_PARITY_ENABLE) == 0) {
+ command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+ if ( (command & PCI_COMMAND_PARITY_ENABLE) == 0)
sc->cfg.control_flag |= CONTROL_FLAG_IGNORE_PERR;
- }
+
/*
* Map Device Registers for I/O
*/
diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c
index ac95c97cb35..c180bf87b49 100644
--- a/sys/dev/pci/ahc_pci.c
+++ b/sys/dev/pci/ahc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahc_pci.c,v 1.48 2005/03/24 17:15:28 martin Exp $ */
+/* $OpenBSD: ahc_pci.c,v 1.49 2005/08/09 04:10:10 mickey Exp $ */
/*
* Product specific probe and attach routines for:
* 3940, 2940, aic7895, aic7890, aic7880,
@@ -40,7 +40,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: ahc_pci.c,v 1.48 2005/03/24 17:15:28 martin Exp $
+ * $Id: ahc_pci.c,v 1.49 2005/08/09 04:10:10 mickey Exp $
*
* //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#57 $
*
@@ -851,10 +851,6 @@ ahc_pci_attach(parent, self, aux)
pci_conf_write(pa->pa_pc, pa->pa_tag, DEVCONFIG, devconfig);
- /* Ensure busmastering is enabled */
- command |= PCI_COMMAND_MASTER_ENABLE;;
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command);
-
/*
* Disable PCI parity error reporting. Users typically
* do this to work around broken PCI chipsets that get
diff --git a/sys/dev/pci/ahd_pci.c b/sys/dev/pci/ahd_pci.c
index 07376f5213b..6224f6ac20b 100644
--- a/sys/dev/pci/ahd_pci.c
+++ b/sys/dev/pci/ahd_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahd_pci.c,v 1.11 2004/12/19 06:17:54 krw Exp $ */
+/* $OpenBSD: ahd_pci.c,v 1.12 2005/08/09 04:10:10 mickey Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -504,11 +504,6 @@ ahd_pci_attach(struct device *parent, struct device *self, void *aux)
pci_conf_write(pa->pa_pc, pa->pa_tag, DEVCONFIG, devconfig);
}
- /* Ensure busmastering is enabled */
- command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command);
-
ahd_softc_init(ahd);
/*
diff --git a/sys/dev/pci/ami_pci.c b/sys/dev/pci/ami_pci.c
index 5ae390f9b7f..e31515670e5 100644
--- a/sys/dev/pci/ami_pci.c
+++ b/sys/dev/pci/ami_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami_pci.c,v 1.27 2005/07/18 02:43:27 fgsch Exp $ */
+/* $OpenBSD: ami_pci.c,v 1.28 2005/08/09 04:10:10 mickey Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -215,11 +215,6 @@ ami_pci_attach(parent, self, aux)
}
sc->dmat = pa->pa_dmat;
- /* enable bus mastering (should not it be mi?) */
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
if (pci_intr_map(pa, &ih)) {
printf(": can't map interrupt\n");
bus_space_unmap(sc->iot, sc->ioh, size);
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index e51a5850f1a..04a5a882d67 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.54 2005/08/04 13:22:49 jsg Exp $ */
+/* $OpenBSD: auich.c,v 1.55 2005/08/09 04:10:10 mickey Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -429,11 +429,6 @@ auich_attach(parent, self, aux)
return;
}
- /* enable bus mastering (should it not be mi?) */
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
if (pci_intr_map(pa, &ih)) {
bus_space_unmap(sc->iot, sc->aud_ioh, aud_size);
bus_space_unmap(sc->iot_mix, sc->mix_ioh, mix_size);
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index 9de9e90305e..a73a2cb0bd5 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.15 2005/04/16 21:57:23 mickey Exp $ */
+/* $OpenBSD: autri.c,v 1.16 2005/08/09 04:10:10 mickey Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -502,7 +502,6 @@ autri_attach(parent, self, aux)
char const *intrstr;
mixer_ctrl_t ctl;
int i, r;
- u_int32_t reg;
sc->sc_devid = pa->pa_id;
sc->sc_class = pa->pa_class;
@@ -539,11 +538,6 @@ autri_attach(parent, self, aux)
sc->sc_pc = pc;
sc->sc_pt = pa->pa_tag;
- /* enable the device */
- reg = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- reg |= (PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE);
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
-
/* initialize the device */
autri_init(sc);
@@ -631,7 +625,7 @@ autri_init(sc_)
void *sc_;
{
struct autri_softc *sc = sc_;
- u_int32_t reg;
+ pcireg_t reg;
pci_chipset_tag_t pc = sc->sc_pc;
pcitag_t pt = sc->sc_pt;
diff --git a/sys/dev/pci/bha_pci.c b/sys/dev/pci/bha_pci.c
index 03a9f859ec1..a902ef2a8ce 100644
--- a/sys/dev/pci/bha_pci.c
+++ b/sys/dev/pci/bha_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bha_pci.c,v 1.6 2003/02/28 15:26:23 mickey Exp $ */
+/* $OpenBSD: bha_pci.c,v 1.7 2005/08/09 04:10:10 mickey Exp $ */
/* $NetBSD: bha_pci.c,v 1.16 1998/08/15 10:10:53 mycroft Exp $ */
/*-
@@ -114,7 +114,6 @@ bha_pci_attach(parent, self, aux)
struct bha_probe_data bpd;
pci_chipset_tag_t pc = pa->pa_pc;
pci_intr_handle_t ih;
- pcireg_t csr;
const char *model, *intrstr;
if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BUSLOGIC_MULTIMASTER_NC)
@@ -141,10 +140,6 @@ bha_pci_attach(parent, self, aux)
sc->sc_dmaflags = 0;
- csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE);
-
if (pci_intr_map(pa, &ih)) {
printf(": couldn't map interrupt\n");
bus_space_unmap(iot, ioh, iosize);
diff --git a/sys/dev/pci/cac_pci.c b/sys/dev/pci/cac_pci.c
index fb4ab548702..6cd006d70f2 100644
--- a/sys/dev/pci/cac_pci.c
+++ b/sys/dev/pci/cac_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac_pci.c,v 1.9 2003/03/06 22:31:23 mickey Exp $ */
+/* $OpenBSD: cac_pci.c,v 1.10 2005/08/09 04:10:10 mickey Exp $ */
/* $NetBSD: cac_pci.c,v 1.10 2001/01/10 16:48:04 ad Exp $ */
/*-
@@ -215,11 +215,6 @@ cac_pci_attach(parent, self, aux)
sc->sc_dmat = pa->pa_dmat;
- /* Enable the device. */
- reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- reg | PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
printf(": can't map interrupt\n");
diff --git a/sys/dev/pci/ciss_pci.c b/sys/dev/pci/ciss_pci.c
index 192339714ce..6e2b2c8ce6a 100644
--- a/sys/dev/pci/ciss_pci.c
+++ b/sys/dev/pci/ciss_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss_pci.c,v 1.4 2005/08/05 17:00:09 mpf Exp $ */
+/* $OpenBSD: ciss_pci.c,v 1.5 2005/08/09 04:10:10 mickey Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -131,11 +131,6 @@ ciss_pci_attach(struct device *parent, struct device *self, void *aux)
bus_space_write_4(sc->iot, sc->ioh, CISS_IMR,
bus_space_read_4(sc->iot, sc->ioh, CISS_IMR) | sc->iem);
- /* enable bus mastering (should not it be mi?) */
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
-
if (pci_intr_map(pa, &ih)) {
printf(": can't map interrupt\n");
bus_space_unmap(sc->iot, sc->ioh, size);
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 1a2c205f9d1..1215b503f24 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4280.c,v 1.22 2004/12/19 16:10:46 deraadt Exp $ */
+/* $OpenBSD: cs4280.c,v 1.23 2005/08/09 04:10:10 mickey Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
@@ -619,11 +619,6 @@ cs4280_attach(parent, self, aux)
sc->sc_dmatag = pa->pa_dmat;
- /* Enable the device (set bus master flag) */
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
-
/* LATENCY_TIMER setting */
mem = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG);
if ( PCI_LATTIMER(mem) < 32 ) {
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c
index 88adfc9c176..8b0d64ba1f9 100644
--- a/sys/dev/pci/cs4281.c
+++ b/sys/dev/pci/cs4281.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4281.c,v 1.16 2003/10/07 14:11:04 fgsch Exp $ */
+/* $OpenBSD: cs4281.c,v 1.17 2005/08/09 04:10:10 mickey Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
@@ -295,7 +295,6 @@ cs4281_attach(parent, self, aux)
pci_chipset_tag_t pc = pa->pa_pc;
char const *intrstr;
pci_intr_handle_t ih;
- pcireg_t csr;
int pci_pwrmgmt_cap_reg, pci_pwrmgmt_csr_reg;
/* Map I/O register */
@@ -333,11 +332,6 @@ cs4281_attach(parent, self, aux)
}
}
- /* Enable the device (set bus master flag) */
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
printf("%s: couldn't map interrupt\n", sc->sc_dev.dv_xname);
diff --git a/sys/dev/pci/dpt_pci.c b/sys/dev/pci/dpt_pci.c
index b3eb4591b90..60be4b9645c 100644
--- a/sys/dev/pci/dpt_pci.c
+++ b/sys/dev/pci/dpt_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpt_pci.c,v 1.4 2002/03/14 01:26:58 millert Exp $ */
+/* $OpenBSD: dpt_pci.c,v 1.5 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: dpt_pci.c,v 1.2 1999/09/29 17:33:02 ad Exp $ */
/*
@@ -109,7 +109,6 @@ dpt_pci_attach(parent, self, aux)
pci_chipset_tag_t pc;
pci_intr_handle_t ih;
const char *intrstr;
- pcireg_t csr;
sc = (struct dpt_softc *)self;
pa = (struct pci_attach_args *)aux;
@@ -124,11 +123,6 @@ dpt_pci_attach(parent, self, aux)
sc->sc_dmat = pa->pa_dmat;
- /* Enable the device. */
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
printf("can't map interrupt\n");
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index 1e054c13094..66a4ed5dc0e 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.27 2005/04/25 19:53:44 niallo Exp $ */
+/* $OpenBSD: eap.c,v 1.28 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
@@ -545,7 +545,6 @@ eap_attach(struct device *parent, struct device *self, void *aux)
struct audio_hw_if *eap_hw_if;
char const *intrstr;
pci_intr_handle_t ih;
- pcireg_t csr;
mixer_ctrl_t ctl;
int i;
int revision, ct5880;
@@ -573,11 +572,6 @@ eap_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dmatag = pa->pa_dmat;
- /* Enable the device. */
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
printf(": couldn't map interrupt\n");
diff --git a/sys/dev/pci/ehci_pci.c b/sys/dev/pci/ehci_pci.c
index 3bb2b4ec76c..3a89bd510a7 100644
--- a/sys/dev/pci/ehci_pci.c
+++ b/sys/dev/pci/ehci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci_pci.c,v 1.6 2005/04/11 08:09:32 dlg Exp $ */
+/* $OpenBSD: ehci_pci.c,v 1.7 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: ehci_pci.c,v 1.15 2004/04/23 21:13:06 itojun Exp $ */
/*
@@ -111,7 +111,6 @@ ehci_pci_attach(struct device *parent, struct device *self, void *aux)
pcitag_t tag = pa->pa_tag;
char const *intrstr;
pci_intr_handle_t ih;
- pcireg_t csr;
const char *vendor;
char *devname = sc->sc.sc_bus.bdev.dv_xname;
usbd_status r;
@@ -135,11 +134,6 @@ ehci_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_tag = tag;
sc->sc.sc_bus.dmatag = pa->pa_dmat;
- /* Enable the device. */
- csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
/* Disable interrupts, so we don't get any spurious ones. */
sc->sc.sc_offs = EREAD1(&sc->sc, EHCI_CAPLENGTH);
DPRINTF(("%s: offs=%d\n", devname, sc->sc.sc_offs));
diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c
index f7d544b6a81..4788e48ecc3 100644
--- a/sys/dev/pci/emuxki.c
+++ b/sys/dev/pci/emuxki.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emuxki.c,v 1.19 2004/09/02 02:09:09 marco Exp $ */
+/* $OpenBSD: emuxki.c,v 1.20 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */
/*-
@@ -430,9 +430,6 @@ emuxki_attach(struct device *parent, struct device *self, void *aux)
sc->sc_pc = pa->pa_pc;
sc->sc_dmat = pa->pa_dmat;
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pa->pa_pc, pa->pa_tag,
- (PCI_COMMAND_STATUS_REG) | PCI_COMMAND_MASTER_ENABLE));
if (pci_intr_map(pa, &ih)) {
printf(": couldn't map interrupt\n");
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c
index 6151dddc025..945b7624135 100644
--- a/sys/dev/pci/esa.c
+++ b/sys/dev/pci/esa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esa.c,v 1.8 2003/10/07 14:11:04 fgsch Exp $ */
+/* $OpenBSD: esa.c,v 1.9 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
@@ -1015,7 +1015,6 @@ esa_attach(struct device *parent, struct device *self, void *aux)
pci_intr_handle_t ih;
struct esa_card_type *card;
const char *intrstr;
- u_int32_t data;
int i, len;
for (card = esa_card_types; card->pci_vendor_id; card++)
@@ -1027,11 +1026,6 @@ esa_attach(struct device *parent, struct device *self, void *aux)
break;
}
- data = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
- data |= (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE
- | PCI_COMMAND_MASTER_ENABLE);
- pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, data);
-
/* Map I/O register */
if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
&sc->sc_iot, &sc->sc_ioh, &sc->sc_iob, &sc->sc_ios, 0)) {
diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c
index 1badaa5aaba..ac3e3d8ce2b 100644
--- a/sys/dev/pci/eso.c
+++ b/sys/dev/pci/eso.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eso.c,v 1.21 2005/04/14 12:42:16 mickey Exp $ */
+/* $OpenBSD: eso.c,v 1.22 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: eso.c,v 1.3 1999/08/02 17:37:43 augustss Exp $ */
/*
@@ -254,12 +254,6 @@ eso_attach(parent, self, aux)
sc->sc_pa = *pa;
- /* Enable bus mastering. */
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pa->pa_pc, pa->pa_tag,
- PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
-
eso_setup(sc, 1);
/* map and establish the interrupt. */
diff --git a/sys/dev/pci/gtp.c b/sys/dev/pci/gtp.c
index c572e1a6e1e..f09ef0d269c 100644
--- a/sys/dev/pci/gtp.c
+++ b/sys/dev/pci/gtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gtp.c,v 1.1 2002/06/03 16:13:21 mickey Exp $ */
+/* $OpenBSD: gtp.c,v 1.2 2005/08/09 04:10:11 mickey Exp $ */
/*
* Copyright (c) 2002 Vladimir Popov <jumbo@narod.ru>
@@ -135,7 +135,6 @@ gtp_attach(struct device *parent, struct device *self, void *aux)
struct pci_attach_args *pa = aux;
struct cfdata *cf = sc->sc_dev.dv_cfdata;
pci_chipset_tag_t pc = pa->pa_pc;
- pcireg_t csr;
if (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_IO, 0, &sc->tea.iot,
&sc->tea.ioh, NULL, NULL, 0)) {
@@ -143,11 +142,6 @@ gtp_attach(struct device *parent, struct device *self, void *aux)
return;
}
- /* Enable the card */
- csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
sc->vol = 0;
sc->mute = 0;
sc->freq = MIN_FM_FREQ;
diff --git a/sys/dev/pci/i82365_pci.c b/sys/dev/pci/i82365_pci.c
index 20e90dd07f0..583b018a12a 100644
--- a/sys/dev/pci/i82365_pci.c
+++ b/sys/dev/pci/i82365_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_pci.c,v 1.8 2005/01/27 17:03:23 millert Exp $ */
+/* $OpenBSD: i82365_pci.c,v 1.9 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: i82365_pci.c,v 1.11 2000/02/24 03:42:44 itohy Exp $ */
/*
@@ -153,11 +153,6 @@ pcic_pci_attach(parent, self, aux)
sc->memt = memt;
sc->memh = memh;
- /* Enable the card. */
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
-
printf("\n");
pcic_attach(sc);
pcic_attach_sockets(sc);
diff --git a/sys/dev/pci/if_an_pci.c b/sys/dev/pci/if_an_pci.c
index 1398e97370c..81cc66b4545 100644
--- a/sys/dev/pci/if_an_pci.c
+++ b/sys/dev/pci/if_an_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_an_pci.c,v 1.10 2005/06/20 22:42:29 jsg Exp $ */
+/* $OpenBSD: if_an_pci.c,v 1.11 2005/08/09 04:10:11 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -118,7 +118,6 @@ an_pci_attach(parent, self, aux)
bus_space_handle_t ioh;
bus_space_tag_t iot = pa->pa_iot;
pci_chipset_tag_t pc = pa->pa_pc;
- pcireg_t csr;
const char *intrstr;
/* Map the I/O ports. */
@@ -130,11 +129,6 @@ an_pci_attach(parent, self, aux)
sc->an_btag = iot;
sc->an_bhandle = ioh;
- /* Enable the card. */
- csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
printf("\n%s: couldn't map interrupt\n", sc->sc_dev.dv_xname);
diff --git a/sys/dev/pci/if_ath_pci.c b/sys/dev/pci/if_ath_pci.c
index 6e62213aefd..77dba72269a 100644
--- a/sys/dev/pci/if_ath_pci.c
+++ b/sys/dev/pci/if_ath_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ath_pci.c,v 1.4 2005/01/03 19:59:18 jsg Exp $ */
+/* $OpenBSD: if_ath_pci.c,v 1.5 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: if_ath_pci.c,v 1.7 2004/06/30 05:58:17 mycroft Exp $ */
/*-
@@ -151,7 +151,7 @@ ath_pci_attach(struct device *parent, struct device *self, void *aux)
{
struct ath_pci_softc *psc = (struct ath_pci_softc *)self;
struct ath_softc *sc = &psc->sc_sc;
- u_int32_t res;
+ pcireg_t res;
struct pci_attach_args *pa = aux;
pci_chipset_tag_t pc = pa->pa_pc;
bus_space_tag_t iot;
@@ -162,11 +162,7 @@ ath_pci_attach(struct device *parent, struct device *self, void *aux)
psc->sc_pc = pc;
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE);
res = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
-
if ((res & PCI_COMMAND_MEM_ENABLE) == 0) {
printf(": couldn't enable memory mapping\n");
goto bad;
diff --git a/sys/dev/pci/if_atw_pci.c b/sys/dev/pci/if_atw_pci.c
index a9b44a12c8a..758f480418c 100644
--- a/sys/dev/pci/if_atw_pci.c
+++ b/sys/dev/pci/if_atw_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atw_pci.c,v 1.5 2005/06/26 04:00:23 brad Exp $ */
+/* $OpenBSD: if_atw_pci.c,v 1.6 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: if_atw_pci.c,v 1.7 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -228,13 +228,6 @@ atw_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dmat = pa->pa_dmat;
/*
- * Make sure bus mastering is enabled.
- */
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
-
- /*
* Get the cacheline size.
*/
sc->sc_cacheline = PCI_CACHELINE(pci_conf_read(pc, pa->pa_tag,
diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c
index 168db2d9ef4..fc9c9d5c77c 100644
--- a/sys/dev/pci/if_bce.c
+++ b/sys/dev/pci/if_bce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bce.c,v 1.8 2005/07/03 07:47:23 brad Exp $ */
+/* $OpenBSD: if_bce.c,v 1.9 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */
/*
@@ -250,7 +250,6 @@ bce_attach(parent, self, aux)
caddr_t kva;
bus_dma_segment_t seg;
int rseg;
- u_int32_t command;
struct ifnet *ifp;
pcireg_t memtype;
bus_addr_t memaddr;
@@ -268,16 +267,6 @@ bce_attach(parent, self, aux)
/*
* 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)) {
- APRINT_ERROR("%s: failed to enable memory mapping!\n",
- sc->bce_dev.dv_xname);
- return;
- }
memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, BCE_PCI_BAR0);
switch (memtype) {
case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT:
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 44881d14bdc..0832b9fc418 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.78 2005/07/25 00:49:43 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.79 2005/08/09 04:10:11 mickey Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1716,7 +1716,6 @@ bge_attach(parent, self, aux)
int s, rseg;
u_int32_t hwcfg = 0;
u_int32_t mac_addr = 0;
- u_int32_t command;
u_int32_t pm_ctl;
struct ifnet *ifp;
int unit, error = 0;
@@ -1729,19 +1728,6 @@ bge_attach(parent, self, aux)
/*
* Map control/status registers.
*/
- DPRINTFN(5, ("Map control/status regs\n"));
- 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("%s: failed to enable memory mapping!\n",
- sc->bge_dev.dv_xname);
- error = ENXIO;
- goto fail;
- }
-
DPRINTFN(5, ("pci_mem_find\n"));
if (pci_mem_find(pc, pa->pa_tag, BGE_PCI_BAR0, &iobase,
&iosize, NULL)) {
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c
index d333fde9c7b..5cca4198169 100644
--- a/sys/dev/pci/if_dc_pci.c
+++ b/sys/dev/pci/if_dc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dc_pci.c,v 1.50 2005/03/26 15:49:09 mickey Exp $ */
+/* $OpenBSD: if_dc_pci.c,v 1.51 2005/08/09 04:10:11 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -211,7 +211,7 @@ void dc_pci_attach(parent, self, aux)
{
int s;
const char *intrstr = NULL;
- u_int32_t command;
+ pcireg_t command;
struct dc_softc *sc = (struct dc_softc *)self;
struct pci_attach_args *pa = aux;
pci_chipset_tag_t pc = pa->pa_pc;
@@ -228,17 +228,11 @@ void dc_pci_attach(parent, self, aux)
*/
dc_pci_acpi(self, aux);
+ sc->dc_csid = pci_conf_read(pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
+
/*
* Map control/status registers.
*/
- command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | 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);
-
- sc->dc_csid = pci_conf_read(pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
-
#ifdef DC_USEIOSPACE
if (pci_mapreg_map(pa, DC_PCI_CFBIO, PCI_MAPREG_TYPE_IO, 0,
&sc->dc_btag, &sc->dc_bhandle, NULL, &iosize, 0)) {
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c
index 9719d5b8930..67acad9c693 100644
--- a/sys/dev/pci/if_de.c
+++ b/sys/dev/pci/if_de.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_de.c,v 1.74 2005/07/16 17:20:47 brad Exp $ */
+/* $OpenBSD: if_de.c,v 1.75 2005/08/09 04:10:11 mickey Exp $ */
/* $NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp $ */
/*-
@@ -5093,12 +5093,6 @@ tulip_pci_attach(TULIP_PCI_ATTACH_ARGS)
printf(": unable to map device registers\n");
return;
}
-
- /* Make sure bus mastering is enabled. */
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pa->pa_pc, pa->pa_tag,
- PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
}
tulip_initcsrs(sc, csr_base + csroffset, csrsize);
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index f8dcde9880a..6d8cb3c399f 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.66 2005/07/16 19:05:36 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.67 2005/08/09 04:10:12 mickey Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -1394,15 +1394,6 @@ em_identify_hardware(struct em_softc *sc)
/* Make sure our PCI config space has the necessary stuff set */
sc->hw.pci_cmd_word = pci_conf_read(pa->pa_pc, pa->pa_tag,
PCI_COMMAND_STATUS_REG);
- if (!((sc->hw.pci_cmd_word & PCI_COMMAND_MASTER_ENABLE) &&
- (sc->hw.pci_cmd_word & PCI_COMMAND_MEM_ENABLE))) {
- printf("%s: Memory Access and/or Bus Master bits were not set!\n",
- sc->sc_dv.dv_xname);
- sc->hw.pci_cmd_word |=
- (PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- sc->hw.pci_cmd_word);
- }
/* Save off the information about this board */
sc->hw.vendor_id = PCI_VENDOR(pa->pa_id);
diff --git a/sys/dev/pci/if_ep_pci.c b/sys/dev/pci/if_ep_pci.c
index 2891fe3e961..4f2477c4fa3 100644
--- a/sys/dev/pci/if_ep_pci.c
+++ b/sys/dev/pci/if_ep_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ep_pci.c,v 1.23 2004/05/12 06:35:11 tedu Exp $ */
+/* $OpenBSD: if_ep_pci.c,v 1.24 2005/08/09 04:10:12 mickey Exp $ */
/* $NetBSD: if_ep_pci.c,v 1.13 1996/10/21 22:56:38 thorpej Exp $ */
/*
@@ -140,11 +140,6 @@ ep_pci_attach(parent, self, aux)
epconfig(sc, EP_CHIPSET_VORTEX, NULL);
- /* Enable the card. */
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
printf(", couldn't map interrupt\n");
diff --git a/sys/dev/pci/if_fxp_pci.c b/sys/dev/pci/if_fxp_pci.c
index b8750c766b5..fca50c8524b 100644
--- a/sys/dev/pci/if_fxp_pci.c
+++ b/sys/dev/pci/if_fxp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fxp_pci.c,v 1.37 2005/08/01 22:54:46 brad Exp $ */
+/* $OpenBSD: if_fxp_pci.c,v 1.38 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 1995, David Greenman
@@ -215,11 +215,6 @@ fxp_pci_attach(parent, self, aux)
(sc->sc_revision >= 8 && sc->sc_revision <= 13))))
sc->sc_flags |= FXPF_DISABLE_STANDBY;
- /* enable bus mastering */
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- PCI_COMMAND_MASTER_ENABLE |
- pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG));
-
/*
* enable PCI Memory Write and Invalidate command
*/
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index 29e9f806a92..3c0c878af36 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.49 2005/07/30 18:04:41 claudio Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.50 2005/08/09 04:10:12 mickey Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -181,11 +181,6 @@ ipw_attach(struct device *parent, struct device *self, void *aux)
data &= ~0x0000ff00;
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, data);
- /* enable bus-mastering */
- data = pci_conf_read(sc->sc_pct, sc->sc_pcitag, PCI_COMMAND_STATUS_REG);
- data |= PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(sc->sc_pct, sc->sc_pcitag, PCI_COMMAND_STATUS_REG, data);
-
/* map the register window */
error = pci_mapreg_map(pa, IPW_PCI_BAR0, PCI_MAPREG_TYPE_MEM |
PCI_MAPREG_MEM_TYPE_32BIT, 0, &memt, &memh, &base, &sc->sc_sz, 0);
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index dff8e1e4c41..33cfba47915 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.47 2005/07/12 18:18:13 damien Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.48 2005/08/09 04:10:12 mickey Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -187,11 +187,6 @@ iwi_attach(struct device *parent, struct device *self, void *aux)
data &= ~0x0000ff00;
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, data);
- /* enable bus-mastering */
- data = pci_conf_read(sc->sc_pct, sc->sc_pcitag, PCI_COMMAND_STATUS_REG);
- data |= PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(sc->sc_pct, sc->sc_pcitag, PCI_COMMAND_STATUS_REG, data);
-
/* map the register window */
error = pci_mapreg_map(pa, IWI_PCI_BAR0, PCI_MAPREG_TYPE_MEM |
PCI_MAPREG_MEM_TYPE_32BIT, 0, &memt, &memh, &base, &sc->sc_sz, 0);
diff --git a/sys/dev/pci/if_le_pci.c b/sys/dev/pci/if_le_pci.c
index 7bbea454a7e..041b7a1370b 100644
--- a/sys/dev/pci/if_le_pci.c
+++ b/sys/dev/pci/if_le_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_pci.c,v 1.21 2003/08/11 04:52:40 mickey Exp $ */
+/* $OpenBSD: if_le_pci.c,v 1.22 2005/08/09 04:10:12 mickey Exp $ */
/* $NetBSD: if_le_pci.c,v 1.13 1996/10/25 21:33:32 cgd Exp $ */
/*-
@@ -151,7 +151,6 @@ le_pci_attach(parent, self, aux)
bus_space_handle_t ioh;
bus_space_tag_t iot = pa->pa_iot;
pci_chipset_tag_t pc = pa->pa_pc;
- pcireg_t csr;
int i, rseg;
const char *intrstr;
bus_dma_segment_t seg;
@@ -246,10 +245,4 @@ le_pci_attach(parent, self, aux)
printf("%s", sc->sc_dev.dv_xname);
am7990_config(sc);
-
- /* Enable the card. */
- csr = pci_conf_read(pc, pa->pa_tag,
- PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
}
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c
index 34992458218..50c2950bba5 100644
--- a/sys/dev/pci/if_lge.c
+++ b/sys/dev/pci/if_lge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lge.c,v 1.21 2005/07/02 23:10:11 brad Exp $ */
+/* $OpenBSD: if_lge.c,v 1.22 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -478,10 +478,6 @@ void lge_attach(parent, self, aux)
*/
DPRINTFN(5, ("Map control/status regs\n"));
command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | 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);
#ifdef LGE_USEIOSPACE
if (!(command & PCI_COMMAND_IO_ENABLE)) {
diff --git a/sys/dev/pci/if_lmc_obsd.c b/sys/dev/pci/if_lmc_obsd.c
index 7a1f65a7c4f..b08b5c8dda1 100644
--- a/sys/dev/pci/if_lmc_obsd.c
+++ b/sys/dev/pci/if_lmc_obsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lmc_obsd.c,v 1.15 2005/07/16 17:20:47 brad Exp $ */
+/* $OpenBSD: if_lmc_obsd.c,v 1.16 2005/08/09 04:10:12 mickey Exp $ */
/* $NetBSD: if_lmc_nbsd.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
@@ -318,11 +318,6 @@ lmc_pci_attach(struct device * const parent,
sc->lmc_dev.dv_xname);
return;
}
- /* Make sure bus mastering is enabled. */
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pa->pa_pc, pa->pa_tag,
- PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
}
lmc_initcsrs(sc, csr_base + csroffset, csrsize);
diff --git a/sys/dev/pci/if_mtd_pci.c b/sys/dev/pci/if_mtd_pci.c
index 0cb75d3e459..09bb1021914 100644
--- a/sys/dev/pci/if_mtd_pci.c
+++ b/sys/dev/pci/if_mtd_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mtd_pci.c,v 1.9 2003/09/29 10:05:07 miod Exp $ */
+/* $OpenBSD: if_mtd_pci.c,v 1.10 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
@@ -87,7 +87,6 @@ mtd_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_devid = PCI_PRODUCT(pa->pa_id);
command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_MASTER_ENABLE;
if (sc->sc_devid == PCI_PRODUCT_MYSON_MTD800 &&
pci_conf_read(pa->pa_pc, pa->pa_tag, MTD_PCI_LOIO) & 0x300) {
pa->pa_flags &= ~PCI_FLAGS_IO_ENABLED;
diff --git a/sys/dev/pci/if_ne_pci.c b/sys/dev/pci/if_ne_pci.c
index 703000bad9a..878b50bce7a 100644
--- a/sys/dev/pci/if_ne_pci.c
+++ b/sys/dev/pci/if_ne_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ne_pci.c,v 1.11 2002/03/14 01:26:58 millert Exp $ */
+/* $OpenBSD: if_ne_pci.c,v 1.12 2005/08/09 04:10:12 mickey Exp $ */
/* $NetBSD: if_ne_pci.c,v 1.8 1998/07/05 00:51:24 jonathan Exp $ */
/*-
@@ -203,7 +203,6 @@ ne_pci_attach(parent, self, aux)
const char *intrstr;
const struct ne_pci_product *npp;
pci_intr_handle_t ih;
- pcireg_t csr;
npp = ne_pci_lookup(pa);
if (npp == NULL) {
@@ -244,12 +243,6 @@ ne_pci_attach(parent, self, aux)
nsc->sc_asict = asict;
nsc->sc_asich = asich;
- /* Enable the card. */
- csr = pci_conf_read(pc, pa->pa_tag,
- PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
/* This interface is always enabled. */
dsc->sc_enabled = 1;
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index b5770cb05f5..80d9c16337a 100644
--- a/sys/dev/pci/if_nge.c
+++ b/sys/dev/pci/if_nge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nge.c,v 1.43 2005/07/30 04:25:00 brad Exp $ */
+/* $OpenBSD: if_nge.c,v 1.44 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -772,10 +772,6 @@ nge_attach(parent, self, aux)
*/
DPRINTFN(5, ("%s: map control/status regs\n", sc->sc_dv.dv_xname));
command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | 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);
#ifdef NGE_USEIOSPACE
if (!(command & PCI_COMMAND_IO_ENABLE)) {
diff --git a/sys/dev/pci/if_ral_pci.c b/sys/dev/pci/if_ral_pci.c
index 2e78813a5f2..b4c8ba52321 100644
--- a/sys/dev/pci/if_ral_pci.c
+++ b/sys/dev/pci/if_ral_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral_pci.c,v 1.4 2005/02/22 10:41:30 damien Exp $ */
+/* $OpenBSD: if_ral_pci.c,v 1.5 2005/08/09 04:10:12 mickey Exp $ */
/*-
* Copyright (c) 2005
@@ -95,17 +95,11 @@ ral_pci_attach(struct device *parent, struct device *self, void *aux)
const char *intrstr;
bus_addr_t base;
pci_intr_handle_t ih;
- pcireg_t reg;
int error;
sc->sc_dmat = pa->pa_dmat;
psc->sc_pc = pa->pa_pc;
- /* enable the appropriate bits in the PCI CSR */
- reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- reg |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE;
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
-
/* map control/status registers */
error = pci_mapreg_map(pa, RAL_PCI_BAR0, PCI_MAPREG_TYPE_MEM |
PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->sc_st, &sc->sc_sh, &base,
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c
index e446f8c8d30..5a471d728b6 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.3 2005/07/22 11:47:26 brad Exp $ */
+/* $OpenBSD: if_re_pci.c,v 1.4 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
@@ -152,10 +152,6 @@ 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);
- command |= PCI_COMMAND_IO_ENABLE | 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_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) == 0) {
printf(": neither i/o nor mem enabled\n");
diff --git a/sys/dev/pci/if_rtw_pci.c b/sys/dev/pci/if_rtw_pci.c
index 567f65507c2..1ae12472679 100644
--- a/sys/dev/pci/if_rtw_pci.c
+++ b/sys/dev/pci/if_rtw_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rtw_pci.c,v 1.5 2005/05/29 02:58:31 reyk Exp $ */
+/* $OpenBSD: if_rtw_pci.c,v 1.6 2005/08/09 04:10:12 mickey Exp $ */
/* $NetBSD: if_rtw_pci.c,v 1.1 2004/09/26 02:33:36 dyoung Exp $ */
/*-
@@ -237,13 +237,6 @@ rtw_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dmat = pa->pa_dmat;
/*
- * Make sure bus mastering is enabled.
- */
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
- PCI_COMMAND_MASTER_ENABLE);
-
- /*
* Map and establish our interrupt.
*/
if (pci_intr_map(pa, &psc->psc_ih)) {
diff --git a/sys/dev/pci/if_sf.c b/sys/dev/pci/if_sf.c
index a633522d86c..ae9bdd16f36 100644
--- a/sys/dev/pci/if_sf.c
+++ b/sys/dev/pci/if_sf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sf.c,v 1.30 2005/07/02 23:10:11 brad Exp $ */
+/* $OpenBSD: if_sf.c,v 1.31 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -629,10 +629,6 @@ void sf_attach(parent, self, aux)
* Map control/status registers.
*/
command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | 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);
#ifdef SF_USEIOSPACE
if (!(command & PCI_COMMAND_IO_ENABLE)) {
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 7bb79e809a6..9fa6c05b0c2 100644
--- a/sys/dev/pci/if_sis.c
+++ b/sys/dev/pci/if_sis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sis.c,v 1.50 2005/07/28 18:39:32 brad Exp $ */
+/* $OpenBSD: if_sis.c,v 1.51 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -858,7 +858,7 @@ void sis_attach(parent, self, aux)
{
int i, s;
const char *intrstr = NULL;
- u_int32_t command;
+ pcireg_t command;
struct sis_softc *sc = (struct sis_softc *)self;
struct pci_attach_args *pa = aux;
pci_chipset_tag_t pc = pa->pa_pc;
@@ -914,10 +914,6 @@ void sis_attach(parent, self, aux)
* Map control/status registers.
*/
command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | 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);
#ifdef SIS_USEIOSPACE
if (pci_mapreg_map(pa, SIS_PCI_LOIO, PCI_MAPREG_TYPE_IO, 0,
diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c
index 4b4e76371a5..4ee46800cc5 100644
--- a/sys/dev/pci/if_ste.c
+++ b/sys/dev/pci/if_ste.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ste.c,v 1.31 2005/07/02 23:10:11 brad Exp $ */
+/* $OpenBSD: if_ste.c,v 1.32 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -834,7 +834,7 @@ void ste_attach(parent, self, aux)
void *aux;
{
const char *intrstr = NULL;
- u_int32_t command;
+ pcireg_t command;
struct ste_softc *sc = (struct ste_softc *)self;
struct pci_attach_args *pa = aux;
pci_chipset_tag_t pc = pa->pa_pc;
@@ -885,10 +885,6 @@ void ste_attach(parent, self, aux)
* Map control/status registers.
*/
command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | 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);
#ifdef STE_USEIOSPACE
if (!(command & PCI_COMMAND_IO_ENABLE)) {
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index db4f0ff4458..3b96599e70e 100644
--- a/sys/dev/pci/if_vge.c
+++ b/sys/dev/pci/if_vge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vge.c,v 1.15 2005/07/03 02:38:23 brad Exp $ */
+/* $OpenBSD: if_vge.c,v 1.16 2005/08/09 04:10:12 mickey Exp $ */
/* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -715,11 +715,6 @@ vge_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);
- command |= PCI_COMMAND_IO_ENABLE | 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_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) == 0) {
printf(": neither i/o nor mem enabled\n");
return;
diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c
index e165eeda209..c3804a8de1d 100644
--- a/sys/dev/pci/if_wb.c
+++ b/sys/dev/pci/if_wb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wb.c,v 1.28 2005/07/02 23:10:11 brad Exp $ */
+/* $OpenBSD: if_wb.c,v 1.29 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -718,7 +718,7 @@ wb_attach(parent, self, aux)
bus_addr_t iobase;
bus_size_t iosize;
int s, rseg;
- u_int32_t command;
+ pcireg_t command;
bus_dma_segment_t seg;
bus_dmamap_t dmamap;
caddr_t kva;
@@ -760,10 +760,6 @@ wb_attach(parent, self, aux)
* Map control/status registers.
*/
command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | 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);
#ifdef WB_USEIOSPACE
if (!(command & PCI_COMMAND_IO_ENABLE)) {
diff --git a/sys/dev/pci/if_xl_pci.c b/sys/dev/pci/if_xl_pci.c
index 1934913bca0..1293114b468 100644
--- a/sys/dev/pci/if_xl_pci.c
+++ b/sys/dev/pci/if_xl_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xl_pci.c,v 1.20 2004/07/16 06:08:05 deraadt Exp $ */
+/* $OpenBSD: if_xl_pci.c,v 1.21 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -223,10 +223,6 @@ xl_pci_attach(parent, self, aux)
/*
* Map control/status registers.
*/
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- PCI_COMMAND_MASTER_ENABLE |
- pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG));
-
#ifdef XL_USEIOSPACE
if (pci_mapreg_map(pa, XL_PCI_LOIO, PCI_MAPREG_TYPE_IO, 0,
&sc->xl_btag, &sc->xl_bhandle, NULL, &iosize, 0)) {
diff --git a/sys/dev/pci/iha_pci.c b/sys/dev/pci/iha_pci.c
index 228a0d9b6cf..138d0cc6ec0 100644
--- a/sys/dev/pci/iha_pci.c
+++ b/sys/dev/pci/iha_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha_pci.c,v 1.8 2002/11/14 02:31:46 krw Exp $ */
+/* $OpenBSD: iha_pci.c,v 1.9 2005/08/09 04:10:12 mickey Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -87,14 +87,8 @@ iha_pci_attach(parent, self, aux)
struct iha_softc *sc = (void *)self;
bus_space_tag_t iot;
const char *intrstr;
- pcireg_t command;
int ioh_valid;
- command = pci_conf_read(pa->pa_pc,pa->pa_tag,PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_PARITY_ENABLE;
-
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command);
-
/*
* XXX - Tried memory mapping (using code from adw and ahc)
* rather that IO mapping, but it didn't work at all..
diff --git a/sys/dev/pci/iop_pci.c b/sys/dev/pci/iop_pci.c
index bd2bac6d58e..39b8bdca68b 100644
--- a/sys/dev/pci/iop_pci.c
+++ b/sys/dev/pci/iop_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iop_pci.c,v 1.4 2002/03/31 05:25:10 nate Exp $ */
+/* $OpenBSD: iop_pci.c,v 1.5 2005/08/09 04:10:12 mickey Exp $ */
/* $NetBSD: iop_pci.c,v 1.4 2001/03/20 13:21:00 ad Exp $ */
/*-
@@ -133,11 +133,6 @@ iop_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_bus_memt = pa->pa_memt;
sc->sc_bus_iot = pa->pa_iot;
- /* Enable the device. */
- reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- reg | PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. XXX IPL_BIO. */
if (pci_intr_map(pa, &ih)) {
printf("can't map interrupt\n");
diff --git a/sys/dev/pci/ises.c b/sys/dev/pci/ises.c
index c6ade181f25..6c9adcf1a65 100644
--- a/sys/dev/pci/ises.c
+++ b/sys/dev/pci/ises.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ises.c,v 1.27 2004/05/07 14:42:26 millert Exp $ */
+/* $OpenBSD: ises.c,v 1.28 2005/08/09 04:10:12 mickey Exp $ */
/*
* Copyright (c) 2000, 2001 Håkan Olsson (ho@crt.se)
@@ -172,10 +172,6 @@ ises_attach(struct device *parent, struct device *self, void *aux)
/* Verify PCI space */
cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- cmd |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, cmd);
- cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
-
if (!(cmd & PCI_COMMAND_MEM_ENABLE)) {
printf(": failed to enable memory mapping\n");
return;
diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c
index 81555942185..bc19df45794 100644
--- a/sys/dev/pci/isp_pci.c
+++ b/sys/dev/pci/isp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_pci.c,v 1.36 2005/04/08 02:07:49 brad Exp $ */
+/* $OpenBSD: isp_pci.c,v 1.37 2005/08/09 04:10:13 mickey Exp $ */
/*
* PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
*
@@ -647,7 +647,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
if (IS_23XX(isp)) {
isp->isp_touched = 1;
}
- data |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_INVALIDATE_ENABLE;
+ data |= PCI_COMMAND_INVALIDATE_ENABLE;
/*
* Not so sure about these- but I think it's important that they get
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 3e4557c21ed..73c23722393 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.18 2005/04/16 21:57:23 mickey Exp $ */
+/* $OpenBSD: maestro.c,v 1.19 2005/08/09 04:10:13 mickey Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -324,7 +324,6 @@ maestro_attach(parent, self, aux)
char const *intrstr;
pci_intr_handle_t ih;
int error;
- pcireg_t data;
u_int16_t cdata;
int dmastage = 0;
int rseg;
@@ -363,12 +362,6 @@ maestro_attach(parent, self, aux)
goto bad;
};
- /* Enable bus mastering */
- data = pci_conf_read(sc->pc, sc->pt, PCI_COMMAND_STATUS_REG);
- if ((data & PCI_COMMAND_MASTER_ENABLE) == 0)
- pci_conf_write(sc->pc, sc->pt, PCI_COMMAND_STATUS_REG,
- data | PCI_COMMAND_MASTER_ENABLE);
-
/* Allocate fixed DMA segment :-( */
sc->dmasize = MAESTRO_BUFSIZ * 16;
if ((error = bus_dmamem_alloc(sc->dmat, sc->dmasize, NBPG, 0,
diff --git a/sys/dev/pci/mpt_pci.c b/sys/dev/pci/mpt_pci.c
index 85adabb817d..fbe45b486e8 100644
--- a/sys/dev/pci/mpt_pci.c
+++ b/sys/dev/pci/mpt_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpt_pci.c,v 1.7 2004/12/29 06:57:12 deraadt Exp $ */
+/* $OpenBSD: mpt_pci.c,v 1.8 2005/08/09 04:10:13 mickey Exp $ */
/* $NetBSD: mpt_pci.c,v 1.2 2003/07/14 15:47:26 lukem Exp $ */
/*
@@ -208,16 +208,6 @@ mpt_pci_attach(struct device *parent, struct device *self, void *aux)
}
/*
- * Make sure the PCI command register is properly configured.
- */
- reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- reg |= PCI_COMMAND_MASTER_ENABLE;
- /* XXX PCI_COMMAND_INVALIDATE_ENABLE */
- /* XXX PCI_COMMAND_PARITY_ENABLE */
- /* XXX PCI_COMMAND_SERR_ENABLE */
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
-
- /*
* Ensure that the ROM is diabled.
*/
reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_MAPREG_ROM);
diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c
index fab830e8b1b..a0b8f3e877b 100644
--- a/sys/dev/pci/neo.c
+++ b/sys/dev/pci/neo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neo.c,v 1.18 2004/12/12 06:50:20 deraadt Exp $ */
+/* $OpenBSD: neo.c,v 1.19 2005/08/09 04:10:13 mickey Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -566,7 +566,6 @@ neo_attach(parent, self, aux)
pci_chipset_tag_t pc = pa->pa_pc;
char const *intrstr;
pci_intr_handle_t ih;
- pcireg_t csr;
int error;
sc->type = pa->pa_id;
@@ -607,11 +606,6 @@ neo_attach(parent, self, aux)
if ((error = nm_init(sc)) != 0)
return;
- /* Enable the device. */
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
sc->host_if.arg = sc;
sc->host_if.attach = neo_attach_codec;
diff --git a/sys/dev/pci/nofn.c b/sys/dev/pci/nofn.c
index 56fe0c8d778..9d26b0a7ef2 100644
--- a/sys/dev/pci/nofn.c
+++ b/sys/dev/pci/nofn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nofn.c,v 1.13 2004/05/07 14:42:26 millert Exp $ */
+/* $OpenBSD: nofn.c,v 1.14 2005/08/09 04:10:13 mickey Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -116,10 +116,6 @@ nofn_attach(parent, self, aux)
sc->sc_dmat = pa->pa_dmat;
cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- cmd |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, cmd);
- cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
-
if (!(cmd & PCI_COMMAND_MEM_ENABLE)) {
printf(": failed to enable memory mapping\n");
goto fail;
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index 3f3e36ffa20..f82cf6846e1 100644
--- a/sys/dev/pci/ohci_pci.c
+++ b/sys/dev/pci/ohci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci_pci.c,v 1.25 2005/04/21 12:30:02 pascoe Exp $ */
+/* $OpenBSD: ohci_pci.c,v 1.26 2005/08/09 04:10:13 mickey Exp $ */
/* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */
/*
@@ -98,10 +98,8 @@ ohci_pci_attach(struct device *parent, struct device *self, void *aux)
struct ohci_pci_softc *sc = (struct ohci_pci_softc *)self;
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
pci_chipset_tag_t pc = pa->pa_pc;
- pcitag_t tag = pa->pa_tag;
char const *intrstr;
pci_intr_handle_t ih;
- pcireg_t csr;
usbd_status r;
int s;
const char *vendor;
@@ -131,11 +129,6 @@ ohci_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_pc = pc;
sc->sc.sc_bus.dmatag = pa->pa_dmat;
- /* Enable the device. */
- csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
bus_space_barrier(sc->sc.iot, sc->sc.ioh, 0, sc->sc.sc_size,
BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE);
bus_space_write_4(sc->sc.iot, sc->sc.ioh,
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 1349ec3f769..4a7699e3e66 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.198 2005/07/21 09:47:57 jsg Exp $ */
+/* $OpenBSD: pciide.c,v 1.199 2005/08/09 04:10:13 mickey Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -875,11 +875,8 @@ pciide_match(struct device *parent, void *match, void *aux)
void
pciide_attach(struct device *parent, struct device *self, void *aux)
{
- struct pci_attach_args *pa = aux;
- pci_chipset_tag_t pc = pa->pa_pc;
- pcitag_t tag = pa->pa_tag;
struct pciide_softc *sc = (struct pciide_softc *)self;
- pcireg_t csr;
+ struct pci_attach_args *pa = aux;
sc->sc_pp = pciide_lookup_product(pa->pa_id);
if (sc->sc_pp == NULL)
@@ -904,12 +901,6 @@ pciide_attach(struct device *parent, struct device *self, void *aux)
sc->sc_pp->chip_map(sc, pa);
- if (sc->sc_dma_ok) {
- csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
- csr |= PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, csr);
- }
-
WDCDEBUG_PRINT(("pciide: command/status register=0x%x\n",
pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG)), DEBUG_PROBE);
}
diff --git a/sys/dev/pci/pcscp.c b/sys/dev/pci/pcscp.c
index e747437fca8..408fabfd9ab 100644
--- a/sys/dev/pci/pcscp.c
+++ b/sys/dev/pci/pcscp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcscp.c,v 1.9 2002/03/14 01:26:59 millert Exp $ */
+/* $OpenBSD: pcscp.c,v 1.10 2005/08/09 04:10:13 mickey Exp $ */
/* $NetBSD: pcscp.c,v 1.11 2000/11/14 18:42:58 thorpej Exp $ */
/*-
@@ -184,7 +184,6 @@ pcscp_attach(parent, self, aux)
int ioh_valid, memh_valid;
pci_intr_handle_t ih;
const char *intrstr;
- pcireg_t csr;
bus_dma_segment_t seg;
int error, rseg;
@@ -215,10 +214,6 @@ pcscp_attach(parent, self, aux)
esc->sc_sh = sh;
esc->sc_dmat = pa->pa_dmat;
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE);
-
/*
* XXX More of this should be in ncr53c9x_attach(), but
* XXX should we really poke around the chip that much in
diff --git a/sys/dev/pci/safe.c b/sys/dev/pci/safe.c
index ce6db125d4d..768af514f89 100644
--- a/sys/dev/pci/safe.c
+++ b/sys/dev/pci/safe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: safe.c,v 1.14 2004/05/07 14:42:26 millert Exp $ */
+/* $OpenBSD: safe.c,v 1.15 2005/08/09 04:10:13 mickey Exp $ */
/*-
* Copyright (c) 2003 Sam Leffler, Errno Consulting
@@ -168,9 +168,6 @@ safe_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dmat = pa->pa_dmat;
cmd = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- cmd |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, cmd);
- cmd = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
if (!(cmd & PCI_COMMAND_MEM_ENABLE)) {
printf(": failed to enable memory mapping\n");
diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c
index e7c0c1c7f61..9df487819aa 100644
--- a/sys/dev/pci/sv.c
+++ b/sys/dev/pci/sv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sv.c,v 1.19 2005/07/16 17:20:47 brad Exp $ */
+/* $OpenBSD: sv.c,v 1.20 2005/08/09 04:10:13 mickey Exp $ */
/*
* Copyright (c) 1998 Constantine Paul Sapuntzakis
@@ -279,7 +279,6 @@ sv_attach(parent, self, aux)
pci_intr_handle_t ih;
bus_addr_t iobase;
bus_size_t iosize;
- pcireg_t csr;
char const *intrstr;
u_int32_t dmareg, dmaio;
u_int8_t reg;
@@ -344,11 +343,6 @@ sv_attach(parent, self, aux)
/* Enable the device. */
enable:
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE
- /* | PCI_COMMAND_IO_ENABLE | PCI_COMMAND_PARITY_ENABLE */);
-
sv_write_indirect(sc, SV_ANALOG_POWER_DOWN_CONTROL, 0);
sv_write_indirect(sc, SV_DIGITAL_POWER_DOWN_CONTROL, 0);
diff --git a/sys/dev/pci/trm_pci.c b/sys/dev/pci/trm_pci.c
index 32d39e0d56d..63d2cb13b49 100644
--- a/sys/dev/pci/trm_pci.c
+++ b/sys/dev/pci/trm_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm_pci.c,v 1.1 2002/02/18 01:55:30 krw Exp $
+/* $OpenBSD: trm_pci.c,v 1.2 2005/08/09 04:10:13 mickey Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* FILE NAME : trm_pci.c
@@ -106,20 +106,10 @@ trm_pci_attach(struct device *parent, struct device *self, void *aux)
struct trm_softc *sc = (void *)self;
bus_space_tag_t iot; /* bus space tag */
const char *intrstr;
- pcireg_t command;
int unit;
unit = sc->sc_device.dv_unit;
- /*
- * These cards do not allow memory mapped accesses.
- * pa_pc: chipset tag
- * pa_tag: pci tag
- */
- command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- command |= PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command);
-
if (PCI_PRODUCT(pa->pa_id) != PCI_PRODUCT_TEKRAM2_DC3X5U)
return;
diff --git a/sys/dev/pci/twe_pci.c b/sys/dev/pci/twe_pci.c
index 0dbba7267ab..16ef3057abc 100644
--- a/sys/dev/pci/twe_pci.c
+++ b/sys/dev/pci/twe_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe_pci.c,v 1.7 2003/06/02 19:24:23 mickey Exp $ */
+/* $OpenBSD: twe_pci.c,v 1.8 2005/08/09 04:10:13 mickey Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -79,7 +79,6 @@ twe_pci_attach(parent, self, aux)
pci_intr_handle_t ih;
const char *intrstr;
bus_size_t size;
- pcireg_t csr;
if (pci_mapreg_map(pa, TWE_BAR, PCI_MAPREG_TYPE_IO, 0,
&sc->iot, &sc->ioh, NULL, &size, 0)) {
@@ -88,11 +87,6 @@ twe_pci_attach(parent, self, aux)
}
sc->dmat = pa->pa_dmat;
- /* enable bus mastering (should not it be mi?) */
- csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
if (pci_intr_map(pa, &ih)) {
printf(": can't map interrupt\n");
bus_space_unmap(sc->iot, sc->ioh, size);
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index 02f1761761b..74201c4a6c9 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.135 2004/05/07 14:42:26 millert Exp $ */
+/* $OpenBSD: ubsec.c,v 1.136 2005/08/09 04:10:13 mickey Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -194,9 +194,6 @@ ubsec_attach(struct device *parent, struct device *self, void *aux)
}
cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- cmd |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE;
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, cmd);
- cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
if (!(cmd & PCI_COMMAND_MEM_ENABLE)) {
printf(": failed to enable memory mapping\n");
diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c
index c26ae50b878..18c06a21f66 100644
--- a/sys/dev/pci/uhci_pci.c
+++ b/sys/dev/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci_pci.c,v 1.19 2005/04/11 08:09:32 dlg Exp $ */
+/* $OpenBSD: uhci_pci.c,v 1.20 2005/08/09 04:10:13 mickey Exp $ */
/* $NetBSD: uhci_pci.c,v 1.24 2002/10/02 16:51:58 thorpej Exp $ */
/*
@@ -95,7 +95,6 @@ uhci_pci_attach(struct device *parent, struct device *self, void *aux)
pcitag_t tag = pa->pa_tag;
char const *intrstr;
pci_intr_handle_t ih;
- pcireg_t csr;
const char *vendor;
char *devname = sc->sc.sc_bus.bdev.dv_xname;
usbd_status r;
@@ -121,11 +120,6 @@ uhci_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_tag = tag;
sc->sc.sc_bus.dmatag = pa->pa_dmat;
- /* Enable the device. */
- csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
- pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
- csr | PCI_COMMAND_MASTER_ENABLE);
-
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
printf(": couldn't map interrupt\n");
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c
index 2aed2af5788..c42d9177a47 100644
--- a/sys/dev/pci/yds.c
+++ b/sys/dev/pci/yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yds.c,v 1.26 2005/05/27 00:49:56 jason Exp $ */
+/* $OpenBSD: yds.c,v 1.27 2005/08/09 04:10:13 mickey Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
@@ -709,14 +709,6 @@ yds_attach(parent, self, aux)
pci_conf_write(pc, pa->pa_tag, YDS_PCI_LEGACY,
reg & YDS_PCI_LEGACY_LAD);
- /* Enable the device. */
- reg = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
- reg |= (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE |
- PCI_COMMAND_MASTER_ENABLE);
-
- pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
- reg = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
-
/* Mute all volumes */
for (i = 0x80; i < 0xc0; i += 2)
YWRITE2(sc, i, 0);