aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/kernel/irq_64.c29
-rw-r--r--drivers/net/sunhme.c2
-rw-r--r--drivers/sbus/char/bbc_i2c.c2
-rw-r--r--drivers/sbus/char/jsflash.c3
4 files changed, 20 insertions, 16 deletions
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index e289376198eb..1c378d8e90c5 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -323,17 +323,25 @@ static void sun4u_set_affinity(unsigned int virt_irq,
323 sun4u_irq_enable(virt_irq); 323 sun4u_irq_enable(virt_irq);
324} 324}
325 325
326/* Don't do anything. The desc->status check for IRQ_DISABLED in
327 * handler_irq() will skip the handler call and that will leave the
328 * interrupt in the sent state. The next ->enable() call will hit the
329 * ICLR register to reset the state machine.
330 *
331 * This scheme is necessary, instead of clearing the Valid bit in the
332 * IMAP register, to handle the case of IMAP registers being shared by
333 * multiple INOs (and thus ICLR registers). Since we use a different
334 * virtual IRQ for each shared IMAP instance, the generic code thinks
335 * there is only one user so it prematurely calls ->disable() on
336 * free_irq().
337 *
338 * We have to provide an explicit ->disable() method instead of using
339 * NULL to get the default. The reason is that if the generic code
340 * sees that, it also hooks up a default ->shutdown method which
341 * invokes ->mask() which we do not want. See irq_chip_set_defaults().
342 */
326static void sun4u_irq_disable(unsigned int virt_irq) 343static void sun4u_irq_disable(unsigned int virt_irq)
327{ 344{
328 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
329
330 if (likely(data)) {
331 unsigned long imap = data->imap;
332 unsigned long tmp = upa_readq(imap);
333
334 tmp &= ~IMAP_VALID;
335 upa_writeq(tmp, imap);
336 }
337} 345}
338 346
339static void sun4u_irq_eoi(unsigned int virt_irq) 347static void sun4u_irq_eoi(unsigned int virt_irq)
@@ -746,7 +754,8 @@ void handler_irq(int irq, struct pt_regs *regs)
746 754
747 desc = irq_desc + virt_irq; 755 desc = irq_desc + virt_irq;
748 756
749 desc->handle_irq(virt_irq, desc); 757 if (!(desc->status & IRQ_DISABLED))
758 desc->handle_irq(virt_irq, desc);
750 759
751 bucket_pa = next_pa; 760 bucket_pa = next_pa;
752 } 761 }
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index d4fb4acdbebd..4e9bd380a5c2 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -2649,8 +2649,6 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
2649 int err = -ENODEV; 2649 int err = -ENODEV;
2650 2650
2651 sbus_dp = to_of_device(op->dev.parent)->node; 2651 sbus_dp = to_of_device(op->dev.parent)->node;
2652 if (is_qfe)
2653 sbus_dp = to_of_device(op->dev.parent->parent)->node;
2654 2652
2655 /* We can match PCI devices too, do not accept those here. */ 2653 /* We can match PCI devices too, do not accept those here. */
2656 if (strcmp(sbus_dp->name, "sbus")) 2654 if (strcmp(sbus_dp->name, "sbus"))
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index f08e169ba1b5..7e30e5f6e032 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -129,7 +129,7 @@ static int wait_for_pin(struct bbc_i2c_bus *bp, u8 *status)
129 bp->waiting = 1; 129 bp->waiting = 1;
130 add_wait_queue(&bp->wq, &wait); 130 add_wait_queue(&bp->wq, &wait);
131 while (limit-- > 0) { 131 while (limit-- > 0) {
132 unsigned long val; 132 long val;
133 133
134 val = wait_event_interruptible_timeout( 134 val = wait_event_interruptible_timeout(
135 bp->wq, 135 bp->wq,
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c
index a9a9893a5f95..e6d1fc8c54f1 100644
--- a/drivers/sbus/char/jsflash.c
+++ b/drivers/sbus/char/jsflash.c
@@ -38,9 +38,6 @@
38#include <linux/string.h> 38#include <linux/string.h>
39#include <linux/genhd.h> 39#include <linux/genhd.h>
40#include <linux/blkdev.h> 40#include <linux/blkdev.h>
41
42#define MAJOR_NR JSFD_MAJOR
43
44#include <asm/uaccess.h> 41#include <asm/uaccess.h>
45#include <asm/pgtable.h> 42#include <asm/pgtable.h>
46#include <asm/io.h> 43#include <asm/io.h>