ixgbe: Move PHY ops initialization to centralize bus accesses
When PHY operations are determined, the PHY must be identified. This identification causes bus access, and should be contained within its own routines. This also helps the 82599 PHY init paths for both SFP+ and KX/KX4 devices to be easier to maintain. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d3e9c56caf
commit
04f165ef4f
@@ -4630,7 +4630,11 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
|
||||
/* reset_hw fills in the perm_addr as well */
|
||||
err = hw->mac.ops.reset_hw(hw);
|
||||
if (err) {
|
||||
if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
|
||||
dev_err(&adapter->pdev->dev, "failed to load because an "
|
||||
"unsupported SFP+ module type was detected.\n");
|
||||
goto err_sw_init;
|
||||
} else if (err) {
|
||||
dev_err(&adapter->pdev->dev, "HW Init failed: %d\n", err);
|
||||
goto err_sw_init;
|
||||
}
|
||||
@@ -4703,6 +4707,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
device_init_wakeup(&adapter->pdev->dev, true);
|
||||
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
|
||||
|
||||
/* pick up the PCI bus settings for reporting later */
|
||||
hw->mac.ops.get_bus_info(hw);
|
||||
|
||||
/* print bus type/speed/width info */
|
||||
dev_info(&pdev->dev, "(PCI Express:%s:%s) %pM\n",
|
||||
((hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0Gb/s":
|
||||
|
Reference in New Issue
Block a user