From: David Brownell <david-b@pacbell.net>
To: David Miller <davem@davemloft.net>
Cc: "Adrian Bunk" <bunk@kernel.org>,
"Toralf Förster" <toralf.foerster@gmx.de>,
jgarzik@pobox.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [2.6 patch] usbnet.c: check for the right MII variable
Date: Wed, 7 Nov 2007 14:31:15 -0800 [thread overview]
Message-ID: <200711071431.15525.david-b@pacbell.net> (raw)
In-Reply-To: <20071102154615.GS30287@stusta.de>
On Friday 02 November 2007, Adrian Bunk wrote:
> <-- snip -->
>
>
> This patch fixes the following compile error with CONFIG_MII=m,
> CONFIG_USB_USBNET=y, CONFIG_USB_USBNET_MII=n:
This is the patch I liked better, if there was going to be
one going upstream without additional test from me ... sorry,
the patch you appear to have accepted was the worst of the
three patches in flight.
>
> <-- snip -->
>
> ...
> LD .tmp_vmlinux1
> drivers/built-in.o: In function `usbnet_set_settings':
> (.text+0xf1876): undefined reference to `mii_ethtool_sset'
> drivers/built-in.o: In function `usbnet_get_settings':
> (.text+0xf1836): undefined reference to `mii_ethtool_gset'
> drivers/built-in.o: In function `usbnet_get_link':
> (.text+0xf18d6): undefined reference to `mii_link_ok'
> drivers/built-in.o: In function `usbnet_nway_reset':
> (.text+0xf18f6): undefined reference to `mii_nway_restart'
> make: *** [.tmp_vmlinux1] Error 1
>
> <-- snip -->
>
> This bug was introduced by commit 18ee91fa9815fa3bb4e51cdcb8229bd0a0f11a70
> and reported by Toralf Förster.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
>
> BTW:
> The Kconfig part of this patch is not really required, but testing for
> #if defined(CONFIG_USB_USBNET_MII) || defined(CONFIG_USB_USBNET_MII_MODULE)
> would look needlessly ugly.
>
> drivers/net/usb/Kconfig | 5 ++---
> drivers/net/usb/usbnet.c | 7 +++----
> 2 files changed, 5 insertions(+), 7 deletions(-)
>
> a421e4910eb30b140a315e274632e87c7a218df6
> diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
> index 5a96d74..9261371 100644
> --- a/drivers/net/usb/Kconfig
> +++ b/drivers/net/usb/Kconfig
> @@ -94,12 +94,11 @@ config USB_RTL8150
> module will be called rtl8150.
>
> config USB_USBNET_MII
> - tristate
> - default n
> + bool
>
> config USB_USBNET
> tristate "Multi-purpose USB Networking Framework"
> - select MII if USB_USBNET_MII != n
> + select MII if USB_USBNET_MII
> ---help---
> This driver supports several kinds of network links over USB,
> with "minidrivers" built around a common network driver core
> diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> index acd5f1c..7393ab0 100644
> --- a/drivers/net/usb/usbnet.c
> +++ b/drivers/net/usb/usbnet.c
> @@ -683,8 +683,7 @@ done_nopm:
> * they'll probably want to use this base set.
> */
>
> -#if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE)
> -#define HAVE_MII
> +#ifdef CONFIG_USB_USBNET_MII
>
> int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd)
> {
> @@ -744,7 +743,7 @@ int usbnet_nway_reset(struct net_device *net)
> }
> EXPORT_SYMBOL_GPL(usbnet_nway_reset);
>
> -#endif /* HAVE_MII */
> +#endif /* CONFIG_USB_USBNET_MII */
>
> void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
> {
> @@ -776,7 +775,7 @@ EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
>
> /* drivers may override default ethtool_ops in their bind() routine */
> static struct ethtool_ops usbnet_ethtool_ops = {
> -#ifdef HAVE_MII
> +#ifdef CONFIG_USB_USBNET_MII
> .get_settings = usbnet_get_settings,
> .set_settings = usbnet_set_settings,
> .get_link = usbnet_get_link,
>
next prev parent reply other threads:[~2007-11-07 22:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200711012024.57412.toralf.foerster@gmx.de>
2007-11-01 21:11 ` build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings': Randy Dunlap
2007-11-01 23:32 ` David Brownell
2007-11-01 23:44 ` Adrian Bunk
2007-11-02 18:45 ` David Brownell
2007-11-02 18:57 ` Adrian Bunk
2007-11-02 19:30 ` David Brownell
2007-11-02 19:55 ` Adrian Bunk
2007-11-07 22:34 ` David Brownell
2007-11-07 22:52 ` Adrian Bunk
2007-11-08 2:53 ` David Brownell
2007-11-08 3:23 ` Adrian Bunk
2007-11-08 3:30 ` Adrian Bunk
2007-11-08 16:08 ` Randy Dunlap
2007-11-20 5:26 ` David Miller
2007-11-25 16:30 ` [2.6 patch] ipv4/arp.c:arp_process(): remove bogus #ifdef mess Adrian Bunk
2007-11-26 15:19 ` Herbert Xu
2007-11-26 20:25 ` Adrian Bunk
2007-11-02 20:05 ` build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings': Adrian Bunk
2007-11-07 8:20 ` David Miller
2007-11-07 22:15 ` David Brownell
2007-11-01 22:25 ` [2.6 patch] let USB_USBNET always select MII Adrian Bunk
2007-11-01 23:52 ` David Brownell
2007-11-02 15:46 ` [2.6 patch] usbnet.c: check for the right MII variable Adrian Bunk
2007-11-07 22:31 ` David Brownell [this message]
2007-11-07 8:10 ` [2.6 patch] let USB_USBNET always select MII David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711071431.15525.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=bunk@kernel.org \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=toralf.foerster@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).