* [net-next-2.6 PATCH 7/9] e1000e: add debug messages
@ 2009-12-02 1:53 Jeff Kirsher
2009-12-02 1:53 ` [net-next-2.6 PATCH 8/9] e1000e: PHY type cleanups in e1000e_check_downshift() Jeff Kirsher
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jeff Kirsher @ 2009-12-02 1:53 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Bruce Allan, Jeff Kirsher
From: Bruce Allan <bruce.w.allan@intel.com>
Add some helpful debug messages.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000e/ich8lan.c | 4 +++-
drivers/net/e1000e/phy.c | 26 ++++++++++++++++++++------
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 1ce2bf9..6efb77f 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -314,8 +314,10 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)
phy->ops.write_reg = e1000e_write_phy_reg_bm;
phy->ops.read_reg = e1000e_read_phy_reg_bm;
ret_val = e1000e_determine_phy_address(hw);
- if (ret_val)
+ if (ret_val) {
+ e_dbg("Cannot determine PHY addr. Erroring out\n");
return ret_val;
+ }
}
phy->id = 0;
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c
index 1bc09b2..3e5940a 100644
--- a/drivers/net/e1000e/phy.c
+++ b/drivers/net/e1000e/phy.c
@@ -2472,7 +2472,7 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
/* Gig must be disabled for MDIO accesses to page 800 */
if ((hw->mac.type == e1000_pchlan) &&
(!(er32(PHY_CTRL) & E1000_PHY_CTRL_GBE_DISABLE)))
- e_dbg("Attempting to access page 800 while gig enabled\n");
+ e_dbg("Attempting to access page 800 while gig enabled.\n");
/* All operations in this function are phy address 1 */
hw->phy.addr = 1;
@@ -2482,20 +2482,26 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
(BM_WUC_ENABLE_PAGE << IGP_PAGE_SHIFT));
ret_val = e1000e_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, &phy_reg);
- if (ret_val)
+ if (ret_val) {
+ e_dbg("Could not read PHY page 769\n");
goto out;
+ }
/* First clear bit 4 to avoid a power state change */
phy_reg &= ~(BM_WUC_HOST_WU_BIT);
ret_val = e1000e_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
- if (ret_val)
+ if (ret_val) {
+ e_dbg("Could not clear PHY page 769 bit 4\n");
goto out;
+ }
/* Write bit 2 = 1, and clear bit 4 to 769_17 */
ret_val = e1000e_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG,
phy_reg | BM_WUC_ENABLE_BIT);
- if (ret_val)
+ if (ret_val) {
+ e_dbg("Could not write PHY page 769 bit 2\n");
goto out;
+ }
/* Select page 800 */
ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT,
@@ -2503,8 +2509,10 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
/* Write the page 800 offset value using opcode 0x11 */
ret_val = e1000e_write_phy_reg_mdic(hw, BM_WUC_ADDRESS_OPCODE, reg);
- if (ret_val)
+ if (ret_val) {
+ e_dbg("Could not write address opcode to page 800\n");
goto out;
+ }
if (read) {
/* Read the page 800 value using opcode 0x12 */
@@ -2516,8 +2524,10 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
*data);
}
- if (ret_val)
+ if (ret_val) {
+ e_dbg("Could not access data value from page 800\n");
goto out;
+ }
/*
* Restore 769_17.2 to its original value
@@ -2528,6 +2538,10 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
/* Clear 769_17.2 */
ret_val = e1000e_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
+ if (ret_val) {
+ e_dbg("Could not clear PHY page 769 bit 2\n");
+ goto out;
+ }
out:
return ret_val;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net-next-2.6 PATCH 8/9] e1000e: PHY type cleanups in e1000e_check_downshift()
2009-12-02 1:53 [net-next-2.6 PATCH 7/9] e1000e: add debug messages Jeff Kirsher
@ 2009-12-02 1:53 ` Jeff Kirsher
2009-12-02 8:38 ` David Miller
2009-12-02 1:54 ` [net-next-2.6 PATCH 9/9] e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom() Jeff Kirsher
2009-12-02 8:38 ` [net-next-2.6 PATCH 7/9] e1000e: add debug messages David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2009-12-02 1:53 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Bruce Allan, Jeff Kirsher
From: Bruce Allan <bruce.w.allan@intel.com>
Remove the case for 82577 because it does not support the ability to check
for downshift. Add case for e1000_phy_bm which can do this.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000e/phy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c
index 3e5940a..0c69649 100644
--- a/drivers/net/e1000e/phy.c
+++ b/drivers/net/e1000e/phy.c
@@ -1525,8 +1525,8 @@ s32 e1000e_check_downshift(struct e1000_hw *hw)
switch (phy->type) {
case e1000_phy_m88:
case e1000_phy_gg82563:
+ case e1000_phy_bm:
case e1000_phy_82578:
- case e1000_phy_82577:
offset = M88E1000_PHY_SPEC_STATUS;
mask = M88E1000_PSSR_DOWNSHIFT;
break;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net-next-2.6 PATCH 9/9] e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom()
2009-12-02 1:53 [net-next-2.6 PATCH 7/9] e1000e: add debug messages Jeff Kirsher
2009-12-02 1:53 ` [net-next-2.6 PATCH 8/9] e1000e: PHY type cleanups in e1000e_check_downshift() Jeff Kirsher
@ 2009-12-02 1:54 ` Jeff Kirsher
2009-12-02 8:38 ` David Miller
2009-12-02 8:38 ` [net-next-2.6 PATCH 7/9] e1000e: add debug messages David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2009-12-02 1:54 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Roel Kluin, Jeff Kirsher
From: Roel Kluin <roel.kluin@gmail.com>
Don't use the sizeof the pointer to clear the result
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000e/ethtool.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index b6243ca..0aa50c2 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -535,7 +535,8 @@ static int e1000_get_eeprom(struct net_device *netdev,
if (ret_val) {
/* a read error occurred, throw away the result */
- memset(eeprom_buff, 0xff, sizeof(eeprom_buff));
+ memset(eeprom_buff, 0xff, sizeof(u16) *
+ (last_word - first_word + 1));
} else {
/* Device's eeprom is always little-endian, word addressable */
for (i = 0; i < last_word - first_word + 1; i++)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [net-next-2.6 PATCH 7/9] e1000e: add debug messages
2009-12-02 1:53 [net-next-2.6 PATCH 7/9] e1000e: add debug messages Jeff Kirsher
2009-12-02 1:53 ` [net-next-2.6 PATCH 8/9] e1000e: PHY type cleanups in e1000e_check_downshift() Jeff Kirsher
2009-12-02 1:54 ` [net-next-2.6 PATCH 9/9] e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom() Jeff Kirsher
@ 2009-12-02 8:38 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-12-02 8:38 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bruce.w.allan
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 01 Dec 2009 17:53:07 -0800
> From: Bruce Allan <bruce.w.allan@intel.com>
>
> Add some helpful debug messages.
>
> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next-2.6 PATCH 8/9] e1000e: PHY type cleanups in e1000e_check_downshift()
2009-12-02 1:53 ` [net-next-2.6 PATCH 8/9] e1000e: PHY type cleanups in e1000e_check_downshift() Jeff Kirsher
@ 2009-12-02 8:38 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-12-02 8:38 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bruce.w.allan
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 01 Dec 2009 17:53:48 -0800
> From: Bruce Allan <bruce.w.allan@intel.com>
>
> Remove the case for 82577 because it does not support the ability to check
> for downshift. Add case for e1000_phy_bm which can do this.
>
> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next-2.6 PATCH 9/9] e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom()
2009-12-02 1:54 ` [net-next-2.6 PATCH 9/9] e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom() Jeff Kirsher
@ 2009-12-02 8:38 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-12-02 8:38 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, roel.kluin
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 01 Dec 2009 17:54:24 -0800
> From: Roel Kluin <roel.kluin@gmail.com>
>
> Don't use the sizeof the pointer to clear the result
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-12-02 8:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 1:53 [net-next-2.6 PATCH 7/9] e1000e: add debug messages Jeff Kirsher
2009-12-02 1:53 ` [net-next-2.6 PATCH 8/9] e1000e: PHY type cleanups in e1000e_check_downshift() Jeff Kirsher
2009-12-02 8:38 ` David Miller
2009-12-02 1:54 ` [net-next-2.6 PATCH 9/9] e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom() Jeff Kirsher
2009-12-02 8:38 ` David Miller
2009-12-02 8:38 ` [net-next-2.6 PATCH 7/9] e1000e: add debug messages David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).