atl1c: Add support for Atheros AR8152 and AR8152
Subsystems (2)
Your commit 496c185c9495629ef1c65387cb2594578393cfe0 "atl1c: Add support for Atheros AR8152 and AR8152" included the following changes:
Quoted 3 lines
drivers/net/atl1c/atl1c_hw.c +0
-0@@ -70,17 +70,39 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)
[...]
Quoted 15 lines
drivers/net/atl1c/atl1c_hw.c +9
-6-/* Enable OTP CLK */ -if (!(otp_ctrl_data &OTP_CTRL_CLK_EN )) { - otp_ctrl_data |=OTP_CTRL_CLK_EN ; -AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data); -AT_WRITE_FLUSH (hw); -msleep (1 ); +if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) { +/* Enable OTP CLK */ +if (!(otp_ctrl_data &OTP_CTRL_CLK_EN )) { + otp_ctrl_data |=OTP_CTRL_CLK_EN ; +AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data); +AT_WRITE_FLUSH (hw); +msleep (1 ); + } + }
[...]
Quoted 7 lines
drivers/net/atl1c/atl1c_hw.c +0
-3@@ -96,11 +118,31 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)return -1 ; }/* Disable OTP_CLK */ -if (otp_ctrl_data &OTP_CTRL_CLK_EN ) { - otp_ctrl_data &= ~OTP_CTRL_CLK_EN ; -AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data);
drivers/net/atl1c/atl1c_hw.c static int atl1c_get_permanent_address(struct atl1c_hw *hw) · line 128
Quoted 10 lines
drivers/net/atl1c/atl1c_hw.c +8
-2-AT_WRITE_FLUSH (hw); -msleep (1 ); +if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) { +if (otp_ctrl_data &OTP_CTRL_CLK_EN ) { + otp_ctrl_data &= ~OTP_CTRL_CLK_EN ; +AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data); +AT_WRITE_FLUSH (hw); +msleep (1 ); + } + }
Shouldn't the first if-statement use the same condition as the second i.e. matching the previously-defined hardware types athr_l1c and athr_l2c?
Ben.
Signature · 2 lines
Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.
David Miller
maintainerFrom: Ben Hutchings <[email protected]>
Date: Mon, 11 Oct 2010 02:18:50 +0100
Quoted 2 lines
Your commit
496c185c9495629ef1c65387cb2594578393cfe0"atl1c: Add support for Atheros AR8152 and AR8152" included the following changes:
...
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) {
...
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) {
...
Quoted 3 lines
Shouldn't the first if-statement use the same condition as the second i.e. matching the previously-defined hardware types
athr_l1candathr_l2c?
Yeah that definitely looks like a bug to me.
Quoted 8 lines · David Miller
From: Ben Hutchings <[email protected]>
Date: Mon, 11 Oct 2010 02:18:50 +0100Quoted 2 lines
Your commit
496c185c9495629ef1c65387cb2594578393cfe0"atl1c: Add support for Atheros AR8152 and AR8152" included the following changes:...
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) {...
Quoted 7 lines
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) {...
Quoted 3 lines
Shouldn't the first if-statement use the same condition as the second i.e. matching the previously-defined hardware types
athr_l1candathr_l2c?Yeah that definitely looks like a bug to me.
Good catch, unfortunatley I don't have the source code I used to port this work the day I did this anymore locally, so adding Jie Yang who is actually our maintainer for this driver.
Jie, can you please confirm if this patch is correct?
drivers/net/atl1c/atl1c_hw.c +1 -1
@@ -132,7 +132,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)return -1 ; }/* Disable OTP_CLK */ -if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) { +if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b)) { otp_ctrl_data &= ~OTP_CTRL_CLK_EN ;AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data);msleep (1 );
Luis
Quoted 29 lines · On Mon, 11 Oct 2010 11:48:35 -0700 "Luis R. Rodriguez"…
Quoted 8 lines · David Miller
From: Ben Hutchings <[email protected]>
Date: Mon, 11 Oct 2010 02:18:50 +0100Quoted 2 lines
Your commit
496c185c9495629ef1c65387cb2594578393cfe0"atl1c: Add support for Atheros AR8152 and AR8152" included the following changes:...
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) {...
Quoted 7 lines
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) {...
Quoted 3 lines
Shouldn't the first if-statement use the same condition as the second i.e. matching the previously-defined hardware types
athr_l1candathr_l2c?Yeah that definitely looks like a bug to me.
Good catch, unfortunatley I don't have the source code I used to port this work the day I did this anymore locally, so adding Jie Yang who is actually our maintainer for this driver.
Jie, can you please confirm if this patch is correct?
drivers/net/atl1c/atl1c_hw.c +0
-0
drivers/net/atl1c/atl1c_hw.c static int atl1c_get_permanent_address(struct atl1c_hw *hw) · line 138
Quoted 8 lines
drivers/net/atl1c/atl1c_hw.c +1
-1@@ -132,7 +132,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)return -1 ; }/* Disable OTP_CLK */ -if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) { +if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b)) { otp_ctrl_data &= ~OTP_CTRL_CLK_EN ;AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data);msleep (1 );
Did you notice ((gratuitous extra parens))
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Mon, 11 Oct 2010 12:01:28 -0700
Quoted 14 lines
drivers/net/atl1c/atl1c_hw.c static int atl1c_get_permanent_address(struct atl1c_hw *hw) · line 138
Quoted 10 lines · On Mon, 11 Oct 2010 11:48:35 -0700 "Luis R. Rodriguez"…
drivers/net/atl1c/atl1c_hw.c +1
-1@@ -132,7 +132,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)return -1 ; }/* Disable OTP_CLK */ -if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) { +if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b)) { otp_ctrl_data &= ~OTP_CTRL_CLK_EN ;AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data);msleep (1 );Did you notice ((gratuitous extra parens))
Yeah let's kill that too while we're changing this.
Quoted 15 lines · Luis R. Rodriguez
Quoted 14 lines · David Miller
From: Ben Hutchings <[email protected]>
Date: Mon, 11 Oct 2010 02:18:50 +0100Quoted 2 lines
Your commit
496c185c9495629ef1c65387cb2594578393cfe0"atl1c: Add support for Atheros AR8152 and AR8152" included the following changes:...
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) {...
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) {...
Quoted 3 lines
Shouldn't the first if-statement use the same condition as the second i.e. matching the previously-defined hardware types
athr_l1candathr_l2c?
Quoted 7 lines
Quoted 1 line
Yeah that definitely looks like a bug to me.
Good catch, unfortunatley I don't have the source code I used to port this work the day I did this anymore locally, so adding Jie Yang who is actually our maintainer for this driver.
Jie, can you please confirm if this patch is correct?
I was suggesting that the first condition was wrong and the second was right.
Ben.
Quoted 16 lines
drivers/net/atl1c/atl1c_hw.c +1
-1@@ -132,7 +132,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)return -1 ; }/* Disable OTP_CLK */ -if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) { +if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b)) { otp_ctrl_data &= ~OTP_CTRL_CLK_EN ;AT_WRITE_REG (hw,REG_OTP_CTRL , otp_ctrl_data);msleep (1 );Luis
Signature · 2 lines
Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.
A message that is not in the archive (sent off-list or not yet received): 20101012004503.GI10049@tux
Quoted 23 lines · Luis Rodriguez
Quoted 22 lines · Ben Hutchings
Quoted 21 lines · Luis R. Rodriguez
Quoted 8 lines · David Miller
From: Ben Hutchings <[email protected]>
Date: Mon, 11 Oct 2010 02:18:50 +0100Quoted 2 lines
Your commit
496c185c9495629ef1c65387cb2594578393cfe0"atl1c: Add support for Atheros AR8152 and AR8152" included the following changes:...
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) {...
Quoted 7 lines
Quoted 1 line
Quoted 1 line
(quoted diff) +1
-0+ if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) {...
Quoted 3 lines
Shouldn't the first if-statement use the same condition as the second i.e. matching the previously-defined hardware types
athr_l1candathr_l2c?Yeah that definitely looks like a bug to me.
Good catch, unfortunatley I don't have the source code I used to port this work the day I did this anymore locally, so adding Jie Yang who is actually our maintainer for this driver.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Jie, can you please confirm if this patch is correct?
I was suggesting that the first condition was wrong and the second was right.
Heh, thanks, Jie can you review?
Jie, have you had any chance to review?
Luis