All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Shan Lu <shanlu@cs.uiuc.edu>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, shanlu@uiuc.edu
Subject: Re: [patch 1/1] network: add the missing phy_device speed information to phy_mii_ioctl
Date: Fri, 02 Mar 2007 20:23:06 -0500	[thread overview]
Message-ID: <45E8CDFA.7020609@garzik.org> (raw)
In-Reply-To: <9FD2C54661D3494AB6F269E0D4A74E83019775E1@DSBEXCLUSTER.ad.uiuc.edu>

Shan Lu wrote:
> Changelog:
> Function `phy_mii_ioctl' returns physical device's information based on
> user requests. When requested to return the basic mode control register
> information (BMCR), the original implementation only returns the
> physical device's duplex information and forgets to return speed
> information, which should not be because BMCR register is used to hold
> both duplex and speed information.
> 
> The patch checks the BMCR value against speed-related flags and fills
> the return structure's speed field accordingly. 
> 
> Signed-off-by: Shan<shanlu@cs.uiuc.edu>
> 
> ---
> --- drivers/net/phy/phy.c   2007-03-02 10:40:26.000000000 -0600  2.6.20
> +++ drivers/net/phy/phy.c   2007-03-02 10:41:39.000000000 -0600
> @@ -337,6 +337,10 @@ int phy_mii_ioctl(struct phy_device *phy
>                                         phydev->duplex = DUPLEX_FULL;
>                                 else
>                                         phydev->duplex = DUPLEX_HALF;
> +                               if ((!phydev->autoneg) && (val
> &BMCR_SPEED1000))
> +                                       phydev->speed = SPEED_1000;
> +                               else if ((!phydev->autoneg) && (val &
> BMCR_SPEED100))
> +                                       phydev->speed = SPEED_100;

patch is word-wrapped



  reply	other threads:[~2007-03-03  1:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02 17:42 [patch 1/1] network: add the missing phy_device speed information to phy_mii_ioctl Shan Lu
2007-03-03  1:23 ` Jeff Garzik [this message]
2007-03-06 17:33 ` Andy Fleming
2007-03-06 17:45   ` Shan Lu

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=45E8CDFA.7020609@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shanlu@cs.uiuc.edu \
    --cc=shanlu@uiuc.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.