diff options
author | Ajit Khaparde <ajitk@serverengines.com> | 2009-11-05 21:07:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-06 23:26:06 -0500 |
commit | 4f2aa89cd263932d61f286307771996df76bf63e (patch) | |
tree | ef9f833641ce9e771dc1026e7139eb35b4c92568 /drivers | |
parent | 9e90c961134929678022aee0c68b16c1ed520614 (diff) |
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')
-rw-r--r-- | drivers/net/benet/be_main.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 4a7a4527182d..876b357101fa 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) | |||
1610 | 1610 | ||
1611 | status = be_cmd_link_status_query(adapter, &link_up); | 1611 | status = be_cmd_link_status_query(adapter, &link_up); |
1612 | if (status) | 1612 | if (status) |
1613 | return status; | 1613 | goto ret_sts; |
1614 | be_link_status_update(adapter, link_up); | 1614 | be_link_status_update(adapter, link_up); |
1615 | 1615 | ||
1616 | status = be_vid_config(adapter); | ||
1617 | if (status) | ||
1618 | goto ret_sts; | ||
1619 | |||
1620 | status = be_cmd_set_flow_control(adapter, | ||
1621 | adapter->tx_fc, adapter->rx_fc); | ||
1622 | if (status) | ||
1623 | goto ret_sts; | ||
1624 | |||
1616 | schedule_delayed_work(&adapter->work, msecs_to_jiffies(100)); | 1625 | schedule_delayed_work(&adapter->work, msecs_to_jiffies(100)); |
1617 | return 0; | 1626 | ret_sts: |
1627 | return status; | ||
1618 | } | 1628 | } |
1619 | 1629 | ||
1620 | static int be_setup(struct be_adapter *adapter) | 1630 | static int be_setup(struct be_adapter *adapter) |
@@ -1648,18 +1658,8 @@ static int be_setup(struct be_adapter *adapter) | |||
1648 | if (status != 0) | 1658 | if (status != 0) |
1649 | goto rx_qs_destroy; | 1659 | goto rx_qs_destroy; |
1650 | 1660 | ||
1651 | status = be_vid_config(adapter); | ||
1652 | if (status != 0) | ||
1653 | goto mccqs_destroy; | ||
1654 | |||
1655 | status = be_cmd_set_flow_control(adapter, | ||
1656 | adapter->tx_fc, adapter->rx_fc); | ||
1657 | if (status != 0) | ||
1658 | goto mccqs_destroy; | ||
1659 | return 0; | 1661 | return 0; |
1660 | 1662 | ||
1661 | mccqs_destroy: | ||
1662 | be_mcc_queues_destroy(adapter); | ||
1663 | rx_qs_destroy: | 1663 | rx_qs_destroy: |
1664 | be_rx_queues_destroy(adapter); | 1664 | be_rx_queues_destroy(adapter); |
1665 | tx_qs_destroy: | 1665 | tx_qs_destroy: |