aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajitk@serverengines.com>2009-11-05 21:06:59 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-06 23:26:03 -0500
commit9e90c961134929678022aee0c68b16c1ed520614 (patch)
treefee2dad0fcbfe8e5168edf9a394ecfa8061cc386 /drivers/net/benet/be_main.c
parentbb7b22840141a4fab8f232ee90d30cdf728bb032 (diff)
be2net: fix to set proper flow control on resume
If be2 goes into suspend after a user changes the flow control settings, we are not programming them back after resume. This patch takes care of it. We now get the flow control settings before going to suspend mode and then apply them during resume. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r--drivers/net/benet/be_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 1f941f027718..4a7a4527182d 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1652,7 +1652,8 @@ static int be_setup(struct be_adapter *adapter)
1652 if (status != 0) 1652 if (status != 0)
1653 goto mccqs_destroy; 1653 goto mccqs_destroy;
1654 1654
1655 status = be_cmd_set_flow_control(adapter, true, true); 1655 status = be_cmd_set_flow_control(adapter,
1656 adapter->tx_fc, adapter->rx_fc);
1656 if (status != 0) 1657 if (status != 0)
1657 goto mccqs_destroy; 1658 goto mccqs_destroy;
1658 return 0; 1659 return 0;
@@ -1909,6 +1910,10 @@ static void be_netdev_init(struct net_device *netdev)
1909 1910
1910 adapter->rx_csum = true; 1911 adapter->rx_csum = true;
1911 1912
1913 /* Default settings for Rx and Tx flow control */
1914 adapter->rx_fc = true;
1915 adapter->tx_fc = true;
1916
1912 netif_set_gso_max_size(netdev, 65535); 1917 netif_set_gso_max_size(netdev, 65535);
1913 1918
1914 BE_SET_NETDEV_OPS(netdev, &be_netdev_ops); 1919 BE_SET_NETDEV_OPS(netdev, &be_netdev_ops);
@@ -2171,6 +2176,7 @@ static int be_suspend(struct pci_dev *pdev, pm_message_t state)
2171 be_close(netdev); 2176 be_close(netdev);
2172 rtnl_unlock(); 2177 rtnl_unlock();
2173 } 2178 }
2179 be_cmd_get_flow_control(adapter, &adapter->tx_fc, &adapter->rx_fc);
2174 be_clear(adapter); 2180 be_clear(adapter);
2175 2181
2176 pci_save_state(pdev); 2182 pci_save_state(pdev);