netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-2.6] atl1c: Fix hardware type check for enabling OTP CLK
@ 2010-11-20  4:55 Ben Hutchings
  2010-11-21 18:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2010-11-20  4:55 UTC (permalink / raw)
  To: Luis R. Rodriguez, Jie Yang, linux-team; +Cc: David Miller, netdev

Commit 496c185c9495629ef1c65387cb2594578393cfe0 "atl1c: Add support
for Atheros AR8152 and AR8152" added the condition:

             if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b)

for enabling OTP CLK, and the condition:

             if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)

for disabling OTP CLK.  Since the two previously defined hardware
types are athr_l1c and athr_l2c, the latter condition appears to be
the correct one.  Change the former to match.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
This is compile-tested only.  It looks like the current code may fail to
read non-volatile settings on the L2C hardware since the EEPROM will not
be clocked.  Please check this.

Ben.

 drivers/net/atl1c/atl1c_hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/atl1c/atl1c_hw.c b/drivers/net/atl1c/atl1c_hw.c
index 919080b..1bf6720 100644
--- a/drivers/net/atl1c/atl1c_hw.c
+++ b/drivers/net/atl1c/atl1c_hw.c
@@ -82,7 +82,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)
 	addr[0] = addr[1] = 0;
 	AT_READ_REG(hw, REG_OTP_CTRL, &otp_ctrl_data);
 	if (atl1c_check_eeprom_exist(hw)) {
-		if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) {
+		if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c) {
 			/* Enable OTP CLK */
 			if (!(otp_ctrl_data & OTP_CTRL_CLK_EN)) {
 				otp_ctrl_data |= OTP_CTRL_CLK_EN;
-- 
1.7.2.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-2.6] atl1c: Fix hardware type check for enabling OTP CLK
  2010-11-20  4:55 [PATCH net-2.6] atl1c: Fix hardware type check for enabling OTP CLK Ben Hutchings
@ 2010-11-21 18:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-21 18:07 UTC (permalink / raw)
  To: ben; +Cc: lrodriguez, Jie.Yang, linux-team, netdev

From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 20 Nov 2010 04:55:36 +0000

> Commit 496c185c9495629ef1c65387cb2594578393cfe0 "atl1c: Add support
> for Atheros AR8152 and AR8152" added the condition:
> 
>              if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b)
> 
> for enabling OTP CLK, and the condition:
> 
>              if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)
> 
> for disabling OTP CLK.  Since the two previously defined hardware
> types are athr_l1c and athr_l2c, the latter condition appears to be
> the correct one.  Change the former to match.
> 
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> This is compile-tested only.  It looks like the current code may fail to
> read non-volatile settings on the L2C hardware since the EEPROM will not
> be clocked.  Please check this.

This was brought up before, perhaps 4 or 5 months ago, and the maintainers
for this driver just fooled around and never brought this issue to a
meaningful resolution.

So I'm just going to apply your patch instead of waiting another half
year for something to happen.

Thanks Ben.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-21 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-20  4:55 [PATCH net-2.6] atl1c: Fix hardware type check for enabling OTP CLK Ben Hutchings
2010-11-21 18:07 ` 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).