aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1e/atl1e_hw.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-09 06:49:48 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 16:27:44 -0500
commitba211e3ec35820eced89bfe12e2d94e6352a4c5f (patch)
tree997d133bb18f347534b7a70536b693cd2a9843a1 /drivers/net/atl1e/atl1e_hw.c
parent571ba42303813106d533bf6bda929d8e289f51bf (diff)
drivers/net/atl1e: Use netdev_printk helpers
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>
Diffstat (limited to 'drivers/net/atl1e/atl1e_hw.c')
-rw-r--r--drivers/net/atl1e/atl1e_hw.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/net/atl1e/atl1e_hw.c b/drivers/net/atl1e/atl1e_hw.c
index 4a7700620119..76cc043def8c 100644
--- a/drivers/net/atl1e/atl1e_hw.c
+++ b/drivers/net/atl1e/atl1e_hw.c
@@ -394,7 +394,6 @@ static int atl1e_phy_setup_autoneg_adv(struct atl1e_hw *hw)
394int atl1e_phy_commit(struct atl1e_hw *hw) 394int atl1e_phy_commit(struct atl1e_hw *hw)
395{ 395{
396 struct atl1e_adapter *adapter = hw->adapter; 396 struct atl1e_adapter *adapter = hw->adapter;
397 struct pci_dev *pdev = adapter->pdev;
398 int ret_val; 397 int ret_val;
399 u16 phy_data; 398 u16 phy_data;
400 399
@@ -415,12 +414,12 @@ int atl1e_phy_commit(struct atl1e_hw *hw)
415 } 414 }
416 415
417 if (0 != (val & (MDIO_START | MDIO_BUSY))) { 416 if (0 != (val & (MDIO_START | MDIO_BUSY))) {
418 dev_err(&pdev->dev, 417 netdev_err(adapter->netdev,
419 "pcie linkdown at least for 25ms\n"); 418 "pcie linkdown at least for 25ms\n");
420 return ret_val; 419 return ret_val;
421 } 420 }
422 421
423 dev_err(&pdev->dev, "pcie linkup after %d ms\n", i); 422 netdev_err(adapter->netdev, "pcie linkup after %d ms\n", i);
424 } 423 }
425 return 0; 424 return 0;
426} 425}
@@ -428,7 +427,6 @@ int atl1e_phy_commit(struct atl1e_hw *hw)
428int atl1e_phy_init(struct atl1e_hw *hw) 427int atl1e_phy_init(struct atl1e_hw *hw)
429{ 428{
430 struct atl1e_adapter *adapter = hw->adapter; 429 struct atl1e_adapter *adapter = hw->adapter;
431 struct pci_dev *pdev = adapter->pdev;
432 s32 ret_val; 430 s32 ret_val;
433 u16 phy_val; 431 u16 phy_val;
434 432
@@ -492,20 +490,22 @@ int atl1e_phy_init(struct atl1e_hw *hw)
492 /*Enable PHY LinkChange Interrupt */ 490 /*Enable PHY LinkChange Interrupt */
493 ret_val = atl1e_write_phy_reg(hw, MII_INT_CTRL, 0xC00); 491 ret_val = atl1e_write_phy_reg(hw, MII_INT_CTRL, 0xC00);
494 if (ret_val) { 492 if (ret_val) {
495 dev_err(&pdev->dev, "Error enable PHY linkChange Interrupt\n"); 493 netdev_err(adapter->netdev,
494 "Error enable PHY linkChange Interrupt\n");
496 return ret_val; 495 return ret_val;
497 } 496 }
498 /* setup AutoNeg parameters */ 497 /* setup AutoNeg parameters */
499 ret_val = atl1e_phy_setup_autoneg_adv(hw); 498 ret_val = atl1e_phy_setup_autoneg_adv(hw);
500 if (ret_val) { 499 if (ret_val) {
501 dev_err(&pdev->dev, "Error Setting up Auto-Negotiation\n"); 500 netdev_err(adapter->netdev,
501 "Error Setting up Auto-Negotiation\n");
502 return ret_val; 502 return ret_val;
503 } 503 }
504 /* SW.Reset & En-Auto-Neg to restart Auto-Neg*/ 504 /* SW.Reset & En-Auto-Neg to restart Auto-Neg*/
505 dev_dbg(&pdev->dev, "Restarting Auto-Neg"); 505 netdev_dbg(adapter->netdev, "Restarting Auto-Negotiation\n");
506 ret_val = atl1e_phy_commit(hw); 506 ret_val = atl1e_phy_commit(hw);
507 if (ret_val) { 507 if (ret_val) {
508 dev_err(&pdev->dev, "Error Resetting the phy"); 508 netdev_err(adapter->netdev, "Error resetting the phy\n");
509 return ret_val; 509 return ret_val;
510 } 510 }
511 511
@@ -559,9 +559,8 @@ int atl1e_reset_hw(struct atl1e_hw *hw)
559 } 559 }
560 560
561 if (timeout >= AT_HW_MAX_IDLE_DELAY) { 561 if (timeout >= AT_HW_MAX_IDLE_DELAY) {
562 dev_err(&pdev->dev, 562 netdev_err(adapter->netdev,
563 "MAC state machine cann't be idle since" 563 "MAC state machine can't be idle since disabled for 10ms second\n");
564 " disabled for 10ms second\n");
565 return AT_ERR_TIMEOUT; 564 return AT_ERR_TIMEOUT;
566 } 565 }
567 566