summaryrefslogtreecommitdiffstats
path: root/sys/dev/smbus
diff options
context:
space:
mode:
authornsouch <nsouch@FreeBSD.org>1999-11-01 23:15:29 +0000
committernsouch <nsouch@FreeBSD.org>1999-11-01 23:15:29 +0000
commitbfcfa15e6865b531634b7968310a861ce2fa7e70 (patch)
tree83bd3e3e44238222b8915eab88db8daf0db45cdc /sys/dev/smbus
parent373247212ef9f2056a82796de13a14040b5b57d6 (diff)
downloadFreeBSD-src-bfcfa15e6865b531634b7968310a861ce2fa7e70.zip
FreeBSD-src-bfcfa15e6865b531634b7968310a861ce2fa7e70.tar.gz
Sync with RELENG_3.
Diffstat (limited to 'sys/dev/smbus')
-rw-r--r--sys/dev/smbus/smb.c4
-rw-r--r--sys/dev/smbus/smbconf.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c
index 331e6b9..7bf1af6 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 d97305c..1d44ef3 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();
OpenPOWER on IntegriCloud