From patchwork Tue Aug 6 10:38:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keerthy X-Patchwork-Id: 1142697 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="jjCGfY9A"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 462rl82NjFz9s7T for ; Tue, 6 Aug 2019 20:40:52 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D8B14C21DB6; Tue, 6 Aug 2019 10:38:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6AD76C21E30; Tue, 6 Aug 2019 10:38:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 89BFDC21E18; Tue, 6 Aug 2019 10:38:32 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lists.denx.de (Postfix) with ESMTPS id 82061C21DFB for ; Tue, 6 Aug 2019 10:38:29 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x76AcRUL112838; Tue, 6 Aug 2019 05:38:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565087907; bh=1nFaxUJcvCq5oLhe+SdUt26R0D9X53uP/NBDv4d9kFE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jjCGfY9Aq2C0oh+MfJZWR4QT/zmr7HVHqTnxh70hiS0EvUK+EWj77EpQXFeHL8jM8 hw2t7qmOAayhs1co2hQIy9WgMA0n3oPyfpzhZVElQQtljnWirbmjsCsrP4VjnoU2lw +tsF0KwtaYdoyhHd+QdcJ4yMTJg/r5qucjNo9UT8= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x76AcRvp123891 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Aug 2019 05:38:27 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 6 Aug 2019 05:38:27 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 6 Aug 2019 05:38:27 -0500 Received: from a0393675ula.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x76AcKvB013727; Tue, 6 Aug 2019 05:38:24 -0500 From: Keerthy To: , , , Date: Tue, 6 Aug 2019 16:08:31 +0530 Message-ID: <20190806103844.25277-2-j-keerthy@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190806103844.25277-1-j-keerthy@ti.com> References: <20190806103844.25277-1-j-keerthy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: t-kristo@ti.com, u-boot@lists.denx.de, rogerq@ti.com Subject: [U-Boot] [PATCH 01/14] net: eth-uclass: eth_get_dev based on SEQ_ALIAS instead of probe order X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In case of multiple eth interfaces currently eth_get_dev fetches the device based on the probe order which can be random hence try with the alias. Signed-off-by: Keerthy --- net/eth-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 031d558625..f11c307b8c 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -68,8 +68,8 @@ struct udevice *eth_get_dev(void) uc_priv = eth_get_uclass_priv(); if (!uc_priv->current) - eth_errno = uclass_first_device(UCLASS_ETH, - &uc_priv->current); + eth_errno = uclass_get_device_by_seq(UCLASS_ETH, + 0, &uc_priv->current); return uc_priv->current; }