summaryrefslogtreecommitdiffstats
path: root/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0008-Revert-PCI-rcar-pcie-Add-bus-notifier-so-we-can-limi.patch
blob: 83f5cbbb8c0f93c5223f1fd2a412128d80b8f0bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From d01c738d46c186bd58b9314d348e5897ef1fd344 Mon Sep 17 00:00:00 2001
From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Date: Sun, 24 Jun 2018 17:56:22 +0300
Subject: [PATCH 005/122] Revert "PCI: rcar-pcie: Add bus notifier so we can
 limit the dma range"

This reverts commit 56c039c504f32e68e2e8decbf01ea34d7f7ee03e.

Resetting dma_mask this way is racy. If driver configures 64-bit
dma_mask in it's probe method and then immediately issues I/O, this
will be handled with dma_mask set to 64-bit.

Thus different workaround is needed, and this workaround must be
reverted.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/pci/host/pcie-rcar.c | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 3679e8e..46b2622 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -1377,31 +1377,3 @@ static struct platform_driver rcar_pcie_driver = {
 	.probe = rcar_pcie_probe,
 };
 builtin_platform_driver(rcar_pcie_driver);
-
-static int rcar_pcie_pci_notifier(struct notifier_block *nb,
-				  unsigned long action, void *data)
-{
-	struct device *dev = data;
-
-	switch (action) {
-	case BUS_NOTIFY_BOUND_DRIVER:
-		/* Force the DMA mask to lower 32-bits */
-		dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
-		break;
-	default:
-		return NOTIFY_DONE;
-	}
-
-	return NOTIFY_OK;
-}
-
-static struct notifier_block device_nb = {
-	.notifier_call = rcar_pcie_pci_notifier,
-};
-
-static int __init register_rcar_pcie_pci_notifier(void)
-{
-	return bus_register_notifier(&pci_bus_type, &device_nb);
-}
-
-arch_initcall(register_rcar_pcie_pci_notifier);
-- 
2.7.4