aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/netxen/netxen_nic.h2
-rw-r--r--drivers/net/netxen/netxen_nic_ethtool.c27
-rw-r--r--drivers/net/netxen/netxen_nic_init.c7
-rw-r--r--drivers/net/netxen/netxen_nic_main.c1
4 files changed, 28 insertions, 9 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 7bbd5d14175..fbc2553275d 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -919,7 +919,7 @@ struct netxen_adapter {
919 u16 link_duplex; 919 u16 link_duplex;
920 u16 state; 920 u16 state;
921 u16 link_autoneg; 921 u16 link_autoneg;
922 int rcsum; 922 int rx_csum;
923 int status; 923 int status;
924 spinlock_t stats_lock; 924 spinlock_t stats_lock;
925 925
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index 78e42316e70..cfb847b0cae 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -516,17 +516,17 @@ netxen_nic_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
516 ring->rx_jumbo_pending = 0; 516 ring->rx_jumbo_pending = 0;
517 for (i = 0; i < MAX_RCV_CTX; ++i) { 517 for (i = 0; i < MAX_RCV_CTX; ++i) {
518 ring->rx_pending += adapter->recv_ctx[i]. 518 ring->rx_pending += adapter->recv_ctx[i].
519 rcv_desc[RCV_DESC_NORMAL_CTXID].rcv_pending; 519 rcv_desc[RCV_DESC_NORMAL_CTXID].max_rx_desc_count;
520 ring->rx_jumbo_pending += adapter->recv_ctx[i]. 520 ring->rx_jumbo_pending += adapter->recv_ctx[i].
521 rcv_desc[RCV_DESC_JUMBO_CTXID].rcv_pending; 521 rcv_desc[RCV_DESC_JUMBO_CTXID].max_rx_desc_count;
522 } 522 }
523 ring->tx_pending = adapter->max_tx_desc_count;
523 524
524 ring->rx_max_pending = adapter->max_rx_desc_count; 525 ring->rx_max_pending = MAX_RCV_DESCRIPTORS;
525 ring->tx_max_pending = adapter->max_tx_desc_count; 526 ring->tx_max_pending = MAX_CMD_DESCRIPTORS_HOST;
526 ring->rx_jumbo_max_pending = adapter->max_jumbo_rx_desc_count; 527 ring->rx_jumbo_max_pending = MAX_JUMBO_RCV_DESCRIPTORS;
527 ring->rx_mini_max_pending = 0; 528 ring->rx_mini_max_pending = 0;
528 ring->rx_mini_pending = 0; 529 ring->rx_mini_pending = 0;
529 ring->rx_jumbo_pending = 0;
530} 530}
531 531
532static void 532static void
@@ -731,6 +731,19 @@ netxen_nic_get_ethtool_stats(struct net_device *dev,
731 } 731 }
732} 732}
733 733
734static u32 netxen_nic_get_rx_csum(struct net_device *dev)
735{
736 struct netxen_adapter *adapter = netdev_priv(dev);
737 return adapter->rx_csum;
738}
739
740static int netxen_nic_set_rx_csum(struct net_device *dev, u32 data)
741{
742 struct netxen_adapter *adapter = netdev_priv(dev);
743 adapter->rx_csum = !!data;
744 return 0;
745}
746
734struct ethtool_ops netxen_nic_ethtool_ops = { 747struct ethtool_ops netxen_nic_ethtool_ops = {
735 .get_settings = netxen_nic_get_settings, 748 .get_settings = netxen_nic_get_settings,
736 .set_settings = netxen_nic_set_settings, 749 .set_settings = netxen_nic_set_settings,
@@ -751,4 +764,6 @@ struct ethtool_ops netxen_nic_ethtool_ops = {
751 .get_strings = netxen_nic_get_strings, 764 .get_strings = netxen_nic_get_strings,
752 .get_ethtool_stats = netxen_nic_get_ethtool_stats, 765 .get_ethtool_stats = netxen_nic_get_ethtool_stats,
753 .get_sset_count = netxen_get_sset_count, 766 .get_sset_count = netxen_get_sset_count,
767 .get_rx_csum = netxen_nic_get_rx_csum,
768 .set_rx_csum = netxen_nic_set_rx_csum,
754}; 769};
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 1811bcb8c38..37589265297 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1118,10 +1118,13 @@ netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
1118 1118
1119 skb = (struct sk_buff *)buffer->skb; 1119 skb = (struct sk_buff *)buffer->skb;
1120 1120
1121 if (likely(netxen_get_sts_status(desc) == STATUS_CKSUM_OK)) { 1121 if (likely(adapter->rx_csum &&
1122 netxen_get_sts_status(desc) == STATUS_CKSUM_OK)) {
1122 adapter->stats.csummed++; 1123 adapter->stats.csummed++;
1123 skb->ip_summed = CHECKSUM_UNNECESSARY; 1124 skb->ip_summed = CHECKSUM_UNNECESSARY;
1124 } 1125 } else
1126 skb->ip_summed = CHECKSUM_NONE;
1127
1125 skb->dev = netdev; 1128 skb->dev = netdev;
1126 if (desc_ctx == RCV_DESC_LRO_CTXID) { 1129 if (desc_ctx == RCV_DESC_LRO_CTXID) {
1127 /* True length was only available on the last pkt */ 1130 /* True length was only available on the last pkt */
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index b9cde65e7f3..2a1d6d7ec35 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -409,6 +409,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
409 /* This will be reset for mezz cards */ 409 /* This will be reset for mezz cards */
410 adapter->portnum = pci_func_id; 410 adapter->portnum = pci_func_id;
411 adapter->status &= ~NETXEN_NETDEV_STATUS; 411 adapter->status &= ~NETXEN_NETDEV_STATUS;
412 adapter->rx_csum = 1;
412 413
413 netdev->open = netxen_nic_open; 414 netdev->open = netxen_nic_open;
414 netdev->stop = netxen_nic_close; 415 netdev->stop = netxen_nic_close;