diff options
author | Amerigo Wang <amwang@redhat.com> | 2010-08-24 20:23:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-25 19:41:26 -0400 |
commit | f0c54ace9b74ec52e57d3ea2ef99fb277667abf8 (patch) | |
tree | 48b126d28b29b2e65a558c18c92abecffb225d00 /drivers/net | |
parent | def824c0d4902d27c52f17d267af8bc648d29e16 (diff) |
s2io: remove lro parameter
Remove "lro" parameter of s2io driver.
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: jon.mason@exar.com
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/s2io.c | 29 | ||||
-rw-r--r-- | drivers/net/s2io.h | 1 |
2 files changed, 9 insertions, 21 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 5f062ddfd5c5..7061fc8e99c7 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -38,8 +38,6 @@ | |||
38 | * Tx descriptors that can be associated with each corresponding FIFO. | 38 | * Tx descriptors that can be associated with each corresponding FIFO. |
39 | * intr_type: This defines the type of interrupt. The values can be 0(INTA), | 39 | * intr_type: This defines the type of interrupt. The values can be 0(INTA), |
40 | * 2(MSI_X). Default value is '2(MSI_X)' | 40 | * 2(MSI_X). Default value is '2(MSI_X)' |
41 | * lro: Specifies whether to enable Large Receive Offload (LRO) or not. | ||
42 | * Possible values '1' for enable '0' for disable. Default is '0' | ||
43 | * lro_max_pkts: This parameter defines maximum number of packets can be | 41 | * lro_max_pkts: This parameter defines maximum number of packets can be |
44 | * aggregated as a single large packet | 42 | * aggregated as a single large packet |
45 | * napi: This parameter used to enable/disable NAPI (polling Rx) | 43 | * napi: This parameter used to enable/disable NAPI (polling Rx) |
@@ -496,8 +494,6 @@ S2IO_PARM_INT(rxsync_frequency, 3); | |||
496 | /* Interrupt type. Values can be 0(INTA), 2(MSI_X) */ | 494 | /* Interrupt type. Values can be 0(INTA), 2(MSI_X) */ |
497 | S2IO_PARM_INT(intr_type, 2); | 495 | S2IO_PARM_INT(intr_type, 2); |
498 | /* Large receive offload feature */ | 496 | /* Large receive offload feature */ |
499 | static unsigned int lro_enable = 1; | ||
500 | module_param_named(lro, lro_enable, uint, 0); | ||
501 | 497 | ||
502 | /* Max pkts to be aggregated by LRO at one time. If not specified, | 498 | /* Max pkts to be aggregated by LRO at one time. If not specified, |
503 | * aggregation happens until we hit max IP pkt size(64K) | 499 | * aggregation happens until we hit max IP pkt size(64K) |
@@ -6733,13 +6729,10 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data) | |||
6733 | return -EINVAL; | 6729 | return -EINVAL; |
6734 | 6730 | ||
6735 | if (data & ETH_FLAG_LRO) { | 6731 | if (data & ETH_FLAG_LRO) { |
6736 | if (lro_enable) { | 6732 | if (!(dev->features & NETIF_F_LRO)) { |
6737 | if (!(dev->features & NETIF_F_LRO)) { | 6733 | dev->features |= NETIF_F_LRO; |
6738 | dev->features |= NETIF_F_LRO; | 6734 | changed = 1; |
6739 | changed = 1; | 6735 | } |
6740 | } | ||
6741 | } else | ||
6742 | rc = -EINVAL; | ||
6743 | } else if (dev->features & NETIF_F_LRO) { | 6736 | } else if (dev->features & NETIF_F_LRO) { |
6744 | dev->features &= ~NETIF_F_LRO; | 6737 | dev->features &= ~NETIF_F_LRO; |
6745 | changed = 1; | 6738 | changed = 1; |
@@ -6748,7 +6741,6 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data) | |||
6748 | if (changed && netif_running(dev)) { | 6741 | if (changed && netif_running(dev)) { |
6749 | s2io_stop_all_tx_queue(sp); | 6742 | s2io_stop_all_tx_queue(sp); |
6750 | s2io_card_down(sp); | 6743 | s2io_card_down(sp); |
6751 | sp->lro = !!(dev->features & NETIF_F_LRO); | ||
6752 | rc = s2io_card_up(sp); | 6744 | rc = s2io_card_up(sp); |
6753 | if (rc) | 6745 | if (rc) |
6754 | s2io_reset(sp); | 6746 | s2io_reset(sp); |
@@ -7305,7 +7297,7 @@ static int s2io_card_up(struct s2io_nic *sp) | |||
7305 | struct ring_info *ring = &mac_control->rings[i]; | 7297 | struct ring_info *ring = &mac_control->rings[i]; |
7306 | 7298 | ||
7307 | ring->mtu = dev->mtu; | 7299 | ring->mtu = dev->mtu; |
7308 | ring->lro = sp->lro; | 7300 | ring->lro = !!(dev->features & NETIF_F_LRO); |
7309 | ret = fill_rx_buffers(sp, ring, 1); | 7301 | ret = fill_rx_buffers(sp, ring, 1); |
7310 | if (ret) { | 7302 | if (ret) { |
7311 | DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", | 7303 | DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", |
@@ -7339,7 +7331,7 @@ static int s2io_card_up(struct s2io_nic *sp) | |||
7339 | /* Setting its receive mode */ | 7331 | /* Setting its receive mode */ |
7340 | s2io_set_multicast(dev); | 7332 | s2io_set_multicast(dev); |
7341 | 7333 | ||
7342 | if (sp->lro) { | 7334 | if (dev->features & NETIF_F_LRO) { |
7343 | /* Initialize max aggregatable pkts per session based on MTU */ | 7335 | /* Initialize max aggregatable pkts per session based on MTU */ |
7344 | sp->lro_max_aggr_per_sess = ((1<<16) - 1) / dev->mtu; | 7336 | sp->lro_max_aggr_per_sess = ((1<<16) - 1) / dev->mtu; |
7345 | /* Check if we can use (if specified) user provided value */ | 7337 | /* Check if we can use (if specified) user provided value */ |
@@ -7909,7 +7901,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7909 | else | 7901 | else |
7910 | sp->device_type = XFRAME_I_DEVICE; | 7902 | sp->device_type = XFRAME_I_DEVICE; |
7911 | 7903 | ||
7912 | sp->lro = lro_enable; | ||
7913 | 7904 | ||
7914 | /* Initialize some PCI/PCI-X fields of the NIC. */ | 7905 | /* Initialize some PCI/PCI-X fields of the NIC. */ |
7915 | s2io_init_pci(sp); | 7906 | s2io_init_pci(sp); |
@@ -8045,8 +8036,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
8045 | dev->netdev_ops = &s2io_netdev_ops; | 8036 | dev->netdev_ops = &s2io_netdev_ops; |
8046 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | 8037 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); |
8047 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 8038 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
8048 | if (lro_enable) | 8039 | dev->features |= NETIF_F_LRO; |
8049 | dev->features |= NETIF_F_LRO; | ||
8050 | dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; | 8040 | dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; |
8051 | if (sp->high_dma_flag == true) | 8041 | if (sp->high_dma_flag == true) |
8052 | dev->features |= NETIF_F_HIGHDMA; | 8042 | dev->features |= NETIF_F_HIGHDMA; |
@@ -8281,9 +8271,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
8281 | dev->name); | 8271 | dev->name); |
8282 | } | 8272 | } |
8283 | 8273 | ||
8284 | if (sp->lro) | 8274 | DBG_PRINT(ERR_DBG, "%s: Large receive offload enabled\n", |
8285 | DBG_PRINT(ERR_DBG, "%s: Large receive offload enabled\n", | 8275 | dev->name); |
8286 | dev->name); | ||
8287 | if (ufo) | 8276 | if (ufo) |
8288 | DBG_PRINT(ERR_DBG, | 8277 | DBG_PRINT(ERR_DBG, |
8289 | "%s: UDP Fragmentation Offload(UFO) enabled\n", | 8278 | "%s: UDP Fragmentation Offload(UFO) enabled\n", |
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 924f618f2397..00b8614efe48 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -963,7 +963,6 @@ struct s2io_nic { | |||
963 | 963 | ||
964 | unsigned long clubbed_frms_cnt; | 964 | unsigned long clubbed_frms_cnt; |
965 | unsigned long sending_both; | 965 | unsigned long sending_both; |
966 | u8 lro; | ||
967 | u16 lro_max_aggr_per_sess; | 966 | u16 lro_max_aggr_per_sess; |
968 | volatile unsigned long state; | 967 | volatile unsigned long state; |
969 | u64 general_int_mask; | 968 | u64 general_int_mask; |