summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/adb-iop.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2017-10-27 04:45:24 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2017-11-09 23:02:57 +0100
commit92178fcabbcd39fc9ccd4e58ec4be83dd5323a46 (patch)
treee06ac4b6dd750c56f16f8c29e2a58a9eb855da1a /drivers/macintosh/adb-iop.c
parentm68k/mac: Disentangle VIA/RBV and NuBus initialization (diff)
downloadlinux-92178fcabbcd39fc9ccd4e58ec4be83dd5323a46.tar.xz
linux-92178fcabbcd39fc9ccd4e58ec4be83dd5323a46.zip
m68k/mac: Add mutual exclusion for IOP interrupt polling
The IOP interrupt handler iop_ism_irq() is used by the adb-iop driver to poll for ADB request completion. Unfortunately, it is not re-entrant. Fix the race condition by adding an iop_ism_irq_poll() function with suitable mutual exclusion. Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/macintosh/adb-iop.c')
-rw-r--r--drivers/macintosh/adb-iop.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c
index f5f4da3d0b67..4b0ad3995497 100644
--- a/drivers/macintosh/adb-iop.c
+++ b/drivers/macintosh/adb-iop.c
@@ -29,8 +29,6 @@
/*#define DEBUG_ADB_IOP*/
-extern void iop_ism_irq(int, void *);
-
static struct adb_request *current_req;
static struct adb_request *last_req;
#if 0
@@ -265,7 +263,7 @@ int adb_iop_autopoll(int devs)
void adb_iop_poll(void)
{
if (adb_iop_state == idle) adb_iop_start();
- iop_ism_irq(0, (void *) ADB_IOP);
+ iop_ism_irq_poll(ADB_IOP);
}
int adb_iop_reset_bus(void)