netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6] Nuke HAS_IP_COPYSUM for net drivers
@ 2004-05-25 19:11 Roger Luethi
  2004-05-27 17:36 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Luethi @ 2004-05-25 19:11 UTC (permalink / raw)
  To: Jeff Garzik, Andrew Morton; +Cc: netdev

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

Entirely untested, but Obviously Correct(TM). HAS_IP_COPYSUM has been
utterly meaningless for a long time.

Respective patch for via-rhine follows once I know the state of its
pending patches (which I wouldn't mind getting feedback on (hint,
hint!)).

Roger

[-- Attachment #2: copysum-2.6.6.diff --]
[-- Type: text/plain, Size: 3012 bytes --]

diff -urp linux-2.6.6/drivers/net/epic100.c linux-2.6.6-patch/drivers/net/epic100.c
--- linux-2.6.6/drivers/net/epic100.c	2004-04-04 05:37:06.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/epic100.c	2004-05-25 20:45:55.273480945 +0200
@@ -1215,13 +1215,8 @@ static int epic_rx(struct net_device *de
 							    ep->rx_ring[entry].bufaddr,
 							    ep->rx_buf_sz,
 							    PCI_DMA_FROMDEVICE);
-#if 1 /* HAS_IP_COPYSUM */
 				eth_copy_and_sum(skb, ep->rx_skbuff[entry]->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len), ep->rx_skbuff[entry]->tail,
-					   pkt_len);
-#endif
 				pci_dma_sync_single_for_device(ep->pci_dev,
 							       ep->rx_ring[entry].bufaddr,
 							       ep->rx_buf_sz,
diff -urp linux-2.6.6/drivers/net/natsemi.c linux-2.6.6-patch/drivers/net/natsemi.c
--- linux-2.6.6/drivers/net/natsemi.c	2004-05-20 16:17:38.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/natsemi.c	2004-05-25 20:51:58.171336667 +0200
@@ -1798,14 +1798,9 @@ static void netdev_rx(struct net_device 
 					np->rx_dma[entry],
 					buflen,
 					PCI_DMA_FROMDEVICE);
-#if HAS_IP_COPYSUM
 				eth_copy_and_sum(skb,
 					np->rx_skbuff[entry]->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len),
-					np->rx_skbuff[entry]->tail, pkt_len);
-#endif
 				pci_dma_sync_single_for_device(np->pci_dev,
 					np->rx_dma[entry],
 					buflen,
diff -urp linux-2.6.6/drivers/net/tulip/winbond-840.c linux-2.6.6-patch/drivers/net/tulip/winbond-840.c
--- linux-2.6.6/drivers/net/tulip/winbond-840.c	2004-04-04 05:36:26.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/tulip/winbond-840.c	2004-05-25 20:46:26.439782500 +0200
@@ -1292,14 +1292,8 @@ static int netdev_rx(struct net_device *
 				pci_dma_sync_single_for_cpu(np->pci_dev,np->rx_addr[entry],
 							    np->rx_skbuff[entry]->len,
 							    PCI_DMA_FROMDEVICE);
-				/* Call copy + cksum if available. */
-#if HAS_IP_COPYSUM
 				eth_copy_and_sum(skb, np->rx_skbuff[entry]->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len), np->rx_skbuff[entry]->tail,
-					   pkt_len);
-#endif
 				pci_dma_sync_single_for_device(np->pci_dev,np->rx_addr[entry],
 							       np->rx_skbuff[entry]->len,
 							       PCI_DMA_FROMDEVICE);
diff -urp linux-2.6.6/drivers/net/yellowfin.c linux-2.6.6-patch/drivers/net/yellowfin.c
--- linux-2.6.6/drivers/net/yellowfin.c	2004-04-04 05:36:56.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/yellowfin.c	2004-05-25 20:46:46.609742086 +0200
@@ -1201,13 +1201,8 @@ static int yellowfin_rx(struct net_devic
 					break;
 				skb->dev = dev;
 				skb_reserve(skb, 2);	/* 16 byte align the IP header */
-#if HAS_IP_COPYSUM
 				eth_copy_and_sum(skb, rx_skb->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len), 
-					rx_skb->tail, pkt_len);
-#endif
 				pci_dma_sync_single_for_device(yp->pci_dev, desc->addr,
 											   yp->rx_buf_sz,
 											   PCI_DMA_FROMDEVICE);

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

end of thread, other threads:[~2004-05-27 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-25 19:11 [PATCH 2.6] Nuke HAS_IP_COPYSUM for net drivers Roger Luethi
2004-05-27 17:36 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).