From b0044bcfa95ddf2e317863fb29121c284b6725ca Mon Sep 17 00:00:00 2001 From: Rajesh Borundia Date: Tue, 23 Nov 2010 01:25:21 +0000 Subject: 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 Signed-off-by: Amit Kumar Salecha Signed-off-by: David S. Miller --- drivers/net/qlcnic/qlcnic_main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/net/qlcnic/qlcnic_main.c') diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index a3dcd04be22f..899df5a81fda 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -1485,6 +1485,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) uint8_t revision_id; uint8_t pci_using_dac; char brd_name[QLCNIC_MAX_BOARD_NAME_LEN]; + u32 val; err = pci_enable_device(pdev); if (err) @@ -1546,6 +1547,10 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (err) goto err_out_iounmap; + val = QLCRD32(adapter, QLCNIC_CRB_DRV_ACTIVE); + if (QLC_DEV_CHECK_ACTIVE(val, adapter->portnum)) + adapter->flags |= QLCNIC_NEED_FLR; + err = adapter->nic_ops->start_firmware(adapter); if (err) { dev_err(&pdev->dev, "Loading fw failed.Please Reboot\n"); -- cgit v1.2.2