diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-28 09:12:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-28 09:12:38 -0500 |
commit | 05ba712d7eb156009753e18e5116cabd869cc6e2 (patch) | |
tree | 1ad850d6889f6b3671a5636653940f20a7d22bdf /drivers/net | |
parent | 257ddbdad13cd3c4f7d03b85af632c508aa8abc9 (diff) | |
parent | b473946a0853860e13b51c28add5524741117786 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net')
27 files changed, 129 insertions, 92 deletions
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 7f64d562ccaa..3227b11131c4 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 */ |
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h index cb3188f8708d..c622a968c379 100644 --- a/drivers/net/benet/be_cmds.h +++ b/drivers/net/benet/be_cmds.h | |||
@@ -165,7 +165,8 @@ struct be_cmd_req_hdr { | |||
165 | u8 domain; /* dword 0 */ | 165 | u8 domain; /* dword 0 */ |
166 | u32 timeout; /* dword 1 */ | 166 | u32 timeout; /* dword 1 */ |
167 | u32 request_length; /* dword 2 */ | 167 | u32 request_length; /* dword 2 */ |
168 | u32 rsvd; /* dword 3 */ | 168 | u8 version; /* dword 3 */ |
169 | u8 rsvd[3]; /* dword 3 */ | ||
169 | }; | 170 | }; |
170 | 171 | ||
171 | #define RESP_HDR_INFO_OPCODE_SHIFT 0 /* bits 0 - 7 */ | 172 | #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 33ab8c7f14fe..90c5661b336f 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -2051,6 +2051,7 @@ static void be_unmap_pci_bars(struct be_adapter *adapter) | |||
2051 | static int be_map_pci_bars(struct be_adapter *adapter) | 2051 | static int be_map_pci_bars(struct be_adapter *adapter) |
2052 | { | 2052 | { |
2053 | u8 __iomem *addr; | 2053 | u8 __iomem *addr; |
2054 | int pcicfg_reg; | ||
2054 | 2055 | ||
2055 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2), | 2056 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2), |
2056 | pci_resource_len(adapter->pdev, 2)); | 2057 | pci_resource_len(adapter->pdev, 2)); |
@@ -2064,8 +2065,13 @@ static int be_map_pci_bars(struct be_adapter *adapter) | |||
2064 | goto pci_map_err; | 2065 | goto pci_map_err; |
2065 | adapter->db = addr; | 2066 | adapter->db = addr; |
2066 | 2067 | ||
2067 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 1), | 2068 | if (adapter->generation == BE_GEN2) |
2068 | 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)); | ||
2069 | if (addr == NULL) | 2075 | if (addr == NULL) |
2070 | goto pci_map_err; | 2076 | goto pci_map_err; |
2071 | adapter->pcicfg = addr; | 2077 | adapter->pcicfg = addr; |
@@ -2162,6 +2168,7 @@ static int be_stats_init(struct be_adapter *adapter) | |||
2162 | cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma); | 2168 | cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma); |
2163 | if (cmd->va == NULL) | 2169 | if (cmd->va == NULL) |
2164 | return -1; | 2170 | return -1; |
2171 | memset(cmd->va, cmd->size, 0); | ||
2165 | return 0; | 2172 | return 0; |
2166 | } | 2173 | } |
2167 | 2174 | ||
@@ -2240,6 +2247,20 @@ static int __devinit be_probe(struct pci_dev *pdev, | |||
2240 | goto rel_reg; | 2247 | goto rel_reg; |
2241 | } | 2248 | } |
2242 | 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 | |||
2243 | adapter->pdev = pdev; | 2264 | adapter->pdev = pdev; |
2244 | pci_set_drvdata(pdev, adapter); | 2265 | pci_set_drvdata(pdev, adapter); |
2245 | adapter->netdev = netdev; | 2266 | adapter->netdev = netdev; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 99a0ff3889ee..6221936e957a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3650,7 +3650,7 @@ static int bond_open(struct net_device *bond_dev) | |||
3650 | */ | 3650 | */ |
3651 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { | 3651 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { |
3652 | /* something went wrong - fail the open operation */ | 3652 | /* something went wrong - fail the open operation */ |
3653 | return -1; | 3653 | return -ENOMEM; |
3654 | } | 3654 | } |
3655 | 3655 | ||
3656 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); | 3656 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 2ce88c5f75c5..b608528f26fc 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; |
@@ -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) |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 5d7a760194d4..14a80f8f6118 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2350,18 +2350,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter) | |||
2350 | rctl &= ~E1000_RCTL_SZ_4096; | 2350 | rctl &= ~E1000_RCTL_SZ_4096; |
2351 | rctl |= E1000_RCTL_BSEX; | 2351 | rctl |= E1000_RCTL_BSEX; |
2352 | switch (adapter->rx_buffer_len) { | 2352 | switch (adapter->rx_buffer_len) { |
2353 | case 256: | ||
2354 | rctl |= E1000_RCTL_SZ_256; | ||
2355 | rctl &= ~E1000_RCTL_BSEX; | ||
2356 | break; | ||
2357 | case 512: | ||
2358 | rctl |= E1000_RCTL_SZ_512; | ||
2359 | rctl &= ~E1000_RCTL_BSEX; | ||
2360 | break; | ||
2361 | case 1024: | ||
2362 | rctl |= E1000_RCTL_SZ_1024; | ||
2363 | rctl &= ~E1000_RCTL_BSEX; | ||
2364 | break; | ||
2365 | case 2048: | 2353 | case 2048: |
2366 | default: | 2354 | default: |
2367 | rctl |= E1000_RCTL_SZ_2048; | 2355 | rctl |= E1000_RCTL_SZ_2048; |
@@ -3788,7 +3776,7 @@ static int e1000_tso(struct e1000_adapter *adapter, | |||
3788 | 0, IPPROTO_TCP, 0); | 3776 | 0, IPPROTO_TCP, 0); |
3789 | cmd_length = E1000_TXD_CMD_IP; | 3777 | cmd_length = E1000_TXD_CMD_IP; |
3790 | ipcse = skb_transport_offset(skb) - 1; | 3778 | ipcse = skb_transport_offset(skb) - 1; |
3791 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 3779 | } else if (skb_is_gso_v6(skb)) { |
3792 | ipv6_hdr(skb)->payload_len = 0; | 3780 | ipv6_hdr(skb)->payload_len = 0; |
3793 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 3781 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
3794 | &ipv6_hdr(skb)->daddr, | 3782 | &ipv6_hdr(skb)->daddr, |
@@ -4324,13 +4312,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu) | |||
4324 | * fragmented skbs | 4312 | * fragmented skbs |
4325 | */ | 4313 | */ |
4326 | 4314 | ||
4327 | if (max_frame <= 256) | 4315 | if (max_frame <= 2048) |
4328 | adapter->rx_buffer_len = 256; | ||
4329 | else if (max_frame <= 512) | ||
4330 | adapter->rx_buffer_len = 512; | ||
4331 | else if (max_frame <= 1024) | ||
4332 | adapter->rx_buffer_len = 1024; | ||
4333 | else if (max_frame <= 2048) | ||
4334 | adapter->rx_buffer_len = 2048; | 4316 | adapter->rx_buffer_len = 2048; |
4335 | else | 4317 | else |
4336 | adapter->rx_buffer_len = 4096; | 4318 | adapter->rx_buffer_len = 4096; |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 01cc29483e2f..0a064ce3eb45 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -3423,7 +3423,7 @@ static inline int igb_tso_adv(struct igb_ring *tx_ring, | |||
3423 | iph->daddr, 0, | 3423 | iph->daddr, 0, |
3424 | IPPROTO_TCP, | 3424 | IPPROTO_TCP, |
3425 | 0); | 3425 | 0); |
3426 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 3426 | } else if (skb_is_gso_v6(skb)) { |
3427 | ipv6_hdr(skb)->payload_len = 0; | 3427 | ipv6_hdr(skb)->payload_len = 0; |
3428 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 3428 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
3429 | &ipv6_hdr(skb)->daddr, | 3429 | &ipv6_hdr(skb)->daddr, |
@@ -3585,6 +3585,7 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3585 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { | 3585 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { |
3586 | struct skb_frag_struct *frag; | 3586 | struct skb_frag_struct *frag; |
3587 | 3587 | ||
3588 | count++; | ||
3588 | i++; | 3589 | i++; |
3589 | if (i == tx_ring->count) | 3590 | if (i == tx_ring->count) |
3590 | i = 0; | 3591 | i = 0; |
@@ -3606,7 +3607,6 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3606 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 3607 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
3607 | goto dma_error; | 3608 | goto dma_error; |
3608 | 3609 | ||
3609 | count++; | ||
3610 | } | 3610 | } |
3611 | 3611 | ||
3612 | tx_ring->buffer_info[i].skb = skb; | 3612 | tx_ring->buffer_info[i].skb = skb; |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 375194f4b97e..23ce07d3de08 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; |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 56f37f66b696..dd4883f642be 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -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_main.c b/drivers/net/ixgbe/ixgbe_main.c index 439645d2aeef..636985224afc 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5133,7 +5133,7 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter, | |||
5133 | iph->daddr, 0, | 5133 | iph->daddr, 0, |
5134 | IPPROTO_TCP, | 5134 | IPPROTO_TCP, |
5135 | 0); | 5135 | 0); |
5136 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 5136 | } else if (skb_is_gso_v6(skb)) { |
5137 | ipv6_hdr(skb)->payload_len = 0; | 5137 | ipv6_hdr(skb)->payload_len = 0; |
5138 | tcp_hdr(skb)->check = | 5138 | tcp_hdr(skb)->check = |
5139 | ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 5139 | ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
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/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/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 95fb63dcd9e4..4adca94a521f 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -4437,7 +4437,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4437 | err = pcie_set_readrq(pdev, 4096); | 4437 | err = pcie_set_readrq(pdev, 4096); |
4438 | if (err) { | 4438 | if (err) { |
4439 | dev_err(&pdev->dev, "Set readrq failed.\n"); | 4439 | dev_err(&pdev->dev, "Set readrq failed.\n"); |
4440 | goto err_out; | 4440 | goto err_out1; |
4441 | } | 4441 | } |
4442 | 4442 | ||
4443 | err = pci_request_regions(pdev, DRV_NAME); | 4443 | err = pci_request_regions(pdev, DRV_NAME); |
@@ -4458,7 +4458,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4458 | 4458 | ||
4459 | if (err) { | 4459 | if (err) { |
4460 | dev_err(&pdev->dev, "No usable DMA configuration.\n"); | 4460 | dev_err(&pdev->dev, "No usable DMA configuration.\n"); |
4461 | goto err_out; | 4461 | goto err_out2; |
4462 | } | 4462 | } |
4463 | 4463 | ||
4464 | /* Set PCIe reset type for EEH to fundamental. */ | 4464 | /* Set PCIe reset type for EEH to fundamental. */ |
@@ -4470,7 +4470,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4470 | if (!qdev->reg_base) { | 4470 | if (!qdev->reg_base) { |
4471 | dev_err(&pdev->dev, "Register mapping failed.\n"); | 4471 | dev_err(&pdev->dev, "Register mapping failed.\n"); |
4472 | err = -ENOMEM; | 4472 | err = -ENOMEM; |
4473 | goto err_out; | 4473 | goto err_out2; |
4474 | } | 4474 | } |
4475 | 4475 | ||
4476 | qdev->doorbell_area_size = pci_resource_len(pdev, 3); | 4476 | qdev->doorbell_area_size = pci_resource_len(pdev, 3); |
@@ -4480,14 +4480,14 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4480 | if (!qdev->doorbell_area) { | 4480 | if (!qdev->doorbell_area) { |
4481 | dev_err(&pdev->dev, "Doorbell register mapping failed.\n"); | 4481 | dev_err(&pdev->dev, "Doorbell register mapping failed.\n"); |
4482 | err = -ENOMEM; | 4482 | err = -ENOMEM; |
4483 | goto err_out; | 4483 | goto err_out2; |
4484 | } | 4484 | } |
4485 | 4485 | ||
4486 | err = ql_get_board_info(qdev); | 4486 | err = ql_get_board_info(qdev); |
4487 | if (err) { | 4487 | if (err) { |
4488 | dev_err(&pdev->dev, "Register access failed.\n"); | 4488 | dev_err(&pdev->dev, "Register access failed.\n"); |
4489 | err = -EIO; | 4489 | err = -EIO; |
4490 | goto err_out; | 4490 | goto err_out2; |
4491 | } | 4491 | } |
4492 | qdev->msg_enable = netif_msg_init(debug, default_msg); | 4492 | qdev->msg_enable = netif_msg_init(debug, default_msg); |
4493 | spin_lock_init(&qdev->hw_lock); | 4493 | spin_lock_init(&qdev->hw_lock); |
@@ -4508,7 +4508,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4508 | err = qdev->nic_ops->get_flash(qdev); | 4508 | err = qdev->nic_ops->get_flash(qdev); |
4509 | if (err) { | 4509 | if (err) { |
4510 | dev_err(&pdev->dev, "Invalid FLASH.\n"); | 4510 | dev_err(&pdev->dev, "Invalid FLASH.\n"); |
4511 | goto err_out; | 4511 | goto err_out2; |
4512 | } | 4512 | } |
4513 | 4513 | ||
4514 | memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); | 4514 | memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); |
@@ -4542,8 +4542,9 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
4542 | DRV_NAME, DRV_VERSION); | 4542 | DRV_NAME, DRV_VERSION); |
4543 | } | 4543 | } |
4544 | return 0; | 4544 | return 0; |
4545 | err_out: | 4545 | err_out2: |
4546 | ql_release_all(pdev); | 4546 | ql_release_all(pdev); |
4547 | err_out1: | ||
4547 | pci_disable_device(pdev); | 4548 | pci_disable_device(pdev); |
4548 | return err; | 4549 | return err; |
4549 | } | 4550 | } |
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index 0d4eba7266ec..9f035b9f0350 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
@@ -804,7 +804,7 @@ int efx_mcdi_nvram_read(struct efx_nic *efx, unsigned int type, | |||
804 | loff_t offset, u8 *buffer, size_t length) | 804 | loff_t offset, u8 *buffer, size_t length) |
805 | { | 805 | { |
806 | u8 inbuf[MC_CMD_NVRAM_READ_IN_LEN]; | 806 | u8 inbuf[MC_CMD_NVRAM_READ_IN_LEN]; |
807 | u8 outbuf[MC_CMD_NVRAM_READ_OUT_LEN(length)]; | 807 | u8 outbuf[MC_CMD_NVRAM_READ_OUT_LEN(EFX_MCDI_NVRAM_LEN_MAX)]; |
808 | size_t outlen; | 808 | size_t outlen; |
809 | int rc; | 809 | int rc; |
810 | 810 | ||
@@ -828,7 +828,7 @@ fail: | |||
828 | 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, |
829 | loff_t offset, const u8 *buffer, size_t length) | 829 | loff_t offset, const u8 *buffer, size_t length) |
830 | { | 830 | { |
831 | u8 inbuf[MC_CMD_NVRAM_WRITE_IN_LEN(length)]; | 831 | u8 inbuf[MC_CMD_NVRAM_WRITE_IN_LEN(EFX_MCDI_NVRAM_LEN_MAX)]; |
832 | int rc; | 832 | int rc; |
833 | 833 | ||
834 | MCDI_SET_DWORD(inbuf, NVRAM_WRITE_IN_TYPE, type); | 834 | MCDI_SET_DWORD(inbuf, NVRAM_WRITE_IN_TYPE, type); |
@@ -838,7 +838,8 @@ int efx_mcdi_nvram_write(struct efx_nic *efx, unsigned int type, | |||
838 | 838 | ||
839 | BUILD_BUG_ON(MC_CMD_NVRAM_WRITE_OUT_LEN != 0); | 839 | BUILD_BUG_ON(MC_CMD_NVRAM_WRITE_OUT_LEN != 0); |
840 | 840 | ||
841 | 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), | ||
842 | NULL, 0, NULL); | 843 | NULL, 0, NULL); |
843 | if (rc) | 844 | if (rc) |
844 | 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/sky2.c b/drivers/net/sky2.c index f8f50f70bcd2..fecde669d6ab 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 */ |
@@ -2149,7 +2153,9 @@ static void sky2_qlink_intr(struct sky2_hw *hw) | |||
2149 | 2153 | ||
2150 | /* reset PHY Link Detect */ | 2154 | /* reset PHY Link Detect */ |
2151 | phy = sky2_pci_read16(hw, PSM_CONFIG_REG4); | 2155 | phy = sky2_pci_read16(hw, PSM_CONFIG_REG4); |
2156 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
2152 | sky2_pci_write16(hw, PSM_CONFIG_REG4, phy | 1); | 2157 | sky2_pci_write16(hw, PSM_CONFIG_REG4, phy | 1); |
2158 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
2153 | 2159 | ||
2154 | sky2_link_up(sky2); | 2160 | sky2_link_up(sky2); |
2155 | } | 2161 | } |
@@ -2640,6 +2646,7 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2640 | if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { | 2646 | if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { |
2641 | u16 pci_err; | 2647 | u16 pci_err; |
2642 | 2648 | ||
2649 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
2643 | pci_err = sky2_pci_read16(hw, PCI_STATUS); | 2650 | pci_err = sky2_pci_read16(hw, PCI_STATUS); |
2644 | if (net_ratelimit()) | 2651 | if (net_ratelimit()) |
2645 | dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", | 2652 | dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", |
@@ -2647,12 +2654,14 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2647 | 2654 | ||
2648 | sky2_pci_write16(hw, PCI_STATUS, | 2655 | sky2_pci_write16(hw, PCI_STATUS, |
2649 | pci_err | PCI_STATUS_ERROR_BITS); | 2656 | pci_err | PCI_STATUS_ERROR_BITS); |
2657 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
2650 | } | 2658 | } |
2651 | 2659 | ||
2652 | if (status & Y2_IS_PCI_EXP) { | 2660 | if (status & Y2_IS_PCI_EXP) { |
2653 | /* PCI-Express uncorrectable Error occurred */ | 2661 | /* PCI-Express uncorrectable Error occurred */ |
2654 | u32 err; | 2662 | u32 err; |
2655 | 2663 | ||
2664 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
2656 | err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); | 2665 | err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); |
2657 | sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, | 2666 | sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, |
2658 | 0xfffffffful); | 2667 | 0xfffffffful); |
@@ -2660,6 +2669,7 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2660 | dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); | 2669 | dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); |
2661 | 2670 | ||
2662 | sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); | 2671 | sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); |
2672 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
2663 | } | 2673 | } |
2664 | 2674 | ||
2665 | if (status & Y2_HWE_L1_MASK) | 2675 | if (status & Y2_HWE_L1_MASK) |
@@ -3038,6 +3048,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
3038 | } | 3048 | } |
3039 | 3049 | ||
3040 | sky2_power_on(hw); | 3050 | sky2_power_on(hw); |
3051 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
3041 | 3052 | ||
3042 | for (i = 0; i < hw->ports; i++) { | 3053 | for (i = 0; i < hw->ports; i++) { |
3043 | sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); | 3054 | sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); |
@@ -3074,6 +3085,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
3074 | reg <<= PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE; | 3085 | reg <<= PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE; |
3075 | 3086 | ||
3076 | /* reset PHY Link Detect */ | 3087 | /* reset PHY Link Detect */ |
3088 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
3077 | sky2_pci_write16(hw, PSM_CONFIG_REG4, | 3089 | sky2_pci_write16(hw, PSM_CONFIG_REG4, |
3078 | reg | PSM_CONFIG_REG4_RST_PHY_LINK_DETECT); | 3090 | reg | PSM_CONFIG_REG4_RST_PHY_LINK_DETECT); |
3079 | sky2_pci_write16(hw, PSM_CONFIG_REG4, reg); | 3091 | sky2_pci_write16(hw, PSM_CONFIG_REG4, reg); |
@@ -3091,6 +3103,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
3091 | /* restore the PCIe Link Control register */ | 3103 | /* restore the PCIe Link Control register */ |
3092 | sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg); | 3104 | sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg); |
3093 | } | 3105 | } |
3106 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
3094 | 3107 | ||
3095 | /* re-enable PEX PM in PEX PHY debug reg. 8 (clear bit 12) */ | 3108 | /* 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)); | 3109 | sky2_write32(hw, Y2_PEX_PHY_DATA, PEX_DB_ACCESS | (0x08UL << 16)); |
@@ -3230,6 +3243,27 @@ static inline u8 sky2_wol_supported(const struct sky2_hw *hw) | |||
3230 | return sky2_is_copper(hw) ? (WAKE_PHY | WAKE_MAGIC) : 0; | 3243 | return sky2_is_copper(hw) ? (WAKE_PHY | WAKE_MAGIC) : 0; |
3231 | } | 3244 | } |
3232 | 3245 | ||
3246 | static void sky2_hw_set_wol(struct sky2_hw *hw) | ||
3247 | { | ||
3248 | int wol = 0; | ||
3249 | int i; | ||
3250 | |||
3251 | for (i = 0; i < hw->ports; i++) { | ||
3252 | struct net_device *dev = hw->dev[i]; | ||
3253 | struct sky2_port *sky2 = netdev_priv(dev); | ||
3254 | |||
3255 | if (sky2->wol) | ||
3256 | wol = 1; | ||
3257 | } | ||
3258 | |||
3259 | if (hw->chip_id == CHIP_ID_YUKON_EC_U || | ||
3260 | hw->chip_id == CHIP_ID_YUKON_EX || | ||
3261 | hw->chip_id == CHIP_ID_YUKON_FE_P) | ||
3262 | sky2_write32(hw, B0_CTST, wol ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF); | ||
3263 | |||
3264 | device_set_wakeup_enable(&hw->pdev->dev, wol); | ||
3265 | } | ||
3266 | |||
3233 | static void sky2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | 3267 | static void sky2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) |
3234 | { | 3268 | { |
3235 | const struct sky2_port *sky2 = netdev_priv(dev); | 3269 | const struct sky2_port *sky2 = netdev_priv(dev); |
@@ -3249,13 +3283,7 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
3249 | 3283 | ||
3250 | sky2->wol = wol->wolopts; | 3284 | sky2->wol = wol->wolopts; |
3251 | 3285 | ||
3252 | if (hw->chip_id == CHIP_ID_YUKON_EC_U || | 3286 | sky2_hw_set_wol(hw); |
3253 | hw->chip_id == CHIP_ID_YUKON_EX || | ||
3254 | hw->chip_id == CHIP_ID_YUKON_FE_P) | ||
3255 | sky2_write32(hw, B0_CTST, sky2->wol | ||
3256 | ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF); | ||
3257 | |||
3258 | device_set_wakeup_enable(&hw->pdev->dev, sky2->wol); | ||
3259 | 3287 | ||
3260 | if (!netif_running(dev)) | 3288 | if (!netif_running(dev)) |
3261 | sky2_wol_init(sky2); | 3289 | sky2_wol_init(sky2); |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index c81252d9a57c..d0556a9b456c 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/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index cbfdd9fbe005..da4fc458f90c 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -249,6 +249,7 @@ static DEFINE_PCI_DEVICE_TABLE(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/virtio_net.c b/drivers/net/virtio_net.c index 088332a943f7..6b92e383c653 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/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 0b1dd10f1d84..1a27f39c1adc 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -807,12 +807,11 @@ static void ath9k_hw_init_mode_gain_regs(struct ath_hw *ah) | |||
807 | } | 807 | } |
808 | } | 808 | } |
809 | 809 | ||
810 | static void ath9k_hw_init_11a_eeprom_fix(struct ath_hw *ah) | 810 | static void ath9k_hw_init_eeprom_fix(struct ath_hw *ah) |
811 | { | 811 | { |
812 | u32 i, j; | 812 | u32 i, j; |
813 | 813 | ||
814 | if ((ah->hw_version.devid == AR9280_DEVID_PCI) && | 814 | if (ah->hw_version.devid == AR9280_DEVID_PCI) { |
815 | test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes)) { | ||
816 | 815 | ||
817 | /* EEPROM Fixup */ | 816 | /* EEPROM Fixup */ |
818 | for (i = 0; i < ah->iniModes.ia_rows; i++) { | 817 | for (i = 0; i < ah->iniModes.ia_rows; i++) { |
@@ -932,7 +931,7 @@ int ath9k_hw_init(struct ath_hw *ah) | |||
932 | if (r) | 931 | if (r) |
933 | return r; | 932 | return r; |
934 | 933 | ||
935 | ath9k_hw_init_11a_eeprom_fix(ah); | 934 | ath9k_hw_init_eeprom_fix(ah); |
936 | 935 | ||
937 | r = ath9k_hw_init_macaddr(ah); | 936 | r = ath9k_hw_init_macaddr(ah); |
938 | if (r) { | 937 | if (r) { |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index c0c571c2e8c4..6aaca0026da8 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1470,10 +1470,10 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1470 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { | 1470 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { |
1471 | ath9k_ps_wakeup(sc); | 1471 | ath9k_ps_wakeup(sc); |
1472 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); | 1472 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); |
1473 | ath_beacon_return(sc, avp); | ||
1474 | ath9k_ps_restore(sc); | 1473 | ath9k_ps_restore(sc); |
1475 | } | 1474 | } |
1476 | 1475 | ||
1476 | ath_beacon_return(sc, avp); | ||
1477 | sc->sc_flags &= ~SC_OP_BEACONS; | 1477 | sc->sc_flags &= ~SC_OP_BEACONS; |
1478 | 1478 | ||
1479 | for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { | 1479 | for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { |
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", |