All of lore.kernel.org
 help / color / mirror / Atom feed
* pcnet32.c bug?
@ 2002-05-29 10:46 Brian Murphy
  2002-05-29 14:43 ` Kevin Paul Herbert
  2002-05-30 16:45 ` William Jhun
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Murphy @ 2002-05-29 10:46 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

If I don't apply the following patch to pcnet32.c then the network 
connection
on my vr5000 box is extremely jerky. It also seems quite sensible to have a
dma sync operation here.

any comments?

/Brian

[-- Attachment #2: pcnet32.diff --]
[-- Type: text/plain, Size: 518 bytes --]

--- drivers/net/pcnet32.c	19 Mar 2002 16:40:55 -0000	1.1.1.1.2.1.2.6
+++ drivers/net/pcnet32.c	29 May 2002 09:57:33 -0000	1.13.4.2
@@ -1343,6 +1351,10 @@
 		if (!rx_in_place) {
 		    skb_reserve(skb,2); /* 16 byte align */
 		    skb_put(skb,pkt_len);	/* Make room */
+                    pci_dma_sync_single(lp->pci_dev, 
+				    lp->rx_skbuff[entry]->tail, 
+				    pkt_len,
+				    PCI_DMA_FROMDEVICE);
 		    eth_copy_and_sum(skb,
 				     (unsigned char *)(lp->rx_skbuff[entry]->tail),
 				     pkt_len,0);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pcnet32.c bug?
  2002-05-29 10:46 pcnet32.c bug? Brian Murphy
@ 2002-05-29 14:43 ` Kevin Paul Herbert
  2002-05-30 16:45 ` William Jhun
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Paul Herbert @ 2002-05-29 14:43 UTC (permalink / raw)
  To: Brian Murphy, linux-mips

Yes, this fix is correct... I made the same patch locally... sorry we 
haven't submited it yet... turns out we've dropeed this one from our 
own latest sources; thanks for the reminder. :-)

Note that there is another problem with cache line invalidation and 
the use of pci_dma_sync_single(), where one can get stale entries in 
the cache when the buffer is next re-used for DMA.

My co-worker Will Jhun <mailto:wjhun@ayrnetworks.com> just sent 
e-mail on the subject of problems with the cache invalidation 
routines last Saturday, with Message-ID: 
<20020525131806.A4073@ayrnetworks.com>

Kevin

At 12:46 PM +0200 5/29/02, Brian Murphy wrote:
>If I don't apply the following patch to pcnet32.c then the network connection
>on my vr5000 box is extremely jerky. It also seems quite sensible to have a
>dma sync operation here.
>
>any comments?
>
>/Brian
>
>
>--- drivers/net/pcnet32.c	19 Mar 2002 16:40:55 -0000	1.1.1.1.2.1.2.6
>+++ drivers/net/pcnet32.c	29 May 2002 09:57:33 -0000	1.13.4.2
>@@ -1343,6 +1351,10 @@
>  		if (!rx_in_place) {
>  		    skb_reserve(skb,2); /* 16 byte align */
>  		    skb_put(skb,pkt_len);	/* Make room */
>+                    pci_dma_sync_single(lp->pci_dev,
>+				    lp->rx_skbuff[entry]->tail,
>+				    pkt_len,
>+				    PCI_DMA_FROMDEVICE);
>  		    eth_copy_and_sum(skb,
>  				     (unsigned char 
>*)(lp->rx_skbuff[entry]->tail),
>  				     pkt_len,0);


-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pcnet32.c bug?
  2002-05-29 10:46 pcnet32.c bug? Brian Murphy
  2002-05-29 14:43 ` Kevin Paul Herbert
@ 2002-05-30 16:45 ` William Jhun
  1 sibling, 0 replies; 3+ messages in thread
From: William Jhun @ 2002-05-30 16:45 UTC (permalink / raw)
  To: Brian Murphy; +Cc: linux-mips

On Wed, May 29, 2002 at 12:46:57PM +0200, Brian Murphy wrote:
> If I don't apply the following patch to pcnet32.c then the network 
> connection
> on my vr5000 box is extremely jerky. It also seems quite sensible to have a
> dma sync operation here.

Yes, that should be there by all means. We had to add that exact same
line to get our pcnet32 working on MIPS.

Thanks,
William

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-30 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-29 10:46 pcnet32.c bug? Brian Murphy
2002-05-29 14:43 ` Kevin Paul Herbert
2002-05-30 16:45 ` William Jhun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.