Re: [PATCH] net: add driver for the NIC on Cell Blades

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2005-06-29 at 02:38 +0200, Arnd Bergmann wrote:
> On Dinsdag 28 Juni 2005 15:53, Arjan van de Ven wrote:
> > 
> > > +static void
> > > +spider_net_rx_irq_off(struct spider_net_card *card)
> > > +{
> > > +       u32 regvalue;
> > > +       unsigned long flags;
> > > +
> > > +       spin_lock_irqsave(&card->intmask_lock, flags);
> > > +       regvalue = spider_net_read_reg(card, SPIDER_NET_GHIINT0MSK);
> > > +       regvalue &= ~SPIDER_NET_RXINT;
> > > +       spider_net_write_reg(card, SPIDER_NET_GHIINT0MSK, regvalue);
> > > +       spin_unlock_irqrestore(&card->intmask_lock, flags);
> > > +}
> > 
> > I think you have a PCI posting bug here....
> 
> Could you be more specific? My guess would be that the 'sync' in writel
> takes care of this. Should there be an extra mmiowb() in here or are
> you referring to some other problem?

different problem. the sync will get the byte out of the cpu. It won't
get it out of the pci bridges...

In short, pci bridges are allowed to buffer (post) writes until data
traffic in the other direction happens (eg readl() or dma). 

In cases where you want your writel to hit the device instantly (and
disabling irqs is generally one of those) you need to flush this posting
cache with a dummy readl().

http://ftp.linux.org.uk/pub/linux/willy/patches/debug-write.diff

is a patch to simulate this behavior more agressive

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux