]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/misc-pci_endpoint_test-fix-test_reg_bar-to-be-update.patch
5251c425d25929be6f506643fd00201f31560f37
[thirdparty/kernel/stable-queue.git] / queue-4.19 / misc-pci_endpoint_test-fix-test_reg_bar-to-be-update.patch
1 From ec9de213cc99aa5698526d08666bd1256ba16124 Mon Sep 17 00:00:00 2001
2 From: Kishon Vijay Abraham I <kishon@ti.com>
3 Date: Mon, 25 Mar 2019 15:09:47 +0530
4 Subject: misc: pci_endpoint_test: Fix test_reg_bar to be updated in
5 pci_endpoint_test
6
7 [ Upstream commit 8f220664570e755946db1282f48e07f26e1f2cb4 ]
8
9 commit 834b90519925 ("misc: pci_endpoint_test: Add support for
10 PCI_ENDPOINT_TEST regs to be mapped to any BAR") while adding
11 test_reg_bar in order to map PCI_ENDPOINT_TEST regs to be mapped to any
12 BAR failed to update test_reg_bar in pci_endpoint_test, resulting in
13 test_reg_bar having invalid value when used outside probe.
14
15 Fix it.
16
17 Fixes: 834b90519925 ("misc: pci_endpoint_test: Add support for PCI_ENDPOINT_TEST regs to be mapped to any BAR")
18 Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
19 Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
20 Signed-off-by: Sasha Levin <sashal@kernel.org>
21 ---
22 drivers/misc/pci_endpoint_test.c | 1 +
23 1 file changed, 1 insertion(+)
24
25 diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
26 index 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 --
38 2.20.1
39