Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26678
b: refs/heads/master
c: 95563d3
h: refs/heads/master
v: v3
  • Loading branch information
Jordan Crouse authored and Greg Kroah-Hartman committed May 9, 2006
1 parent e65783d commit 91a382f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b33d0798e6cfae1fcee75afc808fe5690a48a814
refs/heads/master: 95563d343fec8d3e2f667c95230ac4ab7674b757
7 changes: 7 additions & 0 deletions trunk/drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 91a382f

Please sign in to comment.