diff options
author | Jay Cliburn <jacliburn@bellsouth.net> | 2007-04-29 22:42:10 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-08 01:20:15 -0400 |
commit | 1e0063645ef1e89c63778fbb0417e79b7dc65b5f (patch) | |
tree | d0804c056ea4e711d8ebe75cb09473096aca8ce2 /drivers/net/atl1/atl1_hw.c | |
parent | 88ca2d070c3a169611ec38f00e945a036564ca26 (diff) |
atl1: use dev_printk macros
Use dev_printk macros for PCI related errors, warnings, debug and info
console messages.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/atl1/atl1_hw.c')
-rw-r--r-- | drivers/net/atl1/atl1_hw.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/atl1/atl1_hw.c b/drivers/net/atl1/atl1_hw.c index 69482e0d849b..5b9dd3c1e84b 100644 --- a/drivers/net/atl1/atl1_hw.c +++ b/drivers/net/atl1/atl1_hw.c | |||
@@ -38,6 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | s32 atl1_reset_hw(struct atl1_hw *hw) | 39 | s32 atl1_reset_hw(struct atl1_hw *hw) |
40 | { | 40 | { |
41 | struct pci_dev *pdev = hw->back->pdev; | ||
41 | u32 icr; | 42 | u32 icr; |
42 | int i; | 43 | int i; |
43 | 44 | ||
@@ -74,7 +75,7 @@ s32 atl1_reset_hw(struct atl1_hw *hw) | |||
74 | } | 75 | } |
75 | 76 | ||
76 | if (icr) { | 77 | if (icr) { |
77 | printk (KERN_DEBUG "icr = %x\n", icr); | 78 | dev_dbg(&pdev->dev, "ICR = 0x%x\n", icr); |
78 | return icr; | 79 | return icr; |
79 | } | 80 | } |
80 | 81 | ||
@@ -437,6 +438,7 @@ s32 atl1_phy_enter_power_saving(struct atl1_hw *hw) | |||
437 | */ | 438 | */ |
438 | static s32 atl1_phy_reset(struct atl1_hw *hw) | 439 | static s32 atl1_phy_reset(struct atl1_hw *hw) |
439 | { | 440 | { |
441 | struct pci_dev *pdev = hw->back->pdev; | ||
440 | s32 ret_val; | 442 | s32 ret_val; |
441 | u16 phy_data; | 443 | u16 phy_data; |
442 | 444 | ||
@@ -468,8 +470,7 @@ static s32 atl1_phy_reset(struct atl1_hw *hw) | |||
468 | u32 val; | 470 | u32 val; |
469 | int i; | 471 | int i; |
470 | /* pcie serdes link may be down! */ | 472 | /* pcie serdes link may be down! */ |
471 | printk(KERN_DEBUG "%s: autoneg caused pcie phy link down\n", | 473 | dev_dbg(&pdev->dev, "pcie phy link down\n"); |
472 | atl1_driver_name); | ||
473 | 474 | ||
474 | for (i = 0; i < 25; i++) { | 475 | for (i = 0; i < 25; i++) { |
475 | msleep(1); | 476 | msleep(1); |
@@ -479,9 +480,7 @@ static s32 atl1_phy_reset(struct atl1_hw *hw) | |||
479 | } | 480 | } |
480 | 481 | ||
481 | if ((val & (MDIO_START | MDIO_BUSY)) != 0) { | 482 | if ((val & (MDIO_START | MDIO_BUSY)) != 0) { |
482 | printk(KERN_WARNING | 483 | dev_warn(&pdev->dev, "pcie link down at least 25ms\n"); |
483 | "%s: pcie link down at least for 25ms\n", | ||
484 | atl1_driver_name); | ||
485 | return ret_val; | 484 | return ret_val; |
486 | } | 485 | } |
487 | } | 486 | } |
@@ -571,6 +570,7 @@ s32 atl1_phy_setup_autoneg_adv(struct atl1_hw *hw) | |||
571 | */ | 570 | */ |
572 | static s32 atl1_setup_link(struct atl1_hw *hw) | 571 | static s32 atl1_setup_link(struct atl1_hw *hw) |
573 | { | 572 | { |
573 | struct pci_dev *pdev = hw->back->pdev; | ||
574 | s32 ret_val; | 574 | s32 ret_val; |
575 | 575 | ||
576 | /* | 576 | /* |
@@ -581,15 +581,13 @@ static s32 atl1_setup_link(struct atl1_hw *hw) | |||
581 | */ | 581 | */ |
582 | ret_val = atl1_phy_setup_autoneg_adv(hw); | 582 | ret_val = atl1_phy_setup_autoneg_adv(hw); |
583 | if (ret_val) { | 583 | if (ret_val) { |
584 | printk(KERN_DEBUG "%s: error setting up autonegotiation\n", | 584 | dev_dbg(&pdev->dev, "error setting up autonegotiation\n"); |
585 | atl1_driver_name); | ||
586 | return ret_val; | 585 | return ret_val; |
587 | } | 586 | } |
588 | /* SW.Reset , En-Auto-Neg if needed */ | 587 | /* SW.Reset , En-Auto-Neg if needed */ |
589 | ret_val = atl1_phy_reset(hw); | 588 | ret_val = atl1_phy_reset(hw); |
590 | if (ret_val) { | 589 | if (ret_val) { |
591 | printk(KERN_DEBUG "%s: error resetting the phy\n", | 590 | dev_dbg(&pdev->dev, "error resetting phy\n"); |
592 | atl1_driver_name); | ||
593 | return ret_val; | 591 | return ret_val; |
594 | } | 592 | } |
595 | hw->phy_configured = true; | 593 | hw->phy_configured = true; |
@@ -669,6 +667,7 @@ s32 atl1_init_hw(struct atl1_hw *hw) | |||
669 | */ | 667 | */ |
670 | s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex) | 668 | s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex) |
671 | { | 669 | { |
670 | struct pci_dev *pdev = hw->back->pdev; | ||
672 | s32 ret_val; | 671 | s32 ret_val; |
673 | u16 phy_data; | 672 | u16 phy_data; |
674 | 673 | ||
@@ -691,8 +690,7 @@ s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex) | |||
691 | *speed = SPEED_10; | 690 | *speed = SPEED_10; |
692 | break; | 691 | break; |
693 | default: | 692 | default: |
694 | printk(KERN_DEBUG "%s: error getting speed\n", | 693 | dev_dbg(&pdev->dev, "error getting speed\n"); |
695 | atl1_driver_name); | ||
696 | return ATL1_ERR_PHY_SPEED; | 694 | return ATL1_ERR_PHY_SPEED; |
697 | break; | 695 | break; |
698 | } | 696 | } |