* [PATCH] b44: allow ethtool get_settings when down
@ 2004-11-29 17:45 Stephen Hemminger
2004-12-02 11:25 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2004-11-29 17:45 UTC (permalink / raw)
To: Jeff Garzik; +Cc: David S. Miller, netdev
The FC and Suse startup scripts use ethtool to check for link present. This has
problems on my laptop with Broadcom because it quieries settings before
bringing link up. The problem is driver returns EAGAIN when queried for
settings but not up. Just go ahead and return values anyway, the supported and link
state values will be correct, speed will end up being 10BaseT/Half which is a
reasonable default.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c
--- a/drivers/net/b44.c 2004-11-29 09:41:27 -08:00
+++ b/drivers/net/b44.c 2004-11-29 09:41:27 -08:00
@@ -1487,8 +1487,6 @@
{
struct b44 *bp = netdev_priv(dev);
- if (!(bp->flags & B44_FLAG_INIT_COMPLETE))
- return -EAGAIN;
cmd->supported = (SUPPORTED_Autoneg);
cmd->supported |= (SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full |
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] b44: allow ethtool get_settings when down
2004-11-29 17:45 [PATCH] b44: allow ethtool get_settings when down Stephen Hemminger
@ 2004-12-02 11:25 ` Jeff Garzik
2004-12-02 17:51 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2004-12-02 11:25 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, netdev
Stephen Hemminger wrote:
> The FC and Suse startup scripts use ethtool to check for link present. This has
> problems on my laptop with Broadcom because it quieries settings before
> bringing link up. The problem is driver returns EAGAIN when queried for
> settings but not up. Just go ahead and return values anyway, the supported and link
> state values will be correct, speed will end up being 10BaseT/Half which is a
> reasonable default.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
>
> diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c
> --- a/drivers/net/b44.c 2004-11-29 09:41:27 -08:00
> +++ b/drivers/net/b44.c 2004-11-29 09:41:27 -08:00
> @@ -1487,8 +1487,6 @@
> {
> struct b44 *bp = netdev_priv(dev);
>
> - if (!(bp->flags & B44_FLAG_INIT_COMPLETE))
> - return -EAGAIN;
> cmd->supported = (SUPPORTED_Autoneg);
> cmd->supported |= (SUPPORTED_100baseT_Half |
> SUPPORTED_100baseT_Full |
I'm not so sure about this one...
This sounds like working around stupid userland in the kernel?
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] b44: allow ethtool get_settings when down
2004-12-02 11:25 ` Jeff Garzik
@ 2004-12-02 17:51 ` Stephen Hemminger
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2004-12-02 17:51 UTC (permalink / raw)
To: Jeff Garzik; +Cc: David S. Miller, netdev
On Thu, 02 Dec 2004 06:25:09 -0500
Jeff Garzik <jgarzik@pobox.com> wrote:
> Stephen Hemminger wrote:
> > The FC and Suse startup scripts use ethtool to check for link present. This has
> > problems on my laptop with Broadcom because it quieries settings before
> > bringing link up. The problem is driver returns EAGAIN when queried for
> > settings but not up. Just go ahead and return values anyway, the supported and link
> > state values will be correct, speed will end up being 10BaseT/Half which is a
> > reasonable default.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
> >
> > diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c
> > --- a/drivers/net/b44.c 2004-11-29 09:41:27 -08:00
> > +++ b/drivers/net/b44.c 2004-11-29 09:41:27 -08:00
> > @@ -1487,8 +1487,6 @@
> > {
> > struct b44 *bp = netdev_priv(dev);
> >
> > - if (!(bp->flags & B44_FLAG_INIT_COMPLETE))
> > - return -EAGAIN;
> > cmd->supported = (SUPPORTED_Autoneg);
> > cmd->supported |= (SUPPORTED_100baseT_Half |
> > SUPPORTED_100baseT_Full |
>
> I'm not so sure about this one...
>
> This sounds like working around stupid userland in the kernel?
>
> Jeff
Don't bother with the patch, if I use smart user land code like NetworkManager
then there is no problem. Although EAGAIN seems like a poor choice for errno
how about ENETDOWN or ENONET
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-12-02 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-29 17:45 [PATCH] b44: allow ethtool get_settings when down Stephen Hemminger
2004-12-02 11:25 ` Jeff Garzik
2004-12-02 17:51 ` Stephen Hemminger
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).