aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-4.4/001-4.15-10-bcm63xx_enet-do-not-rely-on-probe-order.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm63xx/patches-4.4/001-4.15-10-bcm63xx_enet-do-not-rely-on-probe-order.patch')
-rw-r--r--target/linux/brcm63xx/patches-4.4/001-4.15-10-bcm63xx_enet-do-not-rely-on-probe-order.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-4.4/001-4.15-10-bcm63xx_enet-do-not-rely-on-probe-order.patch b/target/linux/brcm63xx/patches-4.4/001-4.15-10-bcm63xx_enet-do-not-rely-on-probe-order.patch
new file mode 100644
index 0000000000..b14dedcd76
--- /dev/null
+++ b/target/linux/brcm63xx/patches-4.4/001-4.15-10-bcm63xx_enet-do-not-rely-on-probe-order.patch
@@ -0,0 +1,41 @@
+From 71710bb6cbc82f411a4e5faafa0c3178e48e7137 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Tue, 30 May 2017 13:31:45 +0200
+Subject: [PATCH 3/6] bcm63xx_enet: do not rely on probe order
+
+Do not rely on the shared device being probed before the enet(sw)
+devices. This makes it easier to eventually move out the shared
+device as a dma controller driver (what it should be).
+
+Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
+---
+ drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+@@ -1736,10 +1736,8 @@ static int bcm_enet_probe(struct platfor
+ const char *clk_name;
+ int i, ret;
+
+- /* stop if shared driver failed, assume driver->probe will be
+- * called in the same order we register devices (correct ?) */
+ if (!bcm_enet_shared_base[0])
+- return -ENODEV;
++ return -EPROBE_DEFER;
+
+ res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+ res_irq_rx = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
+@@ -2720,11 +2718,8 @@ static int bcm_enetsw_probe(struct platf
+ struct resource *res_mem;
+ int ret, irq_rx, irq_tx;
+
+- /* stop if shared driver failed, assume driver->probe will be
+- * called in the same order we register devices (correct ?)
+- */
+ if (!bcm_enet_shared_base[0])
+- return -ENODEV;
++ return -EPROBE_DEFER;
+
+ res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ irq_rx = platform_get_irq(pdev, 0);