summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2005-12-25 18:46:25 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2005-12-25 18:46:25 +0000
commitecb836663cf037e4978e0455b17799dc5df9cbb7 (patch)
tree403d97b78a073de1887493011975b249835a4b9f /sys
parent711201126c4e2d755ae8ed6bf001636ffbba89ca (diff)
Don't allow slave devices to do polling during autoconf.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ichiic.c8
-rw-r--r--sys/dev/pci/piixpm.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/pci/ichiic.c b/sys/dev/pci/ichiic.c
index bdda5207234..1a834e0d741 100644
--- a/sys/dev/pci/ichiic.c
+++ b/sys/dev/pci/ichiic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ichiic.c,v 1.4 2005/12/25 15:46:14 grange Exp $ */
+/* $OpenBSD: ichiic.c,v 1.5 2005/12/25 18:46:24 grange Exp $ */
/*
* Copyright (c) 2005 Alexander Yurchenko <grange@openbsd.org>
@@ -176,7 +176,7 @@ ichiic_i2c_acquire_bus(void *cookie, int flags)
{
struct ichiic_softc *sc = cookie;
- if (sc->sc_poll || flags & I2C_F_POLL)
+ if (cold || sc->sc_poll || (flags & I2C_F_POLL))
return (0);
return (lockmgr(&sc->sc_i2c_lock, LK_EXCLUSIVE, NULL));
@@ -187,7 +187,7 @@ ichiic_i2c_release_bus(void *cookie, int flags)
{
struct ichiic_softc *sc = cookie;
- if (sc->sc_poll || flags & I2C_F_POLL)
+ if (cold || sc->sc_poll || (flags & I2C_F_POLL))
return;
lockmgr(&sc->sc_i2c_lock, LK_RELEASE, NULL);
@@ -207,7 +207,7 @@ ichiic_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr,
cmdlen, len, flags, bus_space_read_1(sc->sc_iot, sc->sc_ioh,
ICH_SMB_HS), ICH_SMB_HS_BITS));
- if (sc->sc_poll)
+ if (cold || sc->sc_poll)
flags |= I2C_F_POLL;
if (!I2C_OP_STOP_P(op) || cmdlen > 1 || len > 2)
diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c
index 8b9747c0416..4045d57240f 100644
--- a/sys/dev/pci/piixpm.c
+++ b/sys/dev/pci/piixpm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: piixpm.c,v 1.6 2005/12/25 15:46:14 grange Exp $ */
+/* $OpenBSD: piixpm.c,v 1.7 2005/12/25 18:46:24 grange Exp $ */
/*
* Copyright (c) 2005 Alexander Yurchenko <grange@openbsd.org>
@@ -177,7 +177,7 @@ piixpm_i2c_acquire_bus(void *cookie, int flags)
{
struct piixpm_softc *sc = cookie;
- if (sc->sc_poll || flags & I2C_F_POLL)
+ if (cold || sc->sc_poll || (flags & I2C_F_POLL))
return (0);
return (lockmgr(&sc->sc_i2c_lock, LK_EXCLUSIVE, NULL));
@@ -188,7 +188,7 @@ piixpm_i2c_release_bus(void *cookie, int flags)
{
struct piixpm_softc *sc = cookie;
- if (sc->sc_poll || flags & I2C_F_POLL)
+ if (cold || sc->sc_poll || (flags & I2C_F_POLL))
return;
lockmgr(&sc->sc_i2c_lock, LK_RELEASE, NULL);
@@ -208,7 +208,7 @@ piixpm_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr,
cmdlen, len, flags, bus_space_read_1(sc->sc_iot, sc->sc_ioh,
PIIX_SMB_HS), PIIX_SMB_HS_BITS));
- if (sc->sc_poll)
+ if (cold || sc->sc_poll)
flags |= I2C_F_POLL;
if (!I2C_OP_STOP_P(op) || cmdlen > 1 || len > 2)