aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorAjit Khaparde <ajitk@serverengines.com>2009-11-06 02:07:32 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-06 20:26:06 -0800
commit4f2aa89cd263932d61f286307771996df76bf63e (patch)
treeef9f833641ce9e771dc1026e7139eb35b4c92568 /drivers/net/benet
parent9e90c961134929678022aee0c68b16c1ed520614 (diff)
downloadkernel_samsung_smdk4412-4f2aa89cd263932d61f286307771996df76bf63e.zip
kernel_samsung_smdk4412-4f2aa89cd263932d61f286307771996df76bf63e.tar.gz
kernel_samsung_smdk4412-4f2aa89cd263932d61f286307771996df76bf63e.tar.bz2
be2net: Bug fix to send config commands to hardware after netdev_register
Sending config commands to be2 hardware before netdev_register is completed, is sometimes causing the async link notification to arrive even before the driver is ready to handle it. The commands for vlan config and flow control settings can infact wait till be_open. This patch takes care of that. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet')
-rw-r--r--drivers/net/benet/be_main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 4a7a452..876b357 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1610,11 +1610,21 @@ static int be_open(struct net_device *netdev)
status = be_cmd_link_status_query(adapter, &link_up);
if (status)
- return status;
+ goto ret_sts;
be_link_status_update(adapter, link_up);
+ status = be_vid_config(adapter);
+ if (status)
+ goto ret_sts;
+
+ status = be_cmd_set_flow_control(adapter,
+ adapter->tx_fc, adapter->rx_fc);
+ if (status)
+ goto ret_sts;
+
schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
- return 0;
+ret_sts:
+ return status;
}
static int be_setup(struct be_adapter *adapter)
@@ -1648,18 +1658,8 @@ static int be_setup(struct be_adapter *adapter)
if (status != 0)
goto rx_qs_destroy;
- status = be_vid_config(adapter);
- if (status != 0)
- goto mccqs_destroy;
-
- status = be_cmd_set_flow_control(adapter,
- adapter->tx_fc, adapter->rx_fc);
- if (status != 0)
- goto mccqs_destroy;
return 0;
-mccqs_destroy:
- be_mcc_queues_destroy(adapter);
rx_qs_destroy:
be_rx_queues_destroy(adapter);
tx_qs_destroy: