/* Configures link settings. hw - Struct containing variables accessed by shared code Assumes the hardware has previously been reset and the transmitter and receiver are not enabled.  */
static s32 atl1_setup_link(struct atl1_hw *hw)
/* Configures link settings. hw - Struct containing variables accessed by shared code Assumes the hardware has previously been reset and the transmitter and receiver are not enabled.  */
static s32 atl1_setup_link(struct atl1_hw *hw)
{
	struct pci_dev *pdev = hw->back->pdev;
	struct atl1_adapter *adapter = hw->back;
	s32 ret_val;
	ret_val = atl1_phy_setup_autoneg_adv(hw);
	if (ret_val) {
		if (netif_msg_link(adapter))
			dev_dbg(&pdev->dev,
				"error setting up autonegotiation\n");
		return ret_val;
	}
	ret_val = atl1_phy_reset(hw);
	if (ret_val) {
		if (netif_msg_link(adapter))
			dev_dbg(&pdev->dev, "error resetting phy\n");
		return ret_val;
	}
	hw->phy_configured = true;
	return ret_val;
}