From 91a382f4fd15d7e0f3d66499f146434611fc414c Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Fri, 28 Apr 2006 22:53:30 +0200 Subject: [PATCH] --- yaml --- r: 26678 b: refs/heads/master c: 95563d343fec8d3e2f667c95230ac4ab7674b757 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/i2c/busses/scx200_acb.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index eaeaeaf5996b..7f542dd967d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b33d0798e6cfae1fcee75afc808fe5690a48a814 +refs/heads/master: 95563d343fec8d3e2f667c95230ac4ab7674b757 diff --git a/trunk/drivers/i2c/busses/scx200_acb.c b/trunk/drivers/i2c/busses/scx200_acb.c index 42e4e00d6c32..a140e4536a4e 100644 --- a/trunk/drivers/i2c/busses/scx200_acb.c +++ b/trunk/drivers/i2c/busses/scx200_acb.c @@ -133,6 +133,9 @@ static void scx200_acb_machine(struct scx200_acb_iface *iface, u8 status) outb(inb(ACBCTL1) | ACBCTL1_STOP, ACBCTL1); outb(ACBST_STASTR | ACBST_NEGACK, ACBST); + + /* Reset the status register */ + outb(0, ACBST); return; } @@ -228,6 +231,10 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface) timeout = jiffies + POLL_TIMEOUT; while (time_before(jiffies, timeout)) { status = inb(ACBST); + + /* Reset the status register to avoid the hang */ + outb(0, ACBST); + if ((status & (ACBST_SDAST|ACBST_BER|ACBST_NEGACK)) != 0) { scx200_acb_machine(iface, status); return;