Skip to content

Commit

Permalink
drivers/net/atl1e: Use netdev_printk helpers
Browse files Browse the repository at this point in the history
Logging messages sometimes had duplicated "ATL1E" output.

For instance:
ATL1E 0000:03:00.0: ATL1E: eth0 NIC Link is Up<100 Mbps Full Duplex>
is now:
ATL1E 0000:03:00.0: eth0: NIC Link is Up <100 Mbps Full Duplex>

Add some consistency to logging messages
Add some missing \n's to logging messages
Miscellaneous typo spelling corrections
Change atl1e_validate_option argument from pdev to adapter

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Feb 12, 2010
1 parent 571ba42 commit ba211e3
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 112 deletions.
23 changes: 11 additions & 12 deletions drivers/net/atl1e/atl1e_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ static int atl1e_phy_setup_autoneg_adv(struct atl1e_hw *hw)
int atl1e_phy_commit(struct atl1e_hw *hw)
{
struct atl1e_adapter *adapter = hw->adapter;
struct pci_dev *pdev = adapter->pdev;
int ret_val;
u16 phy_data;

Expand All @@ -415,20 +414,19 @@ int atl1e_phy_commit(struct atl1e_hw *hw)
}

if (0 != (val & (MDIO_START | MDIO_BUSY))) {
dev_err(&pdev->dev,
"pcie linkdown at least for 25ms\n");
netdev_err(adapter->netdev,
"pcie linkdown at least for 25ms\n");
return ret_val;
}

dev_err(&pdev->dev, "pcie linkup after %d ms\n", i);
netdev_err(adapter->netdev, "pcie linkup after %d ms\n", i);
}
return 0;
}

int atl1e_phy_init(struct atl1e_hw *hw)
{
struct atl1e_adapter *adapter = hw->adapter;
struct pci_dev *pdev = adapter->pdev;
s32 ret_val;
u16 phy_val;

Expand Down Expand Up @@ -492,20 +490,22 @@ int atl1e_phy_init(struct atl1e_hw *hw)
/*Enable PHY LinkChange Interrupt */
ret_val = atl1e_write_phy_reg(hw, MII_INT_CTRL, 0xC00);
if (ret_val) {
dev_err(&pdev->dev, "Error enable PHY linkChange Interrupt\n");
netdev_err(adapter->netdev,
"Error enable PHY linkChange Interrupt\n");
return ret_val;
}
/* setup AutoNeg parameters */
ret_val = atl1e_phy_setup_autoneg_adv(hw);
if (ret_val) {
dev_err(&pdev->dev, "Error Setting up Auto-Negotiation\n");
netdev_err(adapter->netdev,
"Error Setting up Auto-Negotiation\n");
return ret_val;
}
/* SW.Reset & En-Auto-Neg to restart Auto-Neg*/
dev_dbg(&pdev->dev, "Restarting Auto-Neg");
netdev_dbg(adapter->netdev, "Restarting Auto-Negotiation\n");
ret_val = atl1e_phy_commit(hw);
if (ret_val) {
dev_err(&pdev->dev, "Error Resetting the phy");
netdev_err(adapter->netdev, "Error resetting the phy\n");
return ret_val;
}

Expand Down Expand Up @@ -559,9 +559,8 @@ int atl1e_reset_hw(struct atl1e_hw *hw)
}

if (timeout >= AT_HW_MAX_IDLE_DELAY) {
dev_err(&pdev->dev,
"MAC state machine cann't be idle since"
" disabled for 10ms second\n");
netdev_err(adapter->netdev,
"MAC state machine can't be idle since disabled for 10ms second\n");
return AT_ERR_TIMEOUT;
}

Expand Down
Loading

0 comments on commit ba211e3

Please sign in to comment.