linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ssb-mipscore: Fix interrupt vectors
@ 2008-04-08  9:17 Michael Buesch
  0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2008-04-08  9:17 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Felix Fietkau

This fixes assignment of the interrupt vectors on the SSB MIPS core.

Signed-off-by: Michael Buesch <mb@bu3sch.de>

---

John, please apply this bugfix to 2.6.25.


Index: wireless-testing/drivers/ssb/driver_mipscore.c
===================================================================
--- wireless-testing.orig/drivers/ssb/driver_mipscore.c	2008-03-22 17:51:22.000000000 +0100
+++ wireless-testing/drivers/ssb/driver_mipscore.c	2008-04-08 11:14:38.000000000 +0200
@@ -106,18 +106,19 @@ static void set_irq(struct ssb_device *d
 	if (oldirq == 0)
 		ssb_write32(mdev, SSB_INTVEC, (~(1 << irqflag) & ssb_read32(mdev, SSB_INTVEC)));
 	else
 		clear_irq(bus, oldirq);
 
 	/* assign the new one */
-	if (irq == 0)
-		ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) & ssb_read32(mdev, SSB_INTVEC)));
-
-	irqflag <<= ipsflag_irq_shift[irq];
-	irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]);
-	ssb_write32(mdev, SSB_IPSFLAG, irqflag);
+	if (irq == 0) {
+		ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) | ssb_read32(mdev, SSB_INTVEC)));
+	} else {
+		irqflag <<= ipsflag_irq_shift[irq];
+		irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]);
+		ssb_write32(mdev, SSB_IPSFLAG, irqflag);
+	}
 }
 
 static void ssb_mips_serial_init(struct ssb_mipscore *mcore)
 {
 	struct ssb_bus *bus = mcore->dev->bus;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-08  9:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08  9:17 [PATCH] ssb-mipscore: Fix interrupt vectors Michael Buesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).