All of lore.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 3/3] tg3: use phylib when robo switch is in use
Date: Tue, 1 Oct 2013 14:12:01 -0700	[thread overview]
Message-ID: <524B3AA1.10105@broadcom.com> (raw)
In-Reply-To: <1380402928-11480-3-git-send-email-hauke@hauke-m.de>



On 09/28/2013 02:15 PM, Hauke Mehrtens wrote:
> When a switch is connected as a PHY to the MAC driven by tg3, use
> phylib and provide the phy address to tg3 from the sprom.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---

Acked-by: Nithin Nayak Sujir <nsujir@broadcom.com>


>   drivers/net/ethernet/broadcom/tg3.c |   11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index 853a05e..a17a3c9 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -1513,6 +1513,13 @@ static int tg3_mdio_init(struct tg3 *tp)
>   				    TG3_CPMU_PHY_STRAP_IS_SERDES;
>   		if (is_serdes)
>   			tp->phy_addr += 7;
> +	} else if (tg3_flag(tp, IS_SSB_CORE) && tg3_flag(tp, ROBOSWITCH)) {
> +		int addr;
> +
> +		addr = ssb_gige_get_phyaddr(tp->pdev);
> +		if (addr < 0)
> +			return addr;
> +		tp->phy_addr = addr;
>   	} else
>   		tp->phy_addr = TG3_PHY_MII_ADDR;
>
> @@ -17366,8 +17373,10 @@ static int tg3_init_one(struct pci_dev *pdev,
>   			tg3_flag_set(tp, FLUSH_POSTED_WRITES);
>   		if (ssb_gige_one_dma_at_once(pdev))
>   			tg3_flag_set(tp, ONE_DMA_AT_ONCE);
> -		if (ssb_gige_have_roboswitch(pdev))
> +		if (ssb_gige_have_roboswitch(pdev)) {
> +			tg3_flag_set(tp, USE_PHYLIB);
>   			tg3_flag_set(tp, ROBOSWITCH);
> +		}
>   		if (ssb_gige_is_rgmii(pdev))
>   			tg3_flag_set(tp, RGMII_MODE);
>   	}
>

  reply	other threads:[~2013-10-01 21:12 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
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 [this message]
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=524B3AA1.10105@broadcom.com \
    --to=nsujir@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=hauke@hauke-m.de \
    --cc=mchan@broadcom.com \
    --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.