diff options
author | Tony Lindgren <tony@atomide.com> | 2010-02-17 17:08:58 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-17 17:08:58 -0500 |
commit | 80c20d543d142ee54ec85259b77aaf0b83c32db5 (patch) | |
tree | 364017b2c001939bbb645dcc20d565c1f71b13a8 /drivers/net | |
parent | d6a2d9b800276140abf352908abbd0c240890692 (diff) | |
parent | b72c7d543589736d43da531566490dd31572f5ca (diff) |
Merge branch 'omap-fixes-for-linus' into omap-for-linus
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ax88796.c | 2 | ||||
-rw-r--r-- | drivers/net/cxgb3/sge.c | 20 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 20 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 7 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 4 | ||||
-rw-r--r-- | drivers/net/sky2.c | 8 |
6 files changed, 29 insertions, 32 deletions
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c index 62d9c9cc5671..1dd4403247ca 100644 --- a/drivers/net/ax88796.c +++ b/drivers/net/ax88796.c | |||
@@ -921,7 +921,7 @@ static int ax_probe(struct platform_device *pdev) | |||
921 | size = (res->end - res->start) + 1; | 921 | size = (res->end - res->start) + 1; |
922 | 922 | ||
923 | ax->mem2 = request_mem_region(res->start, size, pdev->name); | 923 | ax->mem2 = request_mem_region(res->start, size, pdev->name); |
924 | if (ax->mem == NULL) { | 924 | if (ax->mem2 == NULL) { |
925 | dev_err(&pdev->dev, "cannot reserve registers\n"); | 925 | dev_err(&pdev->dev, "cannot reserve registers\n"); |
926 | ret = -ENXIO; | 926 | ret = -ENXIO; |
927 | goto exit_mem1; | 927 | goto exit_mem1; |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index bdbd14727e4b..318a018ca7c5 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -2079,6 +2079,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, | |||
2079 | struct sge_fl *fl, int len, int complete) | 2079 | struct sge_fl *fl, int len, int complete) |
2080 | { | 2080 | { |
2081 | struct rx_sw_desc *sd = &fl->sdesc[fl->cidx]; | 2081 | struct rx_sw_desc *sd = &fl->sdesc[fl->cidx]; |
2082 | struct port_info *pi = netdev_priv(qs->netdev); | ||
2082 | struct sk_buff *skb = NULL; | 2083 | struct sk_buff *skb = NULL; |
2083 | struct cpl_rx_pkt *cpl; | 2084 | struct cpl_rx_pkt *cpl; |
2084 | struct skb_frag_struct *rx_frag; | 2085 | struct skb_frag_struct *rx_frag; |
@@ -2116,11 +2117,18 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, | |||
2116 | 2117 | ||
2117 | if (!nr_frags) { | 2118 | if (!nr_frags) { |
2118 | offset = 2 + sizeof(struct cpl_rx_pkt); | 2119 | offset = 2 + sizeof(struct cpl_rx_pkt); |
2119 | qs->lro_va = sd->pg_chunk.va + 2; | 2120 | cpl = qs->lro_va = sd->pg_chunk.va + 2; |
2120 | } | ||
2121 | len -= offset; | ||
2122 | 2121 | ||
2123 | prefetch(qs->lro_va); | 2122 | if ((pi->rx_offload & T3_RX_CSUM) && |
2123 | cpl->csum_valid && cpl->csum == htons(0xffff)) { | ||
2124 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
2125 | qs->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++; | ||
2126 | } else | ||
2127 | skb->ip_summed = CHECKSUM_NONE; | ||
2128 | } else | ||
2129 | cpl = qs->lro_va; | ||
2130 | |||
2131 | len -= offset; | ||
2124 | 2132 | ||
2125 | rx_frag += nr_frags; | 2133 | rx_frag += nr_frags; |
2126 | rx_frag->page = sd->pg_chunk.page; | 2134 | rx_frag->page = sd->pg_chunk.page; |
@@ -2136,12 +2144,8 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, | |||
2136 | return; | 2144 | return; |
2137 | 2145 | ||
2138 | skb_record_rx_queue(skb, qs - &adap->sge.qs[0]); | 2146 | skb_record_rx_queue(skb, qs - &adap->sge.qs[0]); |
2139 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
2140 | cpl = qs->lro_va; | ||
2141 | 2147 | ||
2142 | if (unlikely(cpl->vlan_valid)) { | 2148 | if (unlikely(cpl->vlan_valid)) { |
2143 | struct net_device *dev = qs->netdev; | ||
2144 | struct port_info *pi = netdev_priv(dev); | ||
2145 | struct vlan_group *grp = pi->vlan_grp; | 2149 | struct vlan_group *grp = pi->vlan_grp; |
2146 | 2150 | ||
2147 | if (likely(grp != NULL)) { | 2151 | if (likely(grp != NULL)) { |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 997124d2992a..c881347cb26d 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -421,6 +421,8 @@ static void igb_assign_vector(struct igb_q_vector *q_vector, int msix_vector) | |||
421 | msixbm = E1000_EICR_RX_QUEUE0 << rx_queue; | 421 | msixbm = E1000_EICR_RX_QUEUE0 << rx_queue; |
422 | if (tx_queue > IGB_N0_QUEUE) | 422 | if (tx_queue > IGB_N0_QUEUE) |
423 | msixbm |= E1000_EICR_TX_QUEUE0 << tx_queue; | 423 | msixbm |= E1000_EICR_TX_QUEUE0 << tx_queue; |
424 | if (!adapter->msix_entries && msix_vector == 0) | ||
425 | msixbm |= E1000_EIMS_OTHER; | ||
424 | array_wr32(E1000_MSIXBM(0), msix_vector, msixbm); | 426 | array_wr32(E1000_MSIXBM(0), msix_vector, msixbm); |
425 | q_vector->eims_value = msixbm; | 427 | q_vector->eims_value = msixbm; |
426 | break; | 428 | break; |
@@ -877,7 +879,6 @@ static int igb_request_irq(struct igb_adapter *adapter) | |||
877 | { | 879 | { |
878 | struct net_device *netdev = adapter->netdev; | 880 | struct net_device *netdev = adapter->netdev; |
879 | struct pci_dev *pdev = adapter->pdev; | 881 | struct pci_dev *pdev = adapter->pdev; |
880 | struct e1000_hw *hw = &adapter->hw; | ||
881 | int err = 0; | 882 | int err = 0; |
882 | 883 | ||
883 | if (adapter->msix_entries) { | 884 | if (adapter->msix_entries) { |
@@ -909,20 +910,7 @@ static int igb_request_irq(struct igb_adapter *adapter) | |||
909 | igb_setup_all_tx_resources(adapter); | 910 | igb_setup_all_tx_resources(adapter); |
910 | igb_setup_all_rx_resources(adapter); | 911 | igb_setup_all_rx_resources(adapter); |
911 | } else { | 912 | } else { |
912 | switch (hw->mac.type) { | 913 | igb_assign_vector(adapter->q_vector[0], 0); |
913 | case e1000_82575: | ||
914 | wr32(E1000_MSIXBM(0), | ||
915 | (E1000_EICR_RX_QUEUE0 | | ||
916 | E1000_EICR_TX_QUEUE0 | | ||
917 | E1000_EIMS_OTHER)); | ||
918 | break; | ||
919 | case e1000_82580: | ||
920 | case e1000_82576: | ||
921 | wr32(E1000_IVAR0, E1000_IVAR_VALID); | ||
922 | break; | ||
923 | default: | ||
924 | break; | ||
925 | } | ||
926 | } | 914 | } |
927 | 915 | ||
928 | if (adapter->flags & IGB_FLAG_HAS_MSI) { | 916 | if (adapter->flags & IGB_FLAG_HAS_MSI) { |
@@ -1140,6 +1128,8 @@ int igb_up(struct igb_adapter *adapter) | |||
1140 | } | 1128 | } |
1141 | if (adapter->msix_entries) | 1129 | if (adapter->msix_entries) |
1142 | igb_configure_msix(adapter); | 1130 | igb_configure_msix(adapter); |
1131 | else | ||
1132 | igb_assign_vector(adapter->q_vector[0], 0); | ||
1143 | 1133 | ||
1144 | /* Clear any pending interrupts. */ | 1134 | /* Clear any pending interrupts. */ |
1145 | rd32(E1000_ICR); | 1135 | rd32(E1000_ICR); |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index b5f64ad67975..7b7c8486c0bf 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5179,7 +5179,7 @@ dma_error: | |||
5179 | ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); | 5179 | ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); |
5180 | } | 5180 | } |
5181 | 5181 | ||
5182 | return count; | 5182 | return 0; |
5183 | } | 5183 | } |
5184 | 5184 | ||
5185 | static void ixgbe_tx_queue(struct ixgbe_adapter *adapter, | 5185 | static void ixgbe_tx_queue(struct ixgbe_adapter *adapter, |
@@ -5329,8 +5329,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
5329 | struct ixgbe_adapter *adapter = netdev_priv(dev); | 5329 | struct ixgbe_adapter *adapter = netdev_priv(dev); |
5330 | int txq = smp_processor_id(); | 5330 | int txq = smp_processor_id(); |
5331 | 5331 | ||
5332 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) | 5332 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) { |
5333 | while (unlikely(txq >= dev->real_num_tx_queues)) | ||
5334 | txq -= dev->real_num_tx_queues; | ||
5333 | return txq; | 5335 | return txq; |
5336 | } | ||
5334 | 5337 | ||
5335 | #ifdef IXGBE_FCOE | 5338 | #ifdef IXGBE_FCOE |
5336 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | 5339 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 9f9d6081959b..24279e6e55f5 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1941,7 +1941,7 @@ static void netxen_tx_timeout_task(struct work_struct *work) | |||
1941 | netif_wake_queue(adapter->netdev); | 1941 | netif_wake_queue(adapter->netdev); |
1942 | 1942 | ||
1943 | clear_bit(__NX_RESETTING, &adapter->state); | 1943 | clear_bit(__NX_RESETTING, &adapter->state); |
1944 | 1944 | return; | |
1945 | } else { | 1945 | } else { |
1946 | clear_bit(__NX_RESETTING, &adapter->state); | 1946 | clear_bit(__NX_RESETTING, &adapter->state); |
1947 | if (!netxen_nic_reset_context(adapter)) { | 1947 | if (!netxen_nic_reset_context(adapter)) { |
@@ -2240,7 +2240,9 @@ netxen_detach_work(struct work_struct *work) | |||
2240 | 2240 | ||
2241 | netxen_nic_down(adapter, netdev); | 2241 | netxen_nic_down(adapter, netdev); |
2242 | 2242 | ||
2243 | rtnl_lock(); | ||
2243 | netxen_nic_detach(adapter); | 2244 | netxen_nic_detach(adapter); |
2245 | rtnl_unlock(); | ||
2244 | 2246 | ||
2245 | status = NXRD32(adapter, NETXEN_PEG_HALT_STATUS1); | 2247 | status = NXRD32(adapter, NETXEN_PEG_HALT_STATUS1); |
2246 | 2248 | ||
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index d760650c5c04..67249c3c9f50 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1025,11 +1025,8 @@ static void sky2_prefetch_init(struct sky2_hw *hw, u32 qaddr, | |||
1025 | static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2, u16 *slot) | 1025 | static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2, u16 *slot) |
1026 | { | 1026 | { |
1027 | struct sky2_tx_le *le = sky2->tx_le + *slot; | 1027 | struct sky2_tx_le *le = sky2->tx_le + *slot; |
1028 | struct tx_ring_info *re = sky2->tx_ring + *slot; | ||
1029 | 1028 | ||
1030 | *slot = RING_NEXT(*slot, sky2->tx_ring_size); | 1029 | *slot = RING_NEXT(*slot, sky2->tx_ring_size); |
1031 | re->flags = 0; | ||
1032 | re->skb = NULL; | ||
1033 | le->ctrl = 0; | 1030 | le->ctrl = 0; |
1034 | return le; | 1031 | return le; |
1035 | } | 1032 | } |
@@ -1622,8 +1619,7 @@ static unsigned tx_le_req(const struct sk_buff *skb) | |||
1622 | return count; | 1619 | return count; |
1623 | } | 1620 | } |
1624 | 1621 | ||
1625 | static void sky2_tx_unmap(struct pci_dev *pdev, | 1622 | static void sky2_tx_unmap(struct pci_dev *pdev, struct tx_ring_info *re) |
1626 | const struct tx_ring_info *re) | ||
1627 | { | 1623 | { |
1628 | if (re->flags & TX_MAP_SINGLE) | 1624 | if (re->flags & TX_MAP_SINGLE) |
1629 | pci_unmap_single(pdev, pci_unmap_addr(re, mapaddr), | 1625 | pci_unmap_single(pdev, pci_unmap_addr(re, mapaddr), |
@@ -1633,6 +1629,7 @@ static void sky2_tx_unmap(struct pci_dev *pdev, | |||
1633 | pci_unmap_page(pdev, pci_unmap_addr(re, mapaddr), | 1629 | pci_unmap_page(pdev, pci_unmap_addr(re, mapaddr), |
1634 | pci_unmap_len(re, maplen), | 1630 | pci_unmap_len(re, maplen), |
1635 | PCI_DMA_TODEVICE); | 1631 | PCI_DMA_TODEVICE); |
1632 | re->flags = 0; | ||
1636 | } | 1633 | } |
1637 | 1634 | ||
1638 | /* | 1635 | /* |
@@ -1839,6 +1836,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done) | |||
1839 | dev->stats.tx_packets++; | 1836 | dev->stats.tx_packets++; |
1840 | dev->stats.tx_bytes += skb->len; | 1837 | dev->stats.tx_bytes += skb->len; |
1841 | 1838 | ||
1839 | re->skb = NULL; | ||
1842 | dev_kfree_skb_any(skb); | 1840 | dev_kfree_skb_any(skb); |
1843 | 1841 | ||
1844 | sky2->tx_next = RING_NEXT(idx, sky2->tx_ring_size); | 1842 | sky2->tx_next = RING_NEXT(idx, sky2->tx_ring_size); |