Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp266301imd; Wed, 31 Oct 2018 18:49:47 -0700 (PDT) X-Google-Smtp-Source: AJdET5d9JvLNyHa44/no3Q2g5JbceRkVoQMHuzd86IPrRK9Q4plH5LepmGw4+xeQEJ0cepk9wkYt X-Received: by 2002:a17:902:82ca:: with SMTP id u10-v6mr5524265plz.146.1541036987853; Wed, 31 Oct 2018 18:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541036987; cv=none; d=google.com; s=arc-20160816; b=hwQ3gdFE/arC2uEcUijtfX8LzdfydQeJ1GXrsKOjoDmeim6GL2PhjMSAKpJSLfHnth +b5fNzdOgf2JGR3JF9sd3NeF2G5XjIW2LhWDTayFs4NE3iz4DmjgWDy4naCA8YgA+3UU NkTQipLULMg3plGw5mD3LxRgqgdc+J+WjVIxDmDzhV5vRMqf56K//uBSsR/K2b0lB3cB XU+1Wi6WQHfV95I2e8TH9zIphz5ORR5I10P0ESf55X3RztAfl9g8xagNffctzteLH8AZ CQ5MKInZj81a9kF2++U0pF1jDa3+ZLED/x25EzEdjjRVxqXLReic7R/SSDqaCLWaqI54 E+uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=he7icsUua0PTOG2bgl87mkCSahy6MP3kjtacB7c4OkA=; b=d9C+Vou3iKK2KYjfs0cQmm++aebP9XlqFYXKXE+LrctpHmJfIFanwCmmgwbrzUpHDt S3NOColI6sldCjRWfnI3lbnwdmDG+JtBYuO6NUXwsyT2kVEZGr5RRmU5ggz0pKPwUq+P V5MewBWgt8P7K4PZd7yk7OVEjJEpMSx8zQvPiKMHIFfXdAiD/CnJj4ioW42kuisIaoU5 Qz41mFUPCez15hKdje8ZhvhkyWD53GnxwsjmGgsu/iYhe2WrlD2ZhWnMKZfIOLi9vLBU UGwxBmBihQGJPuxIkD3luUkSPAMk9ispUlAlPArF5N+hnyDuuGkMa2pmaHVs3zHzxJ8R jIkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v82-v6si10290628pfk.264.2018.10.31.18.49.33; Wed, 31 Oct 2018 18:49:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726840AbeKAKhQ (ORCPT + 99 others); Thu, 1 Nov 2018 06:37:16 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:57740 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbeKAKhP (ORCPT ); Thu, 1 Nov 2018 06:37:15 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 1FC7C14712FCD; Wed, 31 Oct 2018 18:36:29 -0700 (PDT) Date: Wed, 31 Oct 2018 18:36:28 -0700 (PDT) Message-Id: <20181031.183628.2259691990575006225.davem@davemloft.net> To: niklas.cassel@linaro.org Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, vkoul@kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules From: David Miller In-Reply-To: <20181031150810.16665-1-niklas.cassel@linaro.org> References: <20181031150810.16665-1-niklas.cassel@linaro.org> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 31 Oct 2018 18:36:29 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Cassel Date: Wed, 31 Oct 2018 16:08:10 +0100 > When building stmmac, it is only possible to select CONFIG_DWMAC_GENERIC, > or any of the glue drivers, when CONFIG_STMMAC_PLATFORM is set. > The only exception is CONFIG_STMMAC_PCI. > > When calling of_mdiobus_register(), it will call our ->reset() > callback, which is set to stmmac_mdio_reset(). > > Most of the code in stmmac_mdio_reset() is protected by a > "#if defined(CONFIG_STMMAC_PLATFORM)", which will evaluate > to false when CONFIG_STMMAC_PLATFORM=m. > > Because of this, the phy reset gpio will only be pulled when > stmmac is built as built-in, but not when built as modules. > > Fix this by using "#if IS_ENABLED()" instead of "#if defined()". > > Signed-off-by: Niklas Cassel Applied and queued up for -stable, thanks.