diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2006-02-12 10:23:20 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2006-02-12 10:23:20 +0000 |
commit | 979dad32a2525a635e2cab45c8323a25ce0d0ced (patch) | |
tree | 180887b617a2ab5424818bacf9faa0a8e5e0d49b /sys | |
parent | b651bd690bf03da48f9dc8ea54d42a74a1452d7b (diff) |
Revert previous, seems to cause problems on some machines.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/ichiic.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/sys/dev/pci/ichiic.c b/sys/dev/pci/ichiic.c index 91f4b930222..09b6df456cd 100644 --- a/sys/dev/pci/ichiic.c +++ b/sys/dev/pci/ichiic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichiic.c,v 1.13 2006/02/05 21:59:01 grange Exp $ */ +/* $OpenBSD: ichiic.c,v 1.14 2006/02/12 10:23:19 grange Exp $ */ /* * Copyright (c) 2005, 2006 Alexander Yurchenko <grange@openbsd.org> @@ -202,16 +202,6 @@ ichiic_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr, DPRINTF(("%s: exec: op %d, addr 0x%x, cmdlen %d, len %d, flags 0x%x\n", sc->sc_dev.dv_xname, op, addr, cmdlen, len, flags)); - /* Acquire bus semaphore */ - for (retries = 100; retries > 0; retries--) { - st = bus_space_read_1(sc->sc_iot, sc->sc_ioh, ICH_SMB_HS); - if (!(st & ICH_SMB_HS_INUSE)) - break; - DELAY(ICHIIC_DELAY); - } - if (st & ICH_SMB_HS_INUSE) - return (1); - /* Wait for bus to be idle */ for (retries = 100; retries > 0; retries--) { st = bus_space_read_1(sc->sc_iot, sc->sc_ioh, ICH_SMB_HS); @@ -222,13 +212,13 @@ ichiic_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr, DPRINTF(("%s: exec: st 0x%b\n", sc->sc_dev.dv_xname, st, ICH_SMB_HS_BITS)); if (st & ICH_SMB_HS_BUSY) - goto fail; + return (1); if (cold || sc->sc_poll) flags |= I2C_F_POLL; if (!I2C_OP_STOP_P(op) || cmdlen > 1 || len > 2) - goto fail; + return (1); /* Setup transfer */ sc->sc_i2c_xfer.op = op; @@ -312,12 +302,6 @@ timeout: sc->sc_dev.dv_xname, st, ICH_SMB_HS_BITS); bus_space_write_1(sc->sc_iot, sc->sc_ioh, ICH_SMB_HS, st); return (1); - -fail: - /* Release bus semaphore */ - bus_space_write_1(sc->sc_iot, sc->sc_ioh, ICH_SMB_HS, - ICH_SMB_HS_INUSE); - return (1); } int |