Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752433AbbKIOJn (ORCPT ); Mon, 9 Nov 2015 09:09:43 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:58847 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751616AbbKIOJl (ORCPT ); Mon, 9 Nov 2015 09:09:41 -0500 From: Arnd Bergmann To: netdev@vger.kernel.org Cc: Stas Sergeev , "David S. Miller" , Florian Fainelli , Thomas Petazzoni , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] mvneta: add FIXED_PHY dependency Date: Mon, 09 Nov 2015 15:08:57 +0100 Message-ID: <4225885.EYXTHjRPmX@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:IcoOyhQAvmD5dLwuuTUEizMjxkHQBuHd6JMCyuP6f3BSciQ9DCV eecaL+jdgBxYqwKUuco7qCeG1hTLS1vTMYf3pJzS5ujE0D0c4P8pMlw7VcNa2FbBi/pj8Ol gVq28PKA9hXS1l0FrILKchR+ToesNqzmjoyeAeEAqQELRDxGHS8sRALBjpbho1fJdxulAOV VZY7p2ZCgZj84pQA1u09w== X-UI-Out-Filterresults: notjunk:1;V01:K0:rZlhGX8DcFQ=:ejIME8DT0dgIIClcTvCZ8S CzNMc6Qll2GJDz7GiHiYzBdXV7WFRcncMYvygWEDaxVMPN79+u9C8X3YOjKN4yCRiA3YpHrDs UVdMudKZWEK6ca6iJ/jDPbYVCQcyn8F8v4cVcyz+rdj26X63NsZOVwbNtnVC/KlLSiNuJODiq NUWBkBkzK9Bu6sD/Fbz/JGuANwzCZaUmNUvU+HiZahdiP/rzsUt3l1Qxzv21tl9BeRgKj6Ftn ihGlHvUo8KxUteXsI/WcEdhArB1NXWqZjXUO+B47baP0AeGZNv/fk9BNinI0ilSq9jctbA17+ 4vDbLc/R2UPTeIswRlKU6Wbry3gz5itXDkWohU4RttTIFf/NvZSMXvbRO3Po+Z7FAZGqf14Zl nni1AqNbgB2OmNy6HkOA+GiWDcxO308vvIiKSkuX0YvomS2hdSgiqwV8QdWiD0MECzD0cN/wj cuf7d/Cw/RxOnHBslfNLDD3OvKGvvpe7RicZsh9VWRnwCyw7jAJNpXdR8lwRgIyNlZePKhwUf CScjPqv7m8rVC9m20Qs0YS2FV5p3SE2NnBh9Njk3lIQD4n7jpRFQv0wN5RQ31lE0PB3+x63Nj AsNI+SOYC7Zm742tEl40OuQ0qockxusLu4QiJpE1S/J2lDU8DUXfaDau+cjOHJx0SfOF9nPug MzgkrwQBnir5C6/2wsEHbOe/HnmaPMiPcMcwkg1C38m2QN2X0VdvuhjBYW3PJFdu2KaVfY1Eq Pf97lS/h0A3NViws Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1915 Lines: 44 The fixed_phy infrastructure is done in a way that is optional, by providing 'static inline' helper functions doing nothing in include/linux/phy_fixed.h for all its APIs. However, three out of the four users (DSA, BCMGENET, and SYSTEMPORT) always 'select FIXED_PHY', presumably because they need that. MVNETA is the fourth one, and if that is built-in but FIXED_PHY is configured as a loadable module, we get a link error: drivers/built-in.o: In function `mvneta_fixed_link_update': fpga-mgr.c:(.text+0x33ed80): undefined reference to `fixed_phy_update_state' Presumably this driver has the same dependency as the others, so this patch also uses 'select' to ensure that the fixed-phy support is built-in. Signed-off-by: Arnd Bergmann Fixes: 898b2970e2c9 ("mvneta: implement SGMII-based in-band link state signaling") --- Found using ARM randconfig tests. An alternative here would be to use 'depends on FIXED_PHY || FIXED_PHY=n', I picked the 'select' approach for consistency. Should we perhaps make 'FIXED_PHY' a silent option and remove the inline helpers, based on the assumption that a driver that wants these will not work without them? diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig index 80af9ffce5ea..a1c862b4664d 100644 --- a/drivers/net/ethernet/marvell/Kconfig +++ b/drivers/net/ethernet/marvell/Kconfig @@ -44,6 +44,7 @@ config MVNETA tristate "Marvell Armada 370/38x/XP network interface support" depends on PLAT_ORION select MVMDIO + select FIXED_PHY ---help--- This driver supports the network interface units in the Marvell ARMADA XP, ARMADA 370 and ARMADA 38x SoC family. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/