aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c51
1 files changed, 31 insertions, 20 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 5588ef493a3d..e3442f47f932 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2697,19 +2697,23 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
2697 2697
2698 /* 2698 /*
2699 * For hot-pluggable SFP+ devices, a new SFP+ module may have 2699 * For hot-pluggable SFP+ devices, a new SFP+ module may have
2700 * arrived before interrupts were enabled. We need to kick off 2700 * arrived before interrupts were enabled but after probe. Such
2701 * the SFP+ module setup first, then try to bring up link. 2701 * devices wouldn't have their type identified yet. We need to
2702 * kick off the SFP+ module setup first, then try to bring up link.
2702 * If we're not hot-pluggable SFP+, we just need to configure link 2703 * If we're not hot-pluggable SFP+, we just need to configure link
2703 * and bring it up. 2704 * and bring it up.
2704 */ 2705 */
2705 err = hw->phy.ops.identify(hw); 2706 if (hw->phy.type == ixgbe_phy_unknown) {
2706 if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { 2707 err = hw->phy.ops.identify(hw);
2707 dev_err(&adapter->pdev->dev, "failed to initialize because " 2708 if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
2708 "an unsupported SFP+ module type was detected.\n" 2709 /*
2709 "Reload the driver after installing a supported " 2710 * Take the device down and schedule the sfp tasklet
2710 "module.\n"); 2711 * which will unregister_netdev and log it.
2711 ixgbe_down(adapter); 2712 */
2712 return err; 2713 ixgbe_down(adapter);
2714 schedule_work(&adapter->sfp_config_module_task);
2715 return err;
2716 }
2713 } 2717 }
2714 2718
2715 if (ixgbe_is_sfp(hw)) { 2719 if (ixgbe_is_sfp(hw)) {
@@ -3126,7 +3130,11 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter)
3126#endif 3130#endif
3127 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 3131 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
3128 DPRINTK(PROBE, INFO, "FCOE enabled with RSS \n"); 3132 DPRINTK(PROBE, INFO, "FCOE enabled with RSS \n");
3129 ixgbe_set_rss_queues(adapter); 3133 if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) ||
3134 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
3135 ixgbe_set_fdir_queues(adapter);
3136 else
3137 ixgbe_set_rss_queues(adapter);
3130 } 3138 }
3131 /* adding FCoE rx rings to the end */ 3139 /* adding FCoE rx rings to the end */
3132 f->mask = adapter->num_rx_queues; 3140 f->mask = adapter->num_rx_queues;
@@ -3384,7 +3392,12 @@ static inline bool ixgbe_cache_ring_fcoe(struct ixgbe_adapter *adapter)
3384 } 3392 }
3385#endif /* CONFIG_IXGBE_DCB */ 3393#endif /* CONFIG_IXGBE_DCB */
3386 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 3394 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
3387 ixgbe_cache_ring_rss(adapter); 3395 if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) ||
3396 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
3397 ixgbe_cache_ring_fdir(adapter);
3398 else
3399 ixgbe_cache_ring_rss(adapter);
3400
3388 fcoe_i = f->mask; 3401 fcoe_i = f->mask;
3389 } 3402 }
3390 for (i = 0; i < f->indices; i++, fcoe_i++) 3403 for (i = 0; i < f->indices; i++, fcoe_i++)
@@ -3724,7 +3737,7 @@ static void ixgbe_sfp_task(struct work_struct *work)
3724 if ((hw->phy.type == ixgbe_phy_nl) && 3737 if ((hw->phy.type == ixgbe_phy_nl) &&
3725 (hw->phy.sfp_type == ixgbe_sfp_type_not_present)) { 3738 (hw->phy.sfp_type == ixgbe_sfp_type_not_present)) {
3726 s32 ret = hw->phy.ops.identify_sfp(hw); 3739 s32 ret = hw->phy.ops.identify_sfp(hw);
3727 if (ret) 3740 if (ret == IXGBE_ERR_SFP_NOT_PRESENT)
3728 goto reschedule; 3741 goto reschedule;
3729 ret = hw->phy.ops.reset(hw); 3742 ret = hw->phy.ops.reset(hw);
3730 if (ret == IXGBE_ERR_SFP_NOT_SUPPORTED) { 3743 if (ret == IXGBE_ERR_SFP_NOT_SUPPORTED) {
@@ -4534,13 +4547,17 @@ static void ixgbe_sfp_config_module_task(struct work_struct *work)
4534 u32 err; 4547 u32 err;
4535 4548
4536 adapter->flags |= IXGBE_FLAG_IN_SFP_MOD_TASK; 4549 adapter->flags |= IXGBE_FLAG_IN_SFP_MOD_TASK;
4550
4551 /* Time for electrical oscillations to settle down */
4552 msleep(100);
4537 err = hw->phy.ops.identify_sfp(hw); 4553 err = hw->phy.ops.identify_sfp(hw);
4554
4538 if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { 4555 if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
4539 dev_err(&adapter->pdev->dev, "failed to initialize because " 4556 dev_err(&adapter->pdev->dev, "failed to initialize because "
4540 "an unsupported SFP+ module type was detected.\n" 4557 "an unsupported SFP+ module type was detected.\n"
4541 "Reload the driver after installing a supported " 4558 "Reload the driver after installing a supported "
4542 "module.\n"); 4559 "module.\n");
4543 ixgbe_down(adapter); 4560 unregister_netdev(adapter->netdev);
4544 return; 4561 return;
4545 } 4562 }
4546 hw->mac.ops.setup_sfp(hw); 4563 hw->mac.ops.setup_sfp(hw);
@@ -5570,12 +5587,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
5570 netdev->features |= NETIF_F_FCOE_CRC; 5587 netdev->features |= NETIF_F_FCOE_CRC;
5571 netdev->features |= NETIF_F_FSO; 5588 netdev->features |= NETIF_F_FSO;
5572 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; 5589 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1;
5573 DPRINTK(DRV, INFO, "FCoE enabled, "
5574 "disabling Flow Director\n");
5575 adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
5576 adapter->flags &=
5577 ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
5578 adapter->atr_sample_rate = 0;
5579 } else { 5590 } else {
5580 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED; 5591 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
5581 } 5592 }