public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Nithin Nayak Sujir" <nsujir@broadcom•com>
To: "Hauke Mehrtens" <hauke@hauke-m•de>
Cc: davem@davemloft•net, mchan@broadcom•com, netdev@vger•kernel.org
Subject: Re: [PATCH 2/3] ssb: provide phy address for Gigabit Ethernet driver
Date: Tue, 1 Oct 2013 14:13:19 -0700	[thread overview]
Message-ID: <524B3AEF.9060109@broadcom.com> (raw)
In-Reply-To: <1380402928-11480-2-git-send-email-hauke@hauke-m.de>



On 09/28/2013 02:15 PM, Hauke Mehrtens wrote:
> Add a function to provide the phy address which should be used to the
> Gigabit Ethernet driver connected to ssb.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m•de>
> ---

Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom•com>


>   include/linux/ssb/ssb_driver_gige.h |   14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
> index 86a12b0..0688472 100644
> --- a/include/linux/ssb/ssb_driver_gige.h
> +++ b/include/linux/ssb/ssb_driver_gige.h
> @@ -108,6 +108,16 @@ static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
>   	return 0;
>   }
>
> +/* Get the device phy address */
> +static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev)
> +{
> +	struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
> +	if (!dev)
> +		return -ENODEV;
> +
> +	return dev->dev->bus->sprom.et0phyaddr;
> +}
> +
>   extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev,
>   					  struct pci_dev *pdev);
>   extern int ssb_gige_map_irq(struct ssb_device *sdev,
> @@ -174,6 +184,10 @@ static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
>   {
>   	return -ENODEV;
>   }
> +static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev)
> +{
> +	return -ENODEV;
> +}
>
>   #endif /* CONFIG_SSB_DRIVER_GIGE */
>   #endif /* LINUX_SSB_DRIVER_GIGE_H_ */
>

  reply	other threads:[~2013-10-01 21:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28 21:15 [PATCH 1/3] tg3: add support a phy at an address different than 01 Hauke Mehrtens
2013-09-28 21:15 ` [PATCH 2/3] ssb: provide phy address for Gigabit Ethernet driver Hauke Mehrtens
2013-10-01 21:13   ` Nithin Nayak Sujir [this message]
2013-10-02 19:42   ` David Miller
2013-09-28 21:15 ` [PATCH 3/3] tg3: use phylib when robo switch is in use Hauke Mehrtens
2013-10-01 21:12   ` Nithin Nayak Sujir
2013-10-02 19:42   ` David Miller
2013-10-01 20:12 ` [PATCH 1/3] tg3: add support a phy at an address different than 01 David Miller
2013-10-01 21:11 ` Nithin Nayak Sujir
2013-10-02 19:42 ` 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=524B3AEF.9060109@broadcom.com \
    --to=nsujir@broadcom$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=hauke@hauke-m$(echo .)de \
    --cc=mchan@broadcom$(echo .)com \
    --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