]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.51/misc-pci_endpoint_test-fix-test_reg_bar-to-be-update.patch
Linux 4.19.51
[thirdparty/kernel/stable-queue.git] / releases / 4.19.51 / misc-pci_endpoint_test-fix-test_reg_bar-to-be-update.patch
CommitLineData
37554d48
SL
1From ec9de213cc99aa5698526d08666bd1256ba16124 Mon Sep 17 00:00:00 2001
2From: Kishon Vijay Abraham I <kishon@ti.com>
3Date: Mon, 25 Mar 2019 15:09:47 +0530
4Subject: misc: pci_endpoint_test: Fix test_reg_bar to be updated in
5 pci_endpoint_test
6
7[ Upstream commit 8f220664570e755946db1282f48e07f26e1f2cb4 ]
8
9commit 834b90519925 ("misc: pci_endpoint_test: Add support for
10PCI_ENDPOINT_TEST regs to be mapped to any BAR") while adding
11test_reg_bar in order to map PCI_ENDPOINT_TEST regs to be mapped to any
12BAR failed to update test_reg_bar in pci_endpoint_test, resulting in
13test_reg_bar having invalid value when used outside probe.
14
15Fix it.
16
17Fixes: 834b90519925 ("misc: pci_endpoint_test: Add support for PCI_ENDPOINT_TEST regs to be mapped to any BAR")
18Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
19Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
20Signed-off-by: Sasha Levin <sashal@kernel.org>
21---
22 drivers/misc/pci_endpoint_test.c | 1 +
23 1 file changed, 1 insertion(+)
24
25diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
26index 896e2df9400f..fd33a3b9c66f 100644
27--- a/drivers/misc/pci_endpoint_test.c
28+++ b/drivers/misc/pci_endpoint_test.c
29@@ -662,6 +662,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
30 data = (struct pci_endpoint_test_data *)ent->driver_data;
31 if (data) {
32 test_reg_bar = data->test_reg_bar;
33+ test->test_reg_bar = test_reg_bar;
34 test->alignment = data->alignment;
35 irq_type = data->irq_type;
36 }
37--
382.20.1
39