All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 4/6] drivers: net: octeontx: fix QSGMII
Date: Fri, 26 Mar 2021 07:46:33 +0100	[thread overview]
Message-ID: <8feacec0-1c17-00a6-b270-c0dce781ad86@denx.de> (raw)
In-Reply-To: <20210326000737.9764-5-tharvey@gateworks.com>

On 26.03.21 01:07, Tim Harvey wrote:
> Revert a change that occured between the Marvell SDK-10.1.1.0
> and SDK-10.3.1.1 which broke QSMII phy support.
> 
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>

Thanks.

Suneel, do you have a comment on this? Is this revert the "best way" to
handle this?

Thanks,
Stefan

> ---
>   drivers/net/octeontx/bgx.c | 20 +++++++-------------
>   1 file changed, 7 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/octeontx/bgx.c b/drivers/net/octeontx/bgx.c
> index 2ea54be84d..a5c0c9fe2b 100644
> --- a/drivers/net/octeontx/bgx.c
> +++ b/drivers/net/octeontx/bgx.c
> @@ -36,7 +36,6 @@ struct lmac {
>   	int			dmac;
>   	u8			mac[6];
>   	bool			link_up;
> -	bool			init_pend;
>   	int			lmacid; /* ID within BGX */
>   	int			phy_addr; /* ID on board */
>   	struct udevice		*dev;
> @@ -849,6 +848,7 @@ static int bgx_lmac_enable(struct bgx *bgx, int8_t lmacid)
>   	u64 cfg;
>   
>   	lmac = &bgx->lmac[lmacid];
> +	lmac->bgx = bgx;
>   
>   	debug("%s: lmac: %p, lmacid = %d\n", __func__, lmac, lmacid);
>   
> @@ -895,16 +895,6 @@ int bgx_poll_for_link(int node, int bgx_idx, int lmacid)
>   	debug("%s: %d, lmac: %d/%d/%d %p\n",
>   	      __FILE__, __LINE__,
>   	      node, bgx_idx, lmacid, lmac);
> -	if (lmac->init_pend) {
> -		ret = bgx_lmac_enable(lmac->bgx, lmacid);
> -		if (ret < 0) {
> -			printf("BGX%d LMAC%d lmac_enable failed\n", bgx_idx,
> -			       lmacid);
> -			return ret;
> -		}
> -		lmac->init_pend = 0;
> -		mdelay(100);
> -	}
>   	if (lmac->qlm_mode == QLM_MODE_SGMII ||
>   	    lmac->qlm_mode == QLM_MODE_RGMII ||
>   	    lmac->qlm_mode == QLM_MODE_QSGMII) {
> @@ -1461,6 +1451,7 @@ int octeontx_bgx_remove(struct udevice *dev)
>   
>   int octeontx_bgx_probe(struct udevice *dev)
>   {
> +	int err;
>   	struct bgx *bgx = dev_get_priv(dev);
>   	u8 lmac = 0;
>   	int qlm[4] = {-1, -1, -1, -1};
> @@ -1540,8 +1531,11 @@ skip_qlm_config:
>   		struct lmac *tlmac = &bgx->lmac[lmac];
>   
>   		tlmac->dev = dev;
> -		tlmac->init_pend = 1;
> -		tlmac->bgx = bgx;
> +		err = bgx_lmac_enable(bgx, lmac);
> +		if (err) {
> +			printf("BGX%d failed to enable lmac%d\n",
> +			       bgx->bgx_id, lmac);
> +		}
>   	}
>   
>   	return 0;
> 


Viele Gr??e,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

  reply	other threads:[~2021-03-26  6:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  0:07 [PATCH 0/6] octeontx cleanup and fixes Tim Harvey
2021-03-26  0:07 ` [PATCH 1/6] arm: octeontx: move CONFIG_SUPPORT_RAW_INITRD to configs Tim Harvey
2021-03-26  6:38   ` Stefan Roese
2021-04-20 14:20   ` Tom Rini
2021-03-26  0:07 ` [PATCH 2/6] arm: octeontx: support generic distro config Tim Harvey
2021-03-26  6:44   ` Stefan Roese
2021-04-20 14:20   ` Tom Rini
2021-03-26  0:07 ` [PATCH 3/6] arm: octeontx: enable WDT_SBSA Tim Harvey
2021-03-26  6:44   ` Stefan Roese
2021-04-20 14:20   ` Tom Rini
2021-03-26  0:07 ` [PATCH 4/6] drivers: net: octeontx: fix QSGMII Tim Harvey
2021-03-26  6:46   ` Stefan Roese [this message]
2021-03-26 16:08     ` Suneel Garapati
2021-03-26 16:37       ` Tim Harvey
2021-03-26 16:39         ` Suneel Garapati
2021-04-08 19:55           ` Tim Harvey
2021-04-20 14:20   ` Tom Rini
2021-03-26  0:07 ` [PATCH 5/6] drivers: ata: ahci: update max id if it is more than available ports Tim Harvey
2021-03-26  6:47   ` Stefan Roese
2021-04-20 14:20   ` Tom Rini
2021-03-26  0:07 ` [PATCH 6/6] net: octeontx: smi: fix mii probe Tim Harvey
2021-03-26  6:48   ` Stefan Roese
2021-03-26 15:55     ` Tim Harvey
2021-03-26 16:03       ` Suneel Garapati
2021-04-27  5:19       ` Stefan Roese
2021-04-28 15:11         ` Tim Harvey
2021-04-29  5:21           ` Stefan Roese
2021-04-29 14:27             ` Tim Harvey
2021-04-20 14:20   ` Tom Rini
2021-03-26  6:49 ` [PATCH 0/6] octeontx cleanup and fixes Stefan Roese
2021-03-26 15:51   ` Tim Harvey

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=8feacec0-1c17-00a6-b270-c0dce781ad86@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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.