diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-22 13:01:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-22 13:01:58 -0400 |
commit | 258152acc09c5c2df97002cd58cb37cb241aacde (patch) | |
tree | 03bcfc3e0b97f453af77b97076dd28eb1716a4fa /drivers/net | |
parent | e91924158d89086357e46887c23d714cfb4e05ea (diff) | |
parent | 243aad830e8a4cdda261626fbaeddde16b08d04a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (38 commits)
ip_gre: include route header_len in max_headroom calculation
if_tunnel.h: add missing ams/byteorder.h include
ipv4: Don't drop redirected route cache entry unless PTMU actually expired
net: suppress lockdep-RCU false positive in FIB trie.
Bluetooth: Fix kernel crash on L2CAP stress tests
Bluetooth: Convert debug files to actually use debugfs instead of sysfs
Bluetooth: Fix potential bad memory access with sysfs files
netfilter: ctnetlink: fix reliable event delivery if message building fails
netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
NET_DMA: free skbs periodically
netlink: fix unaligned access in nla_get_be64()
tcp: Fix tcp_mark_head_lost() with packets == 0
net: ipmr/ip6mr: fix potential out-of-bounds vif_table access
KS8695: update ksp->next_rx_desc_read at the end of rx loop
igb: Add support for 82576 ET2 Quad Port Server Adapter
ixgbevf: Message formatting cleanups
ixgbevf: Shorten up delay timer for watchdog task
ixgbevf: Fix VF Stats accounting after reset
ixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address
ixgbe: fix for real_num_tx_queues update issue
...
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/arm/ks8695net.c | 24 | ||||
-rw-r--r-- | drivers/net/igb/e1000_82575.c | 1 | ||||
-rw-r--r-- | drivers/net/igb/e1000_hw.h | 1 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 1 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82599.c | 78 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_fcoe.c | 6 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 22 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 1 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ethtool.c | 42 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf_main.c | 74 | ||||
-rw-r--r-- | drivers/net/ixgbevf/vf.h | 6 | ||||
-rw-r--r-- | drivers/net/jme.c | 35 | ||||
-rw-r--r-- | drivers/net/jme.h | 2 | ||||
-rw-r--r-- | drivers/net/ks8851.c | 1 | ||||
-rw-r--r-- | drivers/net/usb/smsc95xx.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_debugfs.c | 3 |
18 files changed, 211 insertions, 127 deletions
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index a1d4188c430b..e7810b74f396 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c | |||
@@ -449,11 +449,10 @@ ks8695_rx_irq(int irq, void *dev_id) | |||
449 | } | 449 | } |
450 | 450 | ||
451 | /** | 451 | /** |
452 | * ks8695_rx - Receive packets called by NAPI poll method | 452 | * ks8695_rx - Receive packets called by NAPI poll method |
453 | * @ksp: Private data for the KS8695 Ethernet | 453 | * @ksp: Private data for the KS8695 Ethernet |
454 | * @budget: The max packets would be receive | 454 | * @budget: Number of packets allowed to process |
455 | */ | 455 | */ |
456 | |||
457 | static int ks8695_rx(struct ks8695_priv *ksp, int budget) | 456 | static int ks8695_rx(struct ks8695_priv *ksp, int budget) |
458 | { | 457 | { |
459 | struct net_device *ndev = ksp->ndev; | 458 | struct net_device *ndev = ksp->ndev; |
@@ -461,7 +460,6 @@ static int ks8695_rx(struct ks8695_priv *ksp, int budget) | |||
461 | int buff_n; | 460 | int buff_n; |
462 | u32 flags; | 461 | u32 flags; |
463 | int pktlen; | 462 | int pktlen; |
464 | int last_rx_processed = -1; | ||
465 | int received = 0; | 463 | int received = 0; |
466 | 464 | ||
467 | buff_n = ksp->next_rx_desc_read; | 465 | buff_n = ksp->next_rx_desc_read; |
@@ -471,6 +469,7 @@ static int ks8695_rx(struct ks8695_priv *ksp, int budget) | |||
471 | cpu_to_le32(RDES_OWN)))) { | 469 | cpu_to_le32(RDES_OWN)))) { |
472 | rmb(); | 470 | rmb(); |
473 | flags = le32_to_cpu(ksp->rx_ring[buff_n].status); | 471 | flags = le32_to_cpu(ksp->rx_ring[buff_n].status); |
472 | |||
474 | /* Found an SKB which we own, this means we | 473 | /* Found an SKB which we own, this means we |
475 | * received a packet | 474 | * received a packet |
476 | */ | 475 | */ |
@@ -533,23 +532,18 @@ rx_failure: | |||
533 | ksp->rx_ring[buff_n].status = cpu_to_le32(RDES_OWN); | 532 | ksp->rx_ring[buff_n].status = cpu_to_le32(RDES_OWN); |
534 | rx_finished: | 533 | rx_finished: |
535 | received++; | 534 | received++; |
536 | /* And note this as processed so we can start | ||
537 | * from here next time | ||
538 | */ | ||
539 | last_rx_processed = buff_n; | ||
540 | buff_n = (buff_n + 1) & MAX_RX_DESC_MASK; | 535 | buff_n = (buff_n + 1) & MAX_RX_DESC_MASK; |
541 | /*And note which RX descriptor we last did */ | ||
542 | if (likely(last_rx_processed != -1)) | ||
543 | ksp->next_rx_desc_read = | ||
544 | (last_rx_processed + 1) & | ||
545 | MAX_RX_DESC_MASK; | ||
546 | } | 536 | } |
537 | |||
538 | /* And note which RX descriptor we last did */ | ||
539 | ksp->next_rx_desc_read = buff_n; | ||
540 | |||
547 | /* And refill the buffers */ | 541 | /* And refill the buffers */ |
548 | ks8695_refill_rxbuffers(ksp); | 542 | ks8695_refill_rxbuffers(ksp); |
549 | 543 | ||
550 | /* Kick the RX DMA engine, in case it became | 544 | /* Kick the RX DMA engine, in case it became suspended */ |
551 | * suspended */ | ||
552 | ks8695_writereg(ksp, KS8695_DRSC, 0); | 545 | ks8695_writereg(ksp, KS8695_DRSC, 0); |
546 | |||
553 | return received; | 547 | return received; |
554 | } | 548 | } |
555 | 549 | ||
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c index 9d7fa2fb85ea..0bc990ec4a8e 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c | |||
@@ -94,6 +94,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) | |||
94 | case E1000_DEV_ID_82576_FIBER: | 94 | case E1000_DEV_ID_82576_FIBER: |
95 | case E1000_DEV_ID_82576_SERDES: | 95 | case E1000_DEV_ID_82576_SERDES: |
96 | case E1000_DEV_ID_82576_QUAD_COPPER: | 96 | case E1000_DEV_ID_82576_QUAD_COPPER: |
97 | case E1000_DEV_ID_82576_QUAD_COPPER_ET2: | ||
97 | case E1000_DEV_ID_82576_SERDES_QUAD: | 98 | case E1000_DEV_ID_82576_SERDES_QUAD: |
98 | mac->type = e1000_82576; | 99 | mac->type = e1000_82576; |
99 | break; | 100 | break; |
diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h index 448005276b26..82a533f5192a 100644 --- a/drivers/net/igb/e1000_hw.h +++ b/drivers/net/igb/e1000_hw.h | |||
@@ -41,6 +41,7 @@ struct e1000_hw; | |||
41 | #define E1000_DEV_ID_82576_FIBER 0x10E6 | 41 | #define E1000_DEV_ID_82576_FIBER 0x10E6 |
42 | #define E1000_DEV_ID_82576_SERDES 0x10E7 | 42 | #define E1000_DEV_ID_82576_SERDES 0x10E7 |
43 | #define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 | 43 | #define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 |
44 | #define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 | ||
44 | #define E1000_DEV_ID_82576_NS 0x150A | 45 | #define E1000_DEV_ID_82576_NS 0x150A |
45 | #define E1000_DEV_ID_82576_NS_SERDES 0x1518 | 46 | #define E1000_DEV_ID_82576_NS_SERDES 0x1518 |
46 | #define E1000_DEV_ID_82576_SERDES_QUAD 0x150D | 47 | #define E1000_DEV_ID_82576_SERDES_QUAD 0x150D |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 0ed25f059a00..45a0e4fd5871 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -72,6 +72,7 @@ static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = { | |||
72 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), board_82575 }, | 72 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), board_82575 }, |
73 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), board_82575 }, | 73 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), board_82575 }, |
74 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES_QUAD), board_82575 }, | 74 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES_QUAD), board_82575 }, |
75 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2), board_82575 }, | ||
75 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), board_82575 }, | 76 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), board_82575 }, |
76 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 }, | 77 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 }, |
77 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 }, | 78 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 }, |
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 1f30e163bd9c..b405a00817c6 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #define IXGBE_82599_MC_TBL_SIZE 128 | 39 | #define IXGBE_82599_MC_TBL_SIZE 128 |
40 | #define IXGBE_82599_VFT_TBL_SIZE 128 | 40 | #define IXGBE_82599_VFT_TBL_SIZE 128 |
41 | 41 | ||
42 | void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw); | ||
42 | s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, | 43 | s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, |
43 | ixgbe_link_speed speed, | 44 | ixgbe_link_speed speed, |
44 | bool autoneg, | 45 | bool autoneg, |
@@ -68,7 +69,9 @@ static void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw) | |||
68 | if (hw->phy.multispeed_fiber) { | 69 | if (hw->phy.multispeed_fiber) { |
69 | /* Set up dual speed SFP+ support */ | 70 | /* Set up dual speed SFP+ support */ |
70 | mac->ops.setup_link = &ixgbe_setup_mac_link_multispeed_fiber; | 71 | mac->ops.setup_link = &ixgbe_setup_mac_link_multispeed_fiber; |
72 | mac->ops.flap_tx_laser = &ixgbe_flap_tx_laser_multispeed_fiber; | ||
71 | } else { | 73 | } else { |
74 | mac->ops.flap_tx_laser = NULL; | ||
72 | if ((mac->ops.get_media_type(hw) == | 75 | if ((mac->ops.get_media_type(hw) == |
73 | ixgbe_media_type_backplane) && | 76 | ixgbe_media_type_backplane) && |
74 | (hw->phy.smart_speed == ixgbe_smart_speed_auto || | 77 | (hw->phy.smart_speed == ixgbe_smart_speed_auto || |
@@ -413,6 +416,41 @@ s32 ixgbe_start_mac_link_82599(struct ixgbe_hw *hw, | |||
413 | } | 416 | } |
414 | 417 | ||
415 | /** | 418 | /** |
419 | * ixgbe_flap_tx_laser_multispeed_fiber - Flap Tx laser | ||
420 | * @hw: pointer to hardware structure | ||
421 | * | ||
422 | * When the driver changes the link speeds that it can support, | ||
423 | * it sets autotry_restart to true to indicate that we need to | ||
424 | * initiate a new autotry session with the link partner. To do | ||
425 | * so, we set the speed then disable and re-enable the tx laser, to | ||
426 | * alert the link partner that it also needs to restart autotry on its | ||
427 | * end. This is consistent with true clause 37 autoneg, which also | ||
428 | * involves a loss of signal. | ||
429 | **/ | ||
430 | void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw) | ||
431 | { | ||
432 | u32 esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP); | ||
433 | |||
434 | hw_dbg(hw, "ixgbe_flap_tx_laser_multispeed_fiber\n"); | ||
435 | |||
436 | if (hw->mac.autotry_restart) { | ||
437 | /* Disable tx laser; allow 100us to go dark per spec */ | ||
438 | esdp_reg |= IXGBE_ESDP_SDP3; | ||
439 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | ||
440 | IXGBE_WRITE_FLUSH(hw); | ||
441 | udelay(100); | ||
442 | |||
443 | /* Enable tx laser; allow 100ms to light up */ | ||
444 | esdp_reg &= ~IXGBE_ESDP_SDP3; | ||
445 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | ||
446 | IXGBE_WRITE_FLUSH(hw); | ||
447 | msleep(100); | ||
448 | |||
449 | hw->mac.autotry_restart = false; | ||
450 | } | ||
451 | } | ||
452 | |||
453 | /** | ||
416 | * ixgbe_setup_mac_link_multispeed_fiber - Set MAC link speed | 454 | * ixgbe_setup_mac_link_multispeed_fiber - Set MAC link speed |
417 | * @hw: pointer to hardware structure | 455 | * @hw: pointer to hardware structure |
418 | * @speed: new link speed | 456 | * @speed: new link speed |
@@ -440,16 +478,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, | |||
440 | speed &= phy_link_speed; | 478 | speed &= phy_link_speed; |
441 | 479 | ||
442 | /* | 480 | /* |
443 | * When the driver changes the link speeds that it can support, | ||
444 | * it sets autotry_restart to true to indicate that we need to | ||
445 | * initiate a new autotry session with the link partner. To do | ||
446 | * so, we set the speed then disable and re-enable the tx laser, to | ||
447 | * alert the link partner that it also needs to restart autotry on its | ||
448 | * end. This is consistent with true clause 37 autoneg, which also | ||
449 | * involves a loss of signal. | ||
450 | */ | ||
451 | |||
452 | /* | ||
453 | * Try each speed one by one, highest priority first. We do this in | 481 | * Try each speed one by one, highest priority first. We do this in |
454 | * software because 10gb fiber doesn't support speed autonegotiation. | 482 | * software because 10gb fiber doesn't support speed autonegotiation. |
455 | */ | 483 | */ |
@@ -466,6 +494,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, | |||
466 | /* Set the module link speed */ | 494 | /* Set the module link speed */ |
467 | esdp_reg |= (IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5); | 495 | esdp_reg |= (IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5); |
468 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | 496 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); |
497 | IXGBE_WRITE_FLUSH(hw); | ||
469 | 498 | ||
470 | /* Allow module to change analog characteristics (1G->10G) */ | 499 | /* Allow module to change analog characteristics (1G->10G) */ |
471 | msleep(40); | 500 | msleep(40); |
@@ -478,19 +507,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, | |||
478 | return status; | 507 | return status; |
479 | 508 | ||
480 | /* Flap the tx laser if it has not already been done */ | 509 | /* Flap the tx laser if it has not already been done */ |
481 | if (hw->mac.autotry_restart) { | 510 | hw->mac.ops.flap_tx_laser(hw); |
482 | /* Disable tx laser; allow 100us to go dark per spec */ | ||
483 | esdp_reg |= IXGBE_ESDP_SDP3; | ||
484 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | ||
485 | udelay(100); | ||
486 | |||
487 | /* Enable tx laser; allow 2ms to light up per spec */ | ||
488 | esdp_reg &= ~IXGBE_ESDP_SDP3; | ||
489 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | ||
490 | msleep(2); | ||
491 | |||
492 | hw->mac.autotry_restart = false; | ||
493 | } | ||
494 | 511 | ||
495 | /* | 512 | /* |
496 | * Wait for the controller to acquire link. Per IEEE 802.3ap, | 513 | * Wait for the controller to acquire link. Per IEEE 802.3ap, |
@@ -525,6 +542,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, | |||
525 | esdp_reg &= ~IXGBE_ESDP_SDP5; | 542 | esdp_reg &= ~IXGBE_ESDP_SDP5; |
526 | esdp_reg |= IXGBE_ESDP_SDP5_DIR; | 543 | esdp_reg |= IXGBE_ESDP_SDP5_DIR; |
527 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | 544 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); |
545 | IXGBE_WRITE_FLUSH(hw); | ||
528 | 546 | ||
529 | /* Allow module to change analog characteristics (10G->1G) */ | 547 | /* Allow module to change analog characteristics (10G->1G) */ |
530 | msleep(40); | 548 | msleep(40); |
@@ -537,19 +555,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, | |||
537 | return status; | 555 | return status; |
538 | 556 | ||
539 | /* Flap the tx laser if it has not already been done */ | 557 | /* Flap the tx laser if it has not already been done */ |
540 | if (hw->mac.autotry_restart) { | 558 | hw->mac.ops.flap_tx_laser(hw); |
541 | /* Disable tx laser; allow 100us to go dark per spec */ | ||
542 | esdp_reg |= IXGBE_ESDP_SDP3; | ||
543 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | ||
544 | udelay(100); | ||
545 | |||
546 | /* Enable tx laser; allow 2ms to light up per spec */ | ||
547 | esdp_reg &= ~IXGBE_ESDP_SDP3; | ||
548 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg); | ||
549 | msleep(2); | ||
550 | |||
551 | hw->mac.autotry_restart = false; | ||
552 | } | ||
553 | 559 | ||
554 | /* Wait for the link partner to also set speed */ | 560 | /* Wait for the link partner to also set speed */ |
555 | msleep(100); | 561 | msleep(100); |
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c index 4123dec0dfb7..700cfc0aa1b9 100644 --- a/drivers/net/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ixgbe/ixgbe_fcoe.c | |||
@@ -614,9 +614,9 @@ int ixgbe_fcoe_enable(struct net_device *netdev) | |||
614 | netdev->vlan_features |= NETIF_F_FSO; | 614 | netdev->vlan_features |= NETIF_F_FSO; |
615 | netdev->vlan_features |= NETIF_F_FCOE_MTU; | 615 | netdev->vlan_features |= NETIF_F_FCOE_MTU; |
616 | netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; | 616 | netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; |
617 | netdev_features_change(netdev); | ||
618 | 617 | ||
619 | ixgbe_init_interrupt_scheme(adapter); | 618 | ixgbe_init_interrupt_scheme(adapter); |
619 | netdev_features_change(netdev); | ||
620 | 620 | ||
621 | if (netif_running(netdev)) | 621 | if (netif_running(netdev)) |
622 | netdev->netdev_ops->ndo_open(netdev); | 622 | netdev->netdev_ops->ndo_open(netdev); |
@@ -660,11 +660,11 @@ int ixgbe_fcoe_disable(struct net_device *netdev) | |||
660 | netdev->vlan_features &= ~NETIF_F_FSO; | 660 | netdev->vlan_features &= ~NETIF_F_FSO; |
661 | netdev->vlan_features &= ~NETIF_F_FCOE_MTU; | 661 | netdev->vlan_features &= ~NETIF_F_FCOE_MTU; |
662 | netdev->fcoe_ddp_xid = 0; | 662 | netdev->fcoe_ddp_xid = 0; |
663 | netdev_features_change(netdev); | ||
664 | 663 | ||
665 | ixgbe_cleanup_fcoe(adapter); | 664 | ixgbe_cleanup_fcoe(adapter); |
666 | |||
667 | ixgbe_init_interrupt_scheme(adapter); | 665 | ixgbe_init_interrupt_scheme(adapter); |
666 | netdev_features_change(netdev); | ||
667 | |||
668 | if (netif_running(netdev)) | 668 | if (netif_running(netdev)) |
669 | netdev->netdev_ops->ndo_open(netdev); | 669 | netdev->netdev_ops->ndo_open(netdev); |
670 | rc = 0; | 670 | rc = 0; |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 684af371462d..d75c46ff31f6 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -935,10 +935,12 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
935 | if (skb->prev) | 935 | if (skb->prev) |
936 | skb = ixgbe_transform_rsc_queue(skb, &(rx_ring->rsc_count)); | 936 | skb = ixgbe_transform_rsc_queue(skb, &(rx_ring->rsc_count)); |
937 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { | 937 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { |
938 | if (IXGBE_RSC_CB(skb)->dma) | 938 | if (IXGBE_RSC_CB(skb)->dma) { |
939 | pci_unmap_single(pdev, IXGBE_RSC_CB(skb)->dma, | 939 | pci_unmap_single(pdev, IXGBE_RSC_CB(skb)->dma, |
940 | rx_ring->rx_buf_len, | 940 | rx_ring->rx_buf_len, |
941 | PCI_DMA_FROMDEVICE); | 941 | PCI_DMA_FROMDEVICE); |
942 | IXGBE_RSC_CB(skb)->dma = 0; | ||
943 | } | ||
942 | if (rx_ring->flags & IXGBE_RING_RX_PS_ENABLED) | 944 | if (rx_ring->flags & IXGBE_RING_RX_PS_ENABLED) |
943 | rx_ring->rsc_count += skb_shinfo(skb)->nr_frags; | 945 | rx_ring->rsc_count += skb_shinfo(skb)->nr_frags; |
944 | else | 946 | else |
@@ -3126,10 +3128,12 @@ static void ixgbe_clean_rx_ring(struct ixgbe_adapter *adapter, | |||
3126 | rx_buffer_info->skb = NULL; | 3128 | rx_buffer_info->skb = NULL; |
3127 | do { | 3129 | do { |
3128 | struct sk_buff *this = skb; | 3130 | struct sk_buff *this = skb; |
3129 | if (IXGBE_RSC_CB(this)->dma) | 3131 | if (IXGBE_RSC_CB(this)->dma) { |
3130 | pci_unmap_single(pdev, IXGBE_RSC_CB(this)->dma, | 3132 | pci_unmap_single(pdev, IXGBE_RSC_CB(this)->dma, |
3131 | rx_ring->rx_buf_len, | 3133 | rx_ring->rx_buf_len, |
3132 | PCI_DMA_FROMDEVICE); | 3134 | PCI_DMA_FROMDEVICE); |
3135 | IXGBE_RSC_CB(this)->dma = 0; | ||
3136 | } | ||
3133 | skb = skb->prev; | 3137 | skb = skb->prev; |
3134 | dev_kfree_skb(this); | 3138 | dev_kfree_skb(this); |
3135 | } while (skb); | 3139 | } while (skb); |
@@ -5018,6 +5022,7 @@ static void ixgbe_multispeed_fiber_task(struct work_struct *work) | |||
5018 | autoneg = hw->phy.autoneg_advertised; | 5022 | autoneg = hw->phy.autoneg_advertised; |
5019 | if ((!autoneg) && (hw->mac.ops.get_link_capabilities)) | 5023 | if ((!autoneg) && (hw->mac.ops.get_link_capabilities)) |
5020 | hw->mac.ops.get_link_capabilities(hw, &autoneg, &negotiation); | 5024 | hw->mac.ops.get_link_capabilities(hw, &autoneg, &negotiation); |
5025 | hw->mac.autotry_restart = false; | ||
5021 | if (hw->mac.ops.setup_link) | 5026 | if (hw->mac.ops.setup_link) |
5022 | hw->mac.ops.setup_link(hw, autoneg, negotiation, true); | 5027 | hw->mac.ops.setup_link(hw, autoneg, negotiation, true); |
5023 | adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; | 5028 | adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; |
@@ -6245,9 +6250,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6245 | case IXGBE_DEV_ID_82599_KX4: | 6250 | case IXGBE_DEV_ID_82599_KX4: |
6246 | adapter->wol = (IXGBE_WUFC_MAG | IXGBE_WUFC_EX | | 6251 | adapter->wol = (IXGBE_WUFC_MAG | IXGBE_WUFC_EX | |
6247 | IXGBE_WUFC_MC | IXGBE_WUFC_BC); | 6252 | IXGBE_WUFC_MC | IXGBE_WUFC_BC); |
6248 | /* Enable ACPI wakeup in GRC */ | ||
6249 | IXGBE_WRITE_REG(hw, IXGBE_GRC, | ||
6250 | (IXGBE_READ_REG(hw, IXGBE_GRC) & ~IXGBE_GRC_APME)); | ||
6251 | break; | 6253 | break; |
6252 | default: | 6254 | default: |
6253 | adapter->wol = 0; | 6255 | adapter->wol = 0; |
@@ -6380,6 +6382,16 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
6380 | del_timer_sync(&adapter->sfp_timer); | 6382 | del_timer_sync(&adapter->sfp_timer); |
6381 | cancel_work_sync(&adapter->watchdog_task); | 6383 | cancel_work_sync(&adapter->watchdog_task); |
6382 | cancel_work_sync(&adapter->sfp_task); | 6384 | cancel_work_sync(&adapter->sfp_task); |
6385 | if (adapter->hw.phy.multispeed_fiber) { | ||
6386 | struct ixgbe_hw *hw = &adapter->hw; | ||
6387 | /* | ||
6388 | * Restart clause 37 autoneg, disable and re-enable | ||
6389 | * the tx laser, to clear & alert the link partner | ||
6390 | * that it needs to restart autotry | ||
6391 | */ | ||
6392 | hw->mac.autotry_restart = true; | ||
6393 | hw->mac.ops.flap_tx_laser(hw); | ||
6394 | } | ||
6383 | cancel_work_sync(&adapter->multispeed_fiber_task); | 6395 | cancel_work_sync(&adapter->multispeed_fiber_task); |
6384 | cancel_work_sync(&adapter->sfp_config_module_task); | 6396 | cancel_work_sync(&adapter->sfp_config_module_task); |
6385 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || | 6397 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 2be907466593..0ed5ab37cc53 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -2397,6 +2397,7 @@ struct ixgbe_mac_operations { | |||
2397 | s32 (*enable_rx_dma)(struct ixgbe_hw *, u32); | 2397 | s32 (*enable_rx_dma)(struct ixgbe_hw *, u32); |
2398 | 2398 | ||
2399 | /* Link */ | 2399 | /* Link */ |
2400 | void (*flap_tx_laser)(struct ixgbe_hw *); | ||
2400 | s32 (*setup_link)(struct ixgbe_hw *, ixgbe_link_speed, bool, bool); | 2401 | s32 (*setup_link)(struct ixgbe_hw *, ixgbe_link_speed, bool, bool); |
2401 | s32 (*check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *, bool); | 2402 | s32 (*check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *, bool); |
2402 | s32 (*get_link_capabilities)(struct ixgbe_hw *, ixgbe_link_speed *, | 2403 | s32 (*get_link_capabilities)(struct ixgbe_hw *, ixgbe_link_speed *, |
diff --git a/drivers/net/ixgbevf/ethtool.c b/drivers/net/ixgbevf/ethtool.c index 399be0c34c36..6fdd651abcd1 100644 --- a/drivers/net/ixgbevf/ethtool.c +++ b/drivers/net/ixgbevf/ethtool.c | |||
@@ -46,22 +46,32 @@ struct ixgbe_stats { | |||
46 | int sizeof_stat; | 46 | int sizeof_stat; |
47 | int stat_offset; | 47 | int stat_offset; |
48 | int base_stat_offset; | 48 | int base_stat_offset; |
49 | int saved_reset_offset; | ||
49 | }; | 50 | }; |
50 | 51 | ||
51 | #define IXGBEVF_STAT(m, b) sizeof(((struct ixgbevf_adapter *)0)->m), \ | 52 | #define IXGBEVF_STAT(m, b, r) sizeof(((struct ixgbevf_adapter *)0)->m), \ |
52 | offsetof(struct ixgbevf_adapter, m), \ | 53 | offsetof(struct ixgbevf_adapter, m), \ |
53 | offsetof(struct ixgbevf_adapter, b) | 54 | offsetof(struct ixgbevf_adapter, b), \ |
55 | offsetof(struct ixgbevf_adapter, r) | ||
54 | static struct ixgbe_stats ixgbe_gstrings_stats[] = { | 56 | static struct ixgbe_stats ixgbe_gstrings_stats[] = { |
55 | {"rx_packets", IXGBEVF_STAT(stats.vfgprc, stats.base_vfgprc)}, | 57 | {"rx_packets", IXGBEVF_STAT(stats.vfgprc, stats.base_vfgprc, |
56 | {"tx_packets", IXGBEVF_STAT(stats.vfgptc, stats.base_vfgptc)}, | 58 | stats.saved_reset_vfgprc)}, |
57 | {"rx_bytes", IXGBEVF_STAT(stats.vfgorc, stats.base_vfgorc)}, | 59 | {"tx_packets", IXGBEVF_STAT(stats.vfgptc, stats.base_vfgptc, |
58 | {"tx_bytes", IXGBEVF_STAT(stats.vfgotc, stats.base_vfgotc)}, | 60 | stats.saved_reset_vfgptc)}, |
59 | {"tx_busy", IXGBEVF_STAT(tx_busy, zero_base)}, | 61 | {"rx_bytes", IXGBEVF_STAT(stats.vfgorc, stats.base_vfgorc, |
60 | {"multicast", IXGBEVF_STAT(stats.vfmprc, stats.base_vfmprc)}, | 62 | stats.saved_reset_vfgorc)}, |
61 | {"rx_csum_offload_good", IXGBEVF_STAT(hw_csum_rx_good, zero_base)}, | 63 | {"tx_bytes", IXGBEVF_STAT(stats.vfgotc, stats.base_vfgotc, |
62 | {"rx_csum_offload_errors", IXGBEVF_STAT(hw_csum_rx_error, zero_base)}, | 64 | stats.saved_reset_vfgotc)}, |
63 | {"tx_csum_offload_ctxt", IXGBEVF_STAT(hw_csum_tx_good, zero_base)}, | 65 | {"tx_busy", IXGBEVF_STAT(tx_busy, zero_base, zero_base)}, |
64 | {"rx_header_split", IXGBEVF_STAT(rx_hdr_split, zero_base)}, | 66 | {"multicast", IXGBEVF_STAT(stats.vfmprc, stats.base_vfmprc, |
67 | stats.saved_reset_vfmprc)}, | ||
68 | {"rx_csum_offload_good", IXGBEVF_STAT(hw_csum_rx_good, zero_base, | ||
69 | zero_base)}, | ||
70 | {"rx_csum_offload_errors", IXGBEVF_STAT(hw_csum_rx_error, zero_base, | ||
71 | zero_base)}, | ||
72 | {"tx_csum_offload_ctxt", IXGBEVF_STAT(hw_csum_tx_good, zero_base, | ||
73 | zero_base)}, | ||
74 | {"rx_header_split", IXGBEVF_STAT(rx_hdr_split, zero_base, zero_base)}, | ||
65 | }; | 75 | }; |
66 | 76 | ||
67 | #define IXGBE_QUEUE_STATS_LEN 0 | 77 | #define IXGBE_QUEUE_STATS_LEN 0 |
@@ -455,10 +465,14 @@ static void ixgbevf_get_ethtool_stats(struct net_device *netdev, | |||
455 | ixgbe_gstrings_stats[i].stat_offset; | 465 | ixgbe_gstrings_stats[i].stat_offset; |
456 | char *b = (char *)adapter + | 466 | char *b = (char *)adapter + |
457 | ixgbe_gstrings_stats[i].base_stat_offset; | 467 | ixgbe_gstrings_stats[i].base_stat_offset; |
468 | char *r = (char *)adapter + | ||
469 | ixgbe_gstrings_stats[i].saved_reset_offset; | ||
458 | data[i] = ((ixgbe_gstrings_stats[i].sizeof_stat == | 470 | data[i] = ((ixgbe_gstrings_stats[i].sizeof_stat == |
459 | sizeof(u64)) ? *(u64 *)p : *(u32 *)p) - | 471 | sizeof(u64)) ? *(u64 *)p : *(u32 *)p) - |
460 | ((ixgbe_gstrings_stats[i].sizeof_stat == | 472 | ((ixgbe_gstrings_stats[i].sizeof_stat == |
461 | sizeof(u64)) ? *(u64 *)b : *(u32 *)b); | 473 | sizeof(u64)) ? *(u64 *)b : *(u32 *)b) + |
474 | ((ixgbe_gstrings_stats[i].sizeof_stat == | ||
475 | sizeof(u64)) ? *(u64 *)r : *(u32 *)r); | ||
462 | } | 476 | } |
463 | } | 477 | } |
464 | 478 | ||
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index ca653c49b765..d6cbd943a6f0 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -965,7 +965,7 @@ static irqreturn_t ixgbevf_msix_mbx(int irq, void *data) | |||
965 | 965 | ||
966 | if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG) | 966 | if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG) |
967 | mod_timer(&adapter->watchdog_timer, | 967 | mod_timer(&adapter->watchdog_timer, |
968 | round_jiffies(jiffies + 10)); | 968 | round_jiffies(jiffies + 1)); |
969 | 969 | ||
970 | return IRQ_HANDLED; | 970 | return IRQ_HANDLED; |
971 | } | 971 | } |
@@ -1610,6 +1610,44 @@ static inline void ixgbevf_rx_desc_queue_enable(struct ixgbevf_adapter *adapter, | |||
1610 | (adapter->rx_ring[rxr].count - 1)); | 1610 | (adapter->rx_ring[rxr].count - 1)); |
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | static void ixgbevf_save_reset_stats(struct ixgbevf_adapter *adapter) | ||
1614 | { | ||
1615 | /* Only save pre-reset stats if there are some */ | ||
1616 | if (adapter->stats.vfgprc || adapter->stats.vfgptc) { | ||
1617 | adapter->stats.saved_reset_vfgprc += adapter->stats.vfgprc - | ||
1618 | adapter->stats.base_vfgprc; | ||
1619 | adapter->stats.saved_reset_vfgptc += adapter->stats.vfgptc - | ||
1620 | adapter->stats.base_vfgptc; | ||
1621 | adapter->stats.saved_reset_vfgorc += adapter->stats.vfgorc - | ||
1622 | adapter->stats.base_vfgorc; | ||
1623 | adapter->stats.saved_reset_vfgotc += adapter->stats.vfgotc - | ||
1624 | adapter->stats.base_vfgotc; | ||
1625 | adapter->stats.saved_reset_vfmprc += adapter->stats.vfmprc - | ||
1626 | adapter->stats.base_vfmprc; | ||
1627 | } | ||
1628 | } | ||
1629 | |||
1630 | static void ixgbevf_init_last_counter_stats(struct ixgbevf_adapter *adapter) | ||
1631 | { | ||
1632 | struct ixgbe_hw *hw = &adapter->hw; | ||
1633 | |||
1634 | adapter->stats.last_vfgprc = IXGBE_READ_REG(hw, IXGBE_VFGPRC); | ||
1635 | adapter->stats.last_vfgorc = IXGBE_READ_REG(hw, IXGBE_VFGORC_LSB); | ||
1636 | adapter->stats.last_vfgorc |= | ||
1637 | (((u64)(IXGBE_READ_REG(hw, IXGBE_VFGORC_MSB))) << 32); | ||
1638 | adapter->stats.last_vfgptc = IXGBE_READ_REG(hw, IXGBE_VFGPTC); | ||
1639 | adapter->stats.last_vfgotc = IXGBE_READ_REG(hw, IXGBE_VFGOTC_LSB); | ||
1640 | adapter->stats.last_vfgotc |= | ||
1641 | (((u64)(IXGBE_READ_REG(hw, IXGBE_VFGOTC_MSB))) << 32); | ||
1642 | adapter->stats.last_vfmprc = IXGBE_READ_REG(hw, IXGBE_VFMPRC); | ||
1643 | |||
1644 | adapter->stats.base_vfgprc = adapter->stats.last_vfgprc; | ||
1645 | adapter->stats.base_vfgorc = adapter->stats.last_vfgorc; | ||
1646 | adapter->stats.base_vfgptc = adapter->stats.last_vfgptc; | ||
1647 | adapter->stats.base_vfgotc = adapter->stats.last_vfgotc; | ||
1648 | adapter->stats.base_vfmprc = adapter->stats.last_vfmprc; | ||
1649 | } | ||
1650 | |||
1613 | static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) | 1651 | static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) |
1614 | { | 1652 | { |
1615 | struct net_device *netdev = adapter->netdev; | 1653 | struct net_device *netdev = adapter->netdev; |
@@ -1656,6 +1694,9 @@ static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) | |||
1656 | /* enable transmits */ | 1694 | /* enable transmits */ |
1657 | netif_tx_start_all_queues(netdev); | 1695 | netif_tx_start_all_queues(netdev); |
1658 | 1696 | ||
1697 | ixgbevf_save_reset_stats(adapter); | ||
1698 | ixgbevf_init_last_counter_stats(adapter); | ||
1699 | |||
1659 | /* bring the link up in the watchdog, this could race with our first | 1700 | /* bring the link up in the watchdog, this could race with our first |
1660 | * link up interrupt but shouldn't be a problem */ | 1701 | * link up interrupt but shouldn't be a problem */ |
1661 | adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; | 1702 | adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; |
@@ -2228,27 +2269,6 @@ out: | |||
2228 | return err; | 2269 | return err; |
2229 | } | 2270 | } |
2230 | 2271 | ||
2231 | static void ixgbevf_init_last_counter_stats(struct ixgbevf_adapter *adapter) | ||
2232 | { | ||
2233 | struct ixgbe_hw *hw = &adapter->hw; | ||
2234 | |||
2235 | adapter->stats.last_vfgprc = IXGBE_READ_REG(hw, IXGBE_VFGPRC); | ||
2236 | adapter->stats.last_vfgorc = IXGBE_READ_REG(hw, IXGBE_VFGORC_LSB); | ||
2237 | adapter->stats.last_vfgorc |= | ||
2238 | (((u64)(IXGBE_READ_REG(hw, IXGBE_VFGORC_MSB))) << 32); | ||
2239 | adapter->stats.last_vfgptc = IXGBE_READ_REG(hw, IXGBE_VFGPTC); | ||
2240 | adapter->stats.last_vfgotc = IXGBE_READ_REG(hw, IXGBE_VFGOTC_LSB); | ||
2241 | adapter->stats.last_vfgotc |= | ||
2242 | (((u64)(IXGBE_READ_REG(hw, IXGBE_VFGOTC_MSB))) << 32); | ||
2243 | adapter->stats.last_vfmprc = IXGBE_READ_REG(hw, IXGBE_VFMPRC); | ||
2244 | |||
2245 | adapter->stats.base_vfgprc = adapter->stats.last_vfgprc; | ||
2246 | adapter->stats.base_vfgorc = adapter->stats.last_vfgorc; | ||
2247 | adapter->stats.base_vfgptc = adapter->stats.last_vfgptc; | ||
2248 | adapter->stats.base_vfgotc = adapter->stats.last_vfgotc; | ||
2249 | adapter->stats.base_vfmprc = adapter->stats.last_vfmprc; | ||
2250 | } | ||
2251 | |||
2252 | #define UPDATE_VF_COUNTER_32bit(reg, last_counter, counter) \ | 2272 | #define UPDATE_VF_COUNTER_32bit(reg, last_counter, counter) \ |
2253 | { \ | 2273 | { \ |
2254 | u32 current_counter = IXGBE_READ_REG(hw, reg); \ | 2274 | u32 current_counter = IXGBE_READ_REG(hw, reg); \ |
@@ -2399,7 +2419,7 @@ static void ixgbevf_watchdog_task(struct work_struct *work) | |||
2399 | if (!netif_carrier_ok(netdev)) { | 2419 | if (!netif_carrier_ok(netdev)) { |
2400 | hw_dbg(&adapter->hw, "NIC Link is Up %s, ", | 2420 | hw_dbg(&adapter->hw, "NIC Link is Up %s, ", |
2401 | ((link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? | 2421 | ((link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? |
2402 | "10 Gbps" : "1 Gbps")); | 2422 | "10 Gbps\n" : "1 Gbps\n")); |
2403 | netif_carrier_on(netdev); | 2423 | netif_carrier_on(netdev); |
2404 | netif_tx_wake_all_queues(netdev); | 2424 | netif_tx_wake_all_queues(netdev); |
2405 | } else { | 2425 | } else { |
@@ -2416,9 +2436,9 @@ static void ixgbevf_watchdog_task(struct work_struct *work) | |||
2416 | } | 2436 | } |
2417 | } | 2437 | } |
2418 | 2438 | ||
2419 | pf_has_reset: | ||
2420 | ixgbevf_update_stats(adapter); | 2439 | ixgbevf_update_stats(adapter); |
2421 | 2440 | ||
2441 | pf_has_reset: | ||
2422 | /* Force detection of hung controller every watchdog period */ | 2442 | /* Force detection of hung controller every watchdog period */ |
2423 | adapter->detect_tx_hung = true; | 2443 | adapter->detect_tx_hung = true; |
2424 | 2444 | ||
@@ -2675,7 +2695,7 @@ static int ixgbevf_open(struct net_device *netdev) | |||
2675 | if (hw->adapter_stopped) { | 2695 | if (hw->adapter_stopped) { |
2676 | err = IXGBE_ERR_MBX; | 2696 | err = IXGBE_ERR_MBX; |
2677 | printk(KERN_ERR "Unable to start - perhaps the PF" | 2697 | printk(KERN_ERR "Unable to start - perhaps the PF" |
2678 | "Driver isn't up yet\n"); | 2698 | " Driver isn't up yet\n"); |
2679 | goto err_setup_reset; | 2699 | goto err_setup_reset; |
2680 | } | 2700 | } |
2681 | } | 2701 | } |
@@ -3390,8 +3410,6 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, | |||
3390 | /* setup the private structure */ | 3410 | /* setup the private structure */ |
3391 | err = ixgbevf_sw_init(adapter); | 3411 | err = ixgbevf_sw_init(adapter); |
3392 | 3412 | ||
3393 | ixgbevf_init_last_counter_stats(adapter); | ||
3394 | |||
3395 | #ifdef MAX_SKB_FRAGS | 3413 | #ifdef MAX_SKB_FRAGS |
3396 | netdev->features = NETIF_F_SG | | 3414 | netdev->features = NETIF_F_SG | |
3397 | NETIF_F_IP_CSUM | | 3415 | NETIF_F_IP_CSUM | |
@@ -3449,6 +3467,8 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, | |||
3449 | 3467 | ||
3450 | adapter->netdev_registered = true; | 3468 | adapter->netdev_registered = true; |
3451 | 3469 | ||
3470 | ixgbevf_init_last_counter_stats(adapter); | ||
3471 | |||
3452 | /* print the MAC address */ | 3472 | /* print the MAC address */ |
3453 | hw_dbg(hw, "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", | 3473 | hw_dbg(hw, "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", |
3454 | netdev->dev_addr[0], | 3474 | netdev->dev_addr[0], |
diff --git a/drivers/net/ixgbevf/vf.h b/drivers/net/ixgbevf/vf.h index 799600e92700..1f31b052d4b4 100644 --- a/drivers/net/ixgbevf/vf.h +++ b/drivers/net/ixgbevf/vf.h | |||
@@ -157,6 +157,12 @@ struct ixgbevf_hw_stats { | |||
157 | u64 vfgorc; | 157 | u64 vfgorc; |
158 | u64 vfgotc; | 158 | u64 vfgotc; |
159 | u64 vfmprc; | 159 | u64 vfmprc; |
160 | |||
161 | u64 saved_reset_vfgprc; | ||
162 | u64 saved_reset_vfgptc; | ||
163 | u64 saved_reset_vfgorc; | ||
164 | u64 saved_reset_vfgotc; | ||
165 | u64 saved_reset_vfmprc; | ||
160 | }; | 166 | }; |
161 | 167 | ||
162 | struct ixgbevf_info { | 168 | struct ixgbevf_info { |
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 0f31497833df..c0b59a555384 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx) | |||
946 | jme->jme_vlan_rx(skb, jme->vlgrp, | 946 | jme->jme_vlan_rx(skb, jme->vlgrp, |
947 | le16_to_cpu(rxdesc->descwb.vlan)); | 947 | le16_to_cpu(rxdesc->descwb.vlan)); |
948 | NET_STAT(jme).rx_bytes += 4; | 948 | NET_STAT(jme).rx_bytes += 4; |
949 | } else { | ||
950 | dev_kfree_skb(skb); | ||
949 | } | 951 | } |
950 | } else { | 952 | } else { |
951 | jme->jme_rx(skb); | 953 | jme->jme_rx(skb); |
@@ -2081,12 +2083,45 @@ jme_tx_timeout(struct net_device *netdev) | |||
2081 | jme_reset_link(jme); | 2083 | jme_reset_link(jme); |
2082 | } | 2084 | } |
2083 | 2085 | ||
2086 | static inline void jme_pause_rx(struct jme_adapter *jme) | ||
2087 | { | ||
2088 | atomic_dec(&jme->link_changing); | ||
2089 | |||
2090 | jme_set_rx_pcc(jme, PCC_OFF); | ||
2091 | if (test_bit(JME_FLAG_POLL, &jme->flags)) { | ||
2092 | JME_NAPI_DISABLE(jme); | ||
2093 | } else { | ||
2094 | tasklet_disable(&jme->rxclean_task); | ||
2095 | tasklet_disable(&jme->rxempty_task); | ||
2096 | } | ||
2097 | } | ||
2098 | |||
2099 | static inline void jme_resume_rx(struct jme_adapter *jme) | ||
2100 | { | ||
2101 | struct dynpcc_info *dpi = &(jme->dpi); | ||
2102 | |||
2103 | if (test_bit(JME_FLAG_POLL, &jme->flags)) { | ||
2104 | JME_NAPI_ENABLE(jme); | ||
2105 | } else { | ||
2106 | tasklet_hi_enable(&jme->rxclean_task); | ||
2107 | tasklet_hi_enable(&jme->rxempty_task); | ||
2108 | } | ||
2109 | dpi->cur = PCC_P1; | ||
2110 | dpi->attempt = PCC_P1; | ||
2111 | dpi->cnt = 0; | ||
2112 | jme_set_rx_pcc(jme, PCC_P1); | ||
2113 | |||
2114 | atomic_inc(&jme->link_changing); | ||
2115 | } | ||
2116 | |||
2084 | static void | 2117 | static void |
2085 | jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | 2118 | jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) |
2086 | { | 2119 | { |
2087 | struct jme_adapter *jme = netdev_priv(netdev); | 2120 | struct jme_adapter *jme = netdev_priv(netdev); |
2088 | 2121 | ||
2122 | jme_pause_rx(jme); | ||
2089 | jme->vlgrp = grp; | 2123 | jme->vlgrp = grp; |
2124 | jme_resume_rx(jme); | ||
2090 | } | 2125 | } |
2091 | 2126 | ||
2092 | static void | 2127 | static void |
diff --git a/drivers/net/jme.h b/drivers/net/jme.h index c19db9146a2f..07ad3a457185 100644 --- a/drivers/net/jme.h +++ b/drivers/net/jme.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #define __JME_H_INCLUDED__ | 25 | #define __JME_H_INCLUDED__ |
26 | 26 | ||
27 | #define DRV_NAME "jme" | 27 | #define DRV_NAME "jme" |
28 | #define DRV_VERSION "1.0.5" | 28 | #define DRV_VERSION "1.0.6" |
29 | #define PFX DRV_NAME ": " | 29 | #define PFX DRV_NAME ": " |
30 | 30 | ||
31 | #define PCI_DEVICE_ID_JMICRON_JMC250 0x0250 | 31 | #define PCI_DEVICE_ID_JMICRON_JMC250 0x0250 |
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c index 0573e0bb4444..13cc1ca261d9 100644 --- a/drivers/net/ks8851.c +++ b/drivers/net/ks8851.c | |||
@@ -976,7 +976,6 @@ static void ks8851_set_rx_mode(struct net_device *dev) | |||
976 | crc >>= (32 - 6); /* get top six bits */ | 976 | crc >>= (32 - 6); /* get top six bits */ |
977 | 977 | ||
978 | rxctrl.mchash[crc >> 4] |= (1 << (crc & 0xf)); | 978 | rxctrl.mchash[crc >> 4] |= (1 << (crc & 0xf)); |
979 | mcptr = mcptr->next; | ||
980 | } | 979 | } |
981 | 980 | ||
982 | rxctrl.rxcr1 = RXCR1_RXME | RXCR1_RXPAFMA; | 981 | rxctrl.rxcr1 = RXCR1_RXME | RXCR1_RXPAFMA; |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index d222d7e25273..73f9a31cf94d 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -1189,9 +1189,21 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev, | |||
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | if (csum) { | 1191 | if (csum) { |
1192 | u32 csum_preamble = smsc95xx_calc_csum_preamble(skb); | 1192 | if (skb->len <= 45) { |
1193 | skb_push(skb, 4); | 1193 | /* workaround - hardware tx checksum does not work |
1194 | memcpy(skb->data, &csum_preamble, 4); | 1194 | * properly with extremely small packets */ |
1195 | long csstart = skb->csum_start - skb_headroom(skb); | ||
1196 | __wsum calc = csum_partial(skb->data + csstart, | ||
1197 | skb->len - csstart, 0); | ||
1198 | *((__sum16 *)(skb->data + csstart | ||
1199 | + skb->csum_offset)) = csum_fold(calc); | ||
1200 | |||
1201 | csum = false; | ||
1202 | } else { | ||
1203 | u32 csum_preamble = smsc95xx_calc_csum_preamble(skb); | ||
1204 | skb_push(skb, 4); | ||
1205 | memcpy(skb->data, &csum_preamble, 4); | ||
1206 | } | ||
1195 | } | 1207 | } |
1196 | 1208 | ||
1197 | skb_push(skb, 4); | 1209 | skb_push(skb, 4); |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index b2c8207f7bc1..294b486bc3ed 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1353,25 +1353,6 @@ static enum ath9k_pkt_type get_hw_packet_type(struct sk_buff *skb) | |||
1353 | return htype; | 1353 | return htype; |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | static bool is_pae(struct sk_buff *skb) | ||
1357 | { | ||
1358 | struct ieee80211_hdr *hdr; | ||
1359 | __le16 fc; | ||
1360 | |||
1361 | hdr = (struct ieee80211_hdr *)skb->data; | ||
1362 | fc = hdr->frame_control; | ||
1363 | |||
1364 | if (ieee80211_is_data(fc)) { | ||
1365 | if (ieee80211_is_nullfunc(fc) || | ||
1366 | /* Port Access Entity (IEEE 802.1X) */ | ||
1367 | (skb->protocol == cpu_to_be16(ETH_P_PAE))) { | ||
1368 | return true; | ||
1369 | } | ||
1370 | } | ||
1371 | |||
1372 | return false; | ||
1373 | } | ||
1374 | |||
1375 | static int get_hw_crypto_keytype(struct sk_buff *skb) | 1356 | static int get_hw_crypto_keytype(struct sk_buff *skb) |
1376 | { | 1357 | { |
1377 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 1358 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
@@ -1696,7 +1677,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
1696 | goto tx_done; | 1677 | goto tx_done; |
1697 | } | 1678 | } |
1698 | 1679 | ||
1699 | if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) { | 1680 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { |
1700 | /* | 1681 | /* |
1701 | * Try aggregation if it's a unicast data frame | 1682 | * Try aggregation if it's a unicast data frame |
1702 | * and the destination is HT capable. | 1683 | * and the destination is HT capable. |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 1ed5206721ec..8c12311dbb0a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -124,7 +124,7 @@ void iwl_free_tfds_in_queue(struct iwl_priv *priv, | |||
124 | if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) | 124 | if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) |
125 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 125 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; |
126 | else { | 126 | else { |
127 | IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n", | 127 | IWL_DEBUG_TX(priv, "free more than tfds_in_queue (%u:%d)\n", |
128 | priv->stations[sta_id].tid[tid].tfds_in_queue, | 128 | priv->stations[sta_id].tid[tid].tfds_in_queue, |
129 | freed); | 129 | freed); |
130 | priv->stations[sta_id].tid[tid].tfds_in_queue = 0; | 130 | priv->stations[sta_id].tid[tid].tfds_in_queue = 0; |
diff --git a/drivers/net/wireless/wl12xx/wl1251_debugfs.c b/drivers/net/wireless/wl12xx/wl1251_debugfs.c index 0ccba57fb9fb..05e4d68eb4cc 100644 --- a/drivers/net/wireless/wl12xx/wl1251_debugfs.c +++ b/drivers/net/wireless/wl12xx/wl1251_debugfs.c | |||
@@ -466,7 +466,8 @@ out: | |||
466 | 466 | ||
467 | void wl1251_debugfs_reset(struct wl1251 *wl) | 467 | void wl1251_debugfs_reset(struct wl1251 *wl) |
468 | { | 468 | { |
469 | memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats)); | 469 | if (wl->stats.fw_stats != NULL) |
470 | memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats)); | ||
470 | wl->stats.retry_count = 0; | 471 | wl->stats.retry_count = 0; |
471 | wl->stats.excessive_retries = 0; | 472 | wl->stats.excessive_retries = 0; |
472 | } | 473 | } |