Commit 8cef7a78 authored by Somnath Kotur's avatar Somnath Kotur Committed by David S. Miller

be2net: enable interrupts in be_probe() (RoCE and other ULPs need them)

As the NIC PCI function may be used by other protocols, the chip interrupts
must be enabled in be_probe() itself rather than be_open().
Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 764444f5
......@@ -157,6 +157,10 @@ static void be_intr_set(struct be_adapter *adapter, bool enable)
{
u32 reg, enabled;
/* On lancer interrupts can't be controlled via this register */
if (lancer_chip(adapter))
return;
if (adapter->eeh_error)
return;
......@@ -2435,9 +2439,6 @@ static int be_close(struct net_device *netdev)
be_roce_dev_close(adapter);
if (!lancer_chip(adapter))
be_intr_set(adapter, false);
for_all_evt_queues(adapter, eqo, i)
napi_disable(&eqo->napi);
......@@ -2525,9 +2526,6 @@ static int be_open(struct net_device *netdev)
be_irq_register(adapter);
if (!lancer_chip(adapter))
be_intr_set(adapter, true);
for_all_rx_queues(adapter, rxo, i)
be_cq_notify(adapter, rxo->cq.id, true, 0);
......@@ -3853,6 +3851,7 @@ static void be_remove(struct pci_dev *pdev)
return;
be_roce_dev_remove(adapter);
be_intr_set(adapter, false);
cancel_delayed_work_sync(&adapter->func_recovery_work);
......@@ -4142,11 +4141,11 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
goto ctrl_clean;
}
/* The INTR bit may be set in the card when probed by a kdump kernel
* after a crash.
*/
if (!lancer_chip(adapter))
be_intr_set(adapter, false);
/* Wait for interrupts to quiesce after an FLR */
msleep(100);
/* Allow interrupts for other ULPs running on NIC function */
be_intr_set(adapter, true);
status = be_stats_init(adapter);
if (status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment