aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igbvf/netdev.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-05-06 06:25:01 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-06 18:33:40 -0400
commit0364d6fd2c353d2d82da865a6f093f97c69b669c (patch)
tree5f0ce8756cf7317130e636e6f3103279483d32e5 /drivers/net/igbvf/netdev.c
parente0ca84105bca8691f39ef7ff221a88046ba11f23 (diff)
igbvf: cleanup flags and allow for rx checksum to be disabled
This patch cleans up a number of unused or unneeded feature flags. As a result of these changes the user should now be able to enable or disable rx checksumming via ethtool. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igbvf/netdev.c')
-rw-r--r--drivers/net/igbvf/netdev.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index b774666ad3cf..44a8eef03a74 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -58,8 +58,7 @@ static void igbvf_reset_interrupt_capability(struct igbvf_adapter *);
58 58
59static struct igbvf_info igbvf_vf_info = { 59static struct igbvf_info igbvf_vf_info = {
60 .mac = e1000_vfadapt, 60 .mac = e1000_vfadapt,
61 .flags = FLAG_HAS_JUMBO_FRAMES 61 .flags = 0,
62 | FLAG_RX_CSUM_ENABLED,
63 .pba = 10, 62 .pba = 10,
64 .init_ops = e1000_init_function_pointers_vf, 63 .init_ops = e1000_init_function_pointers_vf,
65}; 64};
@@ -107,8 +106,10 @@ static inline void igbvf_rx_checksum_adv(struct igbvf_adapter *adapter,
107 skb->ip_summed = CHECKSUM_NONE; 106 skb->ip_summed = CHECKSUM_NONE;
108 107
109 /* Ignore Checksum bit is set or checksum is disabled through ethtool */ 108 /* Ignore Checksum bit is set or checksum is disabled through ethtool */
110 if ((status_err & E1000_RXD_STAT_IXSM)) 109 if ((status_err & E1000_RXD_STAT_IXSM) ||
110 (adapter->flags & IGBVF_FLAG_RX_CSUM_DISABLED))
111 return; 111 return;
112
112 /* TCP/UDP checksum error bit is set */ 113 /* TCP/UDP checksum error bit is set */
113 if (status_err & 114 if (status_err &
114 (E1000_RXDEXT_STATERR_TCPE | E1000_RXDEXT_STATERR_IPE)) { 115 (E1000_RXDEXT_STATERR_TCPE | E1000_RXDEXT_STATERR_IPE)) {
@@ -116,6 +117,7 @@ static inline void igbvf_rx_checksum_adv(struct igbvf_adapter *adapter,
116 adapter->hw_csum_err++; 117 adapter->hw_csum_err++;
117 return; 118 return;
118 } 119 }
120
119 /* It must be a TCP or UDP packet with a valid checksum */ 121 /* It must be a TCP or UDP packet with a valid checksum */
120 if (status_err & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS)) 122 if (status_err & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))
121 skb->ip_summed = CHECKSUM_UNNECESSARY; 123 skb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -2351,15 +2353,6 @@ static int igbvf_change_mtu(struct net_device *netdev, int new_mtu)
2351 return -EINVAL; 2353 return -EINVAL;
2352 } 2354 }
2353 2355
2354 /* Jumbo frame size limits */
2355 if (max_frame > ETH_FRAME_LEN + ETH_FCS_LEN) {
2356 if (!(adapter->flags & FLAG_HAS_JUMBO_FRAMES)) {
2357 dev_err(&adapter->pdev->dev,
2358 "Jumbo Frames not supported.\n");
2359 return -EINVAL;
2360 }
2361 }
2362
2363#define MAX_STD_JUMBO_FRAME_SIZE 9234 2356#define MAX_STD_JUMBO_FRAME_SIZE 9234
2364 if (max_frame > MAX_STD_JUMBO_FRAME_SIZE) { 2357 if (max_frame > MAX_STD_JUMBO_FRAME_SIZE) {
2365 dev_err(&adapter->pdev->dev, "MTU > 9216 not supported.\n"); 2358 dev_err(&adapter->pdev->dev, "MTU > 9216 not supported.\n");