diff options
Diffstat (limited to 'drivers/net')
55 files changed, 465 insertions, 209 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index dc280bc8eba2..6c884ef1b069 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
| @@ -2536,7 +2536,7 @@ config S6GMAC | |||
| 2536 | source "drivers/net/stmmac/Kconfig" | 2536 | source "drivers/net/stmmac/Kconfig" |
| 2537 | 2537 | ||
| 2538 | config PCH_GBE | 2538 | config PCH_GBE |
| 2539 | tristate "PCH Gigabit Ethernet" | 2539 | tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GbE" |
| 2540 | depends on PCI | 2540 | depends on PCI |
| 2541 | select MII | 2541 | select MII |
| 2542 | ---help--- | 2542 | ---help--- |
| @@ -2548,6 +2548,12 @@ config PCH_GBE | |||
| 2548 | to Gigabit Ethernet. | 2548 | to Gigabit Ethernet. |
| 2549 | This driver enables Gigabit Ethernet function. | 2549 | This driver enables Gigabit Ethernet function. |
| 2550 | 2550 | ||
| 2551 | This driver also can be used for OKI SEMICONDUCTOR IOH(Input/ | ||
| 2552 | Output Hub), ML7223. | ||
| 2553 | ML7223 IOH is for MP(Media Phone) use. | ||
| 2554 | ML7223 is companion chip for Intel Atom E6xx series. | ||
| 2555 | ML7223 is completely compatible for Intel EG20T PCH. | ||
| 2556 | |||
| 2551 | endif # NETDEV_1000 | 2557 | endif # NETDEV_1000 |
| 2552 | 2558 | ||
| 2553 | # | 2559 | # |
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 01b604ad155e..e5a7375685ad 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
| @@ -144,7 +144,7 @@ obj-$(CONFIG_NE3210) += ne3210.o 8390.o | |||
| 144 | obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o | 144 | obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o |
| 145 | obj-$(CONFIG_B44) += b44.o | 145 | obj-$(CONFIG_B44) += b44.o |
| 146 | obj-$(CONFIG_FORCEDETH) += forcedeth.o | 146 | obj-$(CONFIG_FORCEDETH) += forcedeth.o |
| 147 | obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o | 147 | obj-$(CONFIG_NE_H8300) += ne-h8300.o |
| 148 | obj-$(CONFIG_AX88796) += ax88796.o | 148 | obj-$(CONFIG_AX88796) += ax88796.o |
| 149 | obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o | 149 | obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o |
| 150 | obj-$(CONFIG_FTMAC100) += ftmac100.o | 150 | obj-$(CONFIG_FTMAC100) += ftmac100.o |
| @@ -219,7 +219,7 @@ obj-$(CONFIG_SC92031) += sc92031.o | |||
| 219 | obj-$(CONFIG_LP486E) += lp486e.o | 219 | obj-$(CONFIG_LP486E) += lp486e.o |
| 220 | 220 | ||
| 221 | obj-$(CONFIG_ETH16I) += eth16i.o | 221 | obj-$(CONFIG_ETH16I) += eth16i.o |
| 222 | obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o | 222 | obj-$(CONFIG_ZORRO8390) += zorro8390.o |
| 223 | obj-$(CONFIG_HPLANCE) += hplance.o 7990.o | 223 | obj-$(CONFIG_HPLANCE) += hplance.o 7990.o |
| 224 | obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o | 224 | obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o |
| 225 | obj-$(CONFIG_EQUALIZER) += eql.o | 225 | obj-$(CONFIG_EQUALIZER) += eql.o |
| @@ -231,7 +231,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o | |||
| 231 | obj-$(CONFIG_DECLANCE) += declance.o | 231 | obj-$(CONFIG_DECLANCE) += declance.o |
| 232 | obj-$(CONFIG_ATARILANCE) += atarilance.o | 232 | obj-$(CONFIG_ATARILANCE) += atarilance.o |
| 233 | obj-$(CONFIG_A2065) += a2065.o | 233 | obj-$(CONFIG_A2065) += a2065.o |
| 234 | obj-$(CONFIG_HYDRA) += hydra.o 8390.o | 234 | obj-$(CONFIG_HYDRA) += hydra.o |
| 235 | obj-$(CONFIG_ARIADNE) += ariadne.o | 235 | obj-$(CONFIG_ARIADNE) += ariadne.o |
| 236 | obj-$(CONFIG_CS89x0) += cs89x0.o | 236 | obj-$(CONFIG_CS89x0) += cs89x0.o |
| 237 | obj-$(CONFIG_MACSONIC) += macsonic.o | 237 | obj-$(CONFIG_MACSONIC) += macsonic.o |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 88495c48a81d..241b185e6569 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
| @@ -106,7 +106,7 @@ MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version "M | |||
| 106 | MODULE_LICENSE("GPL"); | 106 | MODULE_LICENSE("GPL"); |
| 107 | MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl); | 107 | MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl); |
| 108 | module_param_array(speed_duplex, int, NULL, 0); | 108 | module_param_array(speed_duplex, int, NULL, 0); |
| 109 | MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotitate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex"); | 109 | MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotiate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex"); |
| 110 | module_param_array(coalesce, bool, NULL, 0); | 110 | module_param_array(coalesce, bool, NULL, 0); |
| 111 | MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable"); | 111 | MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable"); |
| 112 | module_param_array(dynamic_ipg, bool, NULL, 0); | 112 | module_param_array(dynamic_ipg, bool, NULL, 0); |
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index 4af235d41fda..fbfb5b47c506 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
| @@ -527,7 +527,7 @@ static void __init etherh_banner(void) | |||
| 527 | * Read the ethernet address string from the on board rom. | 527 | * Read the ethernet address string from the on board rom. |
| 528 | * This is an ascii string... | 528 | * This is an ascii string... |
| 529 | */ | 529 | */ |
| 530 | static int __init etherh_addr(char *addr, struct expansion_card *ec) | 530 | static int __devinit etherh_addr(char *addr, struct expansion_card *ec) |
| 531 | { | 531 | { |
| 532 | struct in_chunk_dir cd; | 532 | struct in_chunk_dir cd; |
| 533 | char *s; | 533 | char *s; |
| @@ -655,7 +655,7 @@ static const struct net_device_ops etherh_netdev_ops = { | |||
| 655 | static u32 etherh_regoffsets[16]; | 655 | static u32 etherh_regoffsets[16]; |
| 656 | static u32 etherm_regoffsets[16]; | 656 | static u32 etherm_regoffsets[16]; |
| 657 | 657 | ||
| 658 | static int __init | 658 | static int __devinit |
| 659 | etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | 659 | etherh_probe(struct expansion_card *ec, const struct ecard_id *id) |
| 660 | { | 660 | { |
| 661 | const struct etherh_data *data = id->data; | 661 | const struct etherh_data *data = id->data; |
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h index 7cb375e0e29c..925929d764ca 100644 --- a/drivers/net/atl1c/atl1c.h +++ b/drivers/net/atl1c/atl1c.h | |||
| @@ -566,9 +566,9 @@ struct atl1c_adapter { | |||
| 566 | #define __AT_TESTING 0x0001 | 566 | #define __AT_TESTING 0x0001 |
| 567 | #define __AT_RESETTING 0x0002 | 567 | #define __AT_RESETTING 0x0002 |
| 568 | #define __AT_DOWN 0x0003 | 568 | #define __AT_DOWN 0x0003 |
| 569 | u8 work_event; | 569 | unsigned long work_event; |
| 570 | #define ATL1C_WORK_EVENT_RESET 0x01 | 570 | #define ATL1C_WORK_EVENT_RESET 0 |
| 571 | #define ATL1C_WORK_EVENT_LINK_CHANGE 0x02 | 571 | #define ATL1C_WORK_EVENT_LINK_CHANGE 1 |
| 572 | u32 msg_enable; | 572 | u32 msg_enable; |
| 573 | 573 | ||
| 574 | bool have_msi; | 574 | bool have_msi; |
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c index 7d9d5067a65c..a6e1c36e48e6 100644 --- a/drivers/net/atl1c/atl1c_main.c +++ b/drivers/net/atl1c/atl1c_main.c | |||
| @@ -325,7 +325,7 @@ static void atl1c_link_chg_event(struct atl1c_adapter *adapter) | |||
| 325 | } | 325 | } |
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | adapter->work_event |= ATL1C_WORK_EVENT_LINK_CHANGE; | 328 | set_bit(ATL1C_WORK_EVENT_LINK_CHANGE, &adapter->work_event); |
| 329 | schedule_work(&adapter->common_task); | 329 | schedule_work(&adapter->common_task); |
| 330 | } | 330 | } |
| 331 | 331 | ||
| @@ -337,20 +337,16 @@ static void atl1c_common_task(struct work_struct *work) | |||
| 337 | adapter = container_of(work, struct atl1c_adapter, common_task); | 337 | adapter = container_of(work, struct atl1c_adapter, common_task); |
| 338 | netdev = adapter->netdev; | 338 | netdev = adapter->netdev; |
| 339 | 339 | ||
| 340 | if (adapter->work_event & ATL1C_WORK_EVENT_RESET) { | 340 | if (test_and_clear_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event)) { |
| 341 | adapter->work_event &= ~ATL1C_WORK_EVENT_RESET; | ||
| 342 | netif_device_detach(netdev); | 341 | netif_device_detach(netdev); |
| 343 | atl1c_down(adapter); | 342 | atl1c_down(adapter); |
| 344 | atl1c_up(adapter); | 343 | atl1c_up(adapter); |
| 345 | netif_device_attach(netdev); | 344 | netif_device_attach(netdev); |
| 346 | return; | ||
| 347 | } | 345 | } |
| 348 | 346 | ||
| 349 | if (adapter->work_event & ATL1C_WORK_EVENT_LINK_CHANGE) { | 347 | if (test_and_clear_bit(ATL1C_WORK_EVENT_LINK_CHANGE, |
| 350 | adapter->work_event &= ~ATL1C_WORK_EVENT_LINK_CHANGE; | 348 | &adapter->work_event)) |
| 351 | atl1c_check_link_status(adapter); | 349 | atl1c_check_link_status(adapter); |
| 352 | } | ||
| 353 | return; | ||
| 354 | } | 350 | } |
| 355 | 351 | ||
| 356 | 352 | ||
| @@ -369,7 +365,7 @@ static void atl1c_tx_timeout(struct net_device *netdev) | |||
| 369 | struct atl1c_adapter *adapter = netdev_priv(netdev); | 365 | struct atl1c_adapter *adapter = netdev_priv(netdev); |
| 370 | 366 | ||
| 371 | /* Do the reset outside of interrupt context */ | 367 | /* Do the reset outside of interrupt context */ |
| 372 | adapter->work_event |= ATL1C_WORK_EVENT_RESET; | 368 | set_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event); |
| 373 | schedule_work(&adapter->common_task); | 369 | schedule_work(&adapter->common_task); |
| 374 | } | 370 | } |
| 375 | 371 | ||
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index 66823eded7a3..2353eca32593 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
| @@ -213,7 +213,7 @@ struct be_rx_stats { | |||
| 213 | 213 | ||
| 214 | struct be_rx_compl_info { | 214 | struct be_rx_compl_info { |
| 215 | u32 rss_hash; | 215 | u32 rss_hash; |
| 216 | u16 vid; | 216 | u16 vlan_tag; |
| 217 | u16 pkt_size; | 217 | u16 pkt_size; |
| 218 | u16 rxq_idx; | 218 | u16 rxq_idx; |
| 219 | u16 mac_id; | 219 | u16 mac_id; |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 1e2d825bb94a..9dc9394fd4ca 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
| @@ -132,7 +132,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter, | |||
| 132 | struct be_async_event_grp5_pvid_state *evt) | 132 | struct be_async_event_grp5_pvid_state *evt) |
| 133 | { | 133 | { |
| 134 | if (evt->enabled) | 134 | if (evt->enabled) |
| 135 | adapter->pvid = evt->tag; | 135 | adapter->pvid = le16_to_cpu(evt->tag); |
| 136 | else | 136 | else |
| 137 | adapter->pvid = 0; | 137 | adapter->pvid = 0; |
| 138 | } | 138 | } |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 7cb5a114c733..9187fb4e08f1 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
| @@ -1018,7 +1018,8 @@ static void be_rx_compl_process(struct be_adapter *adapter, | |||
| 1018 | kfree_skb(skb); | 1018 | kfree_skb(skb); |
| 1019 | return; | 1019 | return; |
| 1020 | } | 1020 | } |
| 1021 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, rxcp->vid); | 1021 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, |
| 1022 | rxcp->vlan_tag); | ||
| 1022 | } else { | 1023 | } else { |
| 1023 | netif_receive_skb(skb); | 1024 | netif_receive_skb(skb); |
| 1024 | } | 1025 | } |
| @@ -1076,7 +1077,8 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, | |||
| 1076 | if (likely(!rxcp->vlanf)) | 1077 | if (likely(!rxcp->vlanf)) |
| 1077 | napi_gro_frags(&eq_obj->napi); | 1078 | napi_gro_frags(&eq_obj->napi); |
| 1078 | else | 1079 | else |
| 1079 | vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, rxcp->vid); | 1080 | vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, |
| 1081 | rxcp->vlan_tag); | ||
| 1080 | } | 1082 | } |
| 1081 | 1083 | ||
| 1082 | static void be_parse_rx_compl_v1(struct be_adapter *adapter, | 1084 | static void be_parse_rx_compl_v1(struct be_adapter *adapter, |
| @@ -1102,7 +1104,8 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter, | |||
| 1102 | rxcp->pkt_type = | 1104 | rxcp->pkt_type = |
| 1103 | AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl); | 1105 | AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl); |
| 1104 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, compl); | 1106 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, compl); |
| 1105 | rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, compl); | 1107 | rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, |
| 1108 | compl); | ||
| 1106 | } | 1109 | } |
| 1107 | 1110 | ||
| 1108 | static void be_parse_rx_compl_v0(struct be_adapter *adapter, | 1111 | static void be_parse_rx_compl_v0(struct be_adapter *adapter, |
| @@ -1128,7 +1131,8 @@ static void be_parse_rx_compl_v0(struct be_adapter *adapter, | |||
| 1128 | rxcp->pkt_type = | 1131 | rxcp->pkt_type = |
| 1129 | AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl); | 1132 | AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl); |
| 1130 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, compl); | 1133 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, compl); |
| 1131 | rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, compl); | 1134 | rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, |
| 1135 | compl); | ||
| 1132 | } | 1136 | } |
| 1133 | 1137 | ||
| 1134 | static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) | 1138 | static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) |
| @@ -1155,9 +1159,11 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) | |||
| 1155 | rxcp->vlanf = 0; | 1159 | rxcp->vlanf = 0; |
| 1156 | 1160 | ||
| 1157 | if (!lancer_chip(adapter)) | 1161 | if (!lancer_chip(adapter)) |
| 1158 | rxcp->vid = swab16(rxcp->vid); | 1162 | rxcp->vlan_tag = swab16(rxcp->vlan_tag); |
| 1159 | 1163 | ||
| 1160 | if ((adapter->pvid == rxcp->vid) && !adapter->vlan_tag[rxcp->vid]) | 1164 | if (((adapter->pvid & VLAN_VID_MASK) == |
| 1165 | (rxcp->vlan_tag & VLAN_VID_MASK)) && | ||
| 1166 | !adapter->vlan_tag[rxcp->vlan_tag]) | ||
| 1161 | rxcp->vlanf = 0; | 1167 | rxcp->vlanf = 0; |
| 1162 | 1168 | ||
| 1163 | /* As the compl has been parsed, reset it; we wont touch it again */ | 1169 | /* As the compl has been parsed, reset it; we wont touch it again */ |
| @@ -1873,6 +1879,7 @@ static void be_worker(struct work_struct *work) | |||
| 1873 | be_detect_dump_ue(adapter); | 1879 | be_detect_dump_ue(adapter); |
| 1874 | 1880 | ||
| 1875 | reschedule: | 1881 | reschedule: |
| 1882 | adapter->work_counter++; | ||
| 1876 | schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); | 1883 | schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); |
| 1877 | } | 1884 | } |
| 1878 | 1885 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 8e6d618b5305..d8383a9af9ad 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
| @@ -8413,6 +8413,8 @@ bnx2_remove_one(struct pci_dev *pdev) | |||
| 8413 | 8413 | ||
| 8414 | unregister_netdev(dev); | 8414 | unregister_netdev(dev); |
| 8415 | 8415 | ||
| 8416 | del_timer_sync(&bp->timer); | ||
| 8417 | |||
| 8416 | if (bp->mips_firmware) | 8418 | if (bp->mips_firmware) |
| 8417 | release_firmware(bp->mips_firmware); | 8419 | release_firmware(bp->mips_firmware); |
| 8418 | if (bp->rv2p_firmware) | 8420 | if (bp->rv2p_firmware) |
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c index e83ac6dd6fc0..16581df5ee4e 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.c +++ b/drivers/net/bnx2x/bnx2x_cmn.c | |||
| @@ -2019,15 +2019,23 @@ static inline void bnx2x_set_pbd_gso(struct sk_buff *skb, | |||
| 2019 | static inline u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb, | 2019 | static inline u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb, |
| 2020 | u32 *parsing_data, u32 xmit_type) | 2020 | u32 *parsing_data, u32 xmit_type) |
| 2021 | { | 2021 | { |
| 2022 | *parsing_data |= ((tcp_hdrlen(skb)/4) << | 2022 | *parsing_data |= |
| 2023 | ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) & | 2023 | ((((u8 *)skb_transport_header(skb) - skb->data) >> 1) << |
| 2024 | ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW; | 2024 | ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) & |
| 2025 | ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W; | ||
| 2025 | 2026 | ||
| 2026 | *parsing_data |= ((((u8 *)tcp_hdr(skb) - skb->data) / 2) << | 2027 | if (xmit_type & XMIT_CSUM_TCP) { |
| 2027 | ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) & | 2028 | *parsing_data |= ((tcp_hdrlen(skb) / 4) << |
| 2028 | ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W; | 2029 | ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) & |
| 2030 | ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW; | ||
| 2029 | 2031 | ||
| 2030 | return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data; | 2032 | return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data; |
| 2033 | } else | ||
| 2034 | /* We support checksum offload for TCP and UDP only. | ||
| 2035 | * No need to pass the UDP header length - it's a constant. | ||
| 2036 | */ | ||
| 2037 | return skb_transport_header(skb) + | ||
| 2038 | sizeof(struct udphdr) - skb->data; | ||
| 2031 | } | 2039 | } |
| 2032 | 2040 | ||
| 2033 | /** | 2041 | /** |
| @@ -2043,7 +2051,7 @@ static inline u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb, | |||
| 2043 | struct eth_tx_parse_bd_e1x *pbd, | 2051 | struct eth_tx_parse_bd_e1x *pbd, |
| 2044 | u32 xmit_type) | 2052 | u32 xmit_type) |
| 2045 | { | 2053 | { |
| 2046 | u8 hlen = (skb_network_header(skb) - skb->data) / 2; | 2054 | u8 hlen = (skb_network_header(skb) - skb->data) >> 1; |
| 2047 | 2055 | ||
| 2048 | /* for now NS flag is not used in Linux */ | 2056 | /* for now NS flag is not used in Linux */ |
| 2049 | pbd->global_data = | 2057 | pbd->global_data = |
| @@ -2051,9 +2059,15 @@ static inline u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb, | |||
| 2051 | ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT)); | 2059 | ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT)); |
| 2052 | 2060 | ||
| 2053 | pbd->ip_hlen_w = (skb_transport_header(skb) - | 2061 | pbd->ip_hlen_w = (skb_transport_header(skb) - |
| 2054 | skb_network_header(skb)) / 2; | 2062 | skb_network_header(skb)) >> 1; |
| 2055 | 2063 | ||
| 2056 | hlen += pbd->ip_hlen_w + tcp_hdrlen(skb) / 2; | 2064 | hlen += pbd->ip_hlen_w; |
| 2065 | |||
| 2066 | /* We support checksum offload for TCP and UDP only */ | ||
| 2067 | if (xmit_type & XMIT_CSUM_TCP) | ||
| 2068 | hlen += tcp_hdrlen(skb) / 2; | ||
| 2069 | else | ||
| 2070 | hlen += sizeof(struct udphdr) / 2; | ||
| 2057 | 2071 | ||
| 2058 | pbd->total_hlen_w = cpu_to_le16(hlen); | 2072 | pbd->total_hlen_w = cpu_to_le16(hlen); |
| 2059 | hlen = hlen*2; | 2073 | hlen = hlen*2; |
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 494bf960442d..31912f17653f 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
| @@ -1482,8 +1482,11 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best, | |||
| 1482 | 1482 | ||
| 1483 | static int agg_device_up(const struct aggregator *agg) | 1483 | static int agg_device_up(const struct aggregator *agg) |
| 1484 | { | 1484 | { |
| 1485 | return (netif_running(agg->slave->dev) && | 1485 | struct port *port = agg->lag_ports; |
| 1486 | netif_carrier_ok(agg->slave->dev)); | 1486 | if (!port) |
| 1487 | return 0; | ||
| 1488 | return (netif_running(port->slave->dev) && | ||
| 1489 | netif_carrier_ok(port->slave->dev)); | ||
| 1487 | } | 1490 | } |
| 1488 | 1491 | ||
| 1489 | /** | 1492 | /** |
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index b28baff70864..01b8a6af275b 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | typedef struct mac_addr { | 40 | typedef struct mac_addr { |
| 41 | u8 mac_addr_value[ETH_ALEN]; | 41 | u8 mac_addr_value[ETH_ALEN]; |
| 42 | } mac_addr_t; | 42 | } __packed mac_addr_t; |
| 43 | 43 | ||
| 44 | enum { | 44 | enum { |
| 45 | BOND_AD_STABLE = 0, | 45 | BOND_AD_STABLE = 0, |
| @@ -134,12 +134,12 @@ typedef struct lacpdu { | |||
| 134 | u8 tlv_type_terminator; // = terminator | 134 | u8 tlv_type_terminator; // = terminator |
| 135 | u8 terminator_length; // = 0 | 135 | u8 terminator_length; // = 0 |
| 136 | u8 reserved_50[50]; // = 0 | 136 | u8 reserved_50[50]; // = 0 |
| 137 | } lacpdu_t; | 137 | } __packed lacpdu_t; |
| 138 | 138 | ||
| 139 | typedef struct lacpdu_header { | 139 | typedef struct lacpdu_header { |
| 140 | struct ethhdr hdr; | 140 | struct ethhdr hdr; |
| 141 | struct lacpdu lacpdu; | 141 | struct lacpdu lacpdu; |
| 142 | } lacpdu_header_t; | 142 | } __packed lacpdu_header_t; |
| 143 | 143 | ||
| 144 | // Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) | 144 | // Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) |
| 145 | typedef struct bond_marker { | 145 | typedef struct bond_marker { |
| @@ -155,12 +155,12 @@ typedef struct bond_marker { | |||
| 155 | u8 tlv_type_terminator; // = 0x00 | 155 | u8 tlv_type_terminator; // = 0x00 |
| 156 | u8 terminator_length; // = 0x00 | 156 | u8 terminator_length; // = 0x00 |
| 157 | u8 reserved_90[90]; // = 0 | 157 | u8 reserved_90[90]; // = 0 |
| 158 | } bond_marker_t; | 158 | } __packed bond_marker_t; |
| 159 | 159 | ||
| 160 | typedef struct bond_marker_header { | 160 | typedef struct bond_marker_header { |
| 161 | struct ethhdr hdr; | 161 | struct ethhdr hdr; |
| 162 | struct bond_marker marker; | 162 | struct bond_marker marker; |
| 163 | } bond_marker_header_t; | 163 | } __packed bond_marker_header_t; |
| 164 | 164 | ||
| 165 | #pragma pack() | 165 | #pragma pack() |
| 166 | 166 | ||
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index bd1d811c204f..5fedc3375562 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c | |||
| @@ -247,8 +247,10 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, | |||
| 247 | } | 247 | } |
| 248 | #endif /* CONFIG_PPC_MPC512x */ | 248 | #endif /* CONFIG_PPC_MPC512x */ |
| 249 | 249 | ||
| 250 | static struct of_device_id mpc5xxx_can_table[]; | ||
| 250 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) | 251 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) |
| 251 | { | 252 | { |
| 253 | const struct of_device_id *match; | ||
| 252 | struct mpc5xxx_can_data *data; | 254 | struct mpc5xxx_can_data *data; |
| 253 | struct device_node *np = ofdev->dev.of_node; | 255 | struct device_node *np = ofdev->dev.of_node; |
| 254 | struct net_device *dev; | 256 | struct net_device *dev; |
| @@ -258,9 +260,10 @@ static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) | |||
| 258 | int irq, mscan_clksrc = 0; | 260 | int irq, mscan_clksrc = 0; |
| 259 | int err = -ENOMEM; | 261 | int err = -ENOMEM; |
| 260 | 262 | ||
| 261 | if (!ofdev->dev.of_match) | 263 | match = of_match_device(mpc5xxx_can_table, &ofdev->dev); |
| 264 | if (!match) | ||
| 262 | return -EINVAL; | 265 | return -EINVAL; |
| 263 | data = (struct mpc5xxx_can_data *)ofdev->dev.of_match->data; | 266 | data = match->data; |
| 264 | 267 | ||
| 265 | base = of_iomap(np, 0); | 268 | base = of_iomap(np, 0); |
| 266 | if (!base) { | 269 | if (!base) { |
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index a358ea9445a2..f501bba1fc6f 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c | |||
| @@ -346,10 +346,10 @@ static void sja1000_rx(struct net_device *dev) | |||
| 346 | | (priv->read_reg(priv, REG_ID2) >> 5); | 346 | | (priv->read_reg(priv, REG_ID2) >> 5); |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | cf->can_dlc = get_can_dlc(fi & 0x0F); | ||
| 349 | if (fi & FI_RTR) { | 350 | if (fi & FI_RTR) { |
| 350 | id |= CAN_RTR_FLAG; | 351 | id |= CAN_RTR_FLAG; |
| 351 | } else { | 352 | } else { |
| 352 | cf->can_dlc = get_can_dlc(fi & 0x0F); | ||
| 353 | for (i = 0; i < cf->can_dlc; i++) | 353 | for (i = 0; i < cf->can_dlc; i++) |
| 354 | cf->data[i] = priv->read_reg(priv, dreg++); | 354 | cf->data[i] = priv->read_reg(priv, dreg++); |
| 355 | } | 355 | } |
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index b423965a78d1..1b49df6b2470 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c | |||
| @@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct *tty) | |||
| 583 | /* Done. We have linked the TTY line to a channel. */ | 583 | /* Done. We have linked the TTY line to a channel. */ |
| 584 | rtnl_unlock(); | 584 | rtnl_unlock(); |
| 585 | tty->receive_room = 65536; /* We don't flow control */ | 585 | tty->receive_room = 65536; /* We don't flow control */ |
| 586 | return sl->dev->base_addr; | 586 | |
| 587 | /* TTY layer expects 0 on success */ | ||
| 588 | return 0; | ||
| 587 | 589 | ||
| 588 | err_free_chan: | 590 | err_free_chan: |
| 589 | sl->tty = NULL; | 591 | sl->tty = NULL; |
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c index 3e2e734fecb7..f3bbdcef338c 100644 --- a/drivers/net/ehea/ehea_ethtool.c +++ b/drivers/net/ehea/ehea_ethtool.c | |||
| @@ -55,15 +55,20 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
| 55 | cmd->duplex = -1; | 55 | cmd->duplex = -1; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full | 58 | if (cmd->speed == SPEED_10000) { |
| 59 | | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half | 59 | cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); |
| 60 | | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half | 60 | cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE); |
| 61 | | SUPPORTED_Autoneg | SUPPORTED_FIBRE); | 61 | cmd->port = PORT_FIBRE; |
| 62 | 62 | } else { | |
| 63 | cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg | 63 | cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full |
| 64 | | ADVERTISED_FIBRE); | 64 | | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full |
| 65 | | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg | ||
| 66 | | SUPPORTED_TP); | ||
| 67 | cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg | ||
| 68 | | ADVERTISED_TP); | ||
| 69 | cmd->port = PORT_TP; | ||
| 70 | } | ||
| 65 | 71 | ||
| 66 | cmd->port = PORT_FIBRE; | ||
| 67 | cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE; | 72 | cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE; |
| 68 | 73 | ||
| 69 | return 0; | 74 | return 0; |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index f75d3144b8a5..cf79cf759e13 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
| @@ -2688,9 +2688,6 @@ static int ehea_open(struct net_device *dev) | |||
| 2688 | netif_start_queue(dev); | 2688 | netif_start_queue(dev); |
| 2689 | } | 2689 | } |
| 2690 | 2690 | ||
| 2691 | init_waitqueue_head(&port->swqe_avail_wq); | ||
| 2692 | init_waitqueue_head(&port->restart_wq); | ||
| 2693 | |||
| 2694 | mutex_unlock(&port->port_lock); | 2691 | mutex_unlock(&port->port_lock); |
| 2695 | 2692 | ||
| 2696 | return ret; | 2693 | return ret; |
| @@ -3040,11 +3037,14 @@ static void ehea_rereg_mrs(void) | |||
| 3040 | 3037 | ||
| 3041 | if (dev->flags & IFF_UP) { | 3038 | if (dev->flags & IFF_UP) { |
| 3042 | mutex_lock(&port->port_lock); | 3039 | mutex_lock(&port->port_lock); |
| 3043 | port_napi_enable(port); | ||
| 3044 | ret = ehea_restart_qps(dev); | 3040 | ret = ehea_restart_qps(dev); |
| 3045 | check_sqs(port); | 3041 | if (!ret) { |
| 3046 | if (!ret) | 3042 | check_sqs(port); |
| 3043 | port_napi_enable(port); | ||
| 3047 | netif_wake_queue(dev); | 3044 | netif_wake_queue(dev); |
| 3045 | } else { | ||
| 3046 | netdev_err(dev, "Unable to restart QPS\n"); | ||
| 3047 | } | ||
| 3048 | mutex_unlock(&port->port_lock); | 3048 | mutex_unlock(&port->port_lock); |
| 3049 | } | 3049 | } |
| 3050 | } | 3050 | } |
| @@ -3273,6 +3273,9 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | |||
| 3273 | 3273 | ||
| 3274 | INIT_WORK(&port->reset_task, ehea_reset_port); | 3274 | INIT_WORK(&port->reset_task, ehea_reset_port); |
| 3275 | 3275 | ||
| 3276 | init_waitqueue_head(&port->swqe_avail_wq); | ||
| 3277 | init_waitqueue_head(&port->restart_wq); | ||
| 3278 | |||
| 3276 | ret = register_netdev(dev); | 3279 | ret = register_netdev(dev); |
| 3277 | if (ret) { | 3280 | if (ret) { |
| 3278 | pr_err("register_netdev failed. ret=%d\n", ret); | 3281 | pr_err("register_netdev failed. ret=%d\n", ret); |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 24cb953900dd..5131e61c358c 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
| @@ -998,8 +998,10 @@ static const struct net_device_ops fs_enet_netdev_ops = { | |||
| 998 | #endif | 998 | #endif |
| 999 | }; | 999 | }; |
| 1000 | 1000 | ||
| 1001 | static struct of_device_id fs_enet_match[]; | ||
| 1001 | static int __devinit fs_enet_probe(struct platform_device *ofdev) | 1002 | static int __devinit fs_enet_probe(struct platform_device *ofdev) |
| 1002 | { | 1003 | { |
| 1004 | const struct of_device_id *match; | ||
| 1003 | struct net_device *ndev; | 1005 | struct net_device *ndev; |
| 1004 | struct fs_enet_private *fep; | 1006 | struct fs_enet_private *fep; |
| 1005 | struct fs_platform_info *fpi; | 1007 | struct fs_platform_info *fpi; |
| @@ -1007,14 +1009,15 @@ static int __devinit fs_enet_probe(struct platform_device *ofdev) | |||
| 1007 | const u8 *mac_addr; | 1009 | const u8 *mac_addr; |
| 1008 | int privsize, len, ret = -ENODEV; | 1010 | int privsize, len, ret = -ENODEV; |
| 1009 | 1011 | ||
| 1010 | if (!ofdev->dev.of_match) | 1012 | match = of_match_device(fs_enet_match, &ofdev->dev); |
| 1013 | if (!match) | ||
| 1011 | return -EINVAL; | 1014 | return -EINVAL; |
| 1012 | 1015 | ||
| 1013 | fpi = kzalloc(sizeof(*fpi), GFP_KERNEL); | 1016 | fpi = kzalloc(sizeof(*fpi), GFP_KERNEL); |
| 1014 | if (!fpi) | 1017 | if (!fpi) |
| 1015 | return -ENOMEM; | 1018 | return -ENOMEM; |
| 1016 | 1019 | ||
| 1017 | if (!IS_FEC(ofdev->dev.of_match)) { | 1020 | if (!IS_FEC(match)) { |
| 1018 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); | 1021 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); |
| 1019 | if (!data || len != 4) | 1022 | if (!data || len != 4) |
| 1020 | goto out_free_fpi; | 1023 | goto out_free_fpi; |
| @@ -1049,7 +1052,7 @@ static int __devinit fs_enet_probe(struct platform_device *ofdev) | |||
| 1049 | fep->dev = &ofdev->dev; | 1052 | fep->dev = &ofdev->dev; |
| 1050 | fep->ndev = ndev; | 1053 | fep->ndev = ndev; |
| 1051 | fep->fpi = fpi; | 1054 | fep->fpi = fpi; |
| 1052 | fep->ops = ofdev->dev.of_match->data; | 1055 | fep->ops = match->data; |
| 1053 | 1056 | ||
| 1054 | ret = fep->ops->setup_data(ndev); | 1057 | ret = fep->ops->setup_data(ndev); |
| 1055 | if (ret) | 1058 | if (ret) |
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index 61035fc5599b..b9fbc83d64a7 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
| @@ -226,8 +226,8 @@ static void set_multicast_finish(struct net_device *dev) | |||
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | FC(fecp, r_cntrl, FEC_RCNTRL_PROM); | 228 | FC(fecp, r_cntrl, FEC_RCNTRL_PROM); |
| 229 | FW(fecp, hash_table_high, fep->fec.hthi); | 229 | FW(fecp, grp_hash_table_high, fep->fec.hthi); |
| 230 | FW(fecp, hash_table_low, fep->fec.htlo); | 230 | FW(fecp, grp_hash_table_low, fep->fec.htlo); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static void set_multicast_list(struct net_device *dev) | 233 | static void set_multicast_list(struct net_device *dev) |
| @@ -273,8 +273,8 @@ static void restart(struct net_device *dev) | |||
| 273 | /* | 273 | /* |
| 274 | * Reset all multicast. | 274 | * Reset all multicast. |
| 275 | */ | 275 | */ |
| 276 | FW(fecp, hash_table_high, fep->fec.hthi); | 276 | FW(fecp, grp_hash_table_high, fep->fec.hthi); |
| 277 | FW(fecp, hash_table_low, fep->fec.htlo); | 277 | FW(fecp, grp_hash_table_low, fep->fec.htlo); |
| 278 | 278 | ||
| 279 | /* | 279 | /* |
| 280 | * Set maximum receive buffer size. | 280 | * Set maximum receive buffer size. |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 7e840d373ab3..6a2e150e75bb 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
| @@ -101,17 +101,20 @@ static int fs_enet_fec_mii_reset(struct mii_bus *bus) | |||
| 101 | return 0; | 101 | return 0; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static struct of_device_id fs_enet_mdio_fec_match[]; | ||
| 104 | static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev) | 105 | static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev) |
| 105 | { | 106 | { |
| 107 | const struct of_device_id *match; | ||
| 106 | struct resource res; | 108 | struct resource res; |
| 107 | struct mii_bus *new_bus; | 109 | struct mii_bus *new_bus; |
| 108 | struct fec_info *fec; | 110 | struct fec_info *fec; |
| 109 | int (*get_bus_freq)(struct device_node *); | 111 | int (*get_bus_freq)(struct device_node *); |
| 110 | int ret = -ENOMEM, clock, speed; | 112 | int ret = -ENOMEM, clock, speed; |
| 111 | 113 | ||
| 112 | if (!ofdev->dev.of_match) | 114 | match = of_match_device(fs_enet_mdio_fec_match, &ofdev->dev); |
| 115 | if (!match) | ||
| 113 | return -EINVAL; | 116 | return -EINVAL; |
| 114 | get_bus_freq = ofdev->dev.of_match->data; | 117 | get_bus_freq = match->data; |
| 115 | 118 | ||
| 116 | new_bus = mdiobus_alloc(); | 119 | new_bus = mdiobus_alloc(); |
| 117 | if (!new_bus) | 120 | if (!new_bus) |
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index a31661948c42..9bd7746cbfcf 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c | |||
| @@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv) | |||
| 139 | * that hardware reset completed (what the f*ck). | 139 | * that hardware reset completed (what the f*ck). |
| 140 | * We still need to wait for a while. | 140 | * We still need to wait for a while. |
| 141 | */ | 141 | */ |
| 142 | usleep_range(500, 1000); | 142 | udelay(500); |
| 143 | return 0; | 143 | return 0; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | usleep_range(1000, 10000); | 146 | udelay(1000); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | netdev_err(netdev, "software reset failed\n"); | 149 | netdev_err(netdev, "software reset failed\n"); |
| @@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg) | |||
| 772 | if ((phycr & FTMAC100_PHYCR_MIIRD) == 0) | 772 | if ((phycr & FTMAC100_PHYCR_MIIRD) == 0) |
| 773 | return phycr & FTMAC100_PHYCR_MIIRDATA; | 773 | return phycr & FTMAC100_PHYCR_MIIRDATA; |
| 774 | 774 | ||
| 775 | usleep_range(100, 1000); | 775 | udelay(100); |
| 776 | } | 776 | } |
| 777 | 777 | ||
| 778 | netdev_err(netdev, "mdio read timed out\n"); | 778 | netdev_err(netdev, "mdio read timed out\n"); |
| @@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg, | |||
| 801 | if ((phycr & FTMAC100_PHYCR_MIIWR) == 0) | 801 | if ((phycr & FTMAC100_PHYCR_MIIWR) == 0) |
| 802 | return; | 802 | return; |
| 803 | 803 | ||
| 804 | usleep_range(100, 1000); | 804 | udelay(100); |
| 805 | } | 805 | } |
| 806 | 806 | ||
| 807 | netdev_err(netdev, "mdio write timed out\n"); | 807 | netdev_err(netdev, "mdio write timed out\n"); |
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c index c5ef62ceb840..1cd481c04202 100644 --- a/drivers/net/hydra.c +++ b/drivers/net/hydra.c | |||
| @@ -98,15 +98,15 @@ static const struct net_device_ops hydra_netdev_ops = { | |||
| 98 | .ndo_open = hydra_open, | 98 | .ndo_open = hydra_open, |
| 99 | .ndo_stop = hydra_close, | 99 | .ndo_stop = hydra_close, |
| 100 | 100 | ||
| 101 | .ndo_start_xmit = ei_start_xmit, | 101 | .ndo_start_xmit = __ei_start_xmit, |
| 102 | .ndo_tx_timeout = ei_tx_timeout, | 102 | .ndo_tx_timeout = __ei_tx_timeout, |
| 103 | .ndo_get_stats = ei_get_stats, | 103 | .ndo_get_stats = __ei_get_stats, |
| 104 | .ndo_set_multicast_list = ei_set_multicast_list, | 104 | .ndo_set_multicast_list = __ei_set_multicast_list, |
| 105 | .ndo_validate_addr = eth_validate_addr, | 105 | .ndo_validate_addr = eth_validate_addr, |
| 106 | .ndo_set_mac_address = eth_mac_addr, | 106 | .ndo_set_mac_address = eth_mac_addr, |
| 107 | .ndo_change_mtu = eth_change_mtu, | 107 | .ndo_change_mtu = eth_change_mtu, |
| 108 | #ifdef CONFIG_NET_POLL_CONTROLLER | 108 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 109 | .ndo_poll_controller = ei_poll, | 109 | .ndo_poll_controller = __ei_poll, |
| 110 | #endif | 110 | #endif |
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| @@ -125,7 +125,7 @@ static int __devinit hydra_init(struct zorro_dev *z) | |||
| 125 | 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, | 125 | 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, |
| 126 | }; | 126 | }; |
| 127 | 127 | ||
| 128 | dev = alloc_ei_netdev(); | 128 | dev = ____alloc_ei_netdev(0); |
| 129 | if (!dev) | 129 | if (!dev) |
| 130 | return -ENOMEM; | 130 | return -ENOMEM; |
| 131 | 131 | ||
diff --git a/drivers/net/mii.c b/drivers/net/mii.c index 0a6c6a2e7550..d4fc00b1ff93 100644 --- a/drivers/net/mii.c +++ b/drivers/net/mii.c | |||
| @@ -49,6 +49,10 @@ static u32 mii_get_an(struct mii_if_info *mii, u16 addr) | |||
| 49 | result |= ADVERTISED_100baseT_Half; | 49 | result |= ADVERTISED_100baseT_Half; |
| 50 | if (advert & ADVERTISE_100FULL) | 50 | if (advert & ADVERTISE_100FULL) |
| 51 | result |= ADVERTISED_100baseT_Full; | 51 | result |= ADVERTISED_100baseT_Full; |
| 52 | if (advert & ADVERTISE_PAUSE_CAP) | ||
| 53 | result |= ADVERTISED_Pause; | ||
| 54 | if (advert & ADVERTISE_PAUSE_ASYM) | ||
| 55 | result |= ADVERTISED_Asym_Pause; | ||
| 52 | 56 | ||
| 53 | return result; | 57 | return result; |
| 54 | } | 58 | } |
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c index 30be8c634ebd..7298a34bc795 100644 --- a/drivers/net/ne-h8300.c +++ b/drivers/net/ne-h8300.c | |||
| @@ -167,7 +167,7 @@ static void cleanup_card(struct net_device *dev) | |||
| 167 | #ifndef MODULE | 167 | #ifndef MODULE |
| 168 | struct net_device * __init ne_probe(int unit) | 168 | struct net_device * __init ne_probe(int unit) |
| 169 | { | 169 | { |
| 170 | struct net_device *dev = alloc_ei_netdev(); | 170 | struct net_device *dev = ____alloc_ei_netdev(0); |
| 171 | int err; | 171 | int err; |
| 172 | 172 | ||
| 173 | if (!dev) | 173 | if (!dev) |
| @@ -197,15 +197,15 @@ static const struct net_device_ops ne_netdev_ops = { | |||
| 197 | .ndo_open = ne_open, | 197 | .ndo_open = ne_open, |
| 198 | .ndo_stop = ne_close, | 198 | .ndo_stop = ne_close, |
| 199 | 199 | ||
| 200 | .ndo_start_xmit = ei_start_xmit, | 200 | .ndo_start_xmit = __ei_start_xmit, |
| 201 | .ndo_tx_timeout = ei_tx_timeout, | 201 | .ndo_tx_timeout = __ei_tx_timeout, |
| 202 | .ndo_get_stats = ei_get_stats, | 202 | .ndo_get_stats = __ei_get_stats, |
| 203 | .ndo_set_multicast_list = ei_set_multicast_list, | 203 | .ndo_set_multicast_list = __ei_set_multicast_list, |
| 204 | .ndo_validate_addr = eth_validate_addr, | 204 | .ndo_validate_addr = eth_validate_addr, |
| 205 | .ndo_set_mac_address = eth_mac_addr, | 205 | .ndo_set_mac_address = eth_mac_addr, |
| 206 | .ndo_change_mtu = eth_change_mtu, | 206 | .ndo_change_mtu = eth_change_mtu, |
| 207 | #ifdef CONFIG_NET_POLL_CONTROLLER | 207 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 208 | .ndo_poll_controller = ei_poll, | 208 | .ndo_poll_controller = __ei_poll, |
| 209 | #endif | 209 | #endif |
| 210 | }; | 210 | }; |
| 211 | 211 | ||
| @@ -637,7 +637,7 @@ int init_module(void) | |||
| 637 | int err; | 637 | int err; |
| 638 | 638 | ||
| 639 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { | 639 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { |
| 640 | struct net_device *dev = alloc_ei_netdev(); | 640 | struct net_device *dev = ____alloc_ei_netdev(0); |
| 641 | if (!dev) | 641 | if (!dev) |
| 642 | break; | 642 | break; |
| 643 | if (io[this_dev]) { | 643 | if (io[this_dev]) { |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index dfb67eb2a94b..eb41e44921e6 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
| @@ -671,6 +671,7 @@ static int netconsole_netdev_event(struct notifier_block *this, | |||
| 671 | goto done; | 671 | goto done; |
| 672 | 672 | ||
| 673 | spin_lock_irqsave(&target_list_lock, flags); | 673 | spin_lock_irqsave(&target_list_lock, flags); |
| 674 | restart: | ||
| 674 | list_for_each_entry(nt, &target_list, list) { | 675 | list_for_each_entry(nt, &target_list, list) { |
| 675 | netconsole_target_get(nt); | 676 | netconsole_target_get(nt); |
| 676 | if (nt->np.dev == dev) { | 677 | if (nt->np.dev == dev) { |
| @@ -683,9 +684,16 @@ static int netconsole_netdev_event(struct notifier_block *this, | |||
| 683 | * rtnl_lock already held | 684 | * rtnl_lock already held |
| 684 | */ | 685 | */ |
| 685 | if (nt->np.dev) { | 686 | if (nt->np.dev) { |
| 687 | spin_unlock_irqrestore( | ||
| 688 | &target_list_lock, | ||
| 689 | flags); | ||
| 686 | __netpoll_cleanup(&nt->np); | 690 | __netpoll_cleanup(&nt->np); |
| 691 | spin_lock_irqsave(&target_list_lock, | ||
| 692 | flags); | ||
| 687 | dev_put(nt->np.dev); | 693 | dev_put(nt->np.dev); |
| 688 | nt->np.dev = NULL; | 694 | nt->np.dev = NULL; |
| 695 | netconsole_target_put(nt); | ||
| 696 | goto restart; | ||
| 689 | } | 697 | } |
| 690 | /* Fall through */ | 698 | /* Fall through */ |
| 691 | case NETDEV_GOING_DOWN: | 699 | case NETDEV_GOING_DOWN: |
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c index 2ef2f9cdefa6..56d049a472da 100644 --- a/drivers/net/pch_gbe/pch_gbe_main.c +++ b/drivers/net/pch_gbe/pch_gbe_main.c | |||
| @@ -34,6 +34,10 @@ const char pch_driver_version[] = DRV_VERSION; | |||
| 34 | #define PCH_GBE_COPYBREAK_DEFAULT 256 | 34 | #define PCH_GBE_COPYBREAK_DEFAULT 256 |
| 35 | #define PCH_GBE_PCI_BAR 1 | 35 | #define PCH_GBE_PCI_BAR 1 |
| 36 | 36 | ||
| 37 | /* Macros for ML7223 */ | ||
| 38 | #define PCI_VENDOR_ID_ROHM 0x10db | ||
| 39 | #define PCI_DEVICE_ID_ROHM_ML7223_GBE 0x8013 | ||
| 40 | |||
| 37 | #define PCH_GBE_TX_WEIGHT 64 | 41 | #define PCH_GBE_TX_WEIGHT 64 |
| 38 | #define PCH_GBE_RX_WEIGHT 64 | 42 | #define PCH_GBE_RX_WEIGHT 64 |
| 39 | #define PCH_GBE_RX_BUFFER_WRITE 16 | 43 | #define PCH_GBE_RX_BUFFER_WRITE 16 |
| @@ -43,8 +47,7 @@ const char pch_driver_version[] = DRV_VERSION; | |||
| 43 | 47 | ||
| 44 | #define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \ | 48 | #define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \ |
| 45 | PCH_GBE_CHIP_TYPE_INTERNAL | \ | 49 | PCH_GBE_CHIP_TYPE_INTERNAL | \ |
| 46 | PCH_GBE_RGMII_MODE_RGMII | \ | 50 | PCH_GBE_RGMII_MODE_RGMII \ |
| 47 | PCH_GBE_CRS_SEL \ | ||
| 48 | ) | 51 | ) |
| 49 | 52 | ||
| 50 | /* Ethertype field values */ | 53 | /* Ethertype field values */ |
| @@ -1494,12 +1497,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter, | |||
| 1494 | /* Write meta date of skb */ | 1497 | /* Write meta date of skb */ |
| 1495 | skb_put(skb, length); | 1498 | skb_put(skb, length); |
| 1496 | skb->protocol = eth_type_trans(skb, netdev); | 1499 | skb->protocol = eth_type_trans(skb, netdev); |
| 1497 | if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) == | 1500 | if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) |
| 1498 | PCH_GBE_RXD_ACC_STAT_TCPIPOK) { | ||
| 1499 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
| 1500 | } else { | ||
| 1501 | skb->ip_summed = CHECKSUM_NONE; | 1501 | skb->ip_summed = CHECKSUM_NONE; |
| 1502 | } | 1502 | else |
| 1503 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
| 1504 | |||
| 1503 | napi_gro_receive(&adapter->napi, skb); | 1505 | napi_gro_receive(&adapter->napi, skb); |
| 1504 | (*work_done)++; | 1506 | (*work_done)++; |
| 1505 | pr_debug("Receive skb->ip_summed: %d length: %d\n", | 1507 | pr_debug("Receive skb->ip_summed: %d length: %d\n", |
| @@ -2420,6 +2422,13 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gbe_pcidev_id) = { | |||
| 2420 | .class = (PCI_CLASS_NETWORK_ETHERNET << 8), | 2422 | .class = (PCI_CLASS_NETWORK_ETHERNET << 8), |
| 2421 | .class_mask = (0xFFFF00) | 2423 | .class_mask = (0xFFFF00) |
| 2422 | }, | 2424 | }, |
| 2425 | {.vendor = PCI_VENDOR_ID_ROHM, | ||
| 2426 | .device = PCI_DEVICE_ID_ROHM_ML7223_GBE, | ||
| 2427 | .subvendor = PCI_ANY_ID, | ||
| 2428 | .subdevice = PCI_ANY_ID, | ||
| 2429 | .class = (PCI_CLASS_NETWORK_ETHERNET << 8), | ||
| 2430 | .class_mask = (0xFFFF00) | ||
| 2431 | }, | ||
| 2423 | /* required last entry */ | 2432 | /* required last entry */ |
| 2424 | {0} | 2433 | {0} |
| 2425 | }; | 2434 | }; |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 493b0de3848b..397c36810a15 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
| @@ -170,6 +170,16 @@ static const struct { | |||
| 170 | }; | 170 | }; |
| 171 | #undef _R | 171 | #undef _R |
| 172 | 172 | ||
| 173 | static const struct rtl_firmware_info { | ||
| 174 | int mac_version; | ||
| 175 | const char *fw_name; | ||
| 176 | } rtl_firmware_infos[] = { | ||
| 177 | { .mac_version = RTL_GIGA_MAC_VER_25, .fw_name = FIRMWARE_8168D_1 }, | ||
| 178 | { .mac_version = RTL_GIGA_MAC_VER_26, .fw_name = FIRMWARE_8168D_2 }, | ||
| 179 | { .mac_version = RTL_GIGA_MAC_VER_29, .fw_name = FIRMWARE_8105E_1 }, | ||
| 180 | { .mac_version = RTL_GIGA_MAC_VER_30, .fw_name = FIRMWARE_8105E_1 } | ||
| 181 | }; | ||
| 182 | |||
| 173 | enum cfg_version { | 183 | enum cfg_version { |
| 174 | RTL_CFG_0 = 0x00, | 184 | RTL_CFG_0 = 0x00, |
| 175 | RTL_CFG_1, | 185 | RTL_CFG_1, |
| @@ -565,6 +575,7 @@ struct rtl8169_private { | |||
| 565 | u32 saved_wolopts; | 575 | u32 saved_wolopts; |
| 566 | 576 | ||
| 567 | const struct firmware *fw; | 577 | const struct firmware *fw; |
| 578 | #define RTL_FIRMWARE_UNKNOWN ERR_PTR(-EAGAIN); | ||
| 568 | }; | 579 | }; |
| 569 | 580 | ||
| 570 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); | 581 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); |
| @@ -1789,25 +1800,26 @@ rtl_phy_write_fw(struct rtl8169_private *tp, const struct firmware *fw) | |||
| 1789 | 1800 | ||
| 1790 | static void rtl_release_firmware(struct rtl8169_private *tp) | 1801 | static void rtl_release_firmware(struct rtl8169_private *tp) |
| 1791 | { | 1802 | { |
| 1792 | release_firmware(tp->fw); | 1803 | if (!IS_ERR_OR_NULL(tp->fw)) |
| 1793 | tp->fw = NULL; | 1804 | release_firmware(tp->fw); |
| 1805 | tp->fw = RTL_FIRMWARE_UNKNOWN; | ||
| 1794 | } | 1806 | } |
| 1795 | 1807 | ||
| 1796 | static int rtl_apply_firmware(struct rtl8169_private *tp, const char *fw_name) | 1808 | static void rtl_apply_firmware(struct rtl8169_private *tp) |
| 1797 | { | 1809 | { |
| 1798 | const struct firmware **fw = &tp->fw; | 1810 | const struct firmware *fw = tp->fw; |
| 1799 | int rc = !*fw; | ||
| 1800 | |||
| 1801 | if (rc) { | ||
| 1802 | rc = request_firmware(fw, fw_name, &tp->pci_dev->dev); | ||
| 1803 | if (rc < 0) | ||
| 1804 | goto out; | ||
| 1805 | } | ||
| 1806 | 1811 | ||
| 1807 | /* TODO: release firmware once rtl_phy_write_fw signals failures. */ | 1812 | /* TODO: release firmware once rtl_phy_write_fw signals failures. */ |
| 1808 | rtl_phy_write_fw(tp, *fw); | 1813 | if (!IS_ERR_OR_NULL(fw)) |
| 1809 | out: | 1814 | rtl_phy_write_fw(tp, fw); |
| 1810 | return rc; | 1815 | } |
| 1816 | |||
| 1817 | static void rtl_apply_firmware_cond(struct rtl8169_private *tp, u8 reg, u16 val) | ||
| 1818 | { | ||
| 1819 | if (rtl_readphy(tp, reg) != val) | ||
| 1820 | netif_warn(tp, hw, tp->dev, "chipset not ready for firmware\n"); | ||
| 1821 | else | ||
| 1822 | rtl_apply_firmware(tp); | ||
| 1811 | } | 1823 | } |
| 1812 | 1824 | ||
| 1813 | static void rtl8169s_hw_phy_config(struct rtl8169_private *tp) | 1825 | static void rtl8169s_hw_phy_config(struct rtl8169_private *tp) |
| @@ -2246,10 +2258,8 @@ static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp) | |||
| 2246 | 2258 | ||
| 2247 | rtl_writephy(tp, 0x1f, 0x0005); | 2259 | rtl_writephy(tp, 0x1f, 0x0005); |
| 2248 | rtl_writephy(tp, 0x05, 0x001b); | 2260 | rtl_writephy(tp, 0x05, 0x001b); |
| 2249 | if ((rtl_readphy(tp, 0x06) != 0xbf00) || | 2261 | |
| 2250 | (rtl_apply_firmware(tp, FIRMWARE_8168D_1) < 0)) { | 2262 | rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xbf00); |
| 2251 | netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n"); | ||
| 2252 | } | ||
| 2253 | 2263 | ||
| 2254 | rtl_writephy(tp, 0x1f, 0x0000); | 2264 | rtl_writephy(tp, 0x1f, 0x0000); |
| 2255 | } | 2265 | } |
| @@ -2351,10 +2361,8 @@ static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp) | |||
| 2351 | 2361 | ||
| 2352 | rtl_writephy(tp, 0x1f, 0x0005); | 2362 | rtl_writephy(tp, 0x1f, 0x0005); |
| 2353 | rtl_writephy(tp, 0x05, 0x001b); | 2363 | rtl_writephy(tp, 0x05, 0x001b); |
| 2354 | if ((rtl_readphy(tp, 0x06) != 0xb300) || | 2364 | |
| 2355 | (rtl_apply_firmware(tp, FIRMWARE_8168D_2) < 0)) { | 2365 | rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xb300); |
| 2356 | netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n"); | ||
| 2357 | } | ||
| 2358 | 2366 | ||
| 2359 | rtl_writephy(tp, 0x1f, 0x0000); | 2367 | rtl_writephy(tp, 0x1f, 0x0000); |
| 2360 | } | 2368 | } |
| @@ -2474,8 +2482,7 @@ static void rtl8105e_hw_phy_config(struct rtl8169_private *tp) | |||
| 2474 | rtl_writephy(tp, 0x18, 0x0310); | 2482 | rtl_writephy(tp, 0x18, 0x0310); |
| 2475 | msleep(100); | 2483 | msleep(100); |
| 2476 | 2484 | ||
| 2477 | if (rtl_apply_firmware(tp, FIRMWARE_8105E_1) < 0) | 2485 | rtl_apply_firmware(tp); |
| 2478 | netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n"); | ||
| 2479 | 2486 | ||
| 2480 | rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init)); | 2487 | rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init)); |
| 2481 | } | 2488 | } |
| @@ -3237,6 +3244,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 3237 | tp->timer.data = (unsigned long) dev; | 3244 | tp->timer.data = (unsigned long) dev; |
| 3238 | tp->timer.function = rtl8169_phy_timer; | 3245 | tp->timer.function = rtl8169_phy_timer; |
| 3239 | 3246 | ||
| 3247 | tp->fw = RTL_FIRMWARE_UNKNOWN; | ||
| 3248 | |||
| 3240 | rc = register_netdev(dev); | 3249 | rc = register_netdev(dev); |
| 3241 | if (rc < 0) | 3250 | if (rc < 0) |
| 3242 | goto err_out_msi_4; | 3251 | goto err_out_msi_4; |
| @@ -3288,10 +3297,10 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev) | |||
| 3288 | 3297 | ||
| 3289 | cancel_delayed_work_sync(&tp->task); | 3298 | cancel_delayed_work_sync(&tp->task); |
| 3290 | 3299 | ||
| 3291 | rtl_release_firmware(tp); | ||
| 3292 | |||
| 3293 | unregister_netdev(dev); | 3300 | unregister_netdev(dev); |
| 3294 | 3301 | ||
| 3302 | rtl_release_firmware(tp); | ||
| 3303 | |||
| 3295 | if (pci_dev_run_wake(pdev)) | 3304 | if (pci_dev_run_wake(pdev)) |
| 3296 | pm_runtime_get_noresume(&pdev->dev); | 3305 | pm_runtime_get_noresume(&pdev->dev); |
| 3297 | 3306 | ||
| @@ -3303,6 +3312,37 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev) | |||
| 3303 | pci_set_drvdata(pdev, NULL); | 3312 | pci_set_drvdata(pdev, NULL); |
| 3304 | } | 3313 | } |
| 3305 | 3314 | ||
| 3315 | static void rtl_request_firmware(struct rtl8169_private *tp) | ||
| 3316 | { | ||
| 3317 | int i; | ||
| 3318 | |||
| 3319 | /* Return early if the firmware is already loaded / cached. */ | ||
| 3320 | if (!IS_ERR(tp->fw)) | ||
| 3321 | goto out; | ||
| 3322 | |||
| 3323 | for (i = 0; i < ARRAY_SIZE(rtl_firmware_infos); i++) { | ||
| 3324 | const struct rtl_firmware_info *info = rtl_firmware_infos + i; | ||
| 3325 | |||
| 3326 | if (info->mac_version == tp->mac_version) { | ||
| 3327 | const char *name = info->fw_name; | ||
| 3328 | int rc; | ||
| 3329 | |||
| 3330 | rc = request_firmware(&tp->fw, name, &tp->pci_dev->dev); | ||
| 3331 | if (rc < 0) { | ||
| 3332 | netif_warn(tp, ifup, tp->dev, "unable to load " | ||
| 3333 | "firmware patch %s (%d)\n", name, rc); | ||
| 3334 | goto out_disable_request_firmware; | ||
| 3335 | } | ||
| 3336 | goto out; | ||
| 3337 | } | ||
| 3338 | } | ||
| 3339 | |||
| 3340 | out_disable_request_firmware: | ||
| 3341 | tp->fw = NULL; | ||
| 3342 | out: | ||
| 3343 | return; | ||
| 3344 | } | ||
| 3345 | |||
| 3306 | static int rtl8169_open(struct net_device *dev) | 3346 | static int rtl8169_open(struct net_device *dev) |
| 3307 | { | 3347 | { |
| 3308 | struct rtl8169_private *tp = netdev_priv(dev); | 3348 | struct rtl8169_private *tp = netdev_priv(dev); |
| @@ -3334,11 +3374,13 @@ static int rtl8169_open(struct net_device *dev) | |||
| 3334 | 3374 | ||
| 3335 | smp_mb(); | 3375 | smp_mb(); |
| 3336 | 3376 | ||
| 3377 | rtl_request_firmware(tp); | ||
| 3378 | |||
| 3337 | retval = request_irq(dev->irq, rtl8169_interrupt, | 3379 | retval = request_irq(dev->irq, rtl8169_interrupt, |
| 3338 | (tp->features & RTL_FEATURE_MSI) ? 0 : IRQF_SHARED, | 3380 | (tp->features & RTL_FEATURE_MSI) ? 0 : IRQF_SHARED, |
| 3339 | dev->name, dev); | 3381 | dev->name, dev); |
| 3340 | if (retval < 0) | 3382 | if (retval < 0) |
| 3341 | goto err_release_ring_2; | 3383 | goto err_release_fw_2; |
| 3342 | 3384 | ||
| 3343 | napi_enable(&tp->napi); | 3385 | napi_enable(&tp->napi); |
| 3344 | 3386 | ||
| @@ -3359,7 +3401,8 @@ static int rtl8169_open(struct net_device *dev) | |||
| 3359 | out: | 3401 | out: |
| 3360 | return retval; | 3402 | return retval; |
| 3361 | 3403 | ||
| 3362 | err_release_ring_2: | 3404 | err_release_fw_2: |
| 3405 | rtl_release_firmware(tp); | ||
| 3363 | rtl8169_rx_clear(tp); | 3406 | rtl8169_rx_clear(tp); |
| 3364 | err_free_rx_1: | 3407 | err_free_rx_1: |
| 3365 | dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray, | 3408 | dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray, |
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index d98479030ef2..3dd45ed61f0a 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
| @@ -50,6 +50,20 @@ static inline struct efx_mcdi_iface *efx_mcdi(struct efx_nic *efx) | |||
| 50 | return &nic_data->mcdi; | 50 | return &nic_data->mcdi; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static inline void | ||
| 54 | efx_mcdi_readd(struct efx_nic *efx, efx_dword_t *value, unsigned reg) | ||
| 55 | { | ||
| 56 | struct siena_nic_data *nic_data = efx->nic_data; | ||
| 57 | value->u32[0] = (__force __le32)__raw_readl(nic_data->mcdi_smem + reg); | ||
| 58 | } | ||
| 59 | |||
| 60 | static inline void | ||
| 61 | efx_mcdi_writed(struct efx_nic *efx, const efx_dword_t *value, unsigned reg) | ||
| 62 | { | ||
| 63 | struct siena_nic_data *nic_data = efx->nic_data; | ||
| 64 | __raw_writel((__force u32)value->u32[0], nic_data->mcdi_smem + reg); | ||
| 65 | } | ||
| 66 | |||
| 53 | void efx_mcdi_init(struct efx_nic *efx) | 67 | void efx_mcdi_init(struct efx_nic *efx) |
| 54 | { | 68 | { |
| 55 | struct efx_mcdi_iface *mcdi; | 69 | struct efx_mcdi_iface *mcdi; |
| @@ -70,8 +84,8 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd, | |||
| 70 | const u8 *inbuf, size_t inlen) | 84 | const u8 *inbuf, size_t inlen) |
| 71 | { | 85 | { |
| 72 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 86 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
| 73 | unsigned pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 87 | unsigned pdu = MCDI_PDU(efx); |
| 74 | unsigned doorbell = FR_CZ_MC_TREG_SMEM + MCDI_DOORBELL(efx); | 88 | unsigned doorbell = MCDI_DOORBELL(efx); |
| 75 | unsigned int i; | 89 | unsigned int i; |
| 76 | efx_dword_t hdr; | 90 | efx_dword_t hdr; |
| 77 | u32 xflags, seqno; | 91 | u32 xflags, seqno; |
| @@ -92,30 +106,28 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd, | |||
| 92 | MCDI_HEADER_SEQ, seqno, | 106 | MCDI_HEADER_SEQ, seqno, |
| 93 | MCDI_HEADER_XFLAGS, xflags); | 107 | MCDI_HEADER_XFLAGS, xflags); |
| 94 | 108 | ||
| 95 | efx_writed(efx, &hdr, pdu); | 109 | efx_mcdi_writed(efx, &hdr, pdu); |
| 96 | 110 | ||
| 97 | for (i = 0; i < inlen; i += 4) { | 111 | for (i = 0; i < inlen; i += 4) |
| 98 | _efx_writed(efx, *((__le32 *)(inbuf + i)), pdu + 4 + i); | 112 | efx_mcdi_writed(efx, (const efx_dword_t *)(inbuf + i), |
| 99 | /* use wmb() within loop to inhibit write combining */ | 113 | pdu + 4 + i); |
| 100 | wmb(); | ||
| 101 | } | ||
| 102 | 114 | ||
| 103 | /* ring the doorbell with a distinctive value */ | 115 | /* ring the doorbell with a distinctive value */ |
| 104 | _efx_writed(efx, (__force __le32) 0x45789abc, doorbell); | 116 | EFX_POPULATE_DWORD_1(hdr, EFX_DWORD_0, 0x45789abc); |
| 105 | wmb(); | 117 | efx_mcdi_writed(efx, &hdr, doorbell); |
| 106 | } | 118 | } |
| 107 | 119 | ||
| 108 | static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen) | 120 | static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen) |
| 109 | { | 121 | { |
| 110 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 122 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
| 111 | unsigned int pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 123 | unsigned int pdu = MCDI_PDU(efx); |
| 112 | int i; | 124 | int i; |
| 113 | 125 | ||
| 114 | BUG_ON(atomic_read(&mcdi->state) == MCDI_STATE_QUIESCENT); | 126 | BUG_ON(atomic_read(&mcdi->state) == MCDI_STATE_QUIESCENT); |
| 115 | BUG_ON(outlen & 3 || outlen >= 0x100); | 127 | BUG_ON(outlen & 3 || outlen >= 0x100); |
| 116 | 128 | ||
| 117 | for (i = 0; i < outlen; i += 4) | 129 | for (i = 0; i < outlen; i += 4) |
| 118 | *((__le32 *)(outbuf + i)) = _efx_readd(efx, pdu + 4 + i); | 130 | efx_mcdi_readd(efx, (efx_dword_t *)(outbuf + i), pdu + 4 + i); |
| 119 | } | 131 | } |
| 120 | 132 | ||
| 121 | static int efx_mcdi_poll(struct efx_nic *efx) | 133 | static int efx_mcdi_poll(struct efx_nic *efx) |
| @@ -123,7 +135,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
| 123 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 135 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
| 124 | unsigned int time, finish; | 136 | unsigned int time, finish; |
| 125 | unsigned int respseq, respcmd, error; | 137 | unsigned int respseq, respcmd, error; |
| 126 | unsigned int pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 138 | unsigned int pdu = MCDI_PDU(efx); |
| 127 | unsigned int rc, spins; | 139 | unsigned int rc, spins; |
| 128 | efx_dword_t reg; | 140 | efx_dword_t reg; |
| 129 | 141 | ||
| @@ -149,8 +161,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
| 149 | 161 | ||
| 150 | time = get_seconds(); | 162 | time = get_seconds(); |
| 151 | 163 | ||
| 152 | rmb(); | 164 | efx_mcdi_readd(efx, ®, pdu); |
| 153 | efx_readd(efx, ®, pdu); | ||
| 154 | 165 | ||
| 155 | /* All 1's indicates that shared memory is in reset (and is | 166 | /* All 1's indicates that shared memory is in reset (and is |
| 156 | * not a valid header). Wait for it to come out reset before | 167 | * not a valid header). Wait for it to come out reset before |
| @@ -177,7 +188,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
| 177 | respseq, mcdi->seqno); | 188 | respseq, mcdi->seqno); |
| 178 | rc = EIO; | 189 | rc = EIO; |
| 179 | } else if (error) { | 190 | } else if (error) { |
| 180 | efx_readd(efx, ®, pdu + 4); | 191 | efx_mcdi_readd(efx, ®, pdu + 4); |
| 181 | switch (EFX_DWORD_FIELD(reg, EFX_DWORD_0)) { | 192 | switch (EFX_DWORD_FIELD(reg, EFX_DWORD_0)) { |
| 182 | #define TRANSLATE_ERROR(name) \ | 193 | #define TRANSLATE_ERROR(name) \ |
| 183 | case MC_CMD_ERR_ ## name: \ | 194 | case MC_CMD_ERR_ ## name: \ |
| @@ -211,21 +222,21 @@ out: | |||
| 211 | /* Test and clear MC-rebooted flag for this port/function */ | 222 | /* Test and clear MC-rebooted flag for this port/function */ |
| 212 | int efx_mcdi_poll_reboot(struct efx_nic *efx) | 223 | int efx_mcdi_poll_reboot(struct efx_nic *efx) |
| 213 | { | 224 | { |
| 214 | unsigned int addr = FR_CZ_MC_TREG_SMEM + MCDI_REBOOT_FLAG(efx); | 225 | unsigned int addr = MCDI_REBOOT_FLAG(efx); |
| 215 | efx_dword_t reg; | 226 | efx_dword_t reg; |
| 216 | uint32_t value; | 227 | uint32_t value; |
| 217 | 228 | ||
| 218 | if (efx_nic_rev(efx) < EFX_REV_SIENA_A0) | 229 | if (efx_nic_rev(efx) < EFX_REV_SIENA_A0) |
| 219 | return false; | 230 | return false; |
| 220 | 231 | ||
| 221 | efx_readd(efx, ®, addr); | 232 | efx_mcdi_readd(efx, ®, addr); |
| 222 | value = EFX_DWORD_FIELD(reg, EFX_DWORD_0); | 233 | value = EFX_DWORD_FIELD(reg, EFX_DWORD_0); |
| 223 | 234 | ||
| 224 | if (value == 0) | 235 | if (value == 0) |
| 225 | return 0; | 236 | return 0; |
| 226 | 237 | ||
| 227 | EFX_ZERO_DWORD(reg); | 238 | EFX_ZERO_DWORD(reg); |
| 228 | efx_writed(efx, ®, addr); | 239 | efx_mcdi_writed(efx, ®, addr); |
| 229 | 240 | ||
| 230 | if (value == MC_STATUS_DWORD_ASSERT) | 241 | if (value == MC_STATUS_DWORD_ASSERT) |
| 231 | return -EINTR; | 242 | return -EINTR; |
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c index 10f1cb79c147..9b29a8d7c449 100644 --- a/drivers/net/sfc/nic.c +++ b/drivers/net/sfc/nic.c | |||
| @@ -1937,6 +1937,13 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf) | |||
| 1937 | 1937 | ||
| 1938 | size = min_t(size_t, table->step, 16); | 1938 | size = min_t(size_t, table->step, 16); |
| 1939 | 1939 | ||
| 1940 | if (table->offset >= efx->type->mem_map_size) { | ||
| 1941 | /* No longer mapped; return dummy data */ | ||
| 1942 | memcpy(buf, "\xde\xc0\xad\xde", 4); | ||
| 1943 | buf += table->rows * size; | ||
| 1944 | continue; | ||
| 1945 | } | ||
| 1946 | |||
| 1940 | for (i = 0; i < table->rows; i++) { | 1947 | for (i = 0; i < table->rows; i++) { |
| 1941 | switch (table->step) { | 1948 | switch (table->step) { |
| 1942 | case 4: /* 32-bit register or SRAM */ | 1949 | case 4: /* 32-bit register or SRAM */ |
diff --git a/drivers/net/sfc/nic.h b/drivers/net/sfc/nic.h index a42db6e35be3..d91701abd331 100644 --- a/drivers/net/sfc/nic.h +++ b/drivers/net/sfc/nic.h | |||
| @@ -143,10 +143,12 @@ static inline struct falcon_board *falcon_board(struct efx_nic *efx) | |||
| 143 | /** | 143 | /** |
| 144 | * struct siena_nic_data - Siena NIC state | 144 | * struct siena_nic_data - Siena NIC state |
| 145 | * @mcdi: Management-Controller-to-Driver Interface | 145 | * @mcdi: Management-Controller-to-Driver Interface |
| 146 | * @mcdi_smem: MCDI shared memory mapping. The mapping is always uncacheable. | ||
| 146 | * @wol_filter_id: Wake-on-LAN packet filter id | 147 | * @wol_filter_id: Wake-on-LAN packet filter id |
| 147 | */ | 148 | */ |
| 148 | struct siena_nic_data { | 149 | struct siena_nic_data { |
| 149 | struct efx_mcdi_iface mcdi; | 150 | struct efx_mcdi_iface mcdi; |
| 151 | void __iomem *mcdi_smem; | ||
| 150 | int wol_filter_id; | 152 | int wol_filter_id; |
| 151 | }; | 153 | }; |
| 152 | 154 | ||
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c index e4dd8986b1fe..837869b71db9 100644 --- a/drivers/net/sfc/siena.c +++ b/drivers/net/sfc/siena.c | |||
| @@ -220,12 +220,26 @@ static int siena_probe_nic(struct efx_nic *efx) | |||
| 220 | efx_reado(efx, ®, FR_AZ_CS_DEBUG); | 220 | efx_reado(efx, ®, FR_AZ_CS_DEBUG); |
| 221 | efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; | 221 | efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; |
| 222 | 222 | ||
| 223 | /* Initialise MCDI */ | ||
| 224 | nic_data->mcdi_smem = ioremap_nocache(efx->membase_phys + | ||
| 225 | FR_CZ_MC_TREG_SMEM, | ||
| 226 | FR_CZ_MC_TREG_SMEM_STEP * | ||
| 227 | FR_CZ_MC_TREG_SMEM_ROWS); | ||
| 228 | if (!nic_data->mcdi_smem) { | ||
| 229 | netif_err(efx, probe, efx->net_dev, | ||
| 230 | "could not map MCDI at %llx+%x\n", | ||
| 231 | (unsigned long long)efx->membase_phys + | ||
| 232 | FR_CZ_MC_TREG_SMEM, | ||
| 233 | FR_CZ_MC_TREG_SMEM_STEP * FR_CZ_MC_TREG_SMEM_ROWS); | ||
| 234 | rc = -ENOMEM; | ||
| 235 | goto fail1; | ||
| 236 | } | ||
| 223 | efx_mcdi_init(efx); | 237 | efx_mcdi_init(efx); |
| 224 | 238 | ||
| 225 | /* Recover from a failed assertion before probing */ | 239 | /* Recover from a failed assertion before probing */ |
| 226 | rc = efx_mcdi_handle_assertion(efx); | 240 | rc = efx_mcdi_handle_assertion(efx); |
| 227 | if (rc) | 241 | if (rc) |
| 228 | goto fail1; | 242 | goto fail2; |
| 229 | 243 | ||
| 230 | /* Let the BMC know that the driver is now in charge of link and | 244 | /* Let the BMC know that the driver is now in charge of link and |
| 231 | * filter settings. We must do this before we reset the NIC */ | 245 | * filter settings. We must do this before we reset the NIC */ |
| @@ -280,6 +294,7 @@ fail4: | |||
| 280 | fail3: | 294 | fail3: |
| 281 | efx_mcdi_drv_attach(efx, false, NULL); | 295 | efx_mcdi_drv_attach(efx, false, NULL); |
| 282 | fail2: | 296 | fail2: |
| 297 | iounmap(nic_data->mcdi_smem); | ||
| 283 | fail1: | 298 | fail1: |
| 284 | kfree(efx->nic_data); | 299 | kfree(efx->nic_data); |
| 285 | return rc; | 300 | return rc; |
| @@ -359,6 +374,8 @@ static int siena_init_nic(struct efx_nic *efx) | |||
| 359 | 374 | ||
| 360 | static void siena_remove_nic(struct efx_nic *efx) | 375 | static void siena_remove_nic(struct efx_nic *efx) |
| 361 | { | 376 | { |
| 377 | struct siena_nic_data *nic_data = efx->nic_data; | ||
| 378 | |||
| 362 | efx_nic_free_buffer(efx, &efx->irq_status); | 379 | efx_nic_free_buffer(efx, &efx->irq_status); |
| 363 | 380 | ||
| 364 | siena_reset_hw(efx, RESET_TYPE_ALL); | 381 | siena_reset_hw(efx, RESET_TYPE_ALL); |
| @@ -368,7 +385,8 @@ static void siena_remove_nic(struct efx_nic *efx) | |||
| 368 | efx_mcdi_drv_attach(efx, false, NULL); | 385 | efx_mcdi_drv_attach(efx, false, NULL); |
| 369 | 386 | ||
| 370 | /* Tear down the private nic state */ | 387 | /* Tear down the private nic state */ |
| 371 | kfree(efx->nic_data); | 388 | iounmap(nic_data->mcdi_smem); |
| 389 | kfree(nic_data); | ||
| 372 | efx->nic_data = NULL; | 390 | efx->nic_data = NULL; |
| 373 | } | 391 | } |
| 374 | 392 | ||
| @@ -606,8 +624,7 @@ struct efx_nic_type siena_a0_nic_type = { | |||
| 606 | .default_mac_ops = &efx_mcdi_mac_operations, | 624 | .default_mac_ops = &efx_mcdi_mac_operations, |
| 607 | 625 | ||
| 608 | .revision = EFX_REV_SIENA_A0, | 626 | .revision = EFX_REV_SIENA_A0, |
| 609 | .mem_map_size = (FR_CZ_MC_TREG_SMEM + | 627 | .mem_map_size = FR_CZ_MC_TREG_SMEM, /* MC_TREG_SMEM mapped separately */ |
| 610 | FR_CZ_MC_TREG_SMEM_STEP * FR_CZ_MC_TREG_SMEM_ROWS), | ||
| 611 | .txd_ptr_tbl_base = FR_BZ_TX_DESC_PTR_TBL, | 628 | .txd_ptr_tbl_base = FR_BZ_TX_DESC_PTR_TBL, |
| 612 | .rxd_ptr_tbl_base = FR_BZ_RX_DESC_PTR_TBL, | 629 | .rxd_ptr_tbl_base = FR_BZ_RX_DESC_PTR_TBL, |
| 613 | .buf_tbl_base = FR_BZ_BUF_FULL_TBL, | 630 | .buf_tbl_base = FR_BZ_BUF_FULL_TBL, |
diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 86cbb9ea2f26..8ec1a9a0bb9a 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c | |||
| @@ -853,7 +853,9 @@ static int slip_open(struct tty_struct *tty) | |||
| 853 | /* Done. We have linked the TTY line to a channel. */ | 853 | /* Done. We have linked the TTY line to a channel. */ |
| 854 | rtnl_unlock(); | 854 | rtnl_unlock(); |
| 855 | tty->receive_room = 65536; /* We don't flow control */ | 855 | tty->receive_room = 65536; /* We don't flow control */ |
| 856 | return sl->dev->base_addr; | 856 | |
| 857 | /* TTY layer expects 0 on success */ | ||
| 858 | return 0; | ||
| 857 | 859 | ||
| 858 | err_free_bufs: | 860 | err_free_bufs: |
| 859 | sl_free_bufs(sl); | 861 | sl_free_bufs(sl); |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index eb4f59fb01e9..bff2f7999ff0 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
| @@ -3237,15 +3237,18 @@ static void happy_meal_pci_exit(void) | |||
| 3237 | #endif | 3237 | #endif |
| 3238 | 3238 | ||
| 3239 | #ifdef CONFIG_SBUS | 3239 | #ifdef CONFIG_SBUS |
| 3240 | static const struct of_device_id hme_sbus_match[]; | ||
| 3240 | static int __devinit hme_sbus_probe(struct platform_device *op) | 3241 | static int __devinit hme_sbus_probe(struct platform_device *op) |
| 3241 | { | 3242 | { |
| 3243 | const struct of_device_id *match; | ||
| 3242 | struct device_node *dp = op->dev.of_node; | 3244 | struct device_node *dp = op->dev.of_node; |
| 3243 | const char *model = of_get_property(dp, "model", NULL); | 3245 | const char *model = of_get_property(dp, "model", NULL); |
| 3244 | int is_qfe; | 3246 | int is_qfe; |
| 3245 | 3247 | ||
| 3246 | if (!op->dev.of_match) | 3248 | match = of_match_device(hme_sbus_match, &op->dev); |
| 3249 | if (!match) | ||
| 3247 | return -EINVAL; | 3250 | return -EINVAL; |
| 3248 | is_qfe = (op->dev.of_match->data != NULL); | 3251 | is_qfe = (match->data != NULL); |
| 3249 | 3252 | ||
| 3250 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) | 3253 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) |
| 3251 | is_qfe = 1; | 3254 | is_qfe = 1; |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b8c5f35577e4..7a5daefb6f33 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
| @@ -12327,8 +12327,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
| 12327 | if (val & VCPU_CFGSHDW_ASPM_DBNC) | 12327 | if (val & VCPU_CFGSHDW_ASPM_DBNC) |
| 12328 | tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND; | 12328 | tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND; |
| 12329 | if ((val & VCPU_CFGSHDW_WOL_ENABLE) && | 12329 | if ((val & VCPU_CFGSHDW_WOL_ENABLE) && |
| 12330 | (val & VCPU_CFGSHDW_WOL_MAGPKT)) | 12330 | (val & VCPU_CFGSHDW_WOL_MAGPKT)) { |
| 12331 | tp->tg3_flags |= TG3_FLAG_WOL_ENABLE; | 12331 | tp->tg3_flags |= TG3_FLAG_WOL_ENABLE; |
| 12332 | device_set_wakeup_enable(&tp->pdev->dev, true); | ||
| 12333 | } | ||
| 12332 | goto done; | 12334 | goto done; |
| 12333 | } | 12335 | } |
| 12334 | 12336 | ||
| @@ -12461,8 +12463,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
| 12461 | tp->tg3_flags &= ~TG3_FLAG_WOL_CAP; | 12463 | tp->tg3_flags &= ~TG3_FLAG_WOL_CAP; |
| 12462 | 12464 | ||
| 12463 | if ((tp->tg3_flags & TG3_FLAG_WOL_CAP) && | 12465 | if ((tp->tg3_flags & TG3_FLAG_WOL_CAP) && |
| 12464 | (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) | 12466 | (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) { |
| 12465 | tp->tg3_flags |= TG3_FLAG_WOL_ENABLE; | 12467 | tp->tg3_flags |= TG3_FLAG_WOL_ENABLE; |
| 12468 | device_set_wakeup_enable(&tp->pdev->dev, true); | ||
| 12469 | } | ||
| 12466 | 12470 | ||
| 12467 | if (cfg2 & (1 << 17)) | 12471 | if (cfg2 & (1 << 17)) |
| 12468 | tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING; | 12472 | tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING; |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 341f7056a800..c924ea2bce07 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
| @@ -460,7 +460,7 @@ static const struct driver_info cdc_info = { | |||
| 460 | .manage_power = cdc_manage_power, | 460 | .manage_power = cdc_manage_power, |
| 461 | }; | 461 | }; |
| 462 | 462 | ||
| 463 | static const struct driver_info mbm_info = { | 463 | static const struct driver_info wwan_info = { |
| 464 | .description = "Mobile Broadband Network Device", | 464 | .description = "Mobile Broadband Network Device", |
| 465 | .flags = FLAG_WWAN, | 465 | .flags = FLAG_WWAN, |
| 466 | .bind = usbnet_cdc_bind, | 466 | .bind = usbnet_cdc_bind, |
| @@ -471,6 +471,7 @@ static const struct driver_info mbm_info = { | |||
| 471 | 471 | ||
| 472 | /*-------------------------------------------------------------------------*/ | 472 | /*-------------------------------------------------------------------------*/ |
| 473 | 473 | ||
| 474 | #define HUAWEI_VENDOR_ID 0x12D1 | ||
| 474 | 475 | ||
| 475 | static const struct usb_device_id products [] = { | 476 | static const struct usb_device_id products [] = { |
| 476 | /* | 477 | /* |
| @@ -566,7 +567,7 @@ static const struct usb_device_id products [] = { | |||
| 566 | { | 567 | { |
| 567 | USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM, | 568 | USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM, |
| 568 | USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), | 569 | USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), |
| 569 | .driver_info = 0, | 570 | .driver_info = (unsigned long)&wwan_info, |
| 570 | }, | 571 | }, |
| 571 | 572 | ||
| 572 | /* | 573 | /* |
| @@ -587,8 +588,17 @@ static const struct usb_device_id products [] = { | |||
| 587 | }, { | 588 | }, { |
| 588 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, | 589 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, |
| 589 | USB_CDC_PROTO_NONE), | 590 | USB_CDC_PROTO_NONE), |
| 590 | .driver_info = (unsigned long)&mbm_info, | 591 | .driver_info = (unsigned long)&wwan_info, |
| 591 | 592 | ||
| 593 | }, { | ||
| 594 | /* Various Huawei modems with a network port like the UMG1831 */ | ||
| 595 | .match_flags = USB_DEVICE_ID_MATCH_VENDOR | ||
| 596 | | USB_DEVICE_ID_MATCH_INT_INFO, | ||
| 597 | .idVendor = HUAWEI_VENDOR_ID, | ||
| 598 | .bInterfaceClass = USB_CLASS_COMM, | ||
| 599 | .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, | ||
| 600 | .bInterfaceProtocol = 255, | ||
| 601 | .driver_info = (unsigned long)&wwan_info, | ||
| 592 | }, | 602 | }, |
| 593 | { }, // END | 603 | { }, // END |
| 594 | }; | 604 | }; |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 967371f04454..1033ef6476a4 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
| @@ -54,13 +54,13 @@ | |||
| 54 | #include <linux/usb/usbnet.h> | 54 | #include <linux/usb/usbnet.h> |
| 55 | #include <linux/usb/cdc.h> | 55 | #include <linux/usb/cdc.h> |
| 56 | 56 | ||
| 57 | #define DRIVER_VERSION "7-Feb-2011" | 57 | #define DRIVER_VERSION "23-Apr-2011" |
| 58 | 58 | ||
| 59 | /* CDC NCM subclass 3.2.1 */ | 59 | /* CDC NCM subclass 3.2.1 */ |
| 60 | #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 | 60 | #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 |
| 61 | 61 | ||
| 62 | /* Maximum NTB length */ | 62 | /* Maximum NTB length */ |
| 63 | #define CDC_NCM_NTB_MAX_SIZE_TX 16384 /* bytes */ | 63 | #define CDC_NCM_NTB_MAX_SIZE_TX (16384 + 4) /* bytes, must be short terminated */ |
| 64 | #define CDC_NCM_NTB_MAX_SIZE_RX 16384 /* bytes */ | 64 | #define CDC_NCM_NTB_MAX_SIZE_RX 16384 /* bytes */ |
| 65 | 65 | ||
| 66 | /* Minimum value for MaxDatagramSize, ch. 6.2.9 */ | 66 | /* Minimum value for MaxDatagramSize, ch. 6.2.9 */ |
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index 7d42f9a2c068..81126ff85e05 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c | |||
| @@ -65,6 +65,7 @@ | |||
| 65 | #define IPHETH_USBINTF_PROTO 1 | 65 | #define IPHETH_USBINTF_PROTO 1 |
| 66 | 66 | ||
| 67 | #define IPHETH_BUF_SIZE 1516 | 67 | #define IPHETH_BUF_SIZE 1516 |
| 68 | #define IPHETH_IP_ALIGN 2 /* padding at front of URB */ | ||
| 68 | #define IPHETH_TX_TIMEOUT (5 * HZ) | 69 | #define IPHETH_TX_TIMEOUT (5 * HZ) |
| 69 | 70 | ||
| 70 | #define IPHETH_INTFNUM 2 | 71 | #define IPHETH_INTFNUM 2 |
| @@ -202,18 +203,21 @@ static void ipheth_rcvbulk_callback(struct urb *urb) | |||
| 202 | return; | 203 | return; |
| 203 | } | 204 | } |
| 204 | 205 | ||
| 205 | len = urb->actual_length; | 206 | if (urb->actual_length <= IPHETH_IP_ALIGN) { |
| 206 | buf = urb->transfer_buffer; | 207 | dev->net->stats.rx_length_errors++; |
| 208 | return; | ||
| 209 | } | ||
| 210 | len = urb->actual_length - IPHETH_IP_ALIGN; | ||
| 211 | buf = urb->transfer_buffer + IPHETH_IP_ALIGN; | ||
| 207 | 212 | ||
| 208 | skb = dev_alloc_skb(NET_IP_ALIGN + len); | 213 | skb = dev_alloc_skb(len); |
| 209 | if (!skb) { | 214 | if (!skb) { |
| 210 | err("%s: dev_alloc_skb: -ENOMEM", __func__); | 215 | err("%s: dev_alloc_skb: -ENOMEM", __func__); |
| 211 | dev->net->stats.rx_dropped++; | 216 | dev->net->stats.rx_dropped++; |
| 212 | return; | 217 | return; |
| 213 | } | 218 | } |
| 214 | 219 | ||
| 215 | skb_reserve(skb, NET_IP_ALIGN); | 220 | memcpy(skb_put(skb, len), buf, len); |
| 216 | memcpy(skb_put(skb, len), buf + NET_IP_ALIGN, len - NET_IP_ALIGN); | ||
| 217 | skb->dev = dev->net; | 221 | skb->dev = dev->net; |
| 218 | skb->protocol = eth_type_trans(skb, dev->net); | 222 | skb->protocol = eth_type_trans(skb, dev->net); |
| 219 | 223 | ||
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 47a6c870b51f..48d4efdb4959 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
| @@ -730,7 +730,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev) | |||
| 730 | msleep(10); | 730 | msleep(10); |
| 731 | bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); | 731 | bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); |
| 732 | timeout++; | 732 | timeout++; |
| 733 | } while ((bmcr & MII_BMCR) && (timeout < 100)); | 733 | } while ((bmcr & BMCR_RESET) && (timeout < 100)); |
| 734 | 734 | ||
| 735 | if (timeout >= 100) { | 735 | if (timeout >= 100) { |
| 736 | netdev_warn(dev->net, "timeout on PHY Reset"); | 736 | netdev_warn(dev->net, "timeout on PHY Reset"); |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 069c1cf0fdf7..9ab439d144ed 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
| @@ -645,6 +645,7 @@ int usbnet_stop (struct net_device *net) | |||
| 645 | struct driver_info *info = dev->driver_info; | 645 | struct driver_info *info = dev->driver_info; |
| 646 | int retval; | 646 | int retval; |
| 647 | 647 | ||
| 648 | clear_bit(EVENT_DEV_OPEN, &dev->flags); | ||
| 648 | netif_stop_queue (net); | 649 | netif_stop_queue (net); |
| 649 | 650 | ||
| 650 | netif_info(dev, ifdown, dev->net, | 651 | netif_info(dev, ifdown, dev->net, |
| @@ -736,6 +737,7 @@ int usbnet_open (struct net_device *net) | |||
| 736 | } | 737 | } |
| 737 | } | 738 | } |
| 738 | 739 | ||
| 740 | set_bit(EVENT_DEV_OPEN, &dev->flags); | ||
| 739 | netif_start_queue (net); | 741 | netif_start_queue (net); |
| 740 | netif_info(dev, ifup, dev->net, | 742 | netif_info(dev, ifup, dev->net, |
| 741 | "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n", | 743 | "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n", |
| @@ -1259,6 +1261,9 @@ void usbnet_disconnect (struct usb_interface *intf) | |||
| 1259 | if (dev->driver_info->unbind) | 1261 | if (dev->driver_info->unbind) |
| 1260 | dev->driver_info->unbind (dev, intf); | 1262 | dev->driver_info->unbind (dev, intf); |
| 1261 | 1263 | ||
| 1264 | usb_kill_urb(dev->interrupt); | ||
| 1265 | usb_free_urb(dev->interrupt); | ||
| 1266 | |||
| 1262 | free_netdev(net); | 1267 | free_netdev(net); |
| 1263 | usb_put_dev (xdev); | 1268 | usb_put_dev (xdev); |
| 1264 | } | 1269 | } |
| @@ -1498,6 +1503,10 @@ int usbnet_resume (struct usb_interface *intf) | |||
| 1498 | int retval; | 1503 | int retval; |
| 1499 | 1504 | ||
| 1500 | if (!--dev->suspend_count) { | 1505 | if (!--dev->suspend_count) { |
| 1506 | /* resume interrupt URBs */ | ||
| 1507 | if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags)) | ||
| 1508 | usb_submit_urb(dev->interrupt, GFP_NOIO); | ||
| 1509 | |||
| 1501 | spin_lock_irq(&dev->txq.lock); | 1510 | spin_lock_irq(&dev->txq.lock); |
| 1502 | while ((res = usb_get_from_anchor(&dev->deferred))) { | 1511 | while ((res = usb_get_from_anchor(&dev->deferred))) { |
| 1503 | 1512 | ||
| @@ -1516,9 +1525,12 @@ int usbnet_resume (struct usb_interface *intf) | |||
| 1516 | smp_mb(); | 1525 | smp_mb(); |
| 1517 | clear_bit(EVENT_DEV_ASLEEP, &dev->flags); | 1526 | clear_bit(EVENT_DEV_ASLEEP, &dev->flags); |
| 1518 | spin_unlock_irq(&dev->txq.lock); | 1527 | spin_unlock_irq(&dev->txq.lock); |
| 1519 | if (!(dev->txq.qlen >= TX_QLEN(dev))) | 1528 | |
| 1520 | netif_start_queue(dev->net); | 1529 | if (test_bit(EVENT_DEV_OPEN, &dev->flags)) { |
| 1521 | tasklet_schedule (&dev->bh); | 1530 | if (!(dev->txq.qlen >= TX_QLEN(dev))) |
| 1531 | netif_start_queue(dev->net); | ||
| 1532 | tasklet_schedule (&dev->bh); | ||
| 1533 | } | ||
| 1522 | } | 1534 | } |
| 1523 | return 0; | 1535 | return 0; |
| 1524 | } | 1536 | } |
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 2de9b90c5f8f..3b99f64104fd 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
| @@ -403,6 +403,17 @@ static int veth_newlink(struct net *src_net, struct net_device *dev, | |||
| 403 | if (tb[IFLA_ADDRESS] == NULL) | 403 | if (tb[IFLA_ADDRESS] == NULL) |
| 404 | random_ether_addr(dev->dev_addr); | 404 | random_ether_addr(dev->dev_addr); |
| 405 | 405 | ||
| 406 | if (tb[IFLA_IFNAME]) | ||
| 407 | nla_strlcpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ); | ||
| 408 | else | ||
| 409 | snprintf(dev->name, IFNAMSIZ, DRV_NAME "%%d"); | ||
| 410 | |||
| 411 | if (strchr(dev->name, '%')) { | ||
| 412 | err = dev_alloc_name(dev, dev->name); | ||
| 413 | if (err < 0) | ||
| 414 | goto err_alloc_name; | ||
| 415 | } | ||
| 416 | |||
| 406 | err = register_netdevice(dev); | 417 | err = register_netdevice(dev); |
| 407 | if (err < 0) | 418 | if (err < 0) |
| 408 | goto err_register_dev; | 419 | goto err_register_dev; |
| @@ -422,6 +433,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev, | |||
| 422 | 433 | ||
| 423 | err_register_dev: | 434 | err_register_dev: |
| 424 | /* nothing to do */ | 435 | /* nothing to do */ |
| 436 | err_alloc_name: | ||
| 425 | err_configure_peer: | 437 | err_configure_peer: |
| 426 | unregister_netdevice(peer); | 438 | unregister_netdevice(peer); |
| 427 | return err; | 439 | return err; |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 0d47c3a05307..c16ed961153a 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
| @@ -178,6 +178,7 @@ static void | |||
| 178 | vmxnet3_process_events(struct vmxnet3_adapter *adapter) | 178 | vmxnet3_process_events(struct vmxnet3_adapter *adapter) |
| 179 | { | 179 | { |
| 180 | int i; | 180 | int i; |
| 181 | unsigned long flags; | ||
| 181 | u32 events = le32_to_cpu(adapter->shared->ecr); | 182 | u32 events = le32_to_cpu(adapter->shared->ecr); |
| 182 | if (!events) | 183 | if (!events) |
| 183 | return; | 184 | return; |
| @@ -190,10 +191,10 @@ vmxnet3_process_events(struct vmxnet3_adapter *adapter) | |||
| 190 | 191 | ||
| 191 | /* Check if there is an error on xmit/recv queues */ | 192 | /* Check if there is an error on xmit/recv queues */ |
| 192 | if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) { | 193 | if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) { |
| 193 | spin_lock(&adapter->cmd_lock); | 194 | spin_lock_irqsave(&adapter->cmd_lock, flags); |
| 194 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | 195 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, |
| 195 | VMXNET3_CMD_GET_QUEUE_STATUS); | 196 | VMXNET3_CMD_GET_QUEUE_STATUS); |
| 196 | spin_unlock(&adapter->cmd_lock); | 197 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); |
| 197 | 198 | ||
| 198 | for (i = 0; i < adapter->num_tx_queues; i++) | 199 | for (i = 0; i < adapter->num_tx_queues; i++) |
| 199 | if (adapter->tqd_start[i].status.stopped) | 200 | if (adapter->tqd_start[i].status.stopped) |
| @@ -2733,13 +2734,14 @@ static void | |||
| 2733 | vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) | 2734 | vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) |
| 2734 | { | 2735 | { |
| 2735 | u32 cfg; | 2736 | u32 cfg; |
| 2737 | unsigned long flags; | ||
| 2736 | 2738 | ||
| 2737 | /* intr settings */ | 2739 | /* intr settings */ |
| 2738 | spin_lock(&adapter->cmd_lock); | 2740 | spin_lock_irqsave(&adapter->cmd_lock, flags); |
| 2739 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | 2741 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, |
| 2740 | VMXNET3_CMD_GET_CONF_INTR); | 2742 | VMXNET3_CMD_GET_CONF_INTR); |
| 2741 | cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); | 2743 | cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); |
| 2742 | spin_unlock(&adapter->cmd_lock); | 2744 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); |
| 2743 | adapter->intr.type = cfg & 0x3; | 2745 | adapter->intr.type = cfg & 0x3; |
| 2744 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; | 2746 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; |
| 2745 | 2747 | ||
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index 51f2ef142a5b..976467253d20 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c | |||
| @@ -311,6 +311,9 @@ vmxnet3_set_flags(struct net_device *netdev, u32 data) | |||
| 311 | /* toggle the LRO feature*/ | 311 | /* toggle the LRO feature*/ |
| 312 | netdev->features ^= NETIF_F_LRO; | 312 | netdev->features ^= NETIF_F_LRO; |
| 313 | 313 | ||
| 314 | /* Update private LRO flag */ | ||
| 315 | adapter->lro = lro_requested; | ||
| 316 | |||
| 314 | /* update harware LRO capability accordingly */ | 317 | /* update harware LRO capability accordingly */ |
| 315 | if (lro_requested) | 318 | if (lro_requested) |
| 316 | adapter->shared->devRead.misc.uptFeatures |= | 319 | adapter->shared->devRead.misc.uptFeatures |= |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 17d04ff8d678..1482fa650833 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -2141,6 +2141,8 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | |||
| 2141 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | 2141 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) |
| 2142 | { | 2142 | { |
| 2143 | struct ath_softc *sc = hw->priv; | 2143 | struct ath_softc *sc = hw->priv; |
| 2144 | struct ath_hw *ah = sc->sc_ah; | ||
| 2145 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 2144 | int timeout = 200; /* ms */ | 2146 | int timeout = 200; /* ms */ |
| 2145 | int i, j; | 2147 | int i, j; |
| 2146 | 2148 | ||
| @@ -2149,6 +2151,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | |||
| 2149 | 2151 | ||
| 2150 | cancel_delayed_work_sync(&sc->tx_complete_work); | 2152 | cancel_delayed_work_sync(&sc->tx_complete_work); |
| 2151 | 2153 | ||
| 2154 | if (sc->sc_flags & SC_OP_INVALID) { | ||
| 2155 | ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); | ||
| 2156 | mutex_unlock(&sc->mutex); | ||
| 2157 | return; | ||
| 2158 | } | ||
| 2159 | |||
| 2152 | if (drop) | 2160 | if (drop) |
| 2153 | timeout = 1; | 2161 | timeout = 1; |
| 2154 | 2162 | ||
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index dcd19bc337d1..b29c80def35e 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
| @@ -506,7 +506,7 @@ bool ath_stoprecv(struct ath_softc *sc) | |||
| 506 | "confusing the DMA engine when we start RX up\n"); | 506 | "confusing the DMA engine when we start RX up\n"); |
| 507 | ATH_DBG_WARN_ON_ONCE(!stopped); | 507 | ATH_DBG_WARN_ON_ONCE(!stopped); |
| 508 | } | 508 | } |
| 509 | return stopped || reset; | 509 | return stopped && !reset; |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | void ath_flushrecv(struct ath_softc *sc) | 512 | void ath_flushrecv(struct ath_softc *sc) |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index d59b0168c14a..5af40d9170a0 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -72,6 +72,7 @@ MODULE_FIRMWARE("b43/ucode11.fw"); | |||
| 72 | MODULE_FIRMWARE("b43/ucode13.fw"); | 72 | MODULE_FIRMWARE("b43/ucode13.fw"); |
| 73 | MODULE_FIRMWARE("b43/ucode14.fw"); | 73 | MODULE_FIRMWARE("b43/ucode14.fw"); |
| 74 | MODULE_FIRMWARE("b43/ucode15.fw"); | 74 | MODULE_FIRMWARE("b43/ucode15.fw"); |
| 75 | MODULE_FIRMWARE("b43/ucode16_mimo.fw"); | ||
| 75 | MODULE_FIRMWARE("b43/ucode5.fw"); | 76 | MODULE_FIRMWARE("b43/ucode5.fw"); |
| 76 | MODULE_FIRMWARE("b43/ucode9.fw"); | 77 | MODULE_FIRMWARE("b43/ucode9.fw"); |
| 77 | 78 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c index 5c40502f869a..79ac081832fb 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c | |||
| @@ -316,12 +316,18 @@ int iwl4965_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
| 316 | 316 | ||
| 317 | hdr_len = ieee80211_hdrlen(fc); | 317 | hdr_len = ieee80211_hdrlen(fc); |
| 318 | 318 | ||
| 319 | /* Find index into station table for destination station */ | 319 | /* For management frames use broadcast id to do not break aggregation */ |
| 320 | sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta); | 320 | if (!ieee80211_is_data(fc)) |
| 321 | if (sta_id == IWL_INVALID_STATION) { | 321 | sta_id = ctx->bcast_sta_id; |
| 322 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | 322 | else { |
| 323 | hdr->addr1); | 323 | /* Find index into station table for destination station */ |
| 324 | goto drop_unlock; | 324 | sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta); |
| 325 | |||
| 326 | if (sta_id == IWL_INVALID_STATION) { | ||
| 327 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | ||
| 328 | hdr->addr1); | ||
| 329 | goto drop_unlock; | ||
| 330 | } | ||
| 325 | } | 331 | } |
| 326 | 332 | ||
| 327 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); | 333 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); |
| @@ -1127,12 +1133,16 @@ int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
| 1127 | q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd)) { | 1133 | q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd)) { |
| 1128 | 1134 | ||
| 1129 | tx_info = &txq->txb[txq->q.read_ptr]; | 1135 | tx_info = &txq->txb[txq->q.read_ptr]; |
| 1130 | iwl4965_tx_status(priv, tx_info, | 1136 | |
| 1131 | txq_id >= IWL4965_FIRST_AMPDU_QUEUE); | 1137 | if (WARN_ON_ONCE(tx_info->skb == NULL)) |
| 1138 | continue; | ||
| 1132 | 1139 | ||
| 1133 | hdr = (struct ieee80211_hdr *)tx_info->skb->data; | 1140 | hdr = (struct ieee80211_hdr *)tx_info->skb->data; |
| 1134 | if (hdr && ieee80211_is_data_qos(hdr->frame_control)) | 1141 | if (ieee80211_is_data_qos(hdr->frame_control)) |
| 1135 | nfreed++; | 1142 | nfreed++; |
| 1143 | |||
| 1144 | iwl4965_tx_status(priv, tx_info, | ||
| 1145 | txq_id >= IWL4965_FIRST_AMPDU_QUEUE); | ||
| 1136 | tx_info->skb = NULL; | 1146 | tx_info->skb = NULL; |
| 1137 | 1147 | ||
| 1138 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); | 1148 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index c1511b14b239..42db0fc8b921 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
| @@ -2155,6 +2155,13 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
| 2155 | goto set_ch_out; | 2155 | goto set_ch_out; |
| 2156 | } | 2156 | } |
| 2157 | 2157 | ||
| 2158 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && | ||
| 2159 | !iwl_legacy_is_channel_ibss(ch_info)) { | ||
| 2160 | IWL_DEBUG_MAC80211(priv, "leave - not IBSS channel\n"); | ||
| 2161 | ret = -EINVAL; | ||
| 2162 | goto set_ch_out; | ||
| 2163 | } | ||
| 2164 | |||
| 2158 | spin_lock_irqsave(&priv->lock, flags); | 2165 | spin_lock_irqsave(&priv->lock, flags); |
| 2159 | 2166 | ||
| 2160 | for_each_context(priv, ctx) { | 2167 | for_each_context(priv, ctx) { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h index 9ee849d669f3..f43ac1eb9014 100644 --- a/drivers/net/wireless/iwlegacy/iwl-dev.h +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h | |||
| @@ -1411,6 +1411,12 @@ iwl_legacy_is_channel_passive(const struct iwl_channel_info *ch) | |||
| 1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; | 1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; |
| 1412 | } | 1412 | } |
| 1413 | 1413 | ||
| 1414 | static inline int | ||
| 1415 | iwl_legacy_is_channel_ibss(const struct iwl_channel_info *ch) | ||
| 1416 | { | ||
| 1417 | return (ch->flags & EEPROM_CHANNEL_IBSS) ? 1 : 0; | ||
| 1418 | } | ||
| 1419 | |||
| 1414 | static inline void | 1420 | static inline void |
| 1415 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) | 1421 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) |
| 1416 | { | 1422 | { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-led.c b/drivers/net/wireless/iwlegacy/iwl-led.c index 15eb8b707157..bda0d61b2c0d 100644 --- a/drivers/net/wireless/iwlegacy/iwl-led.c +++ b/drivers/net/wireless/iwlegacy/iwl-led.c | |||
| @@ -48,8 +48,21 @@ module_param(led_mode, int, S_IRUGO); | |||
| 48 | MODULE_PARM_DESC(led_mode, "0=system default, " | 48 | MODULE_PARM_DESC(led_mode, "0=system default, " |
| 49 | "1=On(RF On)/Off(RF Off), 2=blinking"); | 49 | "1=On(RF On)/Off(RF Off), 2=blinking"); |
| 50 | 50 | ||
| 51 | /* Throughput OFF time(ms) ON time (ms) | ||
| 52 | * >300 25 25 | ||
| 53 | * >200 to 300 40 40 | ||
| 54 | * >100 to 200 55 55 | ||
| 55 | * >70 to 100 65 65 | ||
| 56 | * >50 to 70 75 75 | ||
| 57 | * >20 to 50 85 85 | ||
| 58 | * >10 to 20 95 95 | ||
| 59 | * >5 to 10 110 110 | ||
| 60 | * >1 to 5 130 130 | ||
| 61 | * >0 to 1 167 167 | ||
| 62 | * <=0 SOLID ON | ||
| 63 | */ | ||
| 51 | static const struct ieee80211_tpt_blink iwl_blink[] = { | 64 | static const struct ieee80211_tpt_blink iwl_blink[] = { |
| 52 | { .throughput = 0 * 1024 - 1, .blink_time = 334 }, | 65 | { .throughput = 0, .blink_time = 334 }, |
| 53 | { .throughput = 1 * 1024 - 1, .blink_time = 260 }, | 66 | { .throughput = 1 * 1024 - 1, .blink_time = 260 }, |
| 54 | { .throughput = 5 * 1024 - 1, .blink_time = 220 }, | 67 | { .throughput = 5 * 1024 - 1, .blink_time = 220 }, |
| 55 | { .throughput = 10 * 1024 - 1, .blink_time = 190 }, | 68 | { .throughput = 10 * 1024 - 1, .blink_time = 190 }, |
| @@ -101,6 +114,11 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv, | |||
| 101 | if (priv->blink_on == on && priv->blink_off == off) | 114 | if (priv->blink_on == on && priv->blink_off == off) |
| 102 | return 0; | 115 | return 0; |
| 103 | 116 | ||
| 117 | if (off == 0) { | ||
| 118 | /* led is SOLID_ON */ | ||
| 119 | on = IWL_LED_SOLID; | ||
| 120 | } | ||
| 121 | |||
| 104 | IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n", | 122 | IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n", |
| 105 | priv->cfg->base_params->led_compensation); | 123 | priv->cfg->base_params->led_compensation); |
| 106 | led_cmd.on = iwl_legacy_blink_compensation(priv, on, | 124 | led_cmd.on = iwl_legacy_blink_compensation(priv, on, |
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c index d484c3678163..a62fe24ee594 100644 --- a/drivers/net/wireless/iwlegacy/iwl4965-base.c +++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c | |||
| @@ -2984,15 +2984,15 @@ static void iwl4965_bg_txpower_work(struct work_struct *work) | |||
| 2984 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | 2984 | struct iwl_priv *priv = container_of(work, struct iwl_priv, |
| 2985 | txpower_work); | 2985 | txpower_work); |
| 2986 | 2986 | ||
| 2987 | mutex_lock(&priv->mutex); | ||
| 2988 | |||
| 2987 | /* If a scan happened to start before we got here | 2989 | /* If a scan happened to start before we got here |
| 2988 | * then just return; the statistics notification will | 2990 | * then just return; the statistics notification will |
| 2989 | * kick off another scheduled work to compensate for | 2991 | * kick off another scheduled work to compensate for |
| 2990 | * any temperature delta we missed here. */ | 2992 | * any temperature delta we missed here. */ |
| 2991 | if (test_bit(STATUS_EXIT_PENDING, &priv->status) || | 2993 | if (test_bit(STATUS_EXIT_PENDING, &priv->status) || |
| 2992 | test_bit(STATUS_SCANNING, &priv->status)) | 2994 | test_bit(STATUS_SCANNING, &priv->status)) |
| 2993 | return; | 2995 | goto out; |
| 2994 | |||
| 2995 | mutex_lock(&priv->mutex); | ||
| 2996 | 2996 | ||
| 2997 | /* Regardless of if we are associated, we must reconfigure the | 2997 | /* Regardless of if we are associated, we must reconfigure the |
| 2998 | * TX power since frames can be sent on non-radar channels while | 2998 | * TX power since frames can be sent on non-radar channels while |
| @@ -3002,7 +3002,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work) | |||
| 3002 | /* Update last_temperature to keep is_calib_needed from running | 3002 | /* Update last_temperature to keep is_calib_needed from running |
| 3003 | * when it isn't needed... */ | 3003 | * when it isn't needed... */ |
| 3004 | priv->last_temperature = priv->temperature; | 3004 | priv->last_temperature = priv->temperature; |
| 3005 | 3005 | out: | |
| 3006 | mutex_unlock(&priv->mutex); | 3006 | mutex_unlock(&priv->mutex); |
| 3007 | } | 3007 | } |
| 3008 | 3008 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index dfdbea6e8f99..fbbde0712fa5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
| @@ -335,7 +335,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
| 335 | struct ieee80211_channel *channel = conf->channel; | 335 | struct ieee80211_channel *channel = conf->channel; |
| 336 | const struct iwl_channel_info *ch_info; | 336 | const struct iwl_channel_info *ch_info; |
| 337 | int ret = 0; | 337 | int ret = 0; |
| 338 | bool ht_changed[NUM_IWL_RXON_CTX] = {}; | ||
| 339 | 338 | ||
| 340 | IWL_DEBUG_MAC80211(priv, "changed %#x", changed); | 339 | IWL_DEBUG_MAC80211(priv, "changed %#x", changed); |
| 341 | 340 | ||
| @@ -383,10 +382,8 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
| 383 | 382 | ||
| 384 | for_each_context(priv, ctx) { | 383 | for_each_context(priv, ctx) { |
| 385 | /* Configure HT40 channels */ | 384 | /* Configure HT40 channels */ |
| 386 | if (ctx->ht.enabled != conf_is_ht(conf)) { | 385 | if (ctx->ht.enabled != conf_is_ht(conf)) |
| 387 | ctx->ht.enabled = conf_is_ht(conf); | 386 | ctx->ht.enabled = conf_is_ht(conf); |
| 388 | ht_changed[ctx->ctxid] = true; | ||
| 389 | } | ||
| 390 | 387 | ||
| 391 | if (ctx->ht.enabled) { | 388 | if (ctx->ht.enabled) { |
| 392 | if (conf_is_ht40_minus(conf)) { | 389 | if (conf_is_ht40_minus(conf)) { |
| @@ -455,8 +452,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
| 455 | if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging))) | 452 | if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging))) |
| 456 | continue; | 453 | continue; |
| 457 | iwlagn_commit_rxon(priv, ctx); | 454 | iwlagn_commit_rxon(priv, ctx); |
| 458 | if (ht_changed[ctx->ctxid]) | ||
| 459 | iwlagn_update_qos(priv, ctx); | ||
| 460 | } | 455 | } |
| 461 | out: | 456 | out: |
| 462 | mutex_unlock(&priv->mutex); | 457 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index a709d05c5868..0712b67283a4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
| @@ -568,12 +568,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
| 568 | 568 | ||
| 569 | hdr_len = ieee80211_hdrlen(fc); | 569 | hdr_len = ieee80211_hdrlen(fc); |
| 570 | 570 | ||
| 571 | /* Find index into station table for destination station */ | 571 | /* For management frames use broadcast id to do not break aggregation */ |
| 572 | sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta); | 572 | if (!ieee80211_is_data(fc)) |
| 573 | if (sta_id == IWL_INVALID_STATION) { | 573 | sta_id = ctx->bcast_sta_id; |
| 574 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | 574 | else { |
| 575 | hdr->addr1); | 575 | /* Find index into station table for destination station */ |
| 576 | goto drop_unlock; | 576 | sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta); |
| 577 | if (sta_id == IWL_INVALID_STATION) { | ||
| 578 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | ||
| 579 | hdr->addr1); | ||
| 580 | goto drop_unlock; | ||
| 581 | } | ||
| 577 | } | 582 | } |
| 578 | 583 | ||
| 579 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); | 584 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); |
| @@ -1224,12 +1229,16 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
| 1224 | q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) { | 1229 | q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) { |
| 1225 | 1230 | ||
| 1226 | tx_info = &txq->txb[txq->q.read_ptr]; | 1231 | tx_info = &txq->txb[txq->q.read_ptr]; |
| 1227 | iwlagn_tx_status(priv, tx_info, | 1232 | |
| 1228 | txq_id >= IWLAGN_FIRST_AMPDU_QUEUE); | 1233 | if (WARN_ON_ONCE(tx_info->skb == NULL)) |
| 1234 | continue; | ||
| 1229 | 1235 | ||
| 1230 | hdr = (struct ieee80211_hdr *)tx_info->skb->data; | 1236 | hdr = (struct ieee80211_hdr *)tx_info->skb->data; |
| 1231 | if (hdr && ieee80211_is_data_qos(hdr->frame_control)) | 1237 | if (ieee80211_is_data_qos(hdr->frame_control)) |
| 1232 | nfreed++; | 1238 | nfreed++; |
| 1239 | |||
| 1240 | iwlagn_tx_status(priv, tx_info, | ||
| 1241 | txq_id >= IWLAGN_FIRST_AMPDU_QUEUE); | ||
| 1233 | tx_info->skb = NULL; | 1242 | tx_info->skb = NULL; |
| 1234 | 1243 | ||
| 1235 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) | 1244 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 7e8a658b7670..f3ac62431a30 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
| @@ -1339,8 +1339,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
| 1339 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { | 1339 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { |
| 1340 | lbs_deb_host( | 1340 | lbs_deb_host( |
| 1341 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); | 1341 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); |
| 1342 | list_del(&cmdnode->list); | ||
| 1343 | spin_lock_irqsave(&priv->driver_lock, flags); | 1342 | spin_lock_irqsave(&priv->driver_lock, flags); |
| 1343 | list_del(&cmdnode->list); | ||
| 1344 | lbs_complete_command(priv, cmdnode, 0); | 1344 | lbs_complete_command(priv, cmdnode, 0); |
| 1345 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1345 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
| 1346 | 1346 | ||
| @@ -1352,8 +1352,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
| 1352 | (priv->psstate == PS_STATE_PRE_SLEEP)) { | 1352 | (priv->psstate == PS_STATE_PRE_SLEEP)) { |
| 1353 | lbs_deb_host( | 1353 | lbs_deb_host( |
| 1354 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); | 1354 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); |
| 1355 | list_del(&cmdnode->list); | ||
| 1356 | spin_lock_irqsave(&priv->driver_lock, flags); | 1355 | spin_lock_irqsave(&priv->driver_lock, flags); |
| 1356 | list_del(&cmdnode->list); | ||
| 1357 | lbs_complete_command(priv, cmdnode, 0); | 1357 | lbs_complete_command(priv, cmdnode, 0); |
| 1358 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1358 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
| 1359 | priv->needtowakeup = 1; | 1359 | priv->needtowakeup = 1; |
| @@ -1366,7 +1366,9 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
| 1366 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); | 1366 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); |
| 1367 | } | 1367 | } |
| 1368 | } | 1368 | } |
| 1369 | spin_lock_irqsave(&priv->driver_lock, flags); | ||
| 1369 | list_del(&cmdnode->list); | 1370 | list_del(&cmdnode->list); |
| 1371 | spin_unlock_irqrestore(&priv->driver_lock, flags); | ||
| 1370 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", | 1372 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", |
| 1371 | le16_to_cpu(cmd->command)); | 1373 | le16_to_cpu(cmd->command)); |
| 1372 | lbs_submit_command(priv, cmdnode); | 1374 | lbs_submit_command(priv, cmdnode); |
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c index b78a38d9172a..8c7c522a056a 100644 --- a/drivers/net/zorro8390.c +++ b/drivers/net/zorro8390.c | |||
| @@ -126,7 +126,7 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
| 126 | 126 | ||
| 127 | board = z->resource.start; | 127 | board = z->resource.start; |
| 128 | ioaddr = board+cards[i].offset; | 128 | ioaddr = board+cards[i].offset; |
| 129 | dev = alloc_ei_netdev(); | 129 | dev = ____alloc_ei_netdev(0); |
| 130 | if (!dev) | 130 | if (!dev) |
| 131 | return -ENOMEM; | 131 | return -ENOMEM; |
| 132 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { | 132 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { |
| @@ -146,15 +146,15 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
| 146 | static const struct net_device_ops zorro8390_netdev_ops = { | 146 | static const struct net_device_ops zorro8390_netdev_ops = { |
| 147 | .ndo_open = zorro8390_open, | 147 | .ndo_open = zorro8390_open, |
| 148 | .ndo_stop = zorro8390_close, | 148 | .ndo_stop = zorro8390_close, |
| 149 | .ndo_start_xmit = ei_start_xmit, | 149 | .ndo_start_xmit = __ei_start_xmit, |
| 150 | .ndo_tx_timeout = ei_tx_timeout, | 150 | .ndo_tx_timeout = __ei_tx_timeout, |
| 151 | .ndo_get_stats = ei_get_stats, | 151 | .ndo_get_stats = __ei_get_stats, |
| 152 | .ndo_set_multicast_list = ei_set_multicast_list, | 152 | .ndo_set_multicast_list = __ei_set_multicast_list, |
| 153 | .ndo_validate_addr = eth_validate_addr, | 153 | .ndo_validate_addr = eth_validate_addr, |
| 154 | .ndo_set_mac_address = eth_mac_addr, | 154 | .ndo_set_mac_address = eth_mac_addr, |
| 155 | .ndo_change_mtu = eth_change_mtu, | 155 | .ndo_change_mtu = eth_change_mtu, |
| 156 | #ifdef CONFIG_NET_POLL_CONTROLLER | 156 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 157 | .ndo_poll_controller = ei_poll, | 157 | .ndo_poll_controller = __ei_poll, |
| 158 | #endif | 158 | #endif |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
