diff options
author | Thomas Falcon <tlfalcon@linux.vnet.ibm.com> | 2017-06-29 03:55:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-29 22:40:59 +0300 |
commit | 5df969c3b0c6df03d72e0e7502c4adc7838442f9 (patch) | |
tree | 229d5f20a1f0cfba2647298f3f5abf5badc1e105 /drivers/net/ethernet/ibm | |
parent | 4f75ba6982bc7e37e7738b2f1257d21a9c9e5d31 (diff) | |
download | linux-5df969c3b0c6df03d72e0e7502c4adc7838442f9.tar.xz |
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: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 87db1eb5cc44..a3e694679635 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -763,12 +763,6 @@ static int init_resources(struct ibmvnic_adapter *adapter) if (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); if (rc) return rc; @@ -1803,7 +1797,6 @@ static int reset_sub_crq_queues(struct ibmvnic_adapter *adapter) return rc; } - rc = init_sub_crq_irqs(adapter); return rc; } @@ -3669,6 +3662,13 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter) if (rc) { dev_err(dev, "Initialization of sub crqs failed\n"); 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; |