diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-02-25 03:40:22 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-25 03:40:26 -0500 |
commit | 996de8c6fe95c5a9fc524241cc8f142ef0605d3d (patch) | |
tree | 0f637ab0d80d6d7e213707ac2d8c1cc16b69523c /drivers/net | |
parent | 017c426138122c8e9b9f5057fbd0567c37b35247 (diff) | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) |
Merge commit 'v2.6.33' into core/rcu
Merge reason: Update from -rc4 to -final.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/net')
95 files changed, 676 insertions, 398 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/benet/be.h b/drivers/net/benet/be.h index 9fd8e5ecd5d7..5bc74590c73e 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -276,8 +276,13 @@ struct be_adapter { | |||
276 | int link_speed; | 276 | int link_speed; |
277 | u8 port_type; | 277 | u8 port_type; |
278 | u8 transceiver; | 278 | u8 transceiver; |
279 | u8 generation; /* BladeEngine ASIC generation */ | ||
279 | }; | 280 | }; |
280 | 281 | ||
282 | /* BladeEngine Generation numbers */ | ||
283 | #define BE_GEN2 2 | ||
284 | #define BE_GEN3 3 | ||
285 | |||
281 | extern const struct ethtool_ops be_ethtool_ops; | 286 | extern const struct ethtool_ops be_ethtool_ops; |
282 | 287 | ||
283 | #define drvr_stats(adapter) (&adapter->stats.drvr_stats) | 288 | #define drvr_stats(adapter) (&adapter->stats.drvr_stats) |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 102ade134165..006cb2efcd22 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -286,7 +286,7 @@ static void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, | |||
286 | MCC_WRB_SGE_CNT_SHIFT; | 286 | MCC_WRB_SGE_CNT_SHIFT; |
287 | wrb->payload_length = payload_len; | 287 | wrb->payload_length = payload_len; |
288 | wrb->tag0 = opcode; | 288 | wrb->tag0 = opcode; |
289 | be_dws_cpu_to_le(wrb, 20); | 289 | be_dws_cpu_to_le(wrb, 8); |
290 | } | 290 | } |
291 | 291 | ||
292 | /* Don't touch the hdr after it's prepared */ | 292 | /* Don't touch the hdr after it's prepared */ |
@@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, | |||
296 | req_hdr->opcode = opcode; | 296 | req_hdr->opcode = opcode; |
297 | req_hdr->subsystem = subsystem; | 297 | req_hdr->subsystem = subsystem; |
298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); | 298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); |
299 | req_hdr->version = 0; | ||
299 | } | 300 | } |
300 | 301 | ||
301 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, | 302 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, |
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h index c002b8391b4d..13b33c841083 100644 --- a/drivers/net/benet/be_cmds.h +++ b/drivers/net/benet/be_cmds.h | |||
@@ -164,7 +164,8 @@ struct be_cmd_req_hdr { | |||
164 | u8 domain; /* dword 0 */ | 164 | u8 domain; /* dword 0 */ |
165 | u32 timeout; /* dword 1 */ | 165 | u32 timeout; /* dword 1 */ |
166 | u32 request_length; /* dword 2 */ | 166 | u32 request_length; /* dword 2 */ |
167 | u32 rsvd; /* dword 3 */ | 167 | u8 version; /* dword 3 */ |
168 | u8 rsvd[3]; /* dword 3 */ | ||
168 | }; | 169 | }; |
169 | 170 | ||
170 | #define RESP_HDR_INFO_OPCODE_SHIFT 0 /* bits 0 - 7 */ | 171 | #define RESP_HDR_INFO_OPCODE_SHIFT 0 /* bits 0 - 7 */ |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 3a1f7902c16d..626b76c0ebc7 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -910,7 +910,7 @@ static inline struct page *be_alloc_pages(u32 size) | |||
910 | static void be_post_rx_frags(struct be_adapter *adapter) | 910 | static void be_post_rx_frags(struct be_adapter *adapter) |
911 | { | 911 | { |
912 | struct be_rx_page_info *page_info_tbl = adapter->rx_obj.page_info_tbl; | 912 | struct be_rx_page_info *page_info_tbl = adapter->rx_obj.page_info_tbl; |
913 | struct be_rx_page_info *page_info = NULL; | 913 | struct be_rx_page_info *page_info = NULL, *prev_page_info = NULL; |
914 | struct be_queue_info *rxq = &adapter->rx_obj.q; | 914 | struct be_queue_info *rxq = &adapter->rx_obj.q; |
915 | struct page *pagep = NULL; | 915 | struct page *pagep = NULL; |
916 | struct be_eth_rx_d *rxd; | 916 | struct be_eth_rx_d *rxd; |
@@ -941,7 +941,6 @@ static void be_post_rx_frags(struct be_adapter *adapter) | |||
941 | rxd = queue_head_node(rxq); | 941 | rxd = queue_head_node(rxq); |
942 | rxd->fragpa_lo = cpu_to_le32(frag_dmaaddr & 0xFFFFFFFF); | 942 | rxd->fragpa_lo = cpu_to_le32(frag_dmaaddr & 0xFFFFFFFF); |
943 | rxd->fragpa_hi = cpu_to_le32(upper_32_bits(frag_dmaaddr)); | 943 | rxd->fragpa_hi = cpu_to_le32(upper_32_bits(frag_dmaaddr)); |
944 | queue_head_inc(rxq); | ||
945 | 944 | ||
946 | /* Any space left in the current big page for another frag? */ | 945 | /* Any space left in the current big page for another frag? */ |
947 | if ((page_offset + rx_frag_size + rx_frag_size) > | 946 | if ((page_offset + rx_frag_size + rx_frag_size) > |
@@ -949,10 +948,13 @@ static void be_post_rx_frags(struct be_adapter *adapter) | |||
949 | pagep = NULL; | 948 | pagep = NULL; |
950 | page_info->last_page_user = true; | 949 | page_info->last_page_user = true; |
951 | } | 950 | } |
951 | |||
952 | prev_page_info = page_info; | ||
953 | queue_head_inc(rxq); | ||
952 | page_info = &page_info_tbl[rxq->head]; | 954 | page_info = &page_info_tbl[rxq->head]; |
953 | } | 955 | } |
954 | if (pagep) | 956 | if (pagep) |
955 | page_info->last_page_user = true; | 957 | prev_page_info->last_page_user = true; |
956 | 958 | ||
957 | if (posted) { | 959 | if (posted) { |
958 | atomic_add(posted, &rxq->used); | 960 | atomic_add(posted, &rxq->used); |
@@ -1348,7 +1350,7 @@ static irqreturn_t be_intx(int irq, void *dev) | |||
1348 | int isr; | 1350 | int isr; |
1349 | 1351 | ||
1350 | isr = ioread32(adapter->csr + CEV_ISR0_OFFSET + | 1352 | isr = ioread32(adapter->csr + CEV_ISR0_OFFSET + |
1351 | be_pci_func(adapter) * CEV_ISR_SIZE); | 1353 | (adapter->tx_eq.q.id/ 8) * CEV_ISR_SIZE); |
1352 | if (!isr) | 1354 | if (!isr) |
1353 | return IRQ_NONE; | 1355 | return IRQ_NONE; |
1354 | 1356 | ||
@@ -2049,6 +2051,7 @@ static void be_unmap_pci_bars(struct be_adapter *adapter) | |||
2049 | static int be_map_pci_bars(struct be_adapter *adapter) | 2051 | static int be_map_pci_bars(struct be_adapter *adapter) |
2050 | { | 2052 | { |
2051 | u8 __iomem *addr; | 2053 | u8 __iomem *addr; |
2054 | int pcicfg_reg; | ||
2052 | 2055 | ||
2053 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2), | 2056 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2), |
2054 | pci_resource_len(adapter->pdev, 2)); | 2057 | pci_resource_len(adapter->pdev, 2)); |
@@ -2062,8 +2065,13 @@ static int be_map_pci_bars(struct be_adapter *adapter) | |||
2062 | goto pci_map_err; | 2065 | goto pci_map_err; |
2063 | adapter->db = addr; | 2066 | adapter->db = addr; |
2064 | 2067 | ||
2065 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 1), | 2068 | if (adapter->generation == BE_GEN2) |
2066 | pci_resource_len(adapter->pdev, 1)); | 2069 | pcicfg_reg = 1; |
2070 | else | ||
2071 | pcicfg_reg = 0; | ||
2072 | |||
2073 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, pcicfg_reg), | ||
2074 | pci_resource_len(adapter->pdev, pcicfg_reg)); | ||
2067 | if (addr == NULL) | 2075 | if (addr == NULL) |
2068 | goto pci_map_err; | 2076 | goto pci_map_err; |
2069 | adapter->pcicfg = addr; | 2077 | adapter->pcicfg = addr; |
@@ -2160,6 +2168,7 @@ static int be_stats_init(struct be_adapter *adapter) | |||
2160 | cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma); | 2168 | cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma); |
2161 | if (cmd->va == NULL) | 2169 | if (cmd->va == NULL) |
2162 | return -1; | 2170 | return -1; |
2171 | memset(cmd->va, 0, cmd->size); | ||
2163 | return 0; | 2172 | return 0; |
2164 | } | 2173 | } |
2165 | 2174 | ||
@@ -2238,6 +2247,20 @@ static int __devinit be_probe(struct pci_dev *pdev, | |||
2238 | goto rel_reg; | 2247 | goto rel_reg; |
2239 | } | 2248 | } |
2240 | adapter = netdev_priv(netdev); | 2249 | adapter = netdev_priv(netdev); |
2250 | |||
2251 | switch (pdev->device) { | ||
2252 | case BE_DEVICE_ID1: | ||
2253 | case OC_DEVICE_ID1: | ||
2254 | adapter->generation = BE_GEN2; | ||
2255 | break; | ||
2256 | case BE_DEVICE_ID2: | ||
2257 | case OC_DEVICE_ID2: | ||
2258 | adapter->generation = BE_GEN3; | ||
2259 | break; | ||
2260 | default: | ||
2261 | adapter->generation = 0; | ||
2262 | } | ||
2263 | |||
2241 | adapter->pdev = pdev; | 2264 | adapter->pdev = pdev; |
2242 | pci_set_drvdata(pdev, adapter); | 2265 | pci_set_drvdata(pdev, adapter); |
2243 | adapter->netdev = netdev; | 2266 | adapter->netdev = netdev; |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 8ffea3990d07..0b23bc4f56c6 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/dma.h> | 33 | #include <asm/dma.h> |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | 35 | ||
36 | #include <asm/dpmc.h> | ||
36 | #include <asm/blackfin.h> | 37 | #include <asm/blackfin.h> |
37 | #include <asm/cacheflush.h> | 38 | #include <asm/cacheflush.h> |
38 | #include <asm/portmux.h> | 39 | #include <asm/portmux.h> |
@@ -386,8 +387,8 @@ static int mii_probe(struct net_device *dev) | |||
386 | u32 sclk, mdc_div; | 387 | u32 sclk, mdc_div; |
387 | 388 | ||
388 | /* Enable PHY output early */ | 389 | /* Enable PHY output early */ |
389 | if (!(bfin_read_VR_CTL() & PHYCLKOE)) | 390 | if (!(bfin_read_VR_CTL() & CLKBUFOE)) |
390 | bfin_write_VR_CTL(bfin_read_VR_CTL() | PHYCLKOE); | 391 | bfin_write_VR_CTL(bfin_read_VR_CTL() | CLKBUFOE); |
391 | 392 | ||
392 | sclk = get_sclk(); | 393 | sclk = get_sclk(); |
393 | mdc_div = ((sclk / MDC_CLK) / 2) - 1; | 394 | mdc_div = ((sclk / MDC_CLK) / 2) - 1; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3f0071cfe56b..efa0e41bf3ec 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3639,7 +3639,7 @@ static int bond_open(struct net_device *bond_dev) | |||
3639 | */ | 3639 | */ |
3640 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { | 3640 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { |
3641 | /* something went wrong - fail the open operation */ | 3641 | /* something went wrong - fail the open operation */ |
3642 | return -1; | 3642 | return -ENOMEM; |
3643 | } | 3643 | } |
3644 | 3644 | ||
3645 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); | 3645 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); |
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/e1000/e1000.h b/drivers/net/e1000/e1000.h index 2a567df3ea71..e8932db7ee77 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -326,6 +326,8 @@ struct e1000_adapter { | |||
326 | /* for ioport free */ | 326 | /* for ioport free */ |
327 | int bars; | 327 | int bars; |
328 | int need_ioport; | 328 | int need_ioport; |
329 | |||
330 | bool discarding; | ||
329 | }; | 331 | }; |
330 | 332 | ||
331 | enum e1000_state_t { | 333 | enum e1000_state_t { |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 7e855f9bbd97..765543663a4f 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -1698,18 +1698,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter) | |||
1698 | rctl &= ~E1000_RCTL_SZ_4096; | 1698 | rctl &= ~E1000_RCTL_SZ_4096; |
1699 | rctl |= E1000_RCTL_BSEX; | 1699 | rctl |= E1000_RCTL_BSEX; |
1700 | switch (adapter->rx_buffer_len) { | 1700 | switch (adapter->rx_buffer_len) { |
1701 | case E1000_RXBUFFER_256: | ||
1702 | rctl |= E1000_RCTL_SZ_256; | ||
1703 | rctl &= ~E1000_RCTL_BSEX; | ||
1704 | break; | ||
1705 | case E1000_RXBUFFER_512: | ||
1706 | rctl |= E1000_RCTL_SZ_512; | ||
1707 | rctl &= ~E1000_RCTL_BSEX; | ||
1708 | break; | ||
1709 | case E1000_RXBUFFER_1024: | ||
1710 | rctl |= E1000_RCTL_SZ_1024; | ||
1711 | rctl &= ~E1000_RCTL_BSEX; | ||
1712 | break; | ||
1713 | case E1000_RXBUFFER_2048: | 1701 | case E1000_RXBUFFER_2048: |
1714 | default: | 1702 | default: |
1715 | rctl |= E1000_RCTL_SZ_2048; | 1703 | rctl |= E1000_RCTL_SZ_2048; |
@@ -2802,13 +2790,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter, | |||
2802 | dma_error: | 2790 | dma_error: |
2803 | dev_err(&pdev->dev, "TX DMA map failed\n"); | 2791 | dev_err(&pdev->dev, "TX DMA map failed\n"); |
2804 | buffer_info->dma = 0; | 2792 | buffer_info->dma = 0; |
2805 | count--; | 2793 | if (count) |
2806 | |||
2807 | while (count >= 0) { | ||
2808 | count--; | 2794 | count--; |
2809 | i--; | 2795 | |
2810 | if (i < 0) | 2796 | while (count--) { |
2797 | if (i==0) | ||
2811 | i += tx_ring->count; | 2798 | i += tx_ring->count; |
2799 | i--; | ||
2812 | buffer_info = &tx_ring->buffer_info[i]; | 2800 | buffer_info = &tx_ring->buffer_info[i]; |
2813 | e1000_unmap_and_free_tx_resource(adapter, buffer_info); | 2801 | e1000_unmap_and_free_tx_resource(adapter, buffer_info); |
2814 | } | 2802 | } |
@@ -3176,13 +3164,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu) | |||
3176 | * however with the new *_jumbo_rx* routines, jumbo receives will use | 3164 | * however with the new *_jumbo_rx* routines, jumbo receives will use |
3177 | * fragmented skbs */ | 3165 | * fragmented skbs */ |
3178 | 3166 | ||
3179 | if (max_frame <= E1000_RXBUFFER_256) | 3167 | if (max_frame <= E1000_RXBUFFER_2048) |
3180 | adapter->rx_buffer_len = E1000_RXBUFFER_256; | ||
3181 | else if (max_frame <= E1000_RXBUFFER_512) | ||
3182 | adapter->rx_buffer_len = E1000_RXBUFFER_512; | ||
3183 | else if (max_frame <= E1000_RXBUFFER_1024) | ||
3184 | adapter->rx_buffer_len = E1000_RXBUFFER_1024; | ||
3185 | else if (max_frame <= E1000_RXBUFFER_2048) | ||
3186 | adapter->rx_buffer_len = E1000_RXBUFFER_2048; | 3168 | adapter->rx_buffer_len = E1000_RXBUFFER_2048; |
3187 | else | 3169 | else |
3188 | #if (PAGE_SIZE >= E1000_RXBUFFER_16384) | 3170 | #if (PAGE_SIZE >= E1000_RXBUFFER_16384) |
@@ -3850,13 +3832,22 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
3850 | 3832 | ||
3851 | length = le16_to_cpu(rx_desc->length); | 3833 | length = le16_to_cpu(rx_desc->length); |
3852 | /* !EOP means multiple descriptors were used to store a single | 3834 | /* !EOP means multiple descriptors were used to store a single |
3853 | * packet, also make sure the frame isn't just CRC only */ | 3835 | * packet, if thats the case we need to toss it. In fact, we |
3854 | if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) { | 3836 | * to toss every packet with the EOP bit clear and the next |
3837 | * frame that _does_ have the EOP bit set, as it is by | ||
3838 | * definition only a frame fragment | ||
3839 | */ | ||
3840 | if (unlikely(!(status & E1000_RXD_STAT_EOP))) | ||
3841 | adapter->discarding = true; | ||
3842 | |||
3843 | if (adapter->discarding) { | ||
3855 | /* All receives must fit into a single buffer */ | 3844 | /* All receives must fit into a single buffer */ |
3856 | E1000_DBG("%s: Receive packet consumed multiple" | 3845 | E1000_DBG("%s: Receive packet consumed multiple" |
3857 | " buffers\n", netdev->name); | 3846 | " buffers\n", netdev->name); |
3858 | /* recycle */ | 3847 | /* recycle */ |
3859 | buffer_info->skb = skb; | 3848 | buffer_info->skb = skb; |
3849 | if (status & E1000_RXD_STAT_EOP) | ||
3850 | adapter->discarding = false; | ||
3860 | goto next_desc; | 3851 | goto next_desc; |
3861 | } | 3852 | } |
3862 | 3853 | ||
@@ -4015,11 +4006,21 @@ check_page: | |||
4015 | } | 4006 | } |
4016 | } | 4007 | } |
4017 | 4008 | ||
4018 | if (!buffer_info->dma) | 4009 | if (!buffer_info->dma) { |
4019 | buffer_info->dma = pci_map_page(pdev, | 4010 | buffer_info->dma = pci_map_page(pdev, |
4020 | buffer_info->page, 0, | 4011 | buffer_info->page, 0, |
4021 | buffer_info->length, | 4012 | buffer_info->length, |
4022 | PCI_DMA_FROMDEVICE); | 4013 | PCI_DMA_FROMDEVICE); |
4014 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) { | ||
4015 | put_page(buffer_info->page); | ||
4016 | dev_kfree_skb(skb); | ||
4017 | buffer_info->page = NULL; | ||
4018 | buffer_info->skb = NULL; | ||
4019 | buffer_info->dma = 0; | ||
4020 | adapter->alloc_rx_buff_failed++; | ||
4021 | break; /* while !buffer_info->skb */ | ||
4022 | } | ||
4023 | } | ||
4023 | 4024 | ||
4024 | rx_desc = E1000_RX_DESC(*rx_ring, i); | 4025 | rx_desc = E1000_RX_DESC(*rx_ring, i); |
4025 | rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); | 4026 | rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); |
@@ -4110,6 +4111,13 @@ map_skb: | |||
4110 | skb->data, | 4111 | skb->data, |
4111 | buffer_info->length, | 4112 | buffer_info->length, |
4112 | PCI_DMA_FROMDEVICE); | 4113 | PCI_DMA_FROMDEVICE); |
4114 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) { | ||
4115 | dev_kfree_skb(skb); | ||
4116 | buffer_info->skb = NULL; | ||
4117 | buffer_info->dma = 0; | ||
4118 | adapter->alloc_rx_buff_failed++; | ||
4119 | break; /* while !buffer_info->skb */ | ||
4120 | } | ||
4113 | 4121 | ||
4114 | /* | 4122 | /* |
4115 | * XXX if it was allocated cleanly it will never map to a | 4123 | * XXX if it was allocated cleanly it will never map to a |
diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h index cebbd9079d53..d236efaf7478 100644 --- a/drivers/net/e1000e/e1000.h +++ b/drivers/net/e1000e/e1000.h | |||
@@ -421,6 +421,7 @@ struct e1000_info { | |||
421 | /* CRC Stripping defines */ | 421 | /* CRC Stripping defines */ |
422 | #define FLAG2_CRC_STRIPPING (1 << 0) | 422 | #define FLAG2_CRC_STRIPPING (1 << 0) |
423 | #define FLAG2_HAS_PHY_WAKEUP (1 << 1) | 423 | #define FLAG2_HAS_PHY_WAKEUP (1 << 1) |
424 | #define FLAG2_IS_DISCARDING (1 << 2) | ||
424 | 425 | ||
425 | #define E1000_RX_DESC_PS(R, i) \ | 426 | #define E1000_RX_DESC_PS(R, i) \ |
426 | (&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) | 427 | (&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) |
@@ -582,7 +583,6 @@ extern s32 e1000_read_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, | |||
582 | extern s32 e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data); | 583 | extern s32 e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data); |
583 | extern s32 e1000_write_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, | 584 | extern s32 e1000_write_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, |
584 | u16 data); | 585 | u16 data); |
585 | extern s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw, bool slow); | ||
586 | extern s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw); | 586 | extern s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw); |
587 | extern s32 e1000_copper_link_setup_82577(struct e1000_hw *hw); | 587 | extern s32 e1000_copper_link_setup_82577(struct e1000_hw *hw); |
588 | extern s32 e1000_check_polarity_82577(struct e1000_hw *hw); | 588 | extern s32 e1000_check_polarity_82577(struct e1000_hw *hw); |
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index ad08cf3f40c0..8b6ecd127889 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -138,6 +138,10 @@ | |||
138 | #define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */ | 138 | #define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */ |
139 | #define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */ | 139 | #define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */ |
140 | 140 | ||
141 | /* KMRN Mode Control */ | ||
142 | #define HV_KMRN_MODE_CTRL PHY_REG(769, 16) | ||
143 | #define HV_KMRN_MDIO_SLOW 0x0400 | ||
144 | |||
141 | /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ | 145 | /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ |
142 | /* Offset 04h HSFSTS */ | 146 | /* Offset 04h HSFSTS */ |
143 | union ich8_hws_flash_status { | 147 | union ich8_hws_flash_status { |
@@ -219,6 +223,7 @@ static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active); | |||
219 | static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw); | 223 | static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw); |
220 | static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw); | 224 | static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw); |
221 | static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link); | 225 | static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link); |
226 | static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw); | ||
222 | 227 | ||
223 | static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) | 228 | static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) |
224 | { | 229 | { |
@@ -270,7 +275,21 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
270 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; | 275 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; |
271 | 276 | ||
272 | phy->id = e1000_phy_unknown; | 277 | phy->id = e1000_phy_unknown; |
273 | e1000e_get_phy_id(hw); | 278 | ret_val = e1000e_get_phy_id(hw); |
279 | if (ret_val) | ||
280 | goto out; | ||
281 | if ((phy->id == 0) || (phy->id == PHY_REVISION_MASK)) { | ||
282 | /* | ||
283 | * In case the PHY needs to be in mdio slow mode (eg. 82577), | ||
284 | * set slow mode and try to get the PHY id again. | ||
285 | */ | ||
286 | ret_val = e1000_set_mdio_slow_mode_hv(hw); | ||
287 | if (ret_val) | ||
288 | goto out; | ||
289 | ret_val = e1000e_get_phy_id(hw); | ||
290 | if (ret_val) | ||
291 | goto out; | ||
292 | } | ||
274 | phy->type = e1000e_get_phy_type_from_id(phy->id); | 293 | phy->type = e1000e_get_phy_type_from_id(phy->id); |
275 | 294 | ||
276 | switch (phy->type) { | 295 | switch (phy->type) { |
@@ -292,6 +311,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
292 | break; | 311 | break; |
293 | } | 312 | } |
294 | 313 | ||
314 | out: | ||
295 | return ret_val; | 315 | return ret_val; |
296 | } | 316 | } |
297 | 317 | ||
@@ -1076,16 +1096,44 @@ out: | |||
1076 | 1096 | ||
1077 | 1097 | ||
1078 | /** | 1098 | /** |
1099 | * e1000_set_mdio_slow_mode_hv - Set slow MDIO access mode | ||
1100 | * @hw: pointer to the HW structure | ||
1101 | **/ | ||
1102 | static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw) | ||
1103 | { | ||
1104 | s32 ret_val; | ||
1105 | u16 data; | ||
1106 | |||
1107 | ret_val = e1e_rphy(hw, HV_KMRN_MODE_CTRL, &data); | ||
1108 | if (ret_val) | ||
1109 | return ret_val; | ||
1110 | |||
1111 | data |= HV_KMRN_MDIO_SLOW; | ||
1112 | |||
1113 | ret_val = e1e_wphy(hw, HV_KMRN_MODE_CTRL, data); | ||
1114 | |||
1115 | return ret_val; | ||
1116 | } | ||
1117 | |||
1118 | /** | ||
1079 | * e1000_hv_phy_workarounds_ich8lan - A series of Phy workarounds to be | 1119 | * e1000_hv_phy_workarounds_ich8lan - A series of Phy workarounds to be |
1080 | * done after every PHY reset. | 1120 | * done after every PHY reset. |
1081 | **/ | 1121 | **/ |
1082 | static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw) | 1122 | static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw) |
1083 | { | 1123 | { |
1084 | s32 ret_val = 0; | 1124 | s32 ret_val = 0; |
1125 | u16 phy_data; | ||
1085 | 1126 | ||
1086 | if (hw->mac.type != e1000_pchlan) | 1127 | if (hw->mac.type != e1000_pchlan) |
1087 | return ret_val; | 1128 | return ret_val; |
1088 | 1129 | ||
1130 | /* Set MDIO slow mode before any other MDIO access */ | ||
1131 | if (hw->phy.type == e1000_phy_82577) { | ||
1132 | ret_val = e1000_set_mdio_slow_mode_hv(hw); | ||
1133 | if (ret_val) | ||
1134 | goto out; | ||
1135 | } | ||
1136 | |||
1089 | if (((hw->phy.type == e1000_phy_82577) && | 1137 | if (((hw->phy.type == e1000_phy_82577) && |
1090 | ((hw->phy.revision == 1) || (hw->phy.revision == 2))) || | 1138 | ((hw->phy.revision == 1) || (hw->phy.revision == 2))) || |
1091 | ((hw->phy.type == e1000_phy_82578) && (hw->phy.revision == 1))) { | 1139 | ((hw->phy.type == e1000_phy_82578) && (hw->phy.revision == 1))) { |
@@ -1118,16 +1166,32 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw) | |||
1118 | 1166 | ||
1119 | hw->phy.addr = 1; | 1167 | hw->phy.addr = 1; |
1120 | ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, 0); | 1168 | ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, 0); |
1169 | hw->phy.ops.release(hw); | ||
1121 | if (ret_val) | 1170 | if (ret_val) |
1122 | goto out; | 1171 | goto out; |
1123 | hw->phy.ops.release(hw); | ||
1124 | 1172 | ||
1125 | /* | 1173 | /* |
1126 | * Configure the K1 Si workaround during phy reset assuming there is | 1174 | * Configure the K1 Si workaround during phy reset assuming there is |
1127 | * link so that it disables K1 if link is in 1Gbps. | 1175 | * link so that it disables K1 if link is in 1Gbps. |
1128 | */ | 1176 | */ |
1129 | ret_val = e1000_k1_gig_workaround_hv(hw, true); | 1177 | ret_val = e1000_k1_gig_workaround_hv(hw, true); |
1178 | if (ret_val) | ||
1179 | goto out; | ||
1130 | 1180 | ||
1181 | /* Workaround for link disconnects on a busy hub in half duplex */ | ||
1182 | ret_val = hw->phy.ops.acquire(hw); | ||
1183 | if (ret_val) | ||
1184 | goto out; | ||
1185 | ret_val = hw->phy.ops.read_reg_locked(hw, | ||
1186 | PHY_REG(BM_PORT_CTRL_PAGE, 17), | ||
1187 | &phy_data); | ||
1188 | if (ret_val) | ||
1189 | goto release; | ||
1190 | ret_val = hw->phy.ops.write_reg_locked(hw, | ||
1191 | PHY_REG(BM_PORT_CTRL_PAGE, 17), | ||
1192 | phy_data & 0x00FF); | ||
1193 | release: | ||
1194 | hw->phy.ops.release(hw); | ||
1131 | out: | 1195 | out: |
1132 | return ret_val; | 1196 | return ret_val; |
1133 | } | 1197 | } |
@@ -1184,6 +1248,7 @@ static s32 e1000_phy_hw_reset_ich8lan(struct e1000_hw *hw) | |||
1184 | /* Allow time for h/w to get to a quiescent state after reset */ | 1248 | /* Allow time for h/w to get to a quiescent state after reset */ |
1185 | mdelay(10); | 1249 | mdelay(10); |
1186 | 1250 | ||
1251 | /* Perform any necessary post-reset workarounds */ | ||
1187 | if (hw->mac.type == e1000_pchlan) { | 1252 | if (hw->mac.type == e1000_pchlan) { |
1188 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); | 1253 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); |
1189 | if (ret_val) | 1254 | if (ret_val) |
@@ -2484,6 +2549,10 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2484 | if (!ret_val) | 2549 | if (!ret_val) |
2485 | e1000_release_swflag_ich8lan(hw); | 2550 | e1000_release_swflag_ich8lan(hw); |
2486 | 2551 | ||
2552 | /* Perform any necessary post-reset workarounds */ | ||
2553 | if (hw->mac.type == e1000_pchlan) | ||
2554 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); | ||
2555 | |||
2487 | if (ctrl & E1000_CTRL_PHY_RST) | 2556 | if (ctrl & E1000_CTRL_PHY_RST) |
2488 | ret_val = hw->phy.ops.get_cfg_done(hw); | 2557 | ret_val = hw->phy.ops.get_cfg_done(hw); |
2489 | 2558 | ||
@@ -2528,9 +2597,6 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2528 | kab |= E1000_KABGTXD_BGSQLBIAS; | 2597 | kab |= E1000_KABGTXD_BGSQLBIAS; |
2529 | ew32(KABGTXD, kab); | 2598 | ew32(KABGTXD, kab); |
2530 | 2599 | ||
2531 | if (hw->mac.type == e1000_pchlan) | ||
2532 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); | ||
2533 | |||
2534 | out: | 2600 | out: |
2535 | return ret_val; | 2601 | return ret_val; |
2536 | } | 2602 | } |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index c45965a256b6..57f149b75fbe 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -450,13 +450,23 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
450 | 450 | ||
451 | length = le16_to_cpu(rx_desc->length); | 451 | length = le16_to_cpu(rx_desc->length); |
452 | 452 | ||
453 | /* !EOP means multiple descriptors were used to store a single | 453 | /* |
454 | * packet, also make sure the frame isn't just CRC only */ | 454 | * !EOP means multiple descriptors were used to store a single |
455 | if (!(status & E1000_RXD_STAT_EOP) || (length <= 4)) { | 455 | * packet, if that's the case we need to toss it. In fact, we |
456 | * need to toss every packet with the EOP bit clear and the | ||
457 | * next frame that _does_ have the EOP bit set, as it is by | ||
458 | * definition only a frame fragment | ||
459 | */ | ||
460 | if (unlikely(!(status & E1000_RXD_STAT_EOP))) | ||
461 | adapter->flags2 |= FLAG2_IS_DISCARDING; | ||
462 | |||
463 | if (adapter->flags2 & FLAG2_IS_DISCARDING) { | ||
456 | /* All receives must fit into a single buffer */ | 464 | /* All receives must fit into a single buffer */ |
457 | e_dbg("Receive packet consumed multiple buffers\n"); | 465 | e_dbg("Receive packet consumed multiple buffers\n"); |
458 | /* recycle */ | 466 | /* recycle */ |
459 | buffer_info->skb = skb; | 467 | buffer_info->skb = skb; |
468 | if (status & E1000_RXD_STAT_EOP) | ||
469 | adapter->flags2 &= ~FLAG2_IS_DISCARDING; | ||
460 | goto next_desc; | 470 | goto next_desc; |
461 | } | 471 | } |
462 | 472 | ||
@@ -745,10 +755,16 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
745 | PCI_DMA_FROMDEVICE); | 755 | PCI_DMA_FROMDEVICE); |
746 | buffer_info->dma = 0; | 756 | buffer_info->dma = 0; |
747 | 757 | ||
748 | if (!(staterr & E1000_RXD_STAT_EOP)) { | 758 | /* see !EOP comment in other rx routine */ |
759 | if (!(staterr & E1000_RXD_STAT_EOP)) | ||
760 | adapter->flags2 |= FLAG2_IS_DISCARDING; | ||
761 | |||
762 | if (adapter->flags2 & FLAG2_IS_DISCARDING) { | ||
749 | e_dbg("Packet Split buffers didn't pick up the full " | 763 | e_dbg("Packet Split buffers didn't pick up the full " |
750 | "packet\n"); | 764 | "packet\n"); |
751 | dev_kfree_skb_irq(skb); | 765 | dev_kfree_skb_irq(skb); |
766 | if (staterr & E1000_RXD_STAT_EOP) | ||
767 | adapter->flags2 &= ~FLAG2_IS_DISCARDING; | ||
752 | goto next_desc; | 768 | goto next_desc; |
753 | } | 769 | } |
754 | 770 | ||
@@ -1118,6 +1134,7 @@ static void e1000_clean_rx_ring(struct e1000_adapter *adapter) | |||
1118 | 1134 | ||
1119 | rx_ring->next_to_clean = 0; | 1135 | rx_ring->next_to_clean = 0; |
1120 | rx_ring->next_to_use = 0; | 1136 | rx_ring->next_to_use = 0; |
1137 | adapter->flags2 &= ~FLAG2_IS_DISCARDING; | ||
1121 | 1138 | ||
1122 | writel(0, adapter->hw.hw_addr + rx_ring->head); | 1139 | writel(0, adapter->hw.hw_addr + rx_ring->head); |
1123 | writel(0, adapter->hw.hw_addr + rx_ring->tail); | 1140 | writel(0, adapter->hw.hw_addr + rx_ring->tail); |
@@ -2333,18 +2350,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter) | |||
2333 | rctl &= ~E1000_RCTL_SZ_4096; | 2350 | rctl &= ~E1000_RCTL_SZ_4096; |
2334 | rctl |= E1000_RCTL_BSEX; | 2351 | rctl |= E1000_RCTL_BSEX; |
2335 | switch (adapter->rx_buffer_len) { | 2352 | switch (adapter->rx_buffer_len) { |
2336 | case 256: | ||
2337 | rctl |= E1000_RCTL_SZ_256; | ||
2338 | rctl &= ~E1000_RCTL_BSEX; | ||
2339 | break; | ||
2340 | case 512: | ||
2341 | rctl |= E1000_RCTL_SZ_512; | ||
2342 | rctl &= ~E1000_RCTL_BSEX; | ||
2343 | break; | ||
2344 | case 1024: | ||
2345 | rctl |= E1000_RCTL_SZ_1024; | ||
2346 | rctl &= ~E1000_RCTL_BSEX; | ||
2347 | break; | ||
2348 | case 2048: | 2353 | case 2048: |
2349 | default: | 2354 | default: |
2350 | rctl |= E1000_RCTL_SZ_2048; | 2355 | rctl |= E1000_RCTL_SZ_2048; |
@@ -3781,7 +3786,7 @@ static int e1000_tso(struct e1000_adapter *adapter, | |||
3781 | 0, IPPROTO_TCP, 0); | 3786 | 0, IPPROTO_TCP, 0); |
3782 | cmd_length = E1000_TXD_CMD_IP; | 3787 | cmd_length = E1000_TXD_CMD_IP; |
3783 | ipcse = skb_transport_offset(skb) - 1; | 3788 | ipcse = skb_transport_offset(skb) - 1; |
3784 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 3789 | } else if (skb_is_gso_v6(skb)) { |
3785 | ipv6_hdr(skb)->payload_len = 0; | 3790 | ipv6_hdr(skb)->payload_len = 0; |
3786 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 3791 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
3787 | &ipv6_hdr(skb)->daddr, | 3792 | &ipv6_hdr(skb)->daddr, |
@@ -3962,13 +3967,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter, | |||
3962 | dma_error: | 3967 | dma_error: |
3963 | dev_err(&pdev->dev, "TX DMA map failed\n"); | 3968 | dev_err(&pdev->dev, "TX DMA map failed\n"); |
3964 | buffer_info->dma = 0; | 3969 | buffer_info->dma = 0; |
3965 | count--; | 3970 | if (count) |
3966 | |||
3967 | while (count >= 0) { | ||
3968 | count--; | 3971 | count--; |
3969 | i--; | 3972 | |
3970 | if (i < 0) | 3973 | while (count--) { |
3974 | if (i==0) | ||
3971 | i += tx_ring->count; | 3975 | i += tx_ring->count; |
3976 | i--; | ||
3972 | buffer_info = &tx_ring->buffer_info[i]; | 3977 | buffer_info = &tx_ring->buffer_info[i]; |
3973 | e1000_put_txbuf(adapter, buffer_info);; | 3978 | e1000_put_txbuf(adapter, buffer_info);; |
3974 | } | 3979 | } |
@@ -4317,13 +4322,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu) | |||
4317 | * fragmented skbs | 4322 | * fragmented skbs |
4318 | */ | 4323 | */ |
4319 | 4324 | ||
4320 | if (max_frame <= 256) | 4325 | if (max_frame <= 2048) |
4321 | adapter->rx_buffer_len = 256; | ||
4322 | else if (max_frame <= 512) | ||
4323 | adapter->rx_buffer_len = 512; | ||
4324 | else if (max_frame <= 1024) | ||
4325 | adapter->rx_buffer_len = 1024; | ||
4326 | else if (max_frame <= 2048) | ||
4327 | adapter->rx_buffer_len = 2048; | 4326 | adapter->rx_buffer_len = 2048; |
4328 | else | 4327 | else |
4329 | adapter->rx_buffer_len = 4096; | 4328 | adapter->rx_buffer_len = 4096; |
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index 55a2c0acfee7..7f3ceb9dad6a 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -152,32 +152,9 @@ s32 e1000e_get_phy_id(struct e1000_hw *hw) | |||
152 | if (phy->id != 0 && phy->id != PHY_REVISION_MASK) | 152 | if (phy->id != 0 && phy->id != PHY_REVISION_MASK) |
153 | goto out; | 153 | goto out; |
154 | 154 | ||
155 | /* | ||
156 | * If the PHY ID is still unknown, we may have an 82577 | ||
157 | * without link. We will try again after setting Slow MDIC | ||
158 | * mode. No harm in trying again in this case since the PHY | ||
159 | * ID is unknown at this point anyway. | ||
160 | */ | ||
161 | ret_val = phy->ops.acquire(hw); | ||
162 | if (ret_val) | ||
163 | goto out; | ||
164 | ret_val = e1000_set_mdio_slow_mode_hv(hw, true); | ||
165 | if (ret_val) | ||
166 | goto out; | ||
167 | phy->ops.release(hw); | ||
168 | |||
169 | retry_count++; | 155 | retry_count++; |
170 | } | 156 | } |
171 | out: | 157 | out: |
172 | /* Revert to MDIO fast mode, if applicable */ | ||
173 | if (retry_count) { | ||
174 | ret_val = phy->ops.acquire(hw); | ||
175 | if (ret_val) | ||
176 | return ret_val; | ||
177 | ret_val = e1000_set_mdio_slow_mode_hv(hw, false); | ||
178 | phy->ops.release(hw); | ||
179 | } | ||
180 | |||
181 | return ret_val; | 158 | return ret_val; |
182 | } | 159 | } |
183 | 160 | ||
@@ -2791,38 +2768,6 @@ static s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active) | |||
2791 | } | 2768 | } |
2792 | 2769 | ||
2793 | /** | 2770 | /** |
2794 | * e1000_set_mdio_slow_mode_hv - Set slow MDIO access mode | ||
2795 | * @hw: pointer to the HW structure | ||
2796 | * @slow: true for slow mode, false for normal mode | ||
2797 | * | ||
2798 | * Assumes semaphore already acquired. | ||
2799 | **/ | ||
2800 | s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw, bool slow) | ||
2801 | { | ||
2802 | s32 ret_val = 0; | ||
2803 | u16 data = 0; | ||
2804 | |||
2805 | /* Set MDIO mode - page 769, register 16: 0x2580==slow, 0x2180==fast */ | ||
2806 | hw->phy.addr = 1; | ||
2807 | ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, | ||
2808 | (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT)); | ||
2809 | if (ret_val) | ||
2810 | goto out; | ||
2811 | |||
2812 | ret_val = e1000e_write_phy_reg_mdic(hw, BM_CS_CTRL1, | ||
2813 | (0x2180 | (slow << 10))); | ||
2814 | if (ret_val) | ||
2815 | goto out; | ||
2816 | |||
2817 | /* dummy read when reverting to fast mode - throw away result */ | ||
2818 | if (!slow) | ||
2819 | ret_val = e1000e_read_phy_reg_mdic(hw, BM_CS_CTRL1, &data); | ||
2820 | |||
2821 | out: | ||
2822 | return ret_val; | ||
2823 | } | ||
2824 | |||
2825 | /** | ||
2826 | * __e1000_read_phy_reg_hv - Read HV PHY register | 2771 | * __e1000_read_phy_reg_hv - Read HV PHY register |
2827 | * @hw: pointer to the HW structure | 2772 | * @hw: pointer to the HW structure |
2828 | * @offset: register offset to be read | 2773 | * @offset: register offset to be read |
@@ -2839,7 +2784,6 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data, | |||
2839 | s32 ret_val; | 2784 | s32 ret_val; |
2840 | u16 page = BM_PHY_REG_PAGE(offset); | 2785 | u16 page = BM_PHY_REG_PAGE(offset); |
2841 | u16 reg = BM_PHY_REG_NUM(offset); | 2786 | u16 reg = BM_PHY_REG_NUM(offset); |
2842 | bool in_slow_mode = false; | ||
2843 | 2787 | ||
2844 | if (!locked) { | 2788 | if (!locked) { |
2845 | ret_val = hw->phy.ops.acquire(hw); | 2789 | ret_val = hw->phy.ops.acquire(hw); |
@@ -2847,16 +2791,6 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data, | |||
2847 | return ret_val; | 2791 | return ret_val; |
2848 | } | 2792 | } |
2849 | 2793 | ||
2850 | /* Workaround failure in MDIO access while cable is disconnected */ | ||
2851 | if ((hw->phy.type == e1000_phy_82577) && | ||
2852 | !(er32(STATUS) & E1000_STATUS_LU)) { | ||
2853 | ret_val = e1000_set_mdio_slow_mode_hv(hw, true); | ||
2854 | if (ret_val) | ||
2855 | goto out; | ||
2856 | |||
2857 | in_slow_mode = true; | ||
2858 | } | ||
2859 | |||
2860 | /* Page 800 works differently than the rest so it has its own func */ | 2794 | /* Page 800 works differently than the rest so it has its own func */ |
2861 | if (page == BM_WUC_PAGE) { | 2795 | if (page == BM_WUC_PAGE) { |
2862 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, | 2796 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, |
@@ -2893,10 +2827,6 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data, | |||
2893 | ret_val = e1000e_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg, | 2827 | ret_val = e1000e_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg, |
2894 | data); | 2828 | data); |
2895 | out: | 2829 | out: |
2896 | /* Revert to MDIO fast mode, if applicable */ | ||
2897 | if ((hw->phy.type == e1000_phy_82577) && in_slow_mode) | ||
2898 | ret_val |= e1000_set_mdio_slow_mode_hv(hw, false); | ||
2899 | |||
2900 | if (!locked) | 2830 | if (!locked) |
2901 | hw->phy.ops.release(hw); | 2831 | hw->phy.ops.release(hw); |
2902 | 2832 | ||
@@ -2948,7 +2878,6 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data, | |||
2948 | s32 ret_val; | 2878 | s32 ret_val; |
2949 | u16 page = BM_PHY_REG_PAGE(offset); | 2879 | u16 page = BM_PHY_REG_PAGE(offset); |
2950 | u16 reg = BM_PHY_REG_NUM(offset); | 2880 | u16 reg = BM_PHY_REG_NUM(offset); |
2951 | bool in_slow_mode = false; | ||
2952 | 2881 | ||
2953 | if (!locked) { | 2882 | if (!locked) { |
2954 | ret_val = hw->phy.ops.acquire(hw); | 2883 | ret_val = hw->phy.ops.acquire(hw); |
@@ -2956,16 +2885,6 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data, | |||
2956 | return ret_val; | 2885 | return ret_val; |
2957 | } | 2886 | } |
2958 | 2887 | ||
2959 | /* Workaround failure in MDIO access while cable is disconnected */ | ||
2960 | if ((hw->phy.type == e1000_phy_82577) && | ||
2961 | !(er32(STATUS) & E1000_STATUS_LU)) { | ||
2962 | ret_val = e1000_set_mdio_slow_mode_hv(hw, true); | ||
2963 | if (ret_val) | ||
2964 | goto out; | ||
2965 | |||
2966 | in_slow_mode = true; | ||
2967 | } | ||
2968 | |||
2969 | /* Page 800 works differently than the rest so it has its own func */ | 2888 | /* Page 800 works differently than the rest so it has its own func */ |
2970 | if (page == BM_WUC_PAGE) { | 2889 | if (page == BM_WUC_PAGE) { |
2971 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, | 2890 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, |
@@ -3019,10 +2938,6 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data, | |||
3019 | data); | 2938 | data); |
3020 | 2939 | ||
3021 | out: | 2940 | out: |
3022 | /* Revert to MDIO fast mode, if applicable */ | ||
3023 | if ((hw->phy.type == e1000_phy_82577) && in_slow_mode) | ||
3024 | ret_val |= e1000_set_mdio_slow_mode_hv(hw, false); | ||
3025 | |||
3026 | if (!locked) | 2941 | if (!locked) |
3027 | hw->phy.ops.release(hw); | 2942 | hw->phy.ops.release(hw); |
3028 | 2943 | ||
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 933c64ff2465..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); |
@@ -3422,7 +3412,7 @@ static inline int igb_tso_adv(struct igb_ring *tx_ring, | |||
3422 | iph->daddr, 0, | 3412 | iph->daddr, 0, |
3423 | IPPROTO_TCP, | 3413 | IPPROTO_TCP, |
3424 | 0); | 3414 | 0); |
3425 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 3415 | } else if (skb_is_gso_v6(skb)) { |
3426 | ipv6_hdr(skb)->payload_len = 0; | 3416 | ipv6_hdr(skb)->payload_len = 0; |
3427 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 3417 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
3428 | &ipv6_hdr(skb)->daddr, | 3418 | &ipv6_hdr(skb)->daddr, |
@@ -3584,6 +3574,7 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3584 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { | 3574 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { |
3585 | struct skb_frag_struct *frag; | 3575 | struct skb_frag_struct *frag; |
3586 | 3576 | ||
3577 | count++; | ||
3587 | i++; | 3578 | i++; |
3588 | if (i == tx_ring->count) | 3579 | if (i == tx_ring->count) |
3589 | i = 0; | 3580 | i = 0; |
@@ -3605,7 +3596,6 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3605 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 3596 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
3606 | goto dma_error; | 3597 | goto dma_error; |
3607 | 3598 | ||
3608 | count++; | ||
3609 | } | 3599 | } |
3610 | 3600 | ||
3611 | tx_ring->buffer_info[i].skb = skb; | 3601 | tx_ring->buffer_info[i].skb = skb; |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 0dbd0320023a..2aa71a766c35 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -1963,7 +1963,7 @@ static int igbvf_tso(struct igbvf_adapter *adapter, | |||
1963 | iph->daddr, 0, | 1963 | iph->daddr, 0, |
1964 | IPPROTO_TCP, | 1964 | IPPROTO_TCP, |
1965 | 0); | 1965 | 0); |
1966 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 1966 | } else if (skb_is_gso_v6(skb)) { |
1967 | ipv6_hdr(skb)->payload_len = 0; | 1967 | ipv6_hdr(skb)->payload_len = 0; |
1968 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 1968 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
1969 | &ipv6_hdr(skb)->daddr, | 1969 | &ipv6_hdr(skb)->daddr, |
@@ -2117,6 +2117,7 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter, | |||
2117 | /* set time_stamp *before* dma to help avoid a possible race */ | 2117 | /* set time_stamp *before* dma to help avoid a possible race */ |
2118 | buffer_info->time_stamp = jiffies; | 2118 | buffer_info->time_stamp = jiffies; |
2119 | buffer_info->next_to_watch = i; | 2119 | buffer_info->next_to_watch = i; |
2120 | buffer_info->mapped_as_page = false; | ||
2120 | buffer_info->dma = pci_map_single(pdev, skb->data, len, | 2121 | buffer_info->dma = pci_map_single(pdev, skb->data, len, |
2121 | PCI_DMA_TODEVICE); | 2122 | PCI_DMA_TODEVICE); |
2122 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 2123 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
@@ -2126,6 +2127,7 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter, | |||
2126 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { | 2127 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { |
2127 | struct skb_frag_struct *frag; | 2128 | struct skb_frag_struct *frag; |
2128 | 2129 | ||
2130 | count++; | ||
2129 | i++; | 2131 | i++; |
2130 | if (i == tx_ring->count) | 2132 | if (i == tx_ring->count) |
2131 | i = 0; | 2133 | i = 0; |
@@ -2146,7 +2148,6 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter, | |||
2146 | PCI_DMA_TODEVICE); | 2148 | PCI_DMA_TODEVICE); |
2147 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 2149 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
2148 | goto dma_error; | 2150 | goto dma_error; |
2149 | count++; | ||
2150 | } | 2151 | } |
2151 | 2152 | ||
2152 | tx_ring->buffer_info[i].skb = skb; | 2153 | tx_ring->buffer_info[i].skb = skb; |
@@ -2163,14 +2164,14 @@ dma_error: | |||
2163 | buffer_info->length = 0; | 2164 | buffer_info->length = 0; |
2164 | buffer_info->next_to_watch = 0; | 2165 | buffer_info->next_to_watch = 0; |
2165 | buffer_info->mapped_as_page = false; | 2166 | buffer_info->mapped_as_page = false; |
2166 | count--; | 2167 | if (count) |
2168 | count--; | ||
2167 | 2169 | ||
2168 | /* clear timestamp and dma mappings for remaining portion of packet */ | 2170 | /* clear timestamp and dma mappings for remaining portion of packet */ |
2169 | while (count >= 0) { | 2171 | while (count--) { |
2170 | count--; | 2172 | if (i==0) |
2171 | i--; | ||
2172 | if (i < 0) | ||
2173 | i += tx_ring->count; | 2173 | i += tx_ring->count; |
2174 | i--; | ||
2174 | buffer_info = &tx_ring->buffer_info[i]; | 2175 | buffer_info = &tx_ring->buffer_info[i]; |
2175 | igbvf_put_txbuf(adapter, buffer_info); | 2176 | igbvf_put_txbuf(adapter, buffer_info); |
2176 | } | 2177 | } |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index bcd0f01d5feb..593d1a4f217c 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1363,13 +1363,13 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, | |||
1363 | dma_error: | 1363 | dma_error: |
1364 | dev_err(&pdev->dev, "TX DMA map failed\n"); | 1364 | dev_err(&pdev->dev, "TX DMA map failed\n"); |
1365 | buffer_info->dma = 0; | 1365 | buffer_info->dma = 0; |
1366 | count--; | 1366 | if (count) |
1367 | |||
1368 | while (count >= 0) { | ||
1369 | count--; | 1367 | count--; |
1370 | i--; | 1368 | |
1371 | if (i < 0) | 1369 | while (count--) { |
1370 | if (i==0) | ||
1372 | i += tx_ring->count; | 1371 | i += tx_ring->count; |
1372 | i--; | ||
1373 | buffer_info = &tx_ring->buffer_info[i]; | 1373 | buffer_info = &tx_ring->buffer_info[i]; |
1374 | ixgb_unmap_and_free_tx_resource(adapter, buffer_info); | 1374 | ixgb_unmap_and_free_tx_resource(adapter, buffer_info); |
1375 | } | 1375 | } |
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile index 21b41f42b61c..bfef0ebcba9a 100644 --- a/drivers/net/ixgbe/Makefile +++ b/drivers/net/ixgbe/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | ################################################################################ | 1 | ################################################################################ |
2 | # | 2 | # |
3 | # Intel 10 Gigabit PCI Express Linux driver | 3 | # Intel 10 Gigabit PCI Express Linux driver |
4 | # Copyright(c) 1999 - 2009 Intel Corporation. | 4 | # Copyright(c) 1999 - 2010 Intel Corporation. |
5 | # | 5 | # |
6 | # This program is free software; you can redistribute it and/or modify it | 6 | # This program is free software; you can redistribute it and/or modify it |
7 | # under the terms and conditions of the GNU General Public License, | 7 | # under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 8da8eb535084..303e7bd39b67 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 204177d78cec..35a06b47587b 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -357,12 +357,34 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num) | |||
357 | u32 fctrl_reg; | 357 | u32 fctrl_reg; |
358 | u32 rmcs_reg; | 358 | u32 rmcs_reg; |
359 | u32 reg; | 359 | u32 reg; |
360 | u32 link_speed = 0; | ||
361 | bool link_up; | ||
360 | 362 | ||
361 | #ifdef CONFIG_DCB | 363 | #ifdef CONFIG_DCB |
362 | if (hw->fc.requested_mode == ixgbe_fc_pfc) | 364 | if (hw->fc.requested_mode == ixgbe_fc_pfc) |
363 | goto out; | 365 | goto out; |
364 | 366 | ||
365 | #endif /* CONFIG_DCB */ | 367 | #endif /* CONFIG_DCB */ |
368 | /* | ||
369 | * On 82598 having Rx FC on causes resets while doing 1G | ||
370 | * so if it's on turn it off once we know link_speed. For | ||
371 | * more details see 82598 Specification update. | ||
372 | */ | ||
373 | hw->mac.ops.check_link(hw, &link_speed, &link_up, false); | ||
374 | if (link_up && link_speed == IXGBE_LINK_SPEED_1GB_FULL) { | ||
375 | switch (hw->fc.requested_mode) { | ||
376 | case ixgbe_fc_full: | ||
377 | hw->fc.requested_mode = ixgbe_fc_tx_pause; | ||
378 | break; | ||
379 | case ixgbe_fc_rx_pause: | ||
380 | hw->fc.requested_mode = ixgbe_fc_none; | ||
381 | break; | ||
382 | default: | ||
383 | /* no change */ | ||
384 | break; | ||
385 | } | ||
386 | } | ||
387 | |||
366 | /* Negotiate the fc mode to use */ | 388 | /* Negotiate the fc mode to use */ |
367 | ret_val = ixgbe_fc_autoneg(hw); | 389 | ret_val = ixgbe_fc_autoneg(hw); |
368 | if (ret_val) | 390 | if (ret_val) |
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 538340527aa6..b49bd6b9feb7 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 688b8ca5da32..21f158f79dd0 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_common.h b/drivers/net/ixgbe/ixgbe_common.h index 27f3214bed2e..dfff0ffaa502 100644 --- a/drivers/net/ixgbe/ixgbe_common.h +++ b/drivers/net/ixgbe/ixgbe_common.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb.c b/drivers/net/ixgbe/ixgbe_dcb.c index a1562287342f..9aea4f04bbd2 100644 --- a/drivers/net/ixgbe/ixgbe_dcb.c +++ b/drivers/net/ixgbe/ixgbe_dcb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb.h b/drivers/net/ixgbe/ixgbe_dcb.h index 64a9fa15c059..5caafd4afbc3 100644 --- a/drivers/net/ixgbe/ixgbe_dcb.h +++ b/drivers/net/ixgbe/ixgbe_dcb.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82598.c b/drivers/net/ixgbe/ixgbe_dcb_82598.c index f30263898ebc..f0e9279d4669 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82598.c +++ b/drivers/net/ixgbe/ixgbe_dcb_82598.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82598.h b/drivers/net/ixgbe/ixgbe_dcb_82598.h index ebbe53c352a7..cc728fa092e2 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82598.h +++ b/drivers/net/ixgbe/ixgbe_dcb_82598.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82599.c b/drivers/net/ixgbe/ixgbe_dcb_82599.c index ec8a252636d3..4f7a26ab411e 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82599.c +++ b/drivers/net/ixgbe/ixgbe_dcb_82599.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82599.h b/drivers/net/ixgbe/ixgbe_dcb_82599.h index 9e5e2827e4af..0f3f791e1e1d 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82599.h +++ b/drivers/net/ixgbe/ixgbe_dcb_82599.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 3c7a79a7d7c6..dd4883f642be 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -223,7 +223,7 @@ static void ixgbe_dcbnl_set_pg_bwg_cfg_tx(struct net_device *netdev, int bwg_id, | |||
223 | 223 | ||
224 | if (adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] != | 224 | if (adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] != |
225 | adapter->dcb_cfg.bw_percentage[0][bwg_id]) { | 225 | adapter->dcb_cfg.bw_percentage[0][bwg_id]) { |
226 | adapter->dcb_set_bitmap |= BIT_PG_RX; | 226 | adapter->dcb_set_bitmap |= BIT_PG_TX; |
227 | adapter->dcb_set_bitmap |= BIT_RESETLINK; | 227 | adapter->dcb_set_bitmap |= BIT_RESETLINK; |
228 | } | 228 | } |
229 | } | 229 | } |
@@ -341,6 +341,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
341 | if (!adapter->dcb_set_bitmap) | 341 | if (!adapter->dcb_set_bitmap) |
342 | return DCB_NO_HW_CHG; | 342 | return DCB_NO_HW_CHG; |
343 | 343 | ||
344 | ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg, | ||
345 | adapter->ring_feature[RING_F_DCB].indices); | ||
346 | |||
347 | if (ret) | ||
348 | return DCB_NO_HW_CHG; | ||
349 | |||
344 | /* | 350 | /* |
345 | * Only take down the adapter if the configuration change | 351 | * Only take down the adapter if the configuration change |
346 | * requires a reset. | 352 | * requires a reset. |
@@ -359,14 +365,6 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
359 | } | 365 | } |
360 | } | 366 | } |
361 | 367 | ||
362 | ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg, | ||
363 | adapter->ring_feature[RING_F_DCB].indices); | ||
364 | if (ret) { | ||
365 | if (adapter->dcb_set_bitmap & BIT_RESETLINK) | ||
366 | clear_bit(__IXGBE_RESETTING, &adapter->state); | ||
367 | return DCB_NO_HW_CHG; | ||
368 | } | ||
369 | |||
370 | if (adapter->dcb_cfg.pfc_mode_enable) { | 368 | if (adapter->dcb_cfg.pfc_mode_enable) { |
371 | if ((adapter->hw.mac.type != ixgbe_mac_82598EB) && | 369 | if ((adapter->hw.mac.type != ixgbe_mac_82598EB) && |
372 | (adapter->hw.fc.current_mode != ixgbe_fc_pfc)) | 370 | (adapter->hw.fc.current_mode != ixgbe_fc_pfc)) |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 0bd49d3b9f65..d77961fc75f9 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c index da32a108a7b4..e9a20c88c155 100644 --- a/drivers/net/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ixgbe/ixgbe_fcoe.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.h b/drivers/net/ixgbe/ixgbe_fcoe.h index de8ff53187da..abf4b2b3f252 100644 --- a/drivers/net/ixgbe/ixgbe_fcoe.h +++ b/drivers/net/ixgbe/ixgbe_fcoe.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 2ad754c864cf..951b73cf5ca2 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -52,7 +52,7 @@ static const char ixgbe_driver_string[] = | |||
52 | 52 | ||
53 | #define DRV_VERSION "2.0.44-k2" | 53 | #define DRV_VERSION "2.0.44-k2" |
54 | const char ixgbe_driver_version[] = DRV_VERSION; | 54 | const char ixgbe_driver_version[] = DRV_VERSION; |
55 | static char ixgbe_copyright[] = "Copyright (c) 1999-2009 Intel Corporation."; | 55 | static char ixgbe_copyright[] = "Copyright (c) 1999-2010 Intel Corporation."; |
56 | 56 | ||
57 | static const struct ixgbe_info *ixgbe_info_tbl[] = { | 57 | static const struct ixgbe_info *ixgbe_info_tbl[] = { |
58 | [board_82598] = &ixgbe_82598_info, | 58 | [board_82598] = &ixgbe_82598_info, |
@@ -4928,7 +4928,7 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter, | |||
4928 | iph->daddr, 0, | 4928 | iph->daddr, 0, |
4929 | IPPROTO_TCP, | 4929 | IPPROTO_TCP, |
4930 | 0); | 4930 | 0); |
4931 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 4931 | } else if (skb_is_gso_v6(skb)) { |
4932 | ipv6_hdr(skb)->payload_len = 0; | 4932 | ipv6_hdr(skb)->payload_len = 0; |
4933 | tcp_hdr(skb)->check = | 4933 | tcp_hdr(skb)->check = |
4934 | ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 4934 | ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
@@ -5167,19 +5167,19 @@ dma_error: | |||
5167 | tx_buffer_info->dma = 0; | 5167 | tx_buffer_info->dma = 0; |
5168 | tx_buffer_info->time_stamp = 0; | 5168 | tx_buffer_info->time_stamp = 0; |
5169 | tx_buffer_info->next_to_watch = 0; | 5169 | tx_buffer_info->next_to_watch = 0; |
5170 | count--; | 5170 | if (count) |
5171 | count--; | ||
5171 | 5172 | ||
5172 | /* clear timestamp and dma mappings for remaining portion of packet */ | 5173 | /* clear timestamp and dma mappings for remaining portion of packet */ |
5173 | while (count >= 0) { | 5174 | while (count--) { |
5174 | count--; | 5175 | if (i==0) |
5175 | i--; | ||
5176 | if (i < 0) | ||
5177 | i += tx_ring->count; | 5176 | i += tx_ring->count; |
5177 | i--; | ||
5178 | tx_buffer_info = &tx_ring->tx_buffer_info[i]; | 5178 | tx_buffer_info = &tx_ring->tx_buffer_info[i]; |
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) && |
@@ -5576,6 +5579,10 @@ static void ixgbe_netpoll(struct net_device *netdev) | |||
5576 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 5579 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
5577 | int i; | 5580 | int i; |
5578 | 5581 | ||
5582 | /* if interface is down do nothing */ | ||
5583 | if (test_bit(__IXGBE_DOWN, &adapter->state)) | ||
5584 | return; | ||
5585 | |||
5579 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; | 5586 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; |
5580 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { | 5587 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { |
5581 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; | 5588 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; |
@@ -5756,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
5756 | if (err) | 5763 | if (err) |
5757 | goto err_sw_init; | 5764 | goto err_sw_init; |
5758 | 5765 | ||
5766 | /* Make it possible the adapter to be woken up via WOL */ | ||
5767 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | ||
5768 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); | ||
5769 | |||
5759 | /* | 5770 | /* |
5760 | * If there is a fan on this device and it has failed log the | 5771 | * If there is a fan on this device and it has failed log the |
5761 | * failure. | 5772 | * failure. |
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index 9ecad17522c3..1c1efd386956 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_phy.h b/drivers/net/ixgbe/ixgbe_phy.h index 9b700f5bf1ed..9cf5f3b4cc5d 100644 --- a/drivers/net/ixgbe/ixgbe_phy.h +++ b/drivers/net/ixgbe/ixgbe_phy.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 84650c6ebe03..9eafddfa1b97 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c index c146304d8d6c..c0ceebccaa49 100644 --- a/drivers/net/ks8851_mll.c +++ b/drivers/net/ks8851_mll.c | |||
@@ -854,8 +854,8 @@ static void ks_update_link_status(struct net_device *netdev, struct ks_net *ks) | |||
854 | 854 | ||
855 | static irqreturn_t ks_irq(int irq, void *pw) | 855 | static irqreturn_t ks_irq(int irq, void *pw) |
856 | { | 856 | { |
857 | struct ks_net *ks = pw; | 857 | struct net_device *netdev = pw; |
858 | struct net_device *netdev = ks->netdev; | 858 | struct ks_net *ks = netdev_priv(netdev); |
859 | u16 status; | 859 | u16 status; |
860 | 860 | ||
861 | /*this should be the first in IRQ handler */ | 861 | /*this should be the first in IRQ handler */ |
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/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 813aca3fc433..7b17404d0858 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -717,6 +717,7 @@ static struct pcmcia_device_id fmvj18x_ids[] = { | |||
717 | PCMCIA_PFC_DEVICE_PROD_ID12(0, "NEC", "PK-UG-J001" ,0x18df0ba0 ,0x831b1064), | 717 | PCMCIA_PFC_DEVICE_PROD_ID12(0, "NEC", "PK-UG-J001" ,0x18df0ba0 ,0x831b1064), |
718 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0105, 0x0d0a), | 718 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0105, 0x0d0a), |
719 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0105, 0x0e0a), | 719 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0105, 0x0e0a), |
720 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x0e01), | ||
720 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x0a05), | 721 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x0a05), |
721 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x1101), | 722 | PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x1101), |
722 | PCMCIA_DEVICE_NULL, | 723 | PCMCIA_DEVICE_NULL, |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index b0e9f9c51721..0295097d6c44 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -410,7 +410,6 @@ EXPORT_SYMBOL(phy_start_aneg); | |||
410 | 410 | ||
411 | 411 | ||
412 | static void phy_change(struct work_struct *work); | 412 | static void phy_change(struct work_struct *work); |
413 | static void phy_state_machine(struct work_struct *work); | ||
414 | 413 | ||
415 | /** | 414 | /** |
416 | * phy_start_machine - start PHY state machine tracking | 415 | * phy_start_machine - start PHY state machine tracking |
@@ -430,7 +429,6 @@ void phy_start_machine(struct phy_device *phydev, | |||
430 | { | 429 | { |
431 | phydev->adjust_state = handler; | 430 | phydev->adjust_state = handler; |
432 | 431 | ||
433 | INIT_DELAYED_WORK(&phydev->state_queue, phy_state_machine); | ||
434 | schedule_delayed_work(&phydev->state_queue, HZ); | 432 | schedule_delayed_work(&phydev->state_queue, HZ); |
435 | } | 433 | } |
436 | 434 | ||
@@ -761,7 +759,7 @@ EXPORT_SYMBOL(phy_start); | |||
761 | * phy_state_machine - Handle the state machine | 759 | * phy_state_machine - Handle the state machine |
762 | * @work: work_struct that describes the work to be done | 760 | * @work: work_struct that describes the work to be done |
763 | */ | 761 | */ |
764 | static void phy_state_machine(struct work_struct *work) | 762 | void phy_state_machine(struct work_struct *work) |
765 | { | 763 | { |
766 | struct delayed_work *dwork = to_delayed_work(work); | 764 | struct delayed_work *dwork = to_delayed_work(work); |
767 | struct phy_device *phydev = | 765 | struct phy_device *phydev = |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 8212b2b93422..adbc0fded130 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -177,6 +177,7 @@ struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) | |||
177 | dev->state = PHY_DOWN; | 177 | dev->state = PHY_DOWN; |
178 | 178 | ||
179 | mutex_init(&dev->lock); | 179 | mutex_init(&dev->lock); |
180 | INIT_DELAYED_WORK(&dev->state_queue, phy_state_machine); | ||
180 | 181 | ||
181 | return dev; | 182 | return dev; |
182 | } | 183 | } |
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 707b391afa02..894a7c84faef 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -4119,7 +4119,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4119 | err = pcie_set_readrq(pdev, 4096); | 4119 | err = pcie_set_readrq(pdev, 4096); |
4120 | if (err) { | 4120 | if (err) { |
4121 | dev_err(&pdev->dev, "Set readrq failed.\n"); | 4121 | dev_err(&pdev->dev, "Set readrq failed.\n"); |
4122 | goto err_out; | 4122 | goto err_out1; |
4123 | } | 4123 | } |
4124 | 4124 | ||
4125 | err = pci_request_regions(pdev, DRV_NAME); | 4125 | err = pci_request_regions(pdev, DRV_NAME); |
@@ -4140,7 +4140,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4140 | 4140 | ||
4141 | if (err) { | 4141 | if (err) { |
4142 | dev_err(&pdev->dev, "No usable DMA configuration.\n"); | 4142 | dev_err(&pdev->dev, "No usable DMA configuration.\n"); |
4143 | goto err_out; | 4143 | goto err_out2; |
4144 | } | 4144 | } |
4145 | 4145 | ||
4146 | /* Set PCIe reset type for EEH to fundamental. */ | 4146 | /* Set PCIe reset type for EEH to fundamental. */ |
@@ -4152,7 +4152,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4152 | if (!qdev->reg_base) { | 4152 | if (!qdev->reg_base) { |
4153 | dev_err(&pdev->dev, "Register mapping failed.\n"); | 4153 | dev_err(&pdev->dev, "Register mapping failed.\n"); |
4154 | err = -ENOMEM; | 4154 | err = -ENOMEM; |
4155 | goto err_out; | 4155 | goto err_out2; |
4156 | } | 4156 | } |
4157 | 4157 | ||
4158 | qdev->doorbell_area_size = pci_resource_len(pdev, 3); | 4158 | qdev->doorbell_area_size = pci_resource_len(pdev, 3); |
@@ -4162,14 +4162,14 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4162 | if (!qdev->doorbell_area) { | 4162 | if (!qdev->doorbell_area) { |
4163 | dev_err(&pdev->dev, "Doorbell register mapping failed.\n"); | 4163 | dev_err(&pdev->dev, "Doorbell register mapping failed.\n"); |
4164 | err = -ENOMEM; | 4164 | err = -ENOMEM; |
4165 | goto err_out; | 4165 | goto err_out2; |
4166 | } | 4166 | } |
4167 | 4167 | ||
4168 | err = ql_get_board_info(qdev); | 4168 | err = ql_get_board_info(qdev); |
4169 | if (err) { | 4169 | if (err) { |
4170 | dev_err(&pdev->dev, "Register access failed.\n"); | 4170 | dev_err(&pdev->dev, "Register access failed.\n"); |
4171 | err = -EIO; | 4171 | err = -EIO; |
4172 | goto err_out; | 4172 | goto err_out2; |
4173 | } | 4173 | } |
4174 | qdev->msg_enable = netif_msg_init(debug, default_msg); | 4174 | qdev->msg_enable = netif_msg_init(debug, default_msg); |
4175 | spin_lock_init(&qdev->hw_lock); | 4175 | spin_lock_init(&qdev->hw_lock); |
@@ -4179,7 +4179,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4179 | err = qdev->nic_ops->get_flash(qdev); | 4179 | err = qdev->nic_ops->get_flash(qdev); |
4180 | if (err) { | 4180 | if (err) { |
4181 | dev_err(&pdev->dev, "Invalid FLASH.\n"); | 4181 | dev_err(&pdev->dev, "Invalid FLASH.\n"); |
4182 | goto err_out; | 4182 | goto err_out2; |
4183 | } | 4183 | } |
4184 | 4184 | ||
4185 | memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); | 4185 | memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); |
@@ -4212,8 +4212,9 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4212 | DRV_NAME, DRV_VERSION); | 4212 | DRV_NAME, DRV_VERSION); |
4213 | } | 4213 | } |
4214 | return 0; | 4214 | return 0; |
4215 | err_out: | 4215 | err_out2: |
4216 | ql_release_all(pdev); | 4216 | ql_release_all(pdev); |
4217 | err_out1: | ||
4217 | pci_disable_device(pdev); | 4218 | pci_disable_device(pdev); |
4218 | return err; | 4219 | return err; |
4219 | } | 4220 | } |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index cc4218667cba..3c4836d0898f 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -3421,7 +3421,7 @@ static int wait_for_cmd_complete(void __iomem *addr, u64 busy_bit, | |||
3421 | break; | 3421 | break; |
3422 | } | 3422 | } |
3423 | } else { | 3423 | } else { |
3424 | if (!(val64 & busy_bit)) { | 3424 | if (val64 & busy_bit) { |
3425 | ret = SUCCESS; | 3425 | ret = SUCCESS; |
3426 | break; | 3426 | break; |
3427 | } | 3427 | } |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 103e8b0e2a0d..46997e177ee3 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, | |||
2284 | fail2: | 2284 | fail2: |
2285 | efx_fini_struct(efx); | 2285 | efx_fini_struct(efx); |
2286 | fail1: | 2286 | fail1: |
2287 | WARN_ON(rc > 0); | ||
2287 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); | 2288 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); |
2288 | free_netdev(net_dev); | 2289 | free_netdev(net_dev); |
2289 | return rc; | 2290 | return rc; |
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c index bf0b96af5334..5712fddd72f2 100644 --- a/drivers/net/sfc/falcon_boards.c +++ b/drivers/net/sfc/falcon_boards.c | |||
@@ -29,6 +29,15 @@ | |||
29 | #define FALCON_BOARD_SFN4111T 0x51 | 29 | #define FALCON_BOARD_SFN4111T 0x51 |
30 | #define FALCON_BOARD_SFN4112F 0x52 | 30 | #define FALCON_BOARD_SFN4112F 0x52 |
31 | 31 | ||
32 | /* Board temperature is about 15°C above ambient when air flow is | ||
33 | * limited. */ | ||
34 | #define FALCON_BOARD_TEMP_BIAS 15 | ||
35 | |||
36 | /* SFC4000 datasheet says: 'The maximum permitted junction temperature | ||
37 | * is 125°C; the thermal design of the environment for the SFC4000 | ||
38 | * should aim to keep this well below 100°C.' */ | ||
39 | #define FALCON_JUNC_TEMP_MAX 90 | ||
40 | |||
32 | /***************************************************************************** | 41 | /***************************************************************************** |
33 | * Support for LM87 sensor chip used on several boards | 42 | * Support for LM87 sensor chip used on several boards |
34 | */ | 43 | */ |
@@ -548,16 +557,16 @@ fail_hwmon: | |||
548 | static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */ | 557 | static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */ |
549 | 558 | ||
550 | static const u8 sfe4002_lm87_regs[] = { | 559 | static const u8 sfe4002_lm87_regs[] = { |
551 | LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ | 560 | LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */ |
552 | LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ | 561 | LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */ |
553 | LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ | 562 | LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */ |
554 | LM87_IN_LIMITS(3, 0xb0, 0xc9), /* 5V: 4.6-5.2V */ | 563 | LM87_IN_LIMITS(3, 0xac, 0xd4), /* 5V: 5.0V +/- 10% */ |
555 | LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ | 564 | LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */ |
556 | LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ | 565 | LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */ |
557 | LM87_AIN_LIMITS(0, 0xa0, 0xb2), /* AIN1: 1.66V +/- 5% */ | 566 | LM87_AIN_LIMITS(0, 0x98, 0xbb), /* AIN1: 1.66V +/- 10% */ |
558 | LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ | 567 | LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */ |
559 | LM87_TEMP_INT_LIMITS(10, 60), /* board */ | 568 | LM87_TEMP_INT_LIMITS(0, 80 + FALCON_BOARD_TEMP_BIAS), |
560 | LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ | 569 | LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX), |
561 | 0 | 570 | 0 |
562 | }; | 571 | }; |
563 | 572 | ||
@@ -619,14 +628,14 @@ static int sfe4002_init(struct efx_nic *efx) | |||
619 | static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */ | 628 | static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */ |
620 | 629 | ||
621 | static const u8 sfn4112f_lm87_regs[] = { | 630 | static const u8 sfn4112f_lm87_regs[] = { |
622 | LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ | 631 | LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */ |
623 | LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ | 632 | LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */ |
624 | LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ | 633 | LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */ |
625 | LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ | 634 | LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */ |
626 | LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ | 635 | LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */ |
627 | LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ | 636 | LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */ |
628 | LM87_TEMP_INT_LIMITS(10, 60), /* board */ | 637 | LM87_TEMP_INT_LIMITS(0, 60 + FALCON_BOARD_TEMP_BIAS), |
629 | LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ | 638 | LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX), |
630 | 0 | 639 | 0 |
631 | }; | 640 | }; |
632 | 641 | ||
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index 683353b904c7..f66b3da6ddff 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
@@ -127,7 +127,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
127 | efx_dword_t reg; | 127 | efx_dword_t reg; |
128 | 128 | ||
129 | /* Check for a reboot atomically with respect to efx_mcdi_copyout() */ | 129 | /* Check for a reboot atomically with respect to efx_mcdi_copyout() */ |
130 | rc = efx_mcdi_poll_reboot(efx); | 130 | rc = -efx_mcdi_poll_reboot(efx); |
131 | if (rc) | 131 | if (rc) |
132 | goto out; | 132 | goto out; |
133 | 133 | ||
@@ -142,8 +142,9 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
142 | if (spins != 0) { | 142 | if (spins != 0) { |
143 | --spins; | 143 | --spins; |
144 | udelay(1); | 144 | udelay(1); |
145 | } else | 145 | } else { |
146 | schedule(); | 146 | schedule_timeout_uninterruptible(1); |
147 | } | ||
147 | 148 | ||
148 | time = get_seconds(); | 149 | time = get_seconds(); |
149 | 150 | ||
@@ -803,7 +804,7 @@ int efx_mcdi_nvram_read(struct efx_nic *efx, unsigned int type, | |||
803 | loff_t offset, u8 *buffer, size_t length) | 804 | loff_t offset, u8 *buffer, size_t length) |
804 | { | 805 | { |
805 | u8 inbuf[MC_CMD_NVRAM_READ_IN_LEN]; | 806 | u8 inbuf[MC_CMD_NVRAM_READ_IN_LEN]; |
806 | u8 outbuf[MC_CMD_NVRAM_READ_OUT_LEN(length)]; | 807 | u8 outbuf[MC_CMD_NVRAM_READ_OUT_LEN(EFX_MCDI_NVRAM_LEN_MAX)]; |
807 | size_t outlen; | 808 | size_t outlen; |
808 | int rc; | 809 | int rc; |
809 | 810 | ||
@@ -827,7 +828,7 @@ fail: | |||
827 | int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type, | 828 | int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type, |
828 | loff_t offset, const u8 *buffer, size_t length) | 829 | loff_t offset, const u8 *buffer, size_t length) |
829 | { | 830 | { |
830 | u8 inbuf[MC_CMD_NVRAM_WRITE_IN_LEN(length)]; | 831 | u8 inbuf[MC_CMD_NVRAM_WRITE_IN_LEN(EFX_MCDI_NVRAM_LEN_MAX)]; |
831 | int rc; | 832 | int rc; |
832 | 833 | ||
833 | MCDI_SET_DWORD(inbuf, NVRAM_WRITE_IN_TYPE, type); | 834 | MCDI_SET_DWORD(inbuf, NVRAM_WRITE_IN_TYPE, type); |
@@ -837,7 +838,8 @@ int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type, | |||
837 | 838 | ||
838 | BUILD_BUG_ON(MC_CMD_NVRAM_WRITE_OUT_LEN != 0); | 839 | BUILD_BUG_ON(MC_CMD_NVRAM_WRITE_OUT_LEN != 0); |
839 | 840 | ||
840 | rc = efx_mcdi_rpc(efx, MC_CMD_NVRAM_WRITE, inbuf, sizeof(inbuf), | 841 | rc = efx_mcdi_rpc(efx, MC_CMD_NVRAM_WRITE, inbuf, |
842 | ALIGN(MC_CMD_NVRAM_WRITE_IN_LEN(length), 4), | ||
841 | NULL, 0, NULL); | 843 | NULL, 0, NULL); |
842 | if (rc) | 844 | if (rc) |
843 | goto fail; | 845 | goto fail; |
diff --git a/drivers/net/sfc/mcdi.h b/drivers/net/sfc/mcdi.h index de916728c2e3..10ce98f4c0fb 100644 --- a/drivers/net/sfc/mcdi.h +++ b/drivers/net/sfc/mcdi.h | |||
@@ -111,6 +111,7 @@ extern int efx_mcdi_nvram_read(struct efx_nic *efx, unsigned int type, | |||
111 | extern int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type, | 111 | extern int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type, |
112 | loff_t offset, const u8 *buffer, | 112 | loff_t offset, const u8 *buffer, |
113 | size_t length); | 113 | size_t length); |
114 | #define EFX_MCDI_NVRAM_LEN_MAX 128 | ||
114 | extern int efx_mcdi_nvram_erase(struct efx_nic *efx, unsigned int type, | 115 | extern int efx_mcdi_nvram_erase(struct efx_nic *efx, unsigned int type, |
115 | loff_t offset, size_t length); | 116 | loff_t offset, size_t length); |
116 | extern int efx_mcdi_nvram_update_finish(struct efx_nic *efx, | 117 | extern int efx_mcdi_nvram_update_finish(struct efx_nic *efx, |
diff --git a/drivers/net/sfc/mcdi_pcol.h b/drivers/net/sfc/mcdi_pcol.h index 2a85360a46f0..73e71f420624 100644 --- a/drivers/net/sfc/mcdi_pcol.h +++ b/drivers/net/sfc/mcdi_pcol.h | |||
@@ -1090,8 +1090,10 @@ | |||
1090 | #define MC_CMD_MAC_RX_LANES01_DISP_ERR 57 | 1090 | #define MC_CMD_MAC_RX_LANES01_DISP_ERR 57 |
1091 | #define MC_CMD_MAC_RX_LANES23_DISP_ERR 58 | 1091 | #define MC_CMD_MAC_RX_LANES23_DISP_ERR 58 |
1092 | #define MC_CMD_MAC_RX_MATCH_FAULT 59 | 1092 | #define MC_CMD_MAC_RX_MATCH_FAULT 59 |
1093 | #define MC_CMD_GMAC_DMABUF_START 64 | ||
1094 | #define MC_CMD_GMAC_DMABUF_END 95 | ||
1093 | /* Insert new members here. */ | 1095 | /* Insert new members here. */ |
1094 | #define MC_CMD_MAC_GENERATION_END 60 | 1096 | #define MC_CMD_MAC_GENERATION_END 96 |
1095 | #define MC_CMD_MAC_NSTATS (MC_CMD_MAC_GENERATION_END+1) | 1097 | #define MC_CMD_MAC_NSTATS (MC_CMD_MAC_GENERATION_END+1) |
1096 | 1098 | ||
1097 | /* MC_CMD_MAC_STATS: | 1099 | /* MC_CMD_MAC_STATS: |
diff --git a/drivers/net/sfc/mtd.c b/drivers/net/sfc/mtd.c index 3a464529a46b..407bbaddfea6 100644 --- a/drivers/net/sfc/mtd.c +++ b/drivers/net/sfc/mtd.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "mcdi_pcol.h" | 23 | #include "mcdi_pcol.h" |
24 | 24 | ||
25 | #define EFX_SPI_VERIFY_BUF_LEN 16 | 25 | #define EFX_SPI_VERIFY_BUF_LEN 16 |
26 | #define EFX_MCDI_CHUNK_LEN 128 | ||
27 | 26 | ||
28 | struct efx_mtd_partition { | 27 | struct efx_mtd_partition { |
29 | struct mtd_info mtd; | 28 | struct mtd_info mtd; |
@@ -428,7 +427,7 @@ static int siena_mtd_read(struct mtd_info *mtd, loff_t start, | |||
428 | int rc = 0; | 427 | int rc = 0; |
429 | 428 | ||
430 | while (offset < end) { | 429 | while (offset < end) { |
431 | chunk = min_t(size_t, end - offset, EFX_MCDI_CHUNK_LEN); | 430 | chunk = min_t(size_t, end - offset, EFX_MCDI_NVRAM_LEN_MAX); |
432 | rc = efx_mcdi_nvram_read(efx, part->mcdi.nvram_type, offset, | 431 | rc = efx_mcdi_nvram_read(efx, part->mcdi.nvram_type, offset, |
433 | buffer, chunk); | 432 | buffer, chunk); |
434 | if (rc) | 433 | if (rc) |
@@ -491,7 +490,7 @@ static int siena_mtd_write(struct mtd_info *mtd, loff_t start, | |||
491 | } | 490 | } |
492 | 491 | ||
493 | while (offset < end) { | 492 | while (offset < end) { |
494 | chunk = min_t(size_t, end - offset, EFX_MCDI_CHUNK_LEN); | 493 | chunk = min_t(size_t, end - offset, EFX_MCDI_NVRAM_LEN_MAX); |
495 | rc = efx_mcdi_nvram_write(efx, part->mcdi.nvram_type, offset, | 494 | rc = efx_mcdi_nvram_write(efx, part->mcdi.nvram_type, offset, |
496 | buffer, chunk); | 495 | buffer, chunk); |
497 | if (rc) | 496 | if (rc) |
diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c index ff8f0a417fa3..67eec7a6e487 100644 --- a/drivers/net/sfc/qt202x_phy.c +++ b/drivers/net/sfc/qt202x_phy.c | |||
@@ -318,15 +318,9 @@ static int qt202x_reset_phy(struct efx_nic *efx) | |||
318 | /* Wait 250ms for the PHY to complete bootup */ | 318 | /* Wait 250ms for the PHY to complete bootup */ |
319 | msleep(250); | 319 | msleep(250); |
320 | 320 | ||
321 | /* Check that all the MMDs we expect are present and responding. We | ||
322 | * expect faults on some if the link is down, but not on the PHY XS */ | ||
323 | rc = efx_mdio_check_mmds(efx, QT202X_REQUIRED_DEVS, MDIO_DEVS_PHYXS); | ||
324 | if (rc < 0) | ||
325 | goto fail; | ||
326 | |||
327 | falcon_board(efx)->type->init_phy(efx); | 321 | falcon_board(efx)->type->init_phy(efx); |
328 | 322 | ||
329 | return rc; | 323 | return 0; |
330 | 324 | ||
331 | fail: | 325 | fail: |
332 | EFX_ERR(efx, "PHY reset timed out\n"); | 326 | EFX_ERR(efx, "PHY reset timed out\n"); |
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index af3933579790..250c8827b842 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -79,10 +79,14 @@ struct efx_loopback_state { | |||
79 | static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests) | 79 | static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests) |
80 | { | 80 | { |
81 | int rc = 0; | 81 | int rc = 0; |
82 | int devad = __ffs(efx->mdio.mmds); | 82 | int devad; |
83 | u16 physid1, physid2; | 83 | u16 physid1, physid2; |
84 | 84 | ||
85 | if (efx->phy_type == PHY_TYPE_NONE) | 85 | if (efx->mdio.mode_support & MDIO_SUPPORTS_C45) |
86 | devad = __ffs(efx->mdio.mmds); | ||
87 | else if (efx->mdio.mode_support & MDIO_SUPPORTS_C22) | ||
88 | devad = MDIO_DEVAD_NONE; | ||
89 | else | ||
86 | return 0; | 90 | return 0; |
87 | 91 | ||
88 | mutex_lock(&efx->mac_lock); | 92 | mutex_lock(&efx->mac_lock); |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 37f486b65f63..67249c3c9f50 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -644,6 +644,7 @@ static void sky2_phy_power_up(struct sky2_hw *hw, unsigned port) | |||
644 | { | 644 | { |
645 | u32 reg1; | 645 | u32 reg1; |
646 | 646 | ||
647 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
647 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); | 648 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); |
648 | reg1 &= ~phy_power[port]; | 649 | reg1 &= ~phy_power[port]; |
649 | 650 | ||
@@ -651,6 +652,7 @@ static void sky2_phy_power_up(struct sky2_hw *hw, unsigned port) | |||
651 | reg1 |= coma_mode[port]; | 652 | reg1 |= coma_mode[port]; |
652 | 653 | ||
653 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); | 654 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); |
655 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
654 | sky2_pci_read32(hw, PCI_DEV_REG1); | 656 | sky2_pci_read32(hw, PCI_DEV_REG1); |
655 | 657 | ||
656 | if (hw->chip_id == CHIP_ID_YUKON_FE) | 658 | if (hw->chip_id == CHIP_ID_YUKON_FE) |
@@ -707,9 +709,11 @@ static void sky2_phy_power_down(struct sky2_hw *hw, unsigned port) | |||
707 | gm_phy_write(hw, port, PHY_MARV_CTRL, PHY_CT_PDOWN); | 709 | gm_phy_write(hw, port, PHY_MARV_CTRL, PHY_CT_PDOWN); |
708 | } | 710 | } |
709 | 711 | ||
712 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
710 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); | 713 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); |
711 | reg1 |= phy_power[port]; /* set PHY to PowerDown/COMA Mode */ | 714 | reg1 |= phy_power[port]; /* set PHY to PowerDown/COMA Mode */ |
712 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); | 715 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); |
716 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
713 | } | 717 | } |
714 | 718 | ||
715 | /* Force a renegotiation */ | 719 | /* Force a renegotiation */ |
@@ -1021,11 +1025,8 @@ static void sky2_prefetch_init(struct sky2_hw *hw, u32 qaddr, | |||
1021 | 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) |
1022 | { | 1026 | { |
1023 | struct sky2_tx_le *le = sky2->tx_le + *slot; | 1027 | struct sky2_tx_le *le = sky2->tx_le + *slot; |
1024 | struct tx_ring_info *re = sky2->tx_ring + *slot; | ||
1025 | 1028 | ||
1026 | *slot = RING_NEXT(*slot, sky2->tx_ring_size); | 1029 | *slot = RING_NEXT(*slot, sky2->tx_ring_size); |
1027 | re->flags = 0; | ||
1028 | re->skb = NULL; | ||
1029 | le->ctrl = 0; | 1030 | le->ctrl = 0; |
1030 | return le; | 1031 | return le; |
1031 | } | 1032 | } |
@@ -1618,8 +1619,7 @@ static unsigned tx_le_req(const struct sk_buff *skb) | |||
1618 | return count; | 1619 | return count; |
1619 | } | 1620 | } |
1620 | 1621 | ||
1621 | static void sky2_tx_unmap(struct pci_dev *pdev, | 1622 | static void sky2_tx_unmap(struct pci_dev *pdev, struct tx_ring_info *re) |
1622 | const struct tx_ring_info *re) | ||
1623 | { | 1623 | { |
1624 | if (re->flags & TX_MAP_SINGLE) | 1624 | if (re->flags & TX_MAP_SINGLE) |
1625 | pci_unmap_single(pdev, pci_unmap_addr(re, mapaddr), | 1625 | pci_unmap_single(pdev, pci_unmap_addr(re, mapaddr), |
@@ -1629,6 +1629,7 @@ static void sky2_tx_unmap(struct pci_dev *pdev, | |||
1629 | pci_unmap_page(pdev, pci_unmap_addr(re, mapaddr), | 1629 | pci_unmap_page(pdev, pci_unmap_addr(re, mapaddr), |
1630 | pci_unmap_len(re, maplen), | 1630 | pci_unmap_len(re, maplen), |
1631 | PCI_DMA_TODEVICE); | 1631 | PCI_DMA_TODEVICE); |
1632 | re->flags = 0; | ||
1632 | } | 1633 | } |
1633 | 1634 | ||
1634 | /* | 1635 | /* |
@@ -1835,6 +1836,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done) | |||
1835 | dev->stats.tx_packets++; | 1836 | dev->stats.tx_packets++; |
1836 | dev->stats.tx_bytes += skb->len; | 1837 | dev->stats.tx_bytes += skb->len; |
1837 | 1838 | ||
1839 | re->skb = NULL; | ||
1838 | dev_kfree_skb_any(skb); | 1840 | dev_kfree_skb_any(skb); |
1839 | 1841 | ||
1840 | sky2->tx_next = RING_NEXT(idx, sky2->tx_ring_size); | 1842 | sky2->tx_next = RING_NEXT(idx, sky2->tx_ring_size); |
@@ -2149,7 +2151,9 @@ static void sky2_qlink_intr(struct sky2_hw *hw) | |||
2149 | 2151 | ||
2150 | /* reset PHY Link Detect */ | 2152 | /* reset PHY Link Detect */ |
2151 | phy = sky2_pci_read16(hw, PSM_CONFIG_REG4); | 2153 | phy = sky2_pci_read16(hw, PSM_CONFIG_REG4); |
2154 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
2152 | sky2_pci_write16(hw, PSM_CONFIG_REG4, phy | 1); | 2155 | sky2_pci_write16(hw, PSM_CONFIG_REG4, phy | 1); |
2156 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
2153 | 2157 | ||
2154 | sky2_link_up(sky2); | 2158 | sky2_link_up(sky2); |
2155 | } | 2159 | } |
@@ -2640,6 +2644,7 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2640 | if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { | 2644 | if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { |
2641 | u16 pci_err; | 2645 | u16 pci_err; |
2642 | 2646 | ||
2647 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
2643 | pci_err = sky2_pci_read16(hw, PCI_STATUS); | 2648 | pci_err = sky2_pci_read16(hw, PCI_STATUS); |
2644 | if (net_ratelimit()) | 2649 | if (net_ratelimit()) |
2645 | dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", | 2650 | dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", |
@@ -2647,12 +2652,14 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2647 | 2652 | ||
2648 | sky2_pci_write16(hw, PCI_STATUS, | 2653 | sky2_pci_write16(hw, PCI_STATUS, |
2649 | pci_err | PCI_STATUS_ERROR_BITS); | 2654 | pci_err | PCI_STATUS_ERROR_BITS); |
2655 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
2650 | } | 2656 | } |
2651 | 2657 | ||
2652 | if (status & Y2_IS_PCI_EXP) { | 2658 | if (status & Y2_IS_PCI_EXP) { |
2653 | /* PCI-Express uncorrectable Error occurred */ | 2659 | /* PCI-Express uncorrectable Error occurred */ |
2654 | u32 err; | 2660 | u32 err; |
2655 | 2661 | ||
2662 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
2656 | err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); | 2663 | err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); |
2657 | sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, | 2664 | sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, |
2658 | 0xfffffffful); | 2665 | 0xfffffffful); |
@@ -2660,6 +2667,7 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2660 | dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); | 2667 | dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); |
2661 | 2668 | ||
2662 | sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); | 2669 | sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); |
2670 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
2663 | } | 2671 | } |
2664 | 2672 | ||
2665 | if (status & Y2_HWE_L1_MASK) | 2673 | if (status & Y2_HWE_L1_MASK) |
@@ -3038,6 +3046,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
3038 | } | 3046 | } |
3039 | 3047 | ||
3040 | sky2_power_on(hw); | 3048 | sky2_power_on(hw); |
3049 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
3041 | 3050 | ||
3042 | for (i = 0; i < hw->ports; i++) { | 3051 | for (i = 0; i < hw->ports; i++) { |
3043 | sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); | 3052 | sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); |
@@ -3074,6 +3083,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
3074 | reg <<= PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE; | 3083 | reg <<= PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE; |
3075 | 3084 | ||
3076 | /* reset PHY Link Detect */ | 3085 | /* reset PHY Link Detect */ |
3086 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
3077 | sky2_pci_write16(hw, PSM_CONFIG_REG4, | 3087 | sky2_pci_write16(hw, PSM_CONFIG_REG4, |
3078 | reg | PSM_CONFIG_REG4_RST_PHY_LINK_DETECT); | 3088 | reg | PSM_CONFIG_REG4_RST_PHY_LINK_DETECT); |
3079 | sky2_pci_write16(hw, PSM_CONFIG_REG4, reg); | 3089 | sky2_pci_write16(hw, PSM_CONFIG_REG4, reg); |
@@ -3091,6 +3101,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
3091 | /* restore the PCIe Link Control register */ | 3101 | /* restore the PCIe Link Control register */ |
3092 | sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg); | 3102 | sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg); |
3093 | } | 3103 | } |
3104 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
3094 | 3105 | ||
3095 | /* re-enable PEX PM in PEX PHY debug reg. 8 (clear bit 12) */ | 3106 | /* re-enable PEX PM in PEX PHY debug reg. 8 (clear bit 12) */ |
3096 | sky2_write32(hw, Y2_PEX_PHY_DATA, PEX_DB_ACCESS | (0x08UL << 16)); | 3107 | sky2_write32(hw, Y2_PEX_PHY_DATA, PEX_DB_ACCESS | (0x08UL << 16)); |
@@ -3228,6 +3239,27 @@ static inline u8 sky2_wol_supported(const struct sky2_hw *hw) | |||
3228 | return sky2_is_copper(hw) ? (WAKE_PHY | WAKE_MAGIC) : 0; | 3239 | return sky2_is_copper(hw) ? (WAKE_PHY | WAKE_MAGIC) : 0; |
3229 | } | 3240 | } |
3230 | 3241 | ||
3242 | static void sky2_hw_set_wol(struct sky2_hw *hw) | ||
3243 | { | ||
3244 | int wol = 0; | ||
3245 | int i; | ||
3246 | |||
3247 | for (i = 0; i < hw->ports; i++) { | ||
3248 | struct net_device *dev = hw->dev[i]; | ||
3249 | struct sky2_port *sky2 = netdev_priv(dev); | ||
3250 | |||
3251 | if (sky2->wol) | ||
3252 | wol = 1; | ||
3253 | } | ||
3254 | |||
3255 | if (hw->chip_id == CHIP_ID_YUKON_EC_U || | ||
3256 | hw->chip_id == CHIP_ID_YUKON_EX || | ||
3257 | hw->chip_id == CHIP_ID_YUKON_FE_P) | ||
3258 | sky2_write32(hw, B0_CTST, wol ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF); | ||
3259 | |||
3260 | device_set_wakeup_enable(&hw->pdev->dev, wol); | ||
3261 | } | ||
3262 | |||
3231 | static void sky2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | 3263 | static void sky2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) |
3232 | { | 3264 | { |
3233 | const struct sky2_port *sky2 = netdev_priv(dev); | 3265 | const struct sky2_port *sky2 = netdev_priv(dev); |
@@ -3247,13 +3279,7 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
3247 | 3279 | ||
3248 | sky2->wol = wol->wolopts; | 3280 | sky2->wol = wol->wolopts; |
3249 | 3281 | ||
3250 | if (hw->chip_id == CHIP_ID_YUKON_EC_U || | 3282 | sky2_hw_set_wol(hw); |
3251 | hw->chip_id == CHIP_ID_YUKON_EX || | ||
3252 | hw->chip_id == CHIP_ID_YUKON_FE_P) | ||
3253 | sky2_write32(hw, B0_CTST, sky2->wol | ||
3254 | ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF); | ||
3255 | |||
3256 | device_set_wakeup_enable(&hw->pdev->dev, sky2->wol); | ||
3257 | 3283 | ||
3258 | if (!netif_running(dev)) | 3284 | if (!netif_running(dev)) |
3259 | sky2_wol_init(sky2); | 3285 | sky2_wol_init(sky2); |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 95db60adde41..f9521136a869 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1063,7 +1063,7 @@ static int netdev_open(struct net_device *dev) | |||
1063 | if (retval) { | 1063 | if (retval) { |
1064 | printk(KERN_ERR "starfire: Failed to load firmware \"%s\"\n", | 1064 | printk(KERN_ERR "starfire: Failed to load firmware \"%s\"\n", |
1065 | FIRMWARE_RX); | 1065 | FIRMWARE_RX); |
1066 | return retval; | 1066 | goto out_init; |
1067 | } | 1067 | } |
1068 | if (fw_rx->size % 4) { | 1068 | if (fw_rx->size % 4) { |
1069 | printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n", | 1069 | printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n", |
@@ -1108,6 +1108,9 @@ out_tx: | |||
1108 | release_firmware(fw_tx); | 1108 | release_firmware(fw_tx); |
1109 | out_rx: | 1109 | out_rx: |
1110 | release_firmware(fw_rx); | 1110 | release_firmware(fw_rx); |
1111 | out_init: | ||
1112 | if (retval) | ||
1113 | netdev_close(dev); | ||
1111 | return retval; | 1114 | return retval; |
1112 | } | 1115 | } |
1113 | 1116 | ||
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 75a669d48e5e..d71c1976072e 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -1437,7 +1437,6 @@ static int tc35815_do_interrupt(struct net_device *dev, u32 status, int limit) | |||
1437 | /* Transmit complete. */ | 1437 | /* Transmit complete. */ |
1438 | lp->lstats.tx_ints++; | 1438 | lp->lstats.tx_ints++; |
1439 | tc35815_txdone(dev); | 1439 | tc35815_txdone(dev); |
1440 | netif_wake_queue(dev); | ||
1441 | if (ret < 0) | 1440 | if (ret < 0) |
1442 | ret = 0; | 1441 | ret = 0; |
1443 | } | 1442 | } |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 3a74d2168598..7f82b0238e08 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) |
5 | * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) | 5 | * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) |
6 | * Copyright (C) 2004 Sun Microsystems Inc. | 6 | * Copyright (C) 2004 Sun Microsystems Inc. |
7 | * Copyright (C) 2005-2009 Broadcom Corporation. | 7 | * Copyright (C) 2005-2010 Broadcom Corporation. |
8 | * | 8 | * |
9 | * Firmware is: | 9 | * Firmware is: |
10 | * Derived from proprietary unpublished source code, | 10 | * Derived from proprietary unpublished source code, |
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.105" | 71 | #define DRV_MODULE_VERSION "3.106" |
72 | #define DRV_MODULE_RELDATE "December 2, 2009" | 72 | #define DRV_MODULE_RELDATE "January 12, 2010" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -1037,7 +1037,11 @@ static void tg3_mdio_start(struct tg3 *tp) | |||
1037 | else | 1037 | else |
1038 | tp->phy_addr = 1; | 1038 | tp->phy_addr = 1; |
1039 | 1039 | ||
1040 | is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; | 1040 | if (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) |
1041 | is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; | ||
1042 | else | ||
1043 | is_serdes = tr32(TG3_CPMU_PHY_STRAP) & | ||
1044 | TG3_CPMU_PHY_STRAP_IS_SERDES; | ||
1041 | if (is_serdes) | 1045 | if (is_serdes) |
1042 | tp->phy_addr += 7; | 1046 | tp->phy_addr += 7; |
1043 | } else | 1047 | } else |
@@ -4693,8 +4697,9 @@ next_pkt: | |||
4693 | (*post_ptr)++; | 4697 | (*post_ptr)++; |
4694 | 4698 | ||
4695 | if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { | 4699 | if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { |
4696 | u32 idx = *post_ptr % TG3_RX_RING_SIZE; | 4700 | tpr->rx_std_prod_idx = std_prod_idx % TG3_RX_RING_SIZE; |
4697 | tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, idx); | 4701 | tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, |
4702 | tpr->rx_std_prod_idx); | ||
4698 | work_mask &= ~RXD_OPAQUE_RING_STD; | 4703 | work_mask &= ~RXD_OPAQUE_RING_STD; |
4699 | rx_std_posted = 0; | 4704 | rx_std_posted = 0; |
4700 | } | 4705 | } |
@@ -7742,7 +7747,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
7742 | ((u64) tpr->rx_std_mapping >> 32)); | 7747 | ((u64) tpr->rx_std_mapping >> 32)); |
7743 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, | 7748 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, |
7744 | ((u64) tpr->rx_std_mapping & 0xffffffff)); | 7749 | ((u64) tpr->rx_std_mapping & 0xffffffff)); |
7745 | if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) | 7750 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717) |
7746 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, | 7751 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, |
7747 | NIC_SRAM_RX_BUFFER_DESC); | 7752 | NIC_SRAM_RX_BUFFER_DESC); |
7748 | 7753 | ||
@@ -12122,7 +12127,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
12122 | 12127 | ||
12123 | tp->phy_id = eeprom_phy_id; | 12128 | tp->phy_id = eeprom_phy_id; |
12124 | if (eeprom_phy_serdes) { | 12129 | if (eeprom_phy_serdes) { |
12125 | if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) | 12130 | if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) || |
12131 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) | ||
12126 | tp->tg3_flags2 |= TG3_FLG2_MII_SERDES; | 12132 | tp->tg3_flags2 |= TG3_FLG2_MII_SERDES; |
12127 | else | 12133 | else |
12128 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; | 12134 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; |
@@ -13384,6 +13390,11 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13384 | if (err) | 13390 | if (err) |
13385 | return err; | 13391 | return err; |
13386 | 13392 | ||
13393 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 && | ||
13394 | (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0 || | ||
13395 | (tp->tg3_flags2 & TG3_FLG2_MII_SERDES))) | ||
13396 | return -ENOTSUPP; | ||
13397 | |||
13387 | /* Initialize data/descriptor byte/word swapping. */ | 13398 | /* Initialize data/descriptor byte/word swapping. */ |
13388 | val = tr32(GRC_MODE); | 13399 | val = tr32(GRC_MODE); |
13389 | val &= GRC_MODE_HOST_STACKUP; | 13400 | val &= GRC_MODE_HOST_STACKUP; |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index cd30889650f8..8a167912902b 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) |
5 | * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com) | 5 | * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com) |
6 | * Copyright (C) 2004 Sun Microsystems Inc. | 6 | * Copyright (C) 2004 Sun Microsystems Inc. |
7 | * Copyright (C) 2007-2010 Broadcom Corporation. | ||
7 | */ | 8 | */ |
8 | 9 | ||
9 | #ifndef _T3_H | 10 | #ifndef _T3_H |
@@ -1054,6 +1055,8 @@ | |||
1054 | #define CPMU_MUTEX_REQ_DRIVER 0x00001000 | 1055 | #define CPMU_MUTEX_REQ_DRIVER 0x00001000 |
1055 | #define TG3_CPMU_MUTEX_GNT 0x00003660 | 1056 | #define TG3_CPMU_MUTEX_GNT 0x00003660 |
1056 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 | 1057 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 |
1058 | #define TG3_CPMU_PHY_STRAP 0x00003664 | ||
1059 | #define TG3_CPMU_PHY_STRAP_IS_SERDES 0x00000020 | ||
1057 | /* 0x3664 --> 0x3800 unused */ | 1060 | /* 0x3664 --> 0x3800 unused */ |
1058 | 1061 | ||
1059 | /* Mbuf cluster free registers */ | 1062 | /* Mbuf cluster free registers */ |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 595777dcadb1..20696b5d60a5 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -249,6 +249,7 @@ static struct pci_device_id tulip_pci_tbl[] = { | |||
249 | { 0x17B3, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, | 249 | { 0x17B3, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, |
250 | { 0x10b7, 0x9300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* 3Com 3CSOHO100B-TX */ | 250 | { 0x10b7, 0x9300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* 3Com 3CSOHO100B-TX */ |
251 | { 0x14ea, 0xab08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* Planex FNW-3602-TX */ | 251 | { 0x14ea, 0xab08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* Planex FNW-3602-TX */ |
252 | { 0x1414, 0x0001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* Microsoft MN-120 */ | ||
252 | { 0x1414, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, | 253 | { 0x1414, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, |
253 | { } /* terminate list */ | 254 | { } /* terminate list */ |
254 | }; | 255 | }; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 96bdc0b43889..eb8fe7e16c6c 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3279,13 +3279,12 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ) | |||
3279 | /* Handle the transmitted buffer and release */ | 3279 | /* Handle the transmitted buffer and release */ |
3280 | /* the BD to be used with the current frame */ | 3280 | /* the BD to be used with the current frame */ |
3281 | 3281 | ||
3282 | if (bd == ugeth->txBd[txQ]) /* queue empty? */ | 3282 | skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]]; |
3283 | if (!skb) | ||
3283 | break; | 3284 | break; |
3284 | 3285 | ||
3285 | dev->stats.tx_packets++; | 3286 | dev->stats.tx_packets++; |
3286 | 3287 | ||
3287 | skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]]; | ||
3288 | |||
3289 | if (skb_queue_len(&ugeth->rx_recycle) < RX_BD_RING_LEN && | 3288 | if (skb_queue_len(&ugeth->rx_recycle) < RX_BD_RING_LEN && |
3290 | skb_recycle_check(skb, | 3289 | skb_recycle_check(skb, |
3291 | ugeth->ug_info->uf_info.max_rx_buf_length + | 3290 | ugeth->ug_info->uf_info.max_rx_buf_length + |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 21e183a83b99..5f3b9eaeb04f 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -419,7 +419,7 @@ static int cdc_manage_power(struct usbnet *dev, int on) | |||
419 | 419 | ||
420 | static const struct driver_info cdc_info = { | 420 | static const struct driver_info cdc_info = { |
421 | .description = "CDC Ethernet Device", | 421 | .description = "CDC Ethernet Device", |
422 | .flags = FLAG_ETHER | FLAG_LINK_INTR, | 422 | .flags = FLAG_ETHER, |
423 | // .check_connect = cdc_check_connect, | 423 | // .check_connect = cdc_check_connect, |
424 | .bind = cdc_bind, | 424 | .bind = cdc_bind, |
425 | .unbind = usbnet_cdc_unbind, | 425 | .unbind = usbnet_cdc_unbind, |
@@ -584,6 +584,11 @@ static const struct usb_device_id products [] = { | |||
584 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 584 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
585 | .driver_info = (unsigned long) &mbm_info, | 585 | .driver_info = (unsigned long) &mbm_info, |
586 | }, { | 586 | }, { |
587 | /* Ericsson C3607w ver 2 */ | ||
588 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x190b, USB_CLASS_COMM, | ||
589 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
590 | .driver_info = (unsigned long) &mbm_info, | ||
591 | }, { | ||
587 | /* Toshiba F3507g */ | 592 | /* Toshiba F3507g */ |
588 | USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM, | 593 | USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM, |
589 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 594 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index c93f58f5c6f2..317aa34b21cf 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status) | |||
1877 | /** | 1877 | /** |
1878 | * tx_srv - transmit interrupt service | 1878 | * tx_srv - transmit interrupt service |
1879 | * @vptr; Velocity | 1879 | * @vptr; Velocity |
1880 | * @status: | ||
1881 | * | 1880 | * |
1882 | * Scan the queues looking for transmitted packets that | 1881 | * Scan the queues looking for transmitted packets that |
1883 | * we can complete and clean up. Update any statistics as | 1882 | * we can complete and clean up. Update any statistics as |
1884 | * necessary/ | 1883 | * necessary/ |
1885 | */ | 1884 | */ |
1886 | static int velocity_tx_srv(struct velocity_info *vptr, u32 status) | 1885 | static int velocity_tx_srv(struct velocity_info *vptr) |
1887 | { | 1886 | { |
1888 | struct tx_desc *td; | 1887 | struct tx_desc *td; |
1889 | int qnum; | 1888 | int qnum; |
@@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) | |||
2090 | /** | 2089 | /** |
2091 | * velocity_rx_srv - service RX interrupt | 2090 | * velocity_rx_srv - service RX interrupt |
2092 | * @vptr: velocity | 2091 | * @vptr: velocity |
2093 | * @status: adapter status (unused) | ||
2094 | * | 2092 | * |
2095 | * Walk the receive ring of the velocity adapter and remove | 2093 | * Walk the receive ring of the velocity adapter and remove |
2096 | * any received packets from the receive queue. Hand the ring | 2094 | * any received packets from the receive queue. Hand the ring |
2097 | * slots back to the adapter for reuse. | 2095 | * slots back to the adapter for reuse. |
2098 | */ | 2096 | */ |
2099 | static int velocity_rx_srv(struct velocity_info *vptr, int status, | 2097 | static int velocity_rx_srv(struct velocity_info *vptr, int budget_left) |
2100 | int budget_left) | ||
2101 | { | 2098 | { |
2102 | struct net_device_stats *stats = &vptr->dev->stats; | 2099 | struct net_device_stats *stats = &vptr->dev->stats; |
2103 | int rd_curr = vptr->rx.curr; | 2100 | int rd_curr = vptr->rx.curr; |
@@ -2151,32 +2148,24 @@ static int velocity_poll(struct napi_struct *napi, int budget) | |||
2151 | struct velocity_info *vptr = container_of(napi, | 2148 | struct velocity_info *vptr = container_of(napi, |
2152 | struct velocity_info, napi); | 2149 | struct velocity_info, napi); |
2153 | unsigned int rx_done; | 2150 | unsigned int rx_done; |
2154 | u32 isr_status; | 2151 | unsigned long flags; |
2155 | |||
2156 | spin_lock(&vptr->lock); | ||
2157 | isr_status = mac_read_isr(vptr->mac_regs); | ||
2158 | |||
2159 | /* Ack the interrupt */ | ||
2160 | mac_write_isr(vptr->mac_regs, isr_status); | ||
2161 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
2162 | velocity_error(vptr, isr_status); | ||
2163 | 2152 | ||
2153 | spin_lock_irqsave(&vptr->lock, flags); | ||
2164 | /* | 2154 | /* |
2165 | * Do rx and tx twice for performance (taken from the VIA | 2155 | * Do rx and tx twice for performance (taken from the VIA |
2166 | * out-of-tree driver). | 2156 | * out-of-tree driver). |
2167 | */ | 2157 | */ |
2168 | rx_done = velocity_rx_srv(vptr, isr_status, budget / 2); | 2158 | rx_done = velocity_rx_srv(vptr, budget / 2); |
2169 | velocity_tx_srv(vptr, isr_status); | 2159 | velocity_tx_srv(vptr); |
2170 | rx_done += velocity_rx_srv(vptr, isr_status, budget - rx_done); | 2160 | rx_done += velocity_rx_srv(vptr, budget - rx_done); |
2171 | velocity_tx_srv(vptr, isr_status); | 2161 | velocity_tx_srv(vptr); |
2172 | |||
2173 | spin_unlock(&vptr->lock); | ||
2174 | 2162 | ||
2175 | /* If budget not fully consumed, exit the polling mode */ | 2163 | /* If budget not fully consumed, exit the polling mode */ |
2176 | if (rx_done < budget) { | 2164 | if (rx_done < budget) { |
2177 | napi_complete(napi); | 2165 | napi_complete(napi); |
2178 | mac_enable_int(vptr->mac_regs); | 2166 | mac_enable_int(vptr->mac_regs); |
2179 | } | 2167 | } |
2168 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
2180 | 2169 | ||
2181 | return rx_done; | 2170 | return rx_done; |
2182 | } | 2171 | } |
@@ -2206,10 +2195,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance) | |||
2206 | return IRQ_NONE; | 2195 | return IRQ_NONE; |
2207 | } | 2196 | } |
2208 | 2197 | ||
2198 | /* Ack the interrupt */ | ||
2199 | mac_write_isr(vptr->mac_regs, isr_status); | ||
2200 | |||
2209 | if (likely(napi_schedule_prep(&vptr->napi))) { | 2201 | if (likely(napi_schedule_prep(&vptr->napi))) { |
2210 | mac_disable_int(vptr->mac_regs); | 2202 | mac_disable_int(vptr->mac_regs); |
2211 | __napi_schedule(&vptr->napi); | 2203 | __napi_schedule(&vptr->napi); |
2212 | } | 2204 | } |
2205 | |||
2206 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
2207 | velocity_error(vptr, isr_status); | ||
2208 | |||
2213 | spin_unlock(&vptr->lock); | 2209 | spin_unlock(&vptr->lock); |
2214 | 2210 | ||
2215 | return IRQ_HANDLED; | 2211 | return IRQ_HANDLED; |
@@ -3100,7 +3096,7 @@ static int velocity_resume(struct pci_dev *pdev) | |||
3100 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); | 3096 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); |
3101 | mac_disable_int(vptr->mac_regs); | 3097 | mac_disable_int(vptr->mac_regs); |
3102 | 3098 | ||
3103 | velocity_tx_srv(vptr, 0); | 3099 | velocity_tx_srv(vptr); |
3104 | 3100 | ||
3105 | for (i = 0; i < vptr->tx.numq; i++) { | 3101 | for (i = 0; i < vptr->tx.numq; i++) { |
3106 | if (vptr->tx.used[i]) | 3102 | if (vptr->tx.used[i]) |
@@ -3344,6 +3340,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
3344 | { | 3340 | { |
3345 | struct velocity_info *vptr = netdev_priv(dev); | 3341 | struct velocity_info *vptr = netdev_priv(dev); |
3346 | int max_us = 0x3f * 64; | 3342 | int max_us = 0x3f * 64; |
3343 | unsigned long flags; | ||
3347 | 3344 | ||
3348 | /* 6 bits of */ | 3345 | /* 6 bits of */ |
3349 | if (ecmd->tx_coalesce_usecs > max_us) | 3346 | if (ecmd->tx_coalesce_usecs > max_us) |
@@ -3365,6 +3362,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
3365 | ecmd->tx_coalesce_usecs); | 3362 | ecmd->tx_coalesce_usecs); |
3366 | 3363 | ||
3367 | /* Setup the interrupt suppression and queue timers */ | 3364 | /* Setup the interrupt suppression and queue timers */ |
3365 | spin_lock_irqsave(&vptr->lock, flags); | ||
3368 | mac_disable_int(vptr->mac_regs); | 3366 | mac_disable_int(vptr->mac_regs); |
3369 | setup_adaptive_interrupts(vptr); | 3367 | setup_adaptive_interrupts(vptr); |
3370 | setup_queue_timers(vptr); | 3368 | setup_queue_timers(vptr); |
@@ -3372,6 +3370,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
3372 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); | 3370 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); |
3373 | mac_clear_isr(vptr->mac_regs); | 3371 | mac_clear_isr(vptr->mac_regs); |
3374 | mac_enable_int(vptr->mac_regs); | 3372 | mac_enable_int(vptr->mac_regs); |
3373 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
3375 | 3374 | ||
3376 | return 0; | 3375 | return 0; |
3377 | } | 3376 | } |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index c708ecc3cb2e..9ead30bd00c4 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -395,8 +395,7 @@ static void refill_work(struct work_struct *work) | |||
395 | 395 | ||
396 | vi = container_of(work, struct virtnet_info, refill.work); | 396 | vi = container_of(work, struct virtnet_info, refill.work); |
397 | napi_disable(&vi->napi); | 397 | napi_disable(&vi->napi); |
398 | try_fill_recv(vi, GFP_KERNEL); | 398 | still_empty = !try_fill_recv(vi, GFP_KERNEL); |
399 | still_empty = (vi->num == 0); | ||
400 | napi_enable(&vi->napi); | 399 | napi_enable(&vi->napi); |
401 | 400 | ||
402 | /* In theory, this can happen: if we don't get any buffers in | 401 | /* In theory, this can happen: if we don't get any buffers in |
diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h b/drivers/net/wimax/i2400m/i2400m-usb.h index 5cc0f279417e..2d7c96d7e865 100644 --- a/drivers/net/wimax/i2400m/i2400m-usb.h +++ b/drivers/net/wimax/i2400m/i2400m-usb.h | |||
@@ -151,6 +151,7 @@ enum { | |||
151 | 151 | ||
152 | /* Device IDs */ | 152 | /* Device IDs */ |
153 | USB_DEVICE_ID_I6050 = 0x0186, | 153 | USB_DEVICE_ID_I6050 = 0x0186, |
154 | USB_DEVICE_ID_I6050_2 = 0x0188, | ||
154 | }; | 155 | }; |
155 | 156 | ||
156 | 157 | ||
@@ -234,6 +235,7 @@ struct i2400mu { | |||
234 | u8 rx_size_auto_shrink; | 235 | u8 rx_size_auto_shrink; |
235 | 236 | ||
236 | struct dentry *debugfs_dentry; | 237 | struct dentry *debugfs_dentry; |
238 | unsigned i6050:1; /* 1 if this is a 6050 based SKU */ | ||
237 | }; | 239 | }; |
238 | 240 | ||
239 | 241 | ||
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c index 3b48681f8a0d..98f4f8c5fb68 100644 --- a/drivers/net/wimax/i2400m/usb.c +++ b/drivers/net/wimax/i2400m/usb.c | |||
@@ -478,7 +478,16 @@ int i2400mu_probe(struct usb_interface *iface, | |||
478 | i2400m->bus_bm_wait_for_ack = i2400mu_bus_bm_wait_for_ack; | 478 | i2400m->bus_bm_wait_for_ack = i2400mu_bus_bm_wait_for_ack; |
479 | i2400m->bus_bm_mac_addr_impaired = 0; | 479 | i2400m->bus_bm_mac_addr_impaired = 0; |
480 | 480 | ||
481 | if (id->idProduct == USB_DEVICE_ID_I6050) { | 481 | switch (id->idProduct) { |
482 | case USB_DEVICE_ID_I6050: | ||
483 | case USB_DEVICE_ID_I6050_2: | ||
484 | i2400mu->i6050 = 1; | ||
485 | break; | ||
486 | default: | ||
487 | break; | ||
488 | } | ||
489 | |||
490 | if (i2400mu->i6050) { | ||
482 | i2400m->bus_fw_names = i2400mu_bus_fw_names_6050; | 491 | i2400m->bus_fw_names = i2400mu_bus_fw_names_6050; |
483 | i2400mu->endpoint_cfg.bulk_out = 0; | 492 | i2400mu->endpoint_cfg.bulk_out = 0; |
484 | i2400mu->endpoint_cfg.notification = 3; | 493 | i2400mu->endpoint_cfg.notification = 3; |
@@ -719,6 +728,7 @@ int i2400mu_post_reset(struct usb_interface *iface) | |||
719 | static | 728 | static |
720 | struct usb_device_id i2400mu_id_table[] = { | 729 | struct usb_device_id i2400mu_id_table[] = { |
721 | { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050) }, | 730 | { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050) }, |
731 | { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050_2) }, | ||
722 | { USB_DEVICE(0x8086, 0x0181) }, | 732 | { USB_DEVICE(0x8086, 0x0181) }, |
723 | { USB_DEVICE(0x8086, 0x1403) }, | 733 | { USB_DEVICE(0x8086, 0x1403) }, |
724 | { USB_DEVICE(0x8086, 0x1405) }, | 734 | { USB_DEVICE(0x8086, 0x1405) }, |
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index 5d1c8677f180..6a3f4da7fb48 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c | |||
@@ -97,7 +97,7 @@ ath5k_eeprom_init_header(struct ath5k_hw *ah) | |||
97 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; | 97 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; |
98 | int ret; | 98 | int ret; |
99 | u16 val; | 99 | u16 val; |
100 | u32 cksum, offset; | 100 | u32 cksum, offset, eep_max = AR5K_EEPROM_INFO_MAX; |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Read values from EEPROM and store them in the capability structure | 103 | * Read values from EEPROM and store them in the capability structure |
@@ -116,12 +116,38 @@ ath5k_eeprom_init_header(struct ath5k_hw *ah) | |||
116 | * Validate the checksum of the EEPROM date. There are some | 116 | * Validate the checksum of the EEPROM date. There are some |
117 | * devices with invalid EEPROMs. | 117 | * devices with invalid EEPROMs. |
118 | */ | 118 | */ |
119 | for (cksum = 0, offset = 0; offset < AR5K_EEPROM_INFO_MAX; offset++) { | 119 | AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_UPPER, val); |
120 | if (val) { | ||
121 | eep_max = (val & AR5K_EEPROM_SIZE_UPPER_MASK) << | ||
122 | AR5K_EEPROM_SIZE_ENDLOC_SHIFT; | ||
123 | AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_LOWER, val); | ||
124 | eep_max = (eep_max | val) - AR5K_EEPROM_INFO_BASE; | ||
125 | |||
126 | /* | ||
127 | * Fail safe check to prevent stupid loops due | ||
128 | * to busted EEPROMs. XXX: This value is likely too | ||
129 | * big still, waiting on a better value. | ||
130 | */ | ||
131 | if (eep_max > (3 * AR5K_EEPROM_INFO_MAX)) { | ||
132 | ATH5K_ERR(ah->ah_sc, "Invalid max custom EEPROM size: " | ||
133 | "%d (0x%04x) max expected: %d (0x%04x)\n", | ||
134 | eep_max, eep_max, | ||
135 | 3 * AR5K_EEPROM_INFO_MAX, | ||
136 | 3 * AR5K_EEPROM_INFO_MAX); | ||
137 | return -EIO; | ||
138 | } | ||
139 | } | ||
140 | |||
141 | for (cksum = 0, offset = 0; offset < eep_max; offset++) { | ||
120 | AR5K_EEPROM_READ(AR5K_EEPROM_INFO(offset), val); | 142 | AR5K_EEPROM_READ(AR5K_EEPROM_INFO(offset), val); |
121 | cksum ^= val; | 143 | cksum ^= val; |
122 | } | 144 | } |
123 | if (cksum != AR5K_EEPROM_INFO_CKSUM) { | 145 | if (cksum != AR5K_EEPROM_INFO_CKSUM) { |
124 | ATH5K_ERR(ah->ah_sc, "Invalid EEPROM checksum 0x%04x\n", cksum); | 146 | ATH5K_ERR(ah->ah_sc, "Invalid EEPROM " |
147 | "checksum: 0x%04x eep_max: 0x%04x (%s)\n", | ||
148 | cksum, eep_max, | ||
149 | eep_max == AR5K_EEPROM_INFO_MAX ? | ||
150 | "default size" : "custom size"); | ||
125 | return -EIO; | 151 | return -EIO; |
126 | } | 152 | } |
127 | 153 | ||
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.h b/drivers/net/wireless/ath/ath5k/eeprom.h index 0123f3521a0b..473a483bb9c3 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.h +++ b/drivers/net/wireless/ath/ath5k/eeprom.h | |||
@@ -37,6 +37,14 @@ | |||
37 | #define AR5K_EEPROM_RFKILL_POLARITY_S 1 | 37 | #define AR5K_EEPROM_RFKILL_POLARITY_S 1 |
38 | 38 | ||
39 | #define AR5K_EEPROM_REG_DOMAIN 0x00bf /* EEPROM regdom */ | 39 | #define AR5K_EEPROM_REG_DOMAIN 0x00bf /* EEPROM regdom */ |
40 | |||
41 | /* FLASH(EEPROM) Defines for AR531X chips */ | ||
42 | #define AR5K_EEPROM_SIZE_LOWER 0x1b /* size info -- lower */ | ||
43 | #define AR5K_EEPROM_SIZE_UPPER 0x1c /* size info -- upper */ | ||
44 | #define AR5K_EEPROM_SIZE_UPPER_MASK 0xfff0 | ||
45 | #define AR5K_EEPROM_SIZE_UPPER_SHIFT 4 | ||
46 | #define AR5K_EEPROM_SIZE_ENDLOC_SHIFT 12 | ||
47 | |||
40 | #define AR5K_EEPROM_CHECKSUM 0x00c0 /* EEPROM checksum */ | 48 | #define AR5K_EEPROM_CHECKSUM 0x00c0 /* EEPROM checksum */ |
41 | #define AR5K_EEPROM_INFO_BASE 0x00c0 /* EEPROM header */ | 49 | #define AR5K_EEPROM_INFO_BASE 0x00c0 /* EEPROM header */ |
42 | #define AR5K_EEPROM_INFO_MAX (0x400 - AR5K_EEPROM_INFO_BASE) | 50 | #define AR5K_EEPROM_INFO_MAX (0x400 - AR5K_EEPROM_INFO_BASE) |
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig index 03a1106ad725..5774cea23a3b 100644 --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig | |||
@@ -25,7 +25,7 @@ config ATH9K | |||
25 | 25 | ||
26 | config ATH9K_DEBUGFS | 26 | config ATH9K_DEBUGFS |
27 | bool "Atheros ath9k debugging" | 27 | bool "Atheros ath9k debugging" |
28 | depends on ATH9K | 28 | depends on ATH9K && DEBUG_FS |
29 | ---help--- | 29 | ---help--- |
30 | Say Y, if you need access to ath9k's statistics for | 30 | Say Y, if you need access to ath9k's statistics for |
31 | interrupts, rate control, etc. | 31 | interrupts, rate control, etc. |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index e2cef2ff5d8f..1597a42731ed 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -33,11 +33,11 @@ struct ath_node; | |||
33 | 33 | ||
34 | /* Macro to expand scalars to 64-bit objects */ | 34 | /* Macro to expand scalars to 64-bit objects */ |
35 | 35 | ||
36 | #define ito64(x) (sizeof(x) == 8) ? \ | 36 | #define ito64(x) (sizeof(x) == 1) ? \ |
37 | (((unsigned long long int)(x)) & (0xff)) : \ | 37 | (((unsigned long long int)(x)) & (0xff)) : \ |
38 | (sizeof(x) == 16) ? \ | 38 | (sizeof(x) == 2) ? \ |
39 | (((unsigned long long int)(x)) & 0xffff) : \ | 39 | (((unsigned long long int)(x)) & 0xffff) : \ |
40 | ((sizeof(x) == 32) ? \ | 40 | ((sizeof(x) == 4) ? \ |
41 | (((unsigned long long int)(x)) & 0xffffffff) : \ | 41 | (((unsigned long long int)(x)) & 0xffffffff) : \ |
42 | (unsigned long long int)(x)) | 42 | (unsigned long long int)(x)) |
43 | 43 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 2ec61f08cfdb..ae371448b5a0 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -855,12 +855,11 @@ static void ath9k_hw_init_mode_gain_regs(struct ath_hw *ah) | |||
855 | } | 855 | } |
856 | } | 856 | } |
857 | 857 | ||
858 | static void ath9k_hw_init_11a_eeprom_fix(struct ath_hw *ah) | 858 | static void ath9k_hw_init_eeprom_fix(struct ath_hw *ah) |
859 | { | 859 | { |
860 | u32 i, j; | 860 | u32 i, j; |
861 | 861 | ||
862 | if ((ah->hw_version.devid == AR9280_DEVID_PCI) && | 862 | if (ah->hw_version.devid == AR9280_DEVID_PCI) { |
863 | test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes)) { | ||
864 | 863 | ||
865 | /* EEPROM Fixup */ | 864 | /* EEPROM Fixup */ |
866 | for (i = 0; i < ah->iniModes.ia_rows; i++) { | 865 | for (i = 0; i < ah->iniModes.ia_rows; i++) { |
@@ -980,7 +979,7 @@ int ath9k_hw_init(struct ath_hw *ah) | |||
980 | if (r) | 979 | if (r) |
981 | return r; | 980 | return r; |
982 | 981 | ||
983 | ath9k_hw_init_11a_eeprom_fix(ah); | 982 | ath9k_hw_init_eeprom_fix(ah); |
984 | 983 | ||
985 | r = ath9k_hw_init_macaddr(ah); | 984 | r = ath9k_hw_init_macaddr(ah); |
986 | if (r) { | 985 | if (r) { |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 996eb90263cc..643bea35686f 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2655,10 +2655,10 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
2655 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { | 2655 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { |
2656 | ath9k_ps_wakeup(sc); | 2656 | ath9k_ps_wakeup(sc); |
2657 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); | 2657 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); |
2658 | ath_beacon_return(sc, avp); | ||
2659 | ath9k_ps_restore(sc); | 2658 | ath9k_ps_restore(sc); |
2660 | } | 2659 | } |
2661 | 2660 | ||
2661 | ath_beacon_return(sc, avp); | ||
2662 | sc->sc_flags &= ~SC_OP_BEACONS; | 2662 | sc->sc_flags &= ~SC_OP_BEACONS; |
2663 | 2663 | ||
2664 | for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { | 2664 | for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index fa12b9060b0b..29bf33692f71 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1615,7 +1615,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, | |||
1615 | bf->bf_frmlen -= padsize; | 1615 | bf->bf_frmlen -= padsize; |
1616 | } | 1616 | } |
1617 | 1617 | ||
1618 | if (conf_is_ht(&hw->conf) && !is_pae(skb)) | 1618 | if (conf_is_ht(&hw->conf)) |
1619 | bf->bf_state.bf_type |= BUF_HT; | 1619 | bf->bf_state.bf_type |= BUF_HT; |
1620 | 1620 | ||
1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); | 1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); |
@@ -1701,7 +1701,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
1701 | goto tx_done; | 1701 | goto tx_done; |
1702 | } | 1702 | } |
1703 | 1703 | ||
1704 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { | 1704 | if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) { |
1705 | /* | 1705 | /* |
1706 | * Try aggregation if it's a unicast data frame | 1706 | * Try aggregation if it's a unicast data frame |
1707 | * and the destination is HT capable. | 1707 | * and the destination is HT capable. |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index fe3bf9491997..c484cc253892 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -115,6 +115,7 @@ | |||
115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ | 115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ |
116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ | 116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ |
117 | #define B43_MMIO_RNG 0x65A | 117 | #define B43_MMIO_RNG 0x65A |
118 | #define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */ | ||
118 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ | 119 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ |
119 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 | 120 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 |
120 | #define B43_MMIO_POWERUP_DELAY 0x6A8 | 121 | #define B43_MMIO_POWERUP_DELAY 0x6A8 |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 4c41cfe44f26..490fb45d1d05 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -628,10 +628,17 @@ static void b43_upload_card_macaddress(struct b43_wldev *dev) | |||
628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) | 628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) |
629 | { | 629 | { |
630 | /* slot_time is in usec. */ | 630 | /* slot_time is in usec. */ |
631 | if (dev->phy.type != B43_PHYTYPE_G) | 631 | /* This test used to exit for all but a G PHY. */ |
632 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | ||
632 | return; | 633 | return; |
633 | b43_write16(dev, 0x684, 510 + slot_time); | 634 | b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time); |
634 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | 635 | /* Shared memory location 0x0010 is the slot time and should be |
636 | * set to slot_time; however, this register is initially 0 and changing | ||
637 | * the value adversely affects the transmit rate for BCM4311 | ||
638 | * devices. Until this behavior is unterstood, delete this step | ||
639 | * | ||
640 | * b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | ||
641 | */ | ||
635 | } | 642 | } |
636 | 643 | ||
637 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) | 644 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 484c5fdf7c2a..31462813bac0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -1961,7 +1961,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
1961 | struct ieee80211_tx_info *info; | 1961 | struct ieee80211_tx_info *info; |
1962 | struct iwl4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; | 1962 | struct iwl4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; |
1963 | u32 status = le32_to_cpu(tx_resp->u.status); | 1963 | u32 status = le32_to_cpu(tx_resp->u.status); |
1964 | int tid = MAX_TID_COUNT; | 1964 | int uninitialized_var(tid); |
1965 | int sta_id; | 1965 | int sta_id; |
1966 | int freed; | 1966 | int freed; |
1967 | u8 *qc = NULL; | 1967 | u8 *qc = NULL; |
@@ -2008,7 +2008,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2008 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " | 2008 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " |
2009 | "%d index %d\n", scd_ssn , index); | 2009 | "%d index %d\n", scd_ssn , index); |
2010 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 2010 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
2011 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 2011 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
2012 | 2012 | ||
2013 | if (priv->mac80211_registered && | 2013 | if (priv->mac80211_registered && |
2014 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && | 2014 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 33a5866538e7..cffaae772d51 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1125,7 +1125,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1125 | scd_ssn , index, txq_id, txq->swq_id); | 1125 | scd_ssn , index, txq_id, txq->swq_id); |
1126 | 1126 | ||
1127 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 1127 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
1128 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 1128 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1129 | 1129 | ||
1130 | if (priv->mac80211_registered && | 1130 | if (priv->mac80211_registered && |
1131 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && | 1131 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && |
@@ -1153,16 +1153,14 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1153 | tx_resp->failure_frame); | 1153 | tx_resp->failure_frame); |
1154 | 1154 | ||
1155 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 1155 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
1156 | if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) | 1156 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1157 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | ||
1158 | 1157 | ||
1159 | if (priv->mac80211_registered && | 1158 | if (priv->mac80211_registered && |
1160 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) | 1159 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) |
1161 | iwl_wake_queue(priv, txq_id); | 1160 | iwl_wake_queue(priv, txq_id); |
1162 | } | 1161 | } |
1163 | 1162 | ||
1164 | if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) | 1163 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); |
1165 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); | ||
1166 | 1164 | ||
1167 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) | 1165 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) |
1168 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); | 1166 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); |
@@ -1598,6 +1596,7 @@ struct iwl_cfg iwl5300_agn_cfg = { | |||
1598 | .use_bsm = false, | 1596 | .use_bsm = false, |
1599 | .ht_greenfield_support = true, | 1597 | .ht_greenfield_support = true, |
1600 | .led_compensation = 51, | 1598 | .led_compensation = 51, |
1599 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
1601 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1600 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1602 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | 1601 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, |
1603 | }; | 1602 | }; |
@@ -1622,6 +1621,7 @@ struct iwl_cfg iwl5100_bgn_cfg = { | |||
1622 | .use_bsm = false, | 1621 | .use_bsm = false, |
1623 | .ht_greenfield_support = true, | 1622 | .ht_greenfield_support = true, |
1624 | .led_compensation = 51, | 1623 | .led_compensation = 51, |
1624 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
1625 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1625 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1626 | }; | 1626 | }; |
1627 | 1627 | ||
@@ -1667,6 +1667,7 @@ struct iwl_cfg iwl5100_agn_cfg = { | |||
1667 | .use_bsm = false, | 1667 | .use_bsm = false, |
1668 | .ht_greenfield_support = true, | 1668 | .ht_greenfield_support = true, |
1669 | .led_compensation = 51, | 1669 | .led_compensation = 51, |
1670 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
1670 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1671 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1671 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | 1672 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, |
1672 | }; | 1673 | }; |
@@ -1691,6 +1692,7 @@ struct iwl_cfg iwl5350_agn_cfg = { | |||
1691 | .use_bsm = false, | 1692 | .use_bsm = false, |
1692 | .ht_greenfield_support = true, | 1693 | .ht_greenfield_support = true, |
1693 | .led_compensation = 51, | 1694 | .led_compensation = 51, |
1695 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
1694 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1696 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1695 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | 1697 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, |
1696 | }; | 1698 | }; |
@@ -1715,6 +1717,7 @@ struct iwl_cfg iwl5150_agn_cfg = { | |||
1715 | .use_bsm = false, | 1717 | .use_bsm = false, |
1716 | .ht_greenfield_support = true, | 1718 | .ht_greenfield_support = true, |
1717 | .led_compensation = 51, | 1719 | .led_compensation = 51, |
1720 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
1718 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1721 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1719 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | 1722 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, |
1720 | }; | 1723 | }; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 574d36658702..f36f804804fc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -2344,6 +2344,21 @@ static void iwl_ht_conf(struct iwl_priv *priv, | |||
2344 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 2344 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2345 | } | 2345 | } |
2346 | 2346 | ||
2347 | static inline void iwl_set_no_assoc(struct iwl_priv *priv) | ||
2348 | { | ||
2349 | priv->assoc_id = 0; | ||
2350 | iwl_led_disassociate(priv); | ||
2351 | /* | ||
2352 | * inform the ucode that there is no longer an | ||
2353 | * association and that no more packets should be | ||
2354 | * sent | ||
2355 | */ | ||
2356 | priv->staging_rxon.filter_flags &= | ||
2357 | ~RXON_FILTER_ASSOC_MSK; | ||
2358 | priv->staging_rxon.assoc_id = 0; | ||
2359 | iwlcore_commit_rxon(priv); | ||
2360 | } | ||
2361 | |||
2347 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) | 2362 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) |
2348 | void iwl_bss_info_changed(struct ieee80211_hw *hw, | 2363 | void iwl_bss_info_changed(struct ieee80211_hw *hw, |
2349 | struct ieee80211_vif *vif, | 2364 | struct ieee80211_vif *vif, |
@@ -2475,20 +2490,8 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2475 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; | 2490 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; |
2476 | if (!iwl_is_rfkill(priv)) | 2491 | if (!iwl_is_rfkill(priv)) |
2477 | priv->cfg->ops->lib->post_associate(priv); | 2492 | priv->cfg->ops->lib->post_associate(priv); |
2478 | } else { | 2493 | } else |
2479 | priv->assoc_id = 0; | 2494 | iwl_set_no_assoc(priv); |
2480 | iwl_led_disassociate(priv); | ||
2481 | |||
2482 | /* | ||
2483 | * inform the ucode that there is no longer an | ||
2484 | * association and that no more packets should be | ||
2485 | * send | ||
2486 | */ | ||
2487 | priv->staging_rxon.filter_flags &= | ||
2488 | ~RXON_FILTER_ASSOC_MSK; | ||
2489 | priv->staging_rxon.assoc_id = 0; | ||
2490 | iwlcore_commit_rxon(priv); | ||
2491 | } | ||
2492 | } | 2495 | } |
2493 | 2496 | ||
2494 | if (changes && iwl_is_associated(priv) && priv->assoc_id) { | 2497 | if (changes && iwl_is_associated(priv) && priv->assoc_id) { |
@@ -2503,12 +2506,14 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2503 | } | 2506 | } |
2504 | } | 2507 | } |
2505 | 2508 | ||
2506 | if ((changes & BSS_CHANGED_BEACON_ENABLED) && | 2509 | if (changes & BSS_CHANGED_BEACON_ENABLED) { |
2507 | vif->bss_conf.enable_beacon) { | 2510 | if (vif->bss_conf.enable_beacon) { |
2508 | memcpy(priv->staging_rxon.bssid_addr, | 2511 | memcpy(priv->staging_rxon.bssid_addr, |
2509 | bss_conf->bssid, ETH_ALEN); | 2512 | bss_conf->bssid, ETH_ALEN); |
2510 | memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN); | 2513 | memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN); |
2511 | iwlcore_config_ap(priv); | 2514 | iwlcore_config_ap(priv); |
2515 | } else | ||
2516 | iwl_set_no_assoc(priv); | ||
2512 | } | 2517 | } |
2513 | 2518 | ||
2514 | mutex_unlock(&priv->mutex); | 2519 | mutex_unlock(&priv->mutex); |
@@ -2740,6 +2745,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2740 | priv->staging_rxon.flags = 0; | 2745 | priv->staging_rxon.flags = 0; |
2741 | 2746 | ||
2742 | iwl_set_rxon_channel(priv, conf->channel); | 2747 | iwl_set_rxon_channel(priv, conf->channel); |
2748 | iwl_set_rxon_ht(priv, ht_conf); | ||
2743 | 2749 | ||
2744 | iwl_set_flags_for_band(priv, conf->channel->band); | 2750 | iwl_set_flags_for_band(priv, conf->channel->band); |
2745 | spin_unlock_irqrestore(&priv->lock, flags); | 2751 | spin_unlock_irqrestore(&priv->lock, flags); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 27ca859e7453..b69e972671b2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -446,6 +446,8 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv); | |||
446 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, | 446 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, |
447 | struct iwl_tx_queue *txq); | 447 | struct iwl_tx_queue *txq); |
448 | int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); | 448 | int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); |
449 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, | ||
450 | int sta_id, int tid, int freed); | ||
449 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, | 451 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, |
450 | int slots_num, u32 txq_id); | 452 | int slots_num, u32 txq_id); |
451 | void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); | 453 | void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 165d1f6e2dd9..3822cf53e368 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -711,7 +711,7 @@ extern void iwl_txq_ctx_stop(struct iwl_priv *priv); | |||
711 | extern int iwl_queue_space(const struct iwl_queue *q); | 711 | extern int iwl_queue_space(const struct iwl_queue *q); |
712 | static inline int iwl_queue_used(const struct iwl_queue *q, int i) | 712 | static inline int iwl_queue_used(const struct iwl_queue *q, int i) |
713 | { | 713 | { |
714 | return q->write_ptr > q->read_ptr ? | 714 | return q->write_ptr >= q->read_ptr ? |
715 | (i >= q->read_ptr && i < q->write_ptr) : | 715 | (i >= q->read_ptr && i < q->write_ptr) : |
716 | !(i < q->read_ptr && i >= q->write_ptr); | 716 | !(i < q->read_ptr && i >= q->write_ptr); |
717 | } | 717 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.c b/drivers/net/wireless/iwlwifi/iwl-devtrace.c index e7d88d1da15d..83cc4e500a96 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.c +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.c | |||
@@ -1,3 +1,29 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2009 - 2010 Intel Corporation. All rights reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of version 2 of the GNU General Public License as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA | ||
17 | * | ||
18 | * The full GNU General Public License is included in this distribution in the | ||
19 | * file called LICENSE. | ||
20 | * | ||
21 | * Contact Information: | ||
22 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
24 | * | ||
25 | *****************************************************************************/ | ||
26 | |||
1 | #include <linux/module.h> | 27 | #include <linux/module.h> |
2 | 28 | ||
3 | /* sparse doesn't like tracepoint macros */ | 29 | /* sparse doesn't like tracepoint macros */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h index 21361968ab7e..d9c7363b1bbb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h | |||
@@ -1,3 +1,29 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2009 - 2010 Intel Corporation. All rights reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of version 2 of the GNU General Public License as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA | ||
17 | * | ||
18 | * The full GNU General Public License is included in this distribution in the | ||
19 | * file called LICENSE. | ||
20 | * | ||
21 | * Contact Information: | ||
22 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
24 | * | ||
25 | *****************************************************************************/ | ||
26 | |||
1 | #if !defined(__IWLWIFI_DEVICE_TRACE) || defined(TRACE_HEADER_MULTI_READ) | 27 | #if !defined(__IWLWIFI_DEVICE_TRACE) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define __IWLWIFI_DEVICE_TRACE | 28 | #define __IWLWIFI_DEVICE_TRACE |
3 | 29 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 6f36b6e79f5e..2dbce85404aa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -928,7 +928,10 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
928 | if (ieee80211_is_mgmt(fc) || | 928 | if (ieee80211_is_mgmt(fc) || |
929 | ieee80211_has_protected(fc) || | 929 | ieee80211_has_protected(fc) || |
930 | ieee80211_has_morefrags(fc) || | 930 | ieee80211_has_morefrags(fc) || |
931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) | 931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG || |
932 | (ieee80211_is_data_qos(fc) && | ||
933 | *ieee80211_get_qos_ctl(hdr) & | ||
934 | IEEE80211_QOS_CONTROL_A_MSDU_PRESENT)) | ||
932 | ret = skb_linearize(skb); | 935 | ret = skb_linearize(skb); |
933 | else | 936 | else |
934 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? | 937 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index cde09a890b73..90fbdb25399e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -297,7 +297,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, bool is_ap, u8 flags, | |||
297 | } | 297 | } |
298 | EXPORT_SYMBOL(iwl_add_station); | 298 | EXPORT_SYMBOL(iwl_add_station); |
299 | 299 | ||
300 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) | 300 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const u8 *addr) |
301 | { | 301 | { |
302 | unsigned long flags; | 302 | unsigned long flags; |
303 | u8 sta_id = iwl_find_station(priv, addr); | 303 | u8 sta_id = iwl_find_station(priv, addr); |
@@ -324,7 +324,7 @@ static void iwl_remove_sta_callback(struct iwl_priv *priv, | |||
324 | { | 324 | { |
325 | struct iwl_rem_sta_cmd *rm_sta = | 325 | struct iwl_rem_sta_cmd *rm_sta = |
326 | (struct iwl_rem_sta_cmd *)cmd->cmd.payload; | 326 | (struct iwl_rem_sta_cmd *)cmd->cmd.payload; |
327 | const char *addr = rm_sta->addr; | 327 | const u8 *addr = rm_sta->addr; |
328 | 328 | ||
329 | if (pkt->hdr.flags & IWL_CMD_FAILED_MSK) { | 329 | if (pkt->hdr.flags & IWL_CMD_FAILED_MSK) { |
330 | IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", | 330 | IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 87ce2bd292c7..8f4071562857 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -120,6 +120,20 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
120 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); | 120 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); |
121 | 121 | ||
122 | 122 | ||
123 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, | ||
124 | int sta_id, int tid, int freed) | ||
125 | { | ||
126 | if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) | ||
127 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | ||
128 | else { | ||
129 | IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n", | ||
130 | priv->stations[sta_id].tid[tid].tfds_in_queue, | ||
131 | freed); | ||
132 | priv->stations[sta_id].tid[tid].tfds_in_queue = 0; | ||
133 | } | ||
134 | } | ||
135 | EXPORT_SYMBOL(iwl_free_tfds_in_queue); | ||
136 | |||
123 | /** | 137 | /** |
124 | * iwl_tx_queue_free - Deallocate DMA queue. | 138 | * iwl_tx_queue_free - Deallocate DMA queue. |
125 | * @txq: Transmit queue to deallocate. | 139 | * @txq: Transmit queue to deallocate. |
@@ -1131,6 +1145,7 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
1131 | struct iwl_queue *q = &txq->q; | 1145 | struct iwl_queue *q = &txq->q; |
1132 | struct iwl_tx_info *tx_info; | 1146 | struct iwl_tx_info *tx_info; |
1133 | int nfreed = 0; | 1147 | int nfreed = 0; |
1148 | struct ieee80211_hdr *hdr; | ||
1134 | 1149 | ||
1135 | if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { | 1150 | if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { |
1136 | IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " | 1151 | IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " |
@@ -1145,13 +1160,16 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
1145 | 1160 | ||
1146 | tx_info = &txq->txb[txq->q.read_ptr]; | 1161 | tx_info = &txq->txb[txq->q.read_ptr]; |
1147 | iwl_tx_status(priv, tx_info->skb[0]); | 1162 | iwl_tx_status(priv, tx_info->skb[0]); |
1163 | |||
1164 | hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data; | ||
1165 | if (hdr && ieee80211_is_data_qos(hdr->frame_control)) | ||
1166 | nfreed++; | ||
1148 | tx_info->skb[0] = NULL; | 1167 | tx_info->skb[0] = NULL; |
1149 | 1168 | ||
1150 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) | 1169 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) |
1151 | priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); | 1170 | priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); |
1152 | 1171 | ||
1153 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); | 1172 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); |
1154 | nfreed++; | ||
1155 | } | 1173 | } |
1156 | return nfreed; | 1174 | return nfreed; |
1157 | } | 1175 | } |
@@ -1559,7 +1577,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
1559 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { | 1577 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { |
1560 | /* calculate mac80211 ampdu sw queue to wake */ | 1578 | /* calculate mac80211 ampdu sw queue to wake */ |
1561 | int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); | 1579 | int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); |
1562 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 1580 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1563 | 1581 | ||
1564 | if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && | 1582 | if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && |
1565 | priv->mac80211_registered && | 1583 | priv->mac80211_registered && |
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c index 777584d76a88..1e41ad0fcad5 100644 --- a/drivers/net/wireless/iwmc3200wifi/commands.c +++ b/drivers/net/wireless/iwmc3200wifi/commands.c | |||
@@ -973,6 +973,10 @@ int iwm_send_pmkid_update(struct iwm_priv *iwm, | |||
973 | 973 | ||
974 | memset(&update, 0, sizeof(struct iwm_umac_pmkid_update)); | 974 | memset(&update, 0, sizeof(struct iwm_umac_pmkid_update)); |
975 | 975 | ||
976 | update.hdr.oid = UMAC_WIFI_IF_CMD_PMKID_UPDATE; | ||
977 | update.hdr.buf_size = cpu_to_le16(sizeof(struct iwm_umac_pmkid_update) - | ||
978 | sizeof(struct iwm_umac_wifi_if)); | ||
979 | |||
976 | update.command = cpu_to_le32(command); | 980 | update.command = cpu_to_le32(command); |
977 | if (pmksa->bssid) | 981 | if (pmksa->bssid) |
978 | memcpy(&update.bssid, pmksa->bssid, ETH_ALEN); | 982 | memcpy(&update.bssid, pmksa->bssid, ETH_ALEN); |
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.h b/drivers/net/wireless/iwmc3200wifi/commands.h index 06af0552cd75..3dfd9f0e9003 100644 --- a/drivers/net/wireless/iwmc3200wifi/commands.h +++ b/drivers/net/wireless/iwmc3200wifi/commands.h | |||
@@ -463,6 +463,7 @@ struct iwm_umac_cmd_stop_resume_tx { | |||
463 | #define IWM_CMD_PMKID_FLUSH 3 | 463 | #define IWM_CMD_PMKID_FLUSH 3 |
464 | 464 | ||
465 | struct iwm_umac_pmkid_update { | 465 | struct iwm_umac_pmkid_update { |
466 | struct iwm_umac_wifi_if hdr; | ||
466 | __le32 command; | 467 | __le32 command; |
467 | u8 bssid[ETH_ALEN]; | 468 | u8 bssid[ETH_ALEN]; |
468 | __le16 reserved; | 469 | __le16 reserved; |
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 6d6ed7485175..f727b4a83196 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c | |||
@@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, | |||
794 | } | 794 | } |
795 | 795 | ||
796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); | 796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); |
797 | if (!bss) { | 797 | if (!bss->bss) { |
798 | kfree(bss); | 798 | kfree(bss); |
799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); | 799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); |
800 | return -ENOMEM; | 800 | return -ENOMEM; |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 59d49159cf2a..59f92105b0c2 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -3157,8 +3157,10 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw, | |||
3157 | /* Clear unsupported feature flags */ | 3157 | /* Clear unsupported feature flags */ |
3158 | *total_flags &= FIF_ALLMULTI | FIF_BCN_PRBRESP_PROMISC; | 3158 | *total_flags &= FIF_ALLMULTI | FIF_BCN_PRBRESP_PROMISC; |
3159 | 3159 | ||
3160 | if (mwl8k_fw_lock(hw)) | 3160 | if (mwl8k_fw_lock(hw)) { |
3161 | kfree(cmd); | ||
3161 | return; | 3162 | return; |
3163 | } | ||
3162 | 3164 | ||
3163 | if (priv->sniffer_enabled) { | 3165 | if (priv->sniffer_enabled) { |
3164 | mwl8k_enable_sniffer(hw, 0); | 3166 | mwl8k_enable_sniffer(hw, 0); |
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index a15962a19b2a..a72f7c2577de 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
@@ -197,6 +197,14 @@ static void p54p_check_rx_ring(struct ieee80211_hw *dev, u32 *index, | |||
197 | i %= ring_limit; | 197 | i %= ring_limit; |
198 | continue; | 198 | continue; |
199 | } | 199 | } |
200 | |||
201 | if (unlikely(len > priv->common.rx_mtu)) { | ||
202 | if (net_ratelimit()) | ||
203 | dev_err(&priv->pdev->dev, "rx'd frame size " | ||
204 | "exceeds length threshold.\n"); | ||
205 | |||
206 | len = priv->common.rx_mtu; | ||
207 | } | ||
200 | skb_put(skb, len); | 208 | skb_put(skb, len); |
201 | 209 | ||
202 | if (p54_rx(dev, skb)) { | 210 | if (p54_rx(dev, skb)) { |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 27bf887f1453..9deae41cb784 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -340,7 +340,7 @@ static int rt2800_blink_set(struct led_classdev *led_cdev, | |||
340 | rt2x00_set_field32(®, LED_CFG_OFF_PERIOD, *delay_off); | 340 | rt2x00_set_field32(®, LED_CFG_OFF_PERIOD, *delay_off); |
341 | rt2x00_set_field32(®, LED_CFG_SLOW_BLINK_PERIOD, 3); | 341 | rt2x00_set_field32(®, LED_CFG_SLOW_BLINK_PERIOD, 3); |
342 | rt2x00_set_field32(®, LED_CFG_R_LED_MODE, 3); | 342 | rt2x00_set_field32(®, LED_CFG_R_LED_MODE, 3); |
343 | rt2x00_set_field32(®, LED_CFG_G_LED_MODE, 12); | 343 | rt2x00_set_field32(®, LED_CFG_G_LED_MODE, 3); |
344 | rt2x00_set_field32(®, LED_CFG_Y_LED_MODE, 3); | 344 | rt2x00_set_field32(®, LED_CFG_Y_LED_MODE, 3); |
345 | rt2x00_set_field32(®, LED_CFG_LED_POLAR, 1); | 345 | rt2x00_set_field32(®, LED_CFG_LED_POLAR, 1); |
346 | rt2800_register_write(led->rt2x00dev, LED_CFG, reg); | 346 | rt2800_register_write(led->rt2x00dev, LED_CFG, reg); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 4d841c07c970..dcfc8c25d1a7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -113,6 +113,12 @@ | |||
113 | ( ((unsigned long)((__skb)->data + (__header))) & 3 ) | 113 | ( ((unsigned long)((__skb)->data + (__header))) & 3 ) |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Constants for extra TX headroom for alignment purposes. | ||
117 | */ | ||
118 | #define RT2X00_ALIGN_SIZE 4 /* Only whole frame needs alignment */ | ||
119 | #define RT2X00_L2PAD_SIZE 8 /* Both header & payload need alignment */ | ||
120 | |||
121 | /* | ||
116 | * Standard timing and size defines. | 122 | * Standard timing and size defines. |
117 | * These values should follow the ieee80211 specifications. | 123 | * These values should follow the ieee80211 specifications. |
118 | */ | 124 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 06c43ca39bf8..265e66dba552 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -686,7 +686,17 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
686 | /* | 686 | /* |
687 | * Initialize extra TX headroom required. | 687 | * Initialize extra TX headroom required. |
688 | */ | 688 | */ |
689 | rt2x00dev->hw->extra_tx_headroom = rt2x00dev->ops->extra_tx_headroom; | 689 | rt2x00dev->hw->extra_tx_headroom = |
690 | max_t(unsigned int, IEEE80211_TX_STATUS_HEADROOM, | ||
691 | rt2x00dev->ops->extra_tx_headroom); | ||
692 | |||
693 | /* | ||
694 | * Take TX headroom required for alignment into account. | ||
695 | */ | ||
696 | if (test_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags)) | ||
697 | rt2x00dev->hw->extra_tx_headroom += RT2X00_L2PAD_SIZE; | ||
698 | else if (test_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags)) | ||
699 | rt2x00dev->hw->extra_tx_headroom += RT2X00_ALIGN_SIZE; | ||
690 | 700 | ||
691 | /* | 701 | /* |
692 | * Register HW. | 702 | * Register HW. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 239afc7a9c0b..9915a09141ef 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -104,7 +104,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
104 | * is also mapped to the DMA so it can be used for transfering | 104 | * is also mapped to the DMA so it can be used for transfering |
105 | * additional descriptor information to the hardware. | 105 | * additional descriptor information to the hardware. |
106 | */ | 106 | */ |
107 | skb_push(skb, rt2x00dev->hw->extra_tx_headroom); | 107 | skb_push(skb, rt2x00dev->ops->extra_tx_headroom); |
108 | 108 | ||
109 | skbdesc->skb_dma = | 109 | skbdesc->skb_dma = |
110 | dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE); | 110 | dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE); |
@@ -112,7 +112,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
112 | /* | 112 | /* |
113 | * Restore data pointer to original location again. | 113 | * Restore data pointer to original location again. |
114 | */ | 114 | */ |
115 | skb_pull(skb, rt2x00dev->hw->extra_tx_headroom); | 115 | skb_pull(skb, rt2x00dev->ops->extra_tx_headroom); |
116 | 116 | ||
117 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; | 117 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; |
118 | } | 118 | } |
@@ -134,7 +134,7 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
134 | * by the driver, but it was actually mapped to DMA. | 134 | * by the driver, but it was actually mapped to DMA. |
135 | */ | 135 | */ |
136 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, | 136 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, |
137 | skb->len + rt2x00dev->hw->extra_tx_headroom, | 137 | skb->len + rt2x00dev->ops->extra_tx_headroom, |
138 | DMA_TO_DEVICE); | 138 | DMA_TO_DEVICE); |
139 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; | 139 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; |
140 | } | 140 | } |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index bc5726dd5fe4..7ba3052b0708 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -65,6 +65,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
65 | /* Sitecom */ | 65 | /* Sitecom */ |
66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, | 66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, |
67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, | 67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, |
68 | {USB_DEVICE(0x0df6, 0x0029), .driver_info = DEVICE_RTL8187B}, | ||
68 | /* Sphairon Access Systems GmbH */ | 69 | /* Sphairon Access Systems GmbH */ |
69 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, | 70 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, |
70 | /* Dick Smith Electronics */ | 71 | /* Dick Smith Electronics */ |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 8ebf5c33955d..f14deb0c8514 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -987,12 +987,13 @@ static void zd_op_configure_filter(struct ieee80211_hw *hw, | |||
987 | changed_flags &= SUPPORTED_FIF_FLAGS; | 987 | changed_flags &= SUPPORTED_FIF_FLAGS; |
988 | *new_flags &= SUPPORTED_FIF_FLAGS; | 988 | *new_flags &= SUPPORTED_FIF_FLAGS; |
989 | 989 | ||
990 | /* changed_flags is always populated but this driver | 990 | /* |
991 | * doesn't support all FIF flags so its possible we don't | 991 | * If multicast parameter (as returned by zd_op_prepare_multicast) |
992 | * need to do anything */ | 992 | * has changed, no bit in changed_flags is set. To handle this |
993 | if (!changed_flags) | 993 | * situation, we do not return if changed_flags is 0. If we do so, |
994 | return; | 994 | * we will have some issue with IPv6 which uses multicast for link |
995 | 995 | * layer address resolution. | |
996 | */ | ||
996 | if (*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) | 997 | if (*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) |
997 | zd_mc_add_all(&hash); | 998 | zd_mc_add_all(&hash); |
998 | 999 | ||
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index ac19ecd19cfe..72d3e437e190 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -62,6 +62,7 @@ static struct usb_device_id usb_ids[] = { | |||
62 | { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 }, | 62 | { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 }, |
63 | /* ZD1211B */ | 63 | /* ZD1211B */ |
64 | { USB_DEVICE(0x0053, 0x5301), .driver_info = DEVICE_ZD1211B }, | 64 | { USB_DEVICE(0x0053, 0x5301), .driver_info = DEVICE_ZD1211B }, |
65 | { USB_DEVICE(0x0409, 0x0248), .driver_info = DEVICE_ZD1211B }, | ||
65 | { USB_DEVICE(0x0411, 0x00da), .driver_info = DEVICE_ZD1211B }, | 66 | { USB_DEVICE(0x0411, 0x00da), .driver_info = DEVICE_ZD1211B }, |
66 | { USB_DEVICE(0x0471, 0x1236), .driver_info = DEVICE_ZD1211B }, | 67 | { USB_DEVICE(0x0471, 0x1236), .driver_info = DEVICE_ZD1211B }, |
67 | { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B }, | 68 | { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B }, |