[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0711231019210.18378@sbz-30.cs.Helsinki.FI>
Date: Fri, 23 Nov 2007 10:19:33 +0200 (EET)
From: Pekka J Enberg <penberg@...helsinki.fi>
To: romieu@...zoreil.com, sorbica@...lus.com.tw, jesse@...lus.com.tw,
netdev@...r.kernel.org
Subject: [PATCH 5/8] ipg: remove commented out code
From: Pekka Enberg <penberg@...helsinki.fi>
Cc: Francois Romieu <romieu@...zoreil.com>
Cc: Sorbica Shieh <sorbica@...lus.com.tw>
Cc: Jesse Huang <jesse@...lus.com.tw>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
drivers/net/ipg.c | 34 ++++++----------------------------
drivers/net/ipg.h | 4 +---
2 files changed, 7 insertions(+), 31 deletions(-)
Index: linux-2.6/drivers/net/ipg.c
===================================================================
--- linux-2.6.orig/drivers/net/ipg.c
+++ linux-2.6/drivers/net/ipg.c
@@ -1492,35 +1492,13 @@ static int ipg_nic_rx(struct net_device
/* Set the buffer's protocol field to Ethernet. */
skb->protocol = eth_type_trans(skb, dev);
- /* If the frame contains an IP/TCP/UDP frame,
- * determine if upper layer must check IP/TCP/UDP
- * checksums.
- *
- * NOTE: DO NOT RELY ON THE TCP/UDP CHECKSUM
- * VERIFICATION FOR SILICON REVISIONS B3
- * AND EARLIER!
- *
- if ((le64_to_cpu(rxfd->rfs &
- (IPG_RFS_TCPDETECTED | IPG_RFS_UDPDETECTED |
- IPG_RFS_IPDETECTED))) &&
- !(le64_to_cpu(rxfd->rfs &
- (IPG_RFS_TCPERROR | IPG_RFS_UDPERROR |
- IPG_RFS_IPERROR)))) {
- * Indicate IP checksums were performed
- * by the IPG.
- *
- skb->ip_summed = CHECKSUM_UNNECESSARY;
- } else
+ /* The IPG encountered an error with (or
+ * there were no) IP/TCP/UDP checksums.
+ * This may or may not indicate an invalid
+ * IP/TCP/UDP frame was received. Let the
+ * upper layer decide.
*/
- {
- /* The IPG encountered an error with (or
- * there were no) IP/TCP/UDP checksums.
- * This may or may not indicate an invalid
- * IP/TCP/UDP frame was received. Let the
- * upper layer decide.
- */
- skb->ip_summed = CHECKSUM_NONE;
- }
+ skb->ip_summed = CHECKSUM_NONE;
/* Hand off frame for higher layer processing.
* The function netif_rx() releases the sk_buff
Index: linux-2.6/drivers/net/ipg.h
===================================================================
--- linux-2.6.orig/drivers/net/ipg.h
+++ linux-2.6/drivers/net/ipg.h
@@ -23,7 +23,6 @@
#include <linux/skbuff.h>
#include <linux/version.h>
#include <asm/bitops.h>
-/*#include <asm/spinlock.h>*/
/*
* Constants
@@ -733,8 +732,7 @@ enum ipg_regs {
* Miscellaneous macros.
*/
-/* Marco for printing debug statements.
-# define IPG_DDEBUG_MSG(args...) printk(KERN_DEBUG "IPG: " ## args) */
+/* Marco for printing debug statements. */
#ifdef IPG_DEBUG
# define IPG_DEBUG_MSG(args...)
# define IPG_DDEBUG_MSG(args...) printk(KERN_DEBUG "IPG: " args)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists