From 7a19171479e8e4b63c3f8a9afa4423c1bca198e8 Mon Sep 17 00:00:00 2001 From: Nicolas Souchu Date: Mon, 1 Nov 1999 23:15:29 +0000 Subject: Sync with RELENG_3. --- sys/dev/iicbus/iicbus.c | 2 +- sys/dev/iicbus/iiconf.c | 8 ++++++-- sys/dev/smbus/smb.c | 4 ++-- sys/dev/smbus/smbconf.c | 8 ++++++-- 4 files changed, 15 insertions(+), 7 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index e4b6f8d45e399..26912fc0a87b7 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -250,7 +250,7 @@ iicbus_print_child(device_t bus, device_t dev) break; default: - panic("%s: unknown class!\n", __FUNCTION__); + panic("%s: unknown class!", __FUNCTION__); } return (retval); diff --git a/sys/dev/iicbus/iiconf.c b/sys/dev/iicbus/iiconf.c index 42d3a9621c084..52e92f74344d0 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(); diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index 331e6b91e1934..7bf1af68ea3af 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -171,7 +171,7 @@ smbwrite(dev_t dev, struct uio * uio, int ioflag) { /* not supported */ - return (ENODEV); + return (EINVAL); } static int @@ -179,7 +179,7 @@ smbread(dev_t dev, struct uio * uio, int ioflag) { /* not supported */ - return (ENODEV); + return (EINVAL); } static int diff --git a/sys/dev/smbus/smbconf.c b/sys/dev/smbus/smbconf.c index d97305c1c553b..1d44ef3542021 100644 --- a/sys/dev/smbus/smbconf.c +++ b/sys/dev/smbus/smbconf.c @@ -132,8 +132,12 @@ smbus_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 = SMBUS_CALLBACK(device_get_parent(bus), SMB_REQUEST_BUS, - (caddr_t)&how); + do { + error = SMBUS_CALLBACK(device_get_parent(bus), + SMB_REQUEST_BUS, (caddr_t)&how); + if (error) + error = smbus_poll(sc, how); + } while (error == EWOULDBLOCK); while (!error) { s = splhigh(); -- cgit v1.3