All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <david.daney@cavium.com>
To: Andy Fleming <afleming@freescale.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH v3 1/3] phylib: Convert MDIO and PHY Lib drivers to support 10G
Date: Thu, 13 Oct 2011 09:18:18 -0700	[thread overview]
Message-ID: <4E970F4A.3080405@cavium.com> (raw)
In-Reply-To: <1318516660-25452-2-git-send-email-afleming@freescale.com>

On 10/13/2011 07:37 AM, Andy Fleming wrote:

>   /**
> + * is_10g_interface - Distinguishes 10G from 10/100/1000
> + * @interface: PHY interface type
> + *
> + * Returns true if the passed interface is capable of 10G,
> + * and therefore indicates the need for Clause-45-style
> + * MDIO transactions.
> + *
> + * For now, XGMII is the only 10G interface
> + */
> +static inline bool is_10g_interface(phy_interface_t interface)
> +{
> +	return interface == PHY_INTERFACE_MODE_XGMII;
> +}
> +

The packet interface to the PHY and the protocol used on its MDIO bus 
are two separate things.  This function conflates them.

Although it is not perfect, my alternate approach:

http://marc.info/?l=linux-netdev&m=131844284003871

Adds a flag bit to struct phy_device that indicates the MDIO bus 
protocol to be used.  Have you considered doing something like that instead?

David Daney

  parent reply	other threads:[~2011-10-13 16:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 14:37 [PATCH v3 0/3] Add support for 10G to PHY Lib Andy Fleming
2011-10-13 14:37 ` [PATCH v3 1/3] phylib: Convert MDIO and PHY Lib drivers to support 10G Andy Fleming
2011-10-13 15:46   ` Ben Hutchings
2011-10-13 15:59     ` Andy Fleming
2011-10-13 16:00   ` David Daney
2011-10-14 21:17     ` Andy Fleming
2011-10-14 21:52       ` David Daney
2011-10-13 16:18   ` David Daney [this message]
2011-10-13 14:37 ` [PATCH v3 2/3] phylib: Convert MDIO bitbang to new MDIO 45 format Andy Fleming
2011-10-13 14:37 ` [PATCH v3 3/3] phylib: Add rudimentary Generic 10G support Andy Fleming
2011-10-13 15:51   ` Ben Hutchings

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=4E970F4A.3080405@cavium.com \
    --to=david.daney@cavium.com \
    --cc=afleming@freescale.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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.