aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2019-10-25 14:27:31 -0700
committerJohn Crispin <john@phrozen.org>2019-10-27 12:13:59 +0100
commitd3d06f150044e65f6c82d5f41bbd5b4d65881573 (patch)
tree1e524ef6eaf34330d72670aeac526211be73519b /target/linux
parent1abb473cea01a53668d1bd0db14ba553740b62ea (diff)
downloadupstream-d3d06f150044e65f6c82d5f41bbd5b4d65881573.tar.gz
upstream-d3d06f150044e65f6c82d5f41bbd5b4d65881573.tar.bz2
upstream-d3d06f150044e65f6c82d5f41bbd5b4d65881573.zip
octeontx: fix thunderx BGX underflow irq name
request_irq requires irq names to be static/allocated and not on the stack Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch15
1 files changed, 11 insertions, 4 deletions
diff --git a/target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch b/target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
index ef7aef3a8a..5743745d85 100644
--- a/target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
+++ b/target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
@@ -15,7 +15,15 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
-@@ -1344,6 +1344,54 @@ static int bgx_init_phy(struct bgx *bgx)
+@@ -56,6 +56,7 @@ struct bgx {
+ bool is_dlm;
+ bool is_rgx;
+ int phy_mode;
++ char irq_name[7];
+ };
+
+ static struct bgx *bgx_vnic[MAX_BGX_THUNDER];
+@@ -1344,6 +1345,53 @@ static int bgx_init_phy(struct bgx *bgx)
return bgx_init_of_phy(bgx);
}
@@ -49,7 +57,6 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
+ struct bgx *bgx = pci_get_drvdata(pdev);
+ struct device *dev = &pdev->dev;
+ int num_vec, ret;
-+ char irq_name[32];
+
+ /* Enable MSI-X */
+ num_vec = pci_msix_vec_count(pdev);
@@ -58,9 +65,9 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
+ dev_err(dev, "Req for #%d msix vectors failed\n", num_vec);
+ return 1;
+ }
-+ sprintf(irq_name, "BGX%d", bgx->bgx_id);
++ sprintf(bgx->irq_name, "BGX%d", bgx->bgx_id);
+ ret = request_irq(pci_irq_vector(pdev, GMPX_GMI_TX_INT),
-+ bgx_intr_handler, 0, irq_name, bgx);
++ bgx_intr_handler, 0, bgx->irq_name, bgx);
+ if (ret)
+ return 1;
+