Patchwork [Quantal,01/29] be2net: don't call vid_config() when there's no vlan config

login
register
mail settings
Submitter Jesse Sung
Date Dec. 13, 2012, 6:49 a.m.
Message ID <1355381402-10497-1-git-send-email-jesse.sung@canonical.com>
Download mbox | patch
Permalink /patch/205744/
State New
Headers show

Comments

Jesse Sung - Dec. 13, 2012, 6:49 a.m.
From: Sathya Perla <sathya.perla@emulex.com>

BugLink: https://launchpad.net/bugs/1083088

be_vid_config() is called from be_setup() to replay config cmds after
a card reset. Skip calling it when no vlans are configured.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 1d1e9a467c7a478d24a1af39e467a414a8363661)

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 drivers/net/ethernet/emulex/benet/be_main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Brad Figg - Dec. 13, 2012, 6:09 p.m.
Jesse,

These patches look fine. Can you give me a pull request against a
new Quantal kernel tree? Can you also add the standard SRU text to
the bug and give some indication of the testing that has been done.

Thanks,
Brad

On 12/12/2012 10:49 PM, Jesse Sung wrote:
> From: Sathya Perla <sathya.perla@emulex.com>
> 
> BugLink: https://launchpad.net/bugs/1083088
> 
> be_vid_config() is called from be_setup() to replay config cmds after
> a card reset. Skip calling it when no vlans are configured.
> 
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> (cherry picked from commit 1d1e9a467c7a478d24a1af39e467a414a8363661)
> 
> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> ---
>  drivers/net/ethernet/emulex/benet/be_main.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> index bd5cf7e..257c7f3 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -2763,7 +2763,8 @@ static int be_setup(struct be_adapter *adapter)
>  
>  	be_cmd_get_fw_ver(adapter, adapter->fw_ver, NULL);
>  
> -	be_vid_config(adapter, false, 0);
> +	if (adapter->vlans_added)
> +		be_vid_config(adapter, false, 0);
>  
>  	be_set_rx_mode(adapter->netdev);
>  
>
Tim Gardner - Dec. 14, 2012, 6:29 p.m.
On 12/12/2012 11:49 PM, Jesse Sung wrote:
> From: Sathya Perla <sathya.perla@emulex.com>
> 
> BugLink: https://launchpad.net/bugs/1083088
> 
> be_vid_config() is called from be_setup() to replay config cmds after
> a card reset. Skip calling it when no vlans are configured.
> 
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> (cherry picked from commit 1d1e9a467c7a478d24a1af39e467a414a8363661)
> 
> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> ---
>  drivers/net/ethernet/emulex/benet/be_main.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> index bd5cf7e..257c7f3 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -2763,7 +2763,8 @@ static int be_setup(struct be_adapter *adapter)
>  
>  	be_cmd_get_fw_ver(adapter, adapter->fw_ver, NULL);
>  
> -	be_vid_config(adapter, false, 0);
> +	if (adapter->vlans_added)
> +		be_vid_config(adapter, false, 0);
>  
>  	be_set_rx_mode(adapter->netdev);
>  
> 


Be careful to change the commit log from 'cherry-picked' to 'back
ported' if there are _any_ conflicts.

I see there are 27 commits against be2net since v3.7. Are any of those
appropriate ? Looks like a lot of bug fixes.

Finally, as Brad requested, we'd like some test results.

rtg
Jesse Sung - Jan. 7, 2013, 12:42 p.m.
2012/12/15 Tim Gardner <tim.gardner@canonical.com>:
> On 12/12/2012 11:49 PM, Jesse Sung wrote:
>> From: Sathya Perla <sathya.perla@emulex.com>
>>
>> BugLink: https://launchpad.net/bugs/1083088
>>
>> be_vid_config() is called from be_setup() to replay config cmds after
>> a card reset. Skip calling it when no vlans are configured.
>>
>> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>> (cherry picked from commit 1d1e9a467c7a478d24a1af39e467a414a8363661)
>>
>> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
>> ---
>>  drivers/net/ethernet/emulex/benet/be_main.c |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
>> index bd5cf7e..257c7f3 100644
>> --- a/drivers/net/ethernet/emulex/benet/be_main.c
>> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
>> @@ -2763,7 +2763,8 @@ static int be_setup(struct be_adapter *adapter)
>>
>>       be_cmd_get_fw_ver(adapter, adapter->fw_ver, NULL);
>>
>> -     be_vid_config(adapter, false, 0);
>> +     if (adapter->vlans_added)
>> +             be_vid_config(adapter, false, 0);
>>
>>       be_set_rx_mode(adapter->netdev);
>>
>>
>
>
> Be careful to change the commit log from 'cherry-picked' to 'back
> ported' if there are _any_ conflicts.
>
> I see there are 27 commits against be2net since v3.7. Are any of those
> appropriate ? Looks like a lot of bug fixes.
>
> Finally, as Brad requested, we'd like some test results.

Hi Brad and Tim,

Sorry for the delay. The tests have been done are described in
https://bugs.launchpad.net/emulex/+bug/1083088/comments/10
https://bugs.launchpad.net/emulex/+bug/1083088/comments/11

I'll send out a pull request later.

Thanks,
Jesse

Patch

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index bd5cf7e..257c7f3 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -2763,7 +2763,8 @@  static int be_setup(struct be_adapter *adapter)
 
 	be_cmd_get_fw_ver(adapter, adapter->fw_ver, NULL);
 
-	be_vid_config(adapter, false, 0);
+	if (adapter->vlans_added)
+		be_vid_config(adapter, false, 0);
 
 	be_set_rx_mode(adapter->netdev);