Commit c7ccde0f authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

ixgbe: make ixgbe_up and ixgbe_up_complete void functions

ixgbe_up and ixgbe_up_complete will always return 0.  Since this doesn't
provide any useful information we might as well just make them both void
and save ourselves from having to return an unused value.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent f7e1027f
...@@ -547,7 +547,7 @@ extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, ...@@ -547,7 +547,7 @@ extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg,
extern char ixgbe_driver_name[]; extern char ixgbe_driver_name[];
extern const char ixgbe_driver_version[]; extern const char ixgbe_driver_version[];
extern int ixgbe_up(struct ixgbe_adapter *adapter); extern void ixgbe_up(struct ixgbe_adapter *adapter);
extern void ixgbe_down(struct ixgbe_adapter *adapter); extern void ixgbe_down(struct ixgbe_adapter *adapter);
extern void ixgbe_reinit_locked(struct ixgbe_adapter *adapter); extern void ixgbe_reinit_locked(struct ixgbe_adapter *adapter);
extern void ixgbe_reset(struct ixgbe_adapter *adapter); extern void ixgbe_reset(struct ixgbe_adapter *adapter);
......
...@@ -3555,7 +3555,7 @@ static void ixgbe_setup_gpie(struct ixgbe_adapter *adapter) ...@@ -3555,7 +3555,7 @@ static void ixgbe_setup_gpie(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie);
} }
static int ixgbe_up_complete(struct ixgbe_adapter *adapter) static void ixgbe_up_complete(struct ixgbe_adapter *adapter)
{ {
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
int err; int err;
...@@ -3614,8 +3614,6 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) ...@@ -3614,8 +3614,6 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
ctrl_ext |= IXGBE_CTRL_EXT_PFRSTD; ctrl_ext |= IXGBE_CTRL_EXT_PFRSTD;
IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext);
return 0;
} }
void ixgbe_reinit_locked(struct ixgbe_adapter *adapter) void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
...@@ -3639,12 +3637,12 @@ void ixgbe_reinit_locked(struct ixgbe_adapter *adapter) ...@@ -3639,12 +3637,12 @@ void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
clear_bit(__IXGBE_RESETTING, &adapter->state); clear_bit(__IXGBE_RESETTING, &adapter->state);
} }
int ixgbe_up(struct ixgbe_adapter *adapter) void ixgbe_up(struct ixgbe_adapter *adapter)
{ {
/* hardware has been reset, we need to reload some things */ /* hardware has been reset, we need to reload some things */
ixgbe_configure(adapter); ixgbe_configure(adapter);
return ixgbe_up_complete(adapter); ixgbe_up_complete(adapter);
} }
void ixgbe_reset(struct ixgbe_adapter *adapter) void ixgbe_reset(struct ixgbe_adapter *adapter)
...@@ -5186,17 +5184,12 @@ static int ixgbe_open(struct net_device *netdev) ...@@ -5186,17 +5184,12 @@ static int ixgbe_open(struct net_device *netdev)
if (err) if (err)
goto err_req_irq; goto err_req_irq;
err = ixgbe_up_complete(adapter); ixgbe_up_complete(adapter);
if (err)
goto err_up;
netif_tx_start_all_queues(netdev); netif_tx_start_all_queues(netdev);
return 0; return 0;
err_up:
ixgbe_release_hw_control(adapter);
ixgbe_free_irq(adapter);
err_req_irq: err_req_irq:
err_setup_rx: err_setup_rx:
ixgbe_free_all_rx_resources(adapter); ixgbe_free_all_rx_resources(adapter);
...@@ -7653,12 +7646,8 @@ static void ixgbe_io_resume(struct pci_dev *pdev) ...@@ -7653,12 +7646,8 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
struct ixgbe_adapter *adapter = pci_get_drvdata(pdev); struct ixgbe_adapter *adapter = pci_get_drvdata(pdev);
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
if (netif_running(netdev)) { if (netif_running(netdev))
if (ixgbe_up(adapter)) { ixgbe_up(adapter);
e_info(probe, "ixgbe_up failed after reset\n");
return;
}
}
netif_device_attach(netdev); netif_device_attach(netdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment