Commit 5df969c3 authored by Thomas Falcon's avatar Thomas Falcon Committed by David S. Miller

ibmvnic: Fix assignment of RX/TX IRQ's

The driver currently creates RX/TX queues during device probe, but
assigns IRQ's to them during device open. On reset, however,
IRQ's are assigned when resetting the queues. If there is a reset
while the device is closed and the device is later opened, the driver will
request IRQ's twice, causing the open to fail. This patch assigns
the IRQ's in the ibmvnic_init function after the queues are reset or
initialized, ensuring IRQ's are only requested once.
Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4f75ba69
...@@ -763,12 +763,6 @@ static int init_resources(struct ibmvnic_adapter *adapter) ...@@ -763,12 +763,6 @@ static int init_resources(struct ibmvnic_adapter *adapter)
if (rc) if (rc)
return rc; return rc;
rc = init_sub_crq_irqs(adapter);
if (rc) {
netdev_err(netdev, "failed to initialize sub crq irqs\n");
return -1;
}
rc = init_stats_token(adapter); rc = init_stats_token(adapter);
if (rc) if (rc)
return rc; return rc;
...@@ -1803,7 +1797,6 @@ static int reset_sub_crq_queues(struct ibmvnic_adapter *adapter) ...@@ -1803,7 +1797,6 @@ static int reset_sub_crq_queues(struct ibmvnic_adapter *adapter)
return rc; return rc;
} }
rc = init_sub_crq_irqs(adapter);
return rc; return rc;
} }
...@@ -3669,6 +3662,13 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter) ...@@ -3669,6 +3662,13 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter)
if (rc) { if (rc) {
dev_err(dev, "Initialization of sub crqs failed\n"); dev_err(dev, "Initialization of sub crqs failed\n");
release_crq_queue(adapter); release_crq_queue(adapter);
return rc;
}
rc = init_sub_crq_irqs(adapter);
if (rc) {
dev_err(dev, "Failed to initialize sub crq irqs\n");
release_crq_queue(adapter);
} }
return rc; return rc;
......
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