summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_ctx.c
diff options
context:
space:
mode:
authorRajesh Borundia <rajesh.borundia@qlogic.com>2010-11-23 02:25:21 +0100
committerDavid S. Miller <davem@davemloft.net>2010-11-28 19:47:16 +0100
commitb0044bcfa95ddf2e317863fb29121c284b6725ca (patch)
treeced7b7d4d06ab51fa3bcdfe19a5191e380e85e52 /drivers/net/qlcnic/qlcnic_ctx.c
parentsctp: kill unused macro definition (diff)
downloadlinux-b0044bcfa95ddf2e317863fb29121c284b6725ca.tar.xz
linux-b0044bcfa95ddf2e317863fb29121c284b6725ca.zip
qlcnic: avoid using reset_devices as it may become obsolete.
In kdump environment do not depend upon reset_devices parameter to reset the pci function as this parameter may become obsolete. Instead use an adapter specific mechanism to determine if the pci function needs to be reset. Per function refcount is maintained in driver, which is set in probe and reset in remove handler of adapter. If the probe detects the count as non zero then reset the function. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_ctx.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_ctx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c
index 3ad1f3eba289..29cbc2a6e79f 100644
--- a/drivers/net/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/qlcnic/qlcnic_ctx.c
@@ -480,8 +480,10 @@ int qlcnic_fw_create_ctx(struct qlcnic_adapter *adapter)
{
int err;
- if (reset_devices)
+ if (adapter->flags & QLCNIC_NEED_FLR) {
pci_reset_function(adapter->pdev);
+ adapter->flags &= ~QLCNIC_NEED_FLR;
+ }
err = qlcnic_fw_cmd_create_rx_ctx(adapter);
if (err)