summaryrefslogtreecommitdiffstats
path: root/sys/dev/iicbus/iiconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/iicbus/iiconf.c')
-rw-r--r--sys/dev/iicbus/iiconf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/iicbus/iiconf.c b/sys/dev/iicbus/iiconf.c
index 42d3a96..52e92f7 100644
--- a/sys/dev/iicbus/iiconf.c
+++ b/sys/dev/iicbus/iiconf.c
@@ -104,8 +104,12 @@ iicbus_request_bus(device_t bus, device_t dev, int how)
int s, error = 0;
/* first, ask the underlying layers if the request is ok */
- error = IICBUS_CALLBACK(device_get_parent(bus), IIC_REQUEST_BUS,
- (caddr_t)&how);
+ do {
+ error = IICBUS_CALLBACK(device_get_parent(bus),
+ IIC_REQUEST_BUS, (caddr_t)&how);
+ if (error)
+ error = iicbus_poll(sc, how);
+ } while (error == EWOULDBLOCK);
while (!error) {
s = splhigh();
OpenPOWER on IntegriCloud