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: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Somnath Kotur 2013-03-14 02:41:51 +00:00 committed by David S. Miller
parent 764444f5a3
commit 8cef7a7892
1 changed files with 10 additions and 11 deletions

View File

@ -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)