diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-30 22:22:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-30 22:22:43 -0400 |
commit | df597efb5737063497f1a4f7c996cc9aec294230 (patch) | |
tree | 17bb60f68ee299d9717038197a932501625f1621 /drivers/net/ixgbe | |
parent | a33bc5c15154c835aae26f16e6a3a7d9ad4acb45 (diff) | |
parent | 0a924578bc4a2823a95c151f56975c71f5c156bb (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-3945.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 11 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 42 |
3 files changed, 40 insertions, 15 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index dc3cc4348d1d..62b6c028ae81 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -96,6 +96,8 @@ | |||
96 | #define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000 | 96 | #define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000 |
97 | #define IXGBE_TX_FLAGS_VLAN_SHIFT 16 | 97 | #define IXGBE_TX_FLAGS_VLAN_SHIFT 16 |
98 | 98 | ||
99 | #define IXGBE_MAX_RSC_INT_RATE 162760 | ||
100 | |||
99 | /* wrapper around a pointer to a socket buffer, | 101 | /* wrapper around a pointer to a socket buffer, |
100 | * so a DMA handle can be stored along with the buffer */ | 102 | * so a DMA handle can be stored along with the buffer */ |
101 | struct ixgbe_tx_buffer { | 103 | struct ixgbe_tx_buffer { |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 1464b33f1b8e..c6db9a04187d 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -1980,7 +1980,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
1980 | * any other value means disable eitr, which is best | 1980 | * any other value means disable eitr, which is best |
1981 | * served by setting the interrupt rate very high | 1981 | * served by setting the interrupt rate very high |
1982 | */ | 1982 | */ |
1983 | adapter->eitr_param = IXGBE_MAX_INT_RATE; | 1983 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) |
1984 | adapter->eitr_param = IXGBE_MAX_RSC_INT_RATE; | ||
1985 | else | ||
1986 | adapter->eitr_param = IXGBE_MAX_INT_RATE; | ||
1984 | adapter->itr_setting = 0; | 1987 | adapter->itr_setting = 0; |
1985 | } | 1988 | } |
1986 | 1989 | ||
@@ -2004,13 +2007,13 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data) | |||
2004 | 2007 | ||
2005 | ethtool_op_set_flags(netdev, data); | 2008 | ethtool_op_set_flags(netdev, data); |
2006 | 2009 | ||
2007 | if (!(adapter->flags & IXGBE_FLAG2_RSC_CAPABLE)) | 2010 | if (!(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) |
2008 | return 0; | 2011 | return 0; |
2009 | 2012 | ||
2010 | /* if state changes we need to update adapter->flags and reset */ | 2013 | /* if state changes we need to update adapter->flags and reset */ |
2011 | if ((!!(data & ETH_FLAG_LRO)) != | 2014 | if ((!!(data & ETH_FLAG_LRO)) != |
2012 | (!!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED))) { | 2015 | (!!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))) { |
2013 | adapter->flags ^= IXGBE_FLAG2_RSC_ENABLED; | 2016 | adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED; |
2014 | if (netif_running(netdev)) | 2017 | if (netif_running(netdev)) |
2015 | ixgbe_reinit_locked(adapter); | 2018 | ixgbe_reinit_locked(adapter); |
2016 | else | 2019 | else |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 50709da922c7..44adc9862826 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -513,8 +513,11 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector, | |||
513 | * @skb: skb currently being received and modified | 513 | * @skb: skb currently being received and modified |
514 | **/ | 514 | **/ |
515 | static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, | 515 | static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, |
516 | u32 status_err, struct sk_buff *skb) | 516 | union ixgbe_adv_rx_desc *rx_desc, |
517 | struct sk_buff *skb) | ||
517 | { | 518 | { |
519 | u32 status_err = le32_to_cpu(rx_desc->wb.upper.status_error); | ||
520 | |||
518 | skb->ip_summed = CHECKSUM_NONE; | 521 | skb->ip_summed = CHECKSUM_NONE; |
519 | 522 | ||
520 | /* Rx csum disabled */ | 523 | /* Rx csum disabled */ |
@@ -532,6 +535,16 @@ static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, | |||
532 | return; | 535 | return; |
533 | 536 | ||
534 | if (status_err & IXGBE_RXDADV_ERR_TCPE) { | 537 | if (status_err & IXGBE_RXDADV_ERR_TCPE) { |
538 | u16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info; | ||
539 | |||
540 | /* | ||
541 | * 82599 errata, UDP frames with a 0 checksum can be marked as | ||
542 | * checksum errors. | ||
543 | */ | ||
544 | if ((pkt_info & IXGBE_RXDADV_PKTTYPE_UDP) && | ||
545 | (adapter->hw.mac.type == ixgbe_mac_82599EB)) | ||
546 | return; | ||
547 | |||
535 | adapter->hw_csum_rx_error++; | 548 | adapter->hw_csum_rx_error++; |
536 | return; | 549 | return; |
537 | } | 550 | } |
@@ -769,7 +782,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
769 | prefetch(next_rxd); | 782 | prefetch(next_rxd); |
770 | cleaned_count++; | 783 | cleaned_count++; |
771 | 784 | ||
772 | if (adapter->flags & IXGBE_FLAG2_RSC_CAPABLE) | 785 | if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) |
773 | rsc_count = ixgbe_get_rsc_count(rx_desc); | 786 | rsc_count = ixgbe_get_rsc_count(rx_desc); |
774 | 787 | ||
775 | if (rsc_count) { | 788 | if (rsc_count) { |
@@ -805,7 +818,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
805 | goto next_desc; | 818 | goto next_desc; |
806 | } | 819 | } |
807 | 820 | ||
808 | ixgbe_rx_checksum(adapter, staterr, skb); | 821 | ixgbe_rx_checksum(adapter, rx_desc, skb); |
809 | 822 | ||
810 | /* probably a little skewed due to removing CRC */ | 823 | /* probably a little skewed due to removing CRC */ |
811 | total_rx_bytes += skb->len; | 824 | total_rx_bytes += skb->len; |
@@ -2025,7 +2038,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
2025 | IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); | 2038 | IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); |
2026 | } | 2039 | } |
2027 | } else { | 2040 | } else { |
2028 | if (!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED) && | 2041 | if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) && |
2029 | (netdev->mtu <= ETH_DATA_LEN)) | 2042 | (netdev->mtu <= ETH_DATA_LEN)) |
2030 | rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE; | 2043 | rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE; |
2031 | else | 2044 | else |
@@ -2154,7 +2167,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
2154 | IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); | 2167 | IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); |
2155 | } | 2168 | } |
2156 | 2169 | ||
2157 | if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) { | 2170 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { |
2158 | /* Enable 82599 HW-RSC */ | 2171 | /* Enable 82599 HW-RSC */ |
2159 | for (i = 0; i < adapter->num_rx_queues; i++) { | 2172 | for (i = 0; i < adapter->num_rx_queues; i++) { |
2160 | j = adapter->rx_ring[i].reg_idx; | 2173 | j = adapter->rx_ring[i].reg_idx; |
@@ -3801,8 +3814,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) | |||
3801 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598; | 3814 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598; |
3802 | } else if (hw->mac.type == ixgbe_mac_82599EB) { | 3815 | } else if (hw->mac.type == ixgbe_mac_82599EB) { |
3803 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599; | 3816 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599; |
3804 | adapter->flags |= IXGBE_FLAG2_RSC_CAPABLE; | 3817 | adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE; |
3805 | adapter->flags |= IXGBE_FLAG2_RSC_ENABLED; | 3818 | adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED; |
3806 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; | 3819 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; |
3807 | adapter->ring_feature[RING_F_FDIR].indices = | 3820 | adapter->ring_feature[RING_F_FDIR].indices = |
3808 | IXGBE_MAX_FDIR_INDICES; | 3821 | IXGBE_MAX_FDIR_INDICES; |
@@ -5349,12 +5362,19 @@ static int ixgbe_del_sanmac_netdev(struct net_device *dev) | |||
5349 | static void ixgbe_netpoll(struct net_device *netdev) | 5362 | static void ixgbe_netpoll(struct net_device *netdev) |
5350 | { | 5363 | { |
5351 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 5364 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
5365 | int i; | ||
5352 | 5366 | ||
5353 | disable_irq(adapter->pdev->irq); | ||
5354 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; | 5367 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; |
5355 | ixgbe_intr(adapter->pdev->irq, netdev); | 5368 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { |
5369 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; | ||
5370 | for (i = 0; i < num_q_vectors; i++) { | ||
5371 | struct ixgbe_q_vector *q_vector = adapter->q_vector[i]; | ||
5372 | ixgbe_msix_clean_many(0, q_vector); | ||
5373 | } | ||
5374 | } else { | ||
5375 | ixgbe_intr(adapter->pdev->irq, netdev); | ||
5376 | } | ||
5356 | adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL; | 5377 | adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL; |
5357 | enable_irq(adapter->pdev->irq); | ||
5358 | } | 5378 | } |
5359 | #endif | 5379 | #endif |
5360 | 5380 | ||
@@ -5600,7 +5620,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
5600 | if (pci_using_dac) | 5620 | if (pci_using_dac) |
5601 | netdev->features |= NETIF_F_HIGHDMA; | 5621 | netdev->features |= NETIF_F_HIGHDMA; |
5602 | 5622 | ||
5603 | if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) | 5623 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) |
5604 | netdev->features |= NETIF_F_LRO; | 5624 | netdev->features |= NETIF_F_LRO; |
5605 | 5625 | ||
5606 | /* make sure the EEPROM is good */ | 5626 | /* make sure the EEPROM is good */ |