lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <524B3AA1.10105@broadcom.com>
Date:	Tue, 1 Oct 2013 14:12:01 -0700
From:	"Nithin Nayak Sujir" <nsujir@...adcom.com>
To:	"Hauke Mehrtens" <hauke@...ke-m.de>
cc:	davem@...emloft.net, mchan@...adcom.com, netdev@...r.kernel.org
Subject: Re: [PATCH 3/3] tg3: use phylib when robo switch is in use



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@...ke-m.de>
> ---

Acked-by: Nithin Nayak Sujir <nsujir@...adcom.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);
>   	}
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ