Subject: Re: [PATCH] Fix e100 on systems that have cache incoherent DMA

From: Andrew Morton <[email-masked]>
Date: Tue, 1 Jul 2008 01:26:31 -0700

On Thu, 19 Jun 2008 14:38:33 +0200 Anders Grafstr__m <[email-masked]> wrote:

> David Acker wrote:
> > May I ask what actual board you are using and how the e100 is connected 
> > to it?  I plan to test with miniPCI based e100 cards.  Also, can you say 
> > more about it being broke?  Does it crash immediately, fail to move any 
> > data, move some data and stop, etc. ?
> 
> It's a custom board based on the IXDP425 reference design.
> IXP420 with 82551ER integrated on the same board.
> Both RX and TX appears to stop shortly after the driver has been initialized.
> It never recovers after the "exec cuc_dump_reset failed" messages start to show.

So..  where are we with this?  e100 is a pretty popular device and
having it obscurely busted on kooky architectures is likely to be
unpopular.

Did this:

> --- a/drivers/net/e100.c
> +++ b/drivers/net/e100.c
> @@ -1803,6 +1803,8 @@ static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
>   	if (rx->prev->skb) {
>   		struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data;
>   		put_unaligned_le32(rx->dma_addr, &prev_rfd->link);
> +		pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr,
> +			sizeof(struct rfd), PCI_DMA_TODEVICE);
>   	}
> 
>   	return 0;

actually fix it?

If so, it's probably better than nothing.

Thanks.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php