On Wednesday 12 November 2008 13:09:52 Brian J. Murrell wrote:
> On Wed, 2008-11-12 at 12:39 +0100, Michael Buesch wrote:
> > On Wednesday 12 November 2008 04:27:14 Brian J. Murrell wrote:
> > > Please excuse the cross-posting but this thread started on openwrt-users
> > > but the findings are probably more relevant to the developers.
> > > 
> > > On Tue, 2008-10-21 at 17:46 +0200, Michael Buesch wrote:
> > > > 
> > > > Lookup b43_interrupt_handler() and look for the "reason" variable.
> > > > Fairly straightforward, IMO.
> > > 
> > > OK.  I've managed to tool up a b43.ko with a printk and this is what I
> > > see, before I even pump anything through the wireless link (i.e. up in
> > > Master mode, and idle):
> > 
> > Did you print the value _after_ it was masked with the mask? It seems you 
> > didn't.
> 
> All I did was:
> 
>       if (b43_status(dev) < B43_STAT_STARTED)
>               goto out;
>       reason = b43_read32(dev, B43_MMIO_GEN_IRQ_REASON);
> +     /* don't print transmits */
> +     if (reason & B43_IRQ_TX_OK)
> +             ;
> +     else
> +             printk(KERN_INFO "b43_interrupt_handler: 0x%x\n", reason);
>       if (reason == 0xffffffff)       /* shared IRQ */
>               goto out;
>       ret = IRQ_HANDLED;

Yeah, wrong.
Do it later _after_ checking for shared IRQ and after the masking.

1892 static irqreturn_t b43_interrupt_handler(int irq, void *dev_id)
1893 {
1894         irqreturn_t ret = IRQ_NONE;
1895         struct b43_wldev *dev = dev_id;
1896         u32 reason;
1897 
1898         if (!dev)
1899                 return IRQ_NONE;
1900 
1901         spin_lock(&dev->wl->irq_lock);
1902 
1903         if (b43_status(dev) < B43_STAT_STARTED)
1904                 goto out;
1905         reason = b43_read32(dev, B43_MMIO_GEN_IRQ_REASON);
1906         if (reason == 0xffffffff)       /* shared IRQ */
1907                 goto out;
1908         ret = IRQ_HANDLED;
1909         reason &= b43_read32(dev, B43_MMIO_GEN_IRQ_MASK);
1910         if (!reason)
1911                 goto out;

<<< Insert printk code here >>>


Otherwise your printks are completely bogus and not useful at all.

-- 
Greetings Michael.
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to