Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166416926
D48956.id150883.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48956.id150883.diff
View Options
diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c
--- a/sys/dev/ichiic/ig4_iic.c
+++ b/sys/dev/ichiic/ig4_iic.c
@@ -72,7 +72,7 @@
#include <dev/ichiic/ig4_reg.h>
#include <dev/ichiic/ig4_var.h>
-#define DO_POLL(sc) (cold || kdb_active || SCHEDULER_STOPPED() || sc->poll)
+#define DO_POLL(sc) (cold || kdb_active || SCHEDULER_STOPPED())
/*
* tLOW, tHIGH periods of the SCL clock and maximal falling time of both
@@ -720,14 +720,11 @@
if ((how & IIC_WAIT) == 0) {
if (sx_try_xlock(&sc->call_lock) == 0)
error = IIC_EBUSBSY;
- else
- sc->poll = true;
} else
sx_xlock(&sc->call_lock);
break;
case IIC_RELEASE_BUS:
- sc->poll = false;
sx_unlock(&sc->call_lock);
break;
diff --git a/sys/dev/ichiic/ig4_var.h b/sys/dev/ichiic/ig4_var.h
--- a/sys/dev/ichiic/ig4_var.h
+++ b/sys/dev/ichiic/ig4_var.h
@@ -93,7 +93,6 @@
bool platform_attached : 1;
bool use_10bit : 1;
bool slave_valid : 1;
- bool poll: 1;
/*
* Locking semantics:
diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c
--- a/sys/dev/iicbus/iichid.c
+++ b/sys/dev/iicbus/iichid.c
@@ -39,6 +39,7 @@
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
+#include <sys/proc.h>
#include <sys/rman.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
@@ -602,7 +603,9 @@
* acknowledge interrupts we fetch only length header and discard it.
*/
maxlen = sc->power_on ? sc->intr_bufsize : 0;
+ THREAD_SLEEPING_OK();
error = iichid_cmd_read(sc, sc->intr_buf, maxlen, &actual);
+ THREAD_NO_SLEEPING();
if (error == 0) {
if (sc->power_on) {
if (actual != 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 14, 12:18 PM (6 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36721933
Default Alt Text
D48956.id150883.diff (1 KB)
Attached To
Mode
D48956: ig4_iic: Allow sleeping if called from iichid interrupt handler.
Attached
Detach File
Event Timeline
Log In to Comment