Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AF89C25B08 for ; Thu, 18 Aug 2022 02:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240728AbiHRC33 (ORCPT ); Wed, 17 Aug 2022 22:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239403AbiHRC32 (ORCPT ); Wed, 17 Aug 2022 22:29:28 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37974DB04 for ; Wed, 17 Aug 2022 19:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=3Q3HE+D5YQ4YxJbHPiJRwAI28kmD0AtZkeVh5fzzryg=; b=gHPrvRBavCgtxv+1Q28ubdgds7 O229kVw8iRoS8yCpQ+Zv68nAXknenmpMUDpkPElBVdcZjoLxUFPifF0lsezAixUGpdTKTnMrD7E/M N/JIySc5RDy8bEUlLikJh2FZHI60SU2Cn4RTP8MIQHUDVbS3hMdrc2cY1r3jl6BDYZzQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oOVHc-00DhDw-OV; Thu, 18 Aug 2022 04:29:20 +0200 Date: Thu, 18 Aug 2022 04:29:20 +0200 From: Andrew Lunn To: Sergei Antonov Cc: netdev@vger.kernel.org, Jakub Kicinski , Vladimir Oltean , Yang Yingliang , Pavel Skripkin , Yang Wei , Christophe JAILLET Subject: Re: [PATCH] net: moxa: MAC address reading, generating, validity checking Message-ID: References: <20220817171043.459267-1-saproj@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220817171043.459267-1-saproj@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > @@ -539,6 +533,11 @@ static int moxart_mac_probe(struct platform_device *pdev) > > SET_NETDEV_DEV(ndev, &pdev->dev); > > + ret = platform_get_ethdev_address(p_dev, ndev); > + if (ret) > + eth_hw_addr_random(ndev); You should look at the return value. It could be EPROBE_DEFFER, because the EEPROM has not probed yet. You need to return this value, so that the device core will probe other devices, including the EEPROM, and then later reprobe this driver. Andrew