* [PATCH 2/2] be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle
@ 2009-03-19 9:16 Sathya Perla
2009-03-20 10:22 ` Sathya Perla
0 siblings, 1 reply; 2+ messages in thread
From: Sathya Perla @ 2009-03-19 9:16 UTC (permalink / raw)
To: David Miller, netdev
Hi, this is a patch to reconfigure vlan-ids during an i/f down/up cycle
thanks,
-Sathya
P.S: Pls ignore the "company confidential" warning at the end of the
patch emails.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
---
drivers/net/benet/be_main.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 80fe1e0..0ecaffb 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -473,7 +473,7 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu)
* program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured,
* set the BE in promiscuous VLAN mode.
*/
-static void be_vids_config(struct net_device *netdev)
+static void be_vid_config(struct net_device *netdev)
{
struct be_adapter *adapter = netdev_priv(netdev);
u16 vtag[BE_NUM_VLANS_SUPPORTED];
@@ -516,7 +516,7 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid)
adapter->num_vlans++;
adapter->vlan_tag[vid] = 1;
- be_vids_config(netdev);
+ be_vid_config(netdev);
}
static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
@@ -527,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
adapter->vlan_tag[vid] = 0;
vlan_group_set_device(adapter->vlan_grp, vid, NULL);
- be_vids_config(netdev);
+ be_vid_config(netdev);
}
static void be_set_multicast_filter(struct net_device *netdev)
@@ -1430,6 +1430,8 @@ static int be_open(struct net_device *netdev)
if (status != 0)
goto do_none;
+ be_vid_config(netdev);
+
status = be_cmd_set_flow_control(ctrl, true, true);
if (status != 0)
goto if_destroy;
@@ -1864,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, 0);
pci_restore_state(pdev);
- be_vids_config(netdev);
-
if (netif_running(netdev)) {
rtnl_lock();
be_open(netdev);
--
1.5.6.3
___________________________________________________________________________________
This message, together with any attachment(s), contains confidential and proprietary information of
ServerEngines Corporation and is intended only for the designated recipient(s) named above. Any unauthorized
review, printing, retention, copying, disclosure or distribution is strictly prohibited. If you are not the
intended recipient of this message, please immediately advise the sender by reply email message and
delete all copies of this message and any attachment(s). Thank you.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle
2009-03-19 9:16 [PATCH 2/2] be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle Sathya Perla
@ 2009-03-20 10:22 ` Sathya Perla
0 siblings, 0 replies; 2+ messages in thread
From: Sathya Perla @ 2009-03-20 10:22 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Thu, Mar 19, 2009 at 2:46 PM, Sathya Perla <sathyap@serverengines.com> wrote:
> Hi, this is a patch to reconfigure vlan-ids during an i/f down/up cycle
>
> thanks,
> -Sathya
Re-posting the patch:
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
---
drivers/net/benet/be_main.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 80fe1e0..0ecaffb 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -473,7 +473,7 @@ static int be_change_mtu(struct net_device
*netdev, int new_mtu)
* program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured,
* set the BE in promiscuous VLAN mode.
*/
-static void be_vids_config(struct net_device *netdev)
+static void be_vid_config(struct net_device *netdev)
{
struct be_adapter *adapter = netdev_priv(netdev);
u16 vtag[BE_NUM_VLANS_SUPPORTED];
@@ -516,7 +516,7 @@ static void be_vlan_add_vid(struct net_device
*netdev, u16 vid)
adapter->num_vlans++;
adapter->vlan_tag[vid] = 1;
- be_vids_config(netdev);
+ be_vid_config(netdev);
}
static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
@@ -527,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device
*netdev, u16 vid)
adapter->vlan_tag[vid] = 0;
vlan_group_set_device(adapter->vlan_grp, vid, NULL);
- be_vids_config(netdev);
+ be_vid_config(netdev);
}
static void be_set_multicast_filter(struct net_device *netdev)
@@ -1430,6 +1430,8 @@ static int be_open(struct net_device *netdev)
if (status != 0)
goto do_none;
+ be_vid_config(netdev);
+
status = be_cmd_set_flow_control(ctrl, true, true);
if (status != 0)
goto if_destroy;
@@ -1864,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, 0);
pci_restore_state(pdev);
- be_vids_config(netdev);
-
if (netif_running(netdev)) {
rtnl_lock();
be_open(netdev);
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-20 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19 9:16 [PATCH 2/2] be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle Sathya Perla
2009-03-20 10:22 ` Sathya Perla
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).