public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Valentine <vbarshak@ru•mvista.com>
To: linuxppc-dev@ozlabs•org
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH] pasemi_mac: ethtool get settings fix
Date: Mon, 05 Oct 2009 16:59:07 +0400	[thread overview]
Message-ID: <4AC9ED9B.5040400@ru.mvista.com> (raw)
In-Reply-To: <20091001222748.GA21276@ru.mvista.com>

Resending pasemi_mac ethtool patches...

Valentine Barshak wrote:
> Not all pasemi mac interfaces can have a phy attached.
> For example, XAUI has no phy and phydev is NULL for it.
> In this case ethtool get settings causes kernel crash.
> Fix it by returning -EOPNOTSUPP if there's no PHY attached.
> 
> Signed-off-by: Valentine Barshak <vbarshak@ru•mvista.com>
> ---
>  drivers/net/pasemi_mac_ethtool.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-2.6.21.orig/drivers/net/pasemi_mac_ethtool.c	2008-11-06 18:10:38.000000000 +0300
> +++ linux-2.6.21/drivers/net/pasemi_mac_ethtool.c	2008-11-19 19:24:28.000000000 +0300
> @@ -71,6 +71,8 @@ pasemi_mac_ethtool_get_settings(struct n
>  	struct pasemi_mac *mac = netdev_priv(netdev);
>  	struct phy_device *phydev = mac->phydev;
>  
> +	if (!phydev)
> +		return -EOPNOTSUPP;
>  	return phy_ethtool_gset(phydev, cmd);
>  }
>  
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists•ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev


  reply	other threads:[~2009-10-05 12:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01 22:27 [PATCH] pasemi_mac: ethtool get settings fix Valentine Barshak
2009-10-05 12:59 ` Valentine [this message]
2009-10-05 13:27   ` Valentine Barshak
2009-10-06 16:10     ` Olof Johansson
2009-10-07 10:43       ` David Miller
2009-10-05 13:31   ` [PATCH] pasemi_mac: ethtool set settings support Valentine Barshak
2009-10-06 16:11     ` Olof Johansson
2009-10-12 11:25       ` 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=4AC9ED9B.5040400@ru.mvista.com \
    --to=vbarshak@ru$(echo .)mvista.com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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