Re: kernel BUG at tg3.c:1557

Roland Kuhn (rkuhn@e18.physik.tu-muenchen.de)
Wed, 7 Aug 2002 18:28:04 +0200 (CEST)


On Wed, 7 Aug 2002, David S. Miller wrote:

> From: Roland Kuhn <rkuhn@e18.physik.tu-muenchen.de>
> Date: Wed, 7 Aug 2002 17:36:25 +0200 (CEST)
>
> How can I help to track this down?
>
> I'm stumped, sorry.

Just out of curiosity I tried it with

static void tg3_write_mailbox_reg32(struct tg3 *tp, u32 off, u32 val)
{
unsigned long flags;

spin_lock_irqsave(&tp->indirect_lock, flags);
writel(val, tp->regs + off);
spin_unlock_irqrestore(&tp->indirect_lock, flags);
}

and that plain works. That means that only the mailbox writes have
additional locking around the otherwise unchanged writel() call. Does the
spin_lock_irqsave/spin_unlock_irqrestore take care of the PCI ordering?

Ciao,
Roland

+---------------------------+-------------------------+
| TU Muenchen | |
| Physik-Department E18 | Raum 3558 |
| James-Franck-Str. | Telefon 089/289-12592 |
| 85747 Garching | |
+---------------------------+-------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/