Page MenuHomeFreeBSD

D48956.id151996.diff
No OneTemporary

D48956.id151996.diff

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

Mime Type
text/plain
Expires
Fri, Aug 14, 12:18 PM (11 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36721933
Default Alt Text
D48956.id151996.diff (1 KB)

Event Timeline