Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-06-10 12:55:00 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-06-10 12:56:11 +0200
commitb30515c1ab6c2f4002c4303af2e12866701c11c9 (patch)
tree2f8f0480aade861f1b2d921e618928951786eb33
parent5c02fc174c30ae79b6f5b00605a0b9ffbfe91a9d (diff)
ibmvnic: Add device identification to requested IRQs
(bsc#1137739).
-rw-r--r--patches.drivers/ibmvnic-Add-device-identification-to-requested-IRQs.patch92
-rw-r--r--series.conf1
2 files changed, 93 insertions, 0 deletions
diff --git a/patches.drivers/ibmvnic-Add-device-identification-to-requested-IRQs.patch b/patches.drivers/ibmvnic-Add-device-identification-to-requested-IRQs.patch
new file mode 100644
index 0000000000..0010244495
--- /dev/null
+++ b/patches.drivers/ibmvnic-Add-device-identification-to-requested-IRQs.patch
@@ -0,0 +1,92 @@
+From e56e2515669af9f2444228db39699d02c5a4989a Mon Sep 17 00:00:00 2001
+From: Murilo Fossa Vicentini <muvic@linux.ibm.com>
+Date: Thu, 25 Apr 2019 11:02:33 -0300
+Subject: [PATCH] ibmvnic: Add device identification to requested IRQs
+
+References: bsc#1137739
+Patch-mainline: v5.2-rc1
+Git-commit: e56e2515669af9f2444228db39699d02c5a4989a
+
+The ibmvnic driver currently uses the same fixed name when using
+request_irq, this makes it hard to parse when multiple VNIC devices are
+available at the same time. This patch adds the unit_address as the device
+identification along with an id for each queue.
+
+The original idea was to use the interface name as an identifier, but it
+is not feasible given these requests happen at adapter probe, and at this
+point netdev is not yet registered so it doesn't have the proper name
+assigned to it.
+
+Signed-off-by: Murilo Fossa Vicentini <muvic@linux.ibm.com>
+Reviewed-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
+Reviewed-by: Thomas Falcon <tlfalcon@linux.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 13 +++++++++----
+ drivers/net/ethernet/ibm/ibmvnic.h | 2 ++
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index 5e3cdb0b46d5..b398d6c94dbd 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -2919,8 +2919,10 @@ static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter)
+ goto req_tx_irq_failed;
+ }
+
++ snprintf(scrq->name, sizeof(scrq->name), "ibmvnic-%x-tx%d",
++ adapter->vdev->unit_address, i);
+ rc = request_irq(scrq->irq, ibmvnic_interrupt_tx,
+- 0, "ibmvnic_tx", scrq);
++ 0, scrq->name, scrq);
+
+ if (rc) {
+ dev_err(dev, "Couldn't register tx irq 0x%x. rc=%d\n",
+@@ -2940,8 +2942,10 @@ static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter)
+ dev_err(dev, "Error mapping irq\n");
+ goto req_rx_irq_failed;
+ }
++ snprintf(scrq->name, sizeof(scrq->name), "ibmvnic-%x-rx%d",
++ adapter->vdev->unit_address, i);
+ rc = request_irq(scrq->irq, ibmvnic_interrupt_rx,
+- 0, "ibmvnic_rx", scrq);
++ 0, scrq->name, scrq);
+ if (rc) {
+ dev_err(dev, "Couldn't register rx irq 0x%x. rc=%d\n",
+ scrq->irq, rc);
+@@ -4667,8 +4671,9 @@ static int init_crq_queue(struct ibmvnic_adapter *adapter)
+ (unsigned long)adapter);
+
+ netdev_dbg(adapter->netdev, "registering irq 0x%x\n", vdev->irq);
+- rc = request_irq(vdev->irq, ibmvnic_interrupt, 0, IBMVNIC_NAME,
+- adapter);
++ snprintf(crq->name, sizeof(crq->name), "ibmvnic-%x",
++ adapter->vdev->unit_address);
++ rc = request_irq(vdev->irq, ibmvnic_interrupt, 0, crq->name, adapter);
+ if (rc) {
+ dev_err(dev, "Couldn't register irq 0x%x. rc=%d\n",
+ vdev->irq, rc);
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
+index d5260a206708..cffdac372a33 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.h
++++ b/drivers/net/ethernet/ibm/ibmvnic.h
+@@ -855,6 +855,7 @@ struct ibmvnic_crq_queue {
+ dma_addr_t msg_token;
+ spinlock_t lock;
+ bool active;
++ char name[32];
+ };
+
+ union sub_crq {
+@@ -881,6 +882,7 @@ struct ibmvnic_sub_crq_queue {
+ struct sk_buff *rx_skb_top;
+ struct ibmvnic_adapter *adapter;
+ atomic_t used;
++ char name[32];
+ };
+
+ struct ibmvnic_long_term_buff {
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 9f8d68a396..c684b10e0d 100644
--- a/series.conf
+++ b/series.conf
@@ -22103,6 +22103,7 @@
patches.drivers/mwifiex-Fix-mem-leak-in-mwifiex_tm_cmd.patch
patches.drivers/Bluetooth-hidp-fix-buffer-overflow.patch
patches.drivers/Bluetooth-Align-minimum-encryption-key-size-for-LE-a.patch
+ patches.drivers/ibmvnic-Add-device-identification-to-requested-IRQs.patch
patches.drivers/ssb-Fix-possible-NULL-pointer-dereference-in-ssb_hos.patch
patches.drivers/mwifiex-prevent-an-array-overflow.patch
patches.drivers/at76c50x-usb-Don-t-register-led_trigger-if-usb_regis.patch