From patchwork Sun Oct 1 11:02:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 9979677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D0DA860365 for ; Sun, 1 Oct 2017 11:04:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C464928864 for ; Sun, 1 Oct 2017 11:04:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7BE928A28; Sun, 1 Oct 2017 11:04:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5897528864 for ; Sun, 1 Oct 2017 11:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=GXuo5Ju/D3/IWtPLaagSMMCepgnAbiK+wLaj/NxpgCE=; b=qiJ8rSv7+xI4E5itDLKcYTWHy0 9ha0LwjTohnaaUISrjJdGq6nuYCXqCRId4NKtyHwyCkFXekCoxaOtofeZ+5LNZlWvOO56cMGoRsu6 Al3Knv1XkglRwfS2CLxv+jwDgCNi02U3XM0nsyOCyGNaBoBkzSIR7nszSXqvO6vXhU0f8ReSa0css VCj5cELh73NpB3B6yW4q0uLFjxE8g0NVEJIXDoqgx9Ag6lFPB4Dn1sx67C4U1nt1zWk3JUAD8MeTb kdIGh74fZiVHFQGT6LMWtIyWNQhVDS4TESwXjBpPTIawVhxWGngnp/J6us/lGNNdkABbGZuMfGwpA d+OBfzwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dyc2s-0006c7-Ae; Sun, 01 Oct 2017 11:04:26 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dyc16-0004vd-4y for linux-arm-kernel@lists.infradead.org; Sun, 01 Oct 2017 11:02:38 +0000 Received: by mail-wm0-x241.google.com with SMTP id q124so1865924wmb.5 for ; Sun, 01 Oct 2017 04:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w2shvzZ+50QHflkjbJliyKDfvnKUNYnWp2VTvE+0OrY=; b=FkjVylYY7T4sWx4ChQZvoy4x+jKl00EbxJsR+npvq+rfPMFDPchLCMIAPAkdrHpDpt FKcj78W722TRaMJ6B1I52Bj9D02FdOwBudu84Eqlt2MHGKzkfAj8WsZoY6idh+ehO/sN uevAvv3HSBbLtA7qcuVUlw3WTGa44P7/JtZiKZG6sdhltAI18C7KwF4O/hyjBVwStqB6 drmwi0pPkhdetx/9ZZm4+qfgIRbXQ5xgDzwg7egDs/PeouNP3d9FzMAiAIigpEoMsoW8 ldsdJxgKYuoRGlP3CS2BKZlUEb3Lh0iAGFah54V2eV0sEeCqu7Kw7QPrOLZJ0MrMrBGG kzMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w2shvzZ+50QHflkjbJliyKDfvnKUNYnWp2VTvE+0OrY=; b=sVJZxf9Cj9KC/VWnV4z9RWkn2mM0c2W2rYyoUlGkB07zxZWcnj99YFY4wugPwaPFwU J6Q6ixVQug1ta20V3+/9sAX+wBqJ/5PK1LQ3JqQGYaSpwO28oCqxdnEmk+MARNifLdZy AarJeA2b874QhKd+jIQLoEdVcDFsJTGC9eoHevihj8k4Xo98YLWwsOfMYYHHDghB92qO f6CDvbBFquI5zYiTWP4cgv3w3xylvlBEZS1N3PIN201p27IwJTD0F3vvjFr+ZcyWweHU a+6cBhN+hgjXQCoXvJgey/9hjgx3PXuwEWivoO+ngI4TQ1spsmPW9zV6mm8QUJoxNL4G L8Yw== X-Gm-Message-State: AHPjjUiKBmEiobwWO3o8n2oJ0DQzifO5te7IdwdfwqubKYtQVytiWEkY T047qNEvvQKrl9Sm8RA+QWk= X-Google-Smtp-Source: AOwi7QDvB3eiJPMWS1bSPqTqYKdE5QitQlWkwFcAfdacHHfy3Lk4GHBUMgC9lVZKvJ6fzMyUgRQotw== X-Received: by 10.80.181.59 with SMTP id y56mr16653301edd.140.1506855734254; Sun, 01 Oct 2017 04:02:14 -0700 (PDT) Received: from localhost.localdomain ([2001:470:9e39::48e]) by smtp.gmail.com with ESMTPSA id 26sm7404270eds.5.2017.10.01.04.02.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Oct 2017 04:02:13 -0700 (PDT) From: Jonas Gorski To: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.or Subject: [PATCH 3/6] bcm63xx_enet: do not rely on probe order Date: Sun, 1 Oct 2017 13:02:17 +0200 Message-Id: <20171001110220.27668-4-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20171001110220.27668-1-jonas.gorski@gmail.com> References: <20171001110220.27668-1-jonas.gorski@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171001_040236_404762_2EA6AA64 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, "David S. Miller" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 ++------- 1 file 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);