summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bcm63xx_enet.c
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2017-10-01 14:02:17 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-02 09:05:10 +0300
commit527a48713b01057d94aeec8f4383b1e20c82522c (patch)
tree5b9521fbe6208f0ce144a393738798e393d8ef40 /drivers/net/ethernet/broadcom/bcm63xx_enet.c
parentd6213c1f2ad54a964b77471690264ed685718928 (diff)
downloadlinux-527a48713b01057d94aeec8f4383b1e20c82522c.tar.xz
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bcm63xx_enet.c')
-rw-r--r--drivers/net/ethernet/broadcom/bcm63xx_enet.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index a1e1e12e187a..8caf6abab3a6 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1722,10 +1722,8 @@ static int bcm_enet_probe(struct platform_device *pdev)
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);
@@ -2696,11 +2694,8 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
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);