Re: eepro100 (PCI ID 82820) lockups/failure

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 6 Aug 2001 20:14:18 +0100 (BST)


> Shouldn't a udelay(1) always take one microsecond, regardless of
> hardware optimizations?

A udelay(1) should always take 1 microsecond or a bit longer. There are some
funnies with PCI posting to beware of - notably

writel(0x1, foo->reg);
udelay(1);
writel(0x0, foo->reg)

Does _not_ guarantee the two writes hit the PCI device with a 1 uS delay
where its PCI access timing that matters you need to do

writel(0x1, foo->reg)
readl(foo->somethingthatdoesnothing);
udelay(1);
writel(0x0, foo->reg)

-
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/