netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arseny Solokha <asolokha@kb.kras.ru>
To: Claudiu Manoil <claudiu.manoil@nxp.com>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>,
	Russell King <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH 1/2] gianfar: convert to phylink
Date: Wed, 24 Jul 2019 14:36:17 +0700	[thread overview]
Message-ID: <87muh33mvi.fsf@kb.kras.ru> (raw)
In-Reply-To: <VI1PR04MB48809AFBB9DF01001AA5E2CA96C70@VI1PR04MB4880.eurprd04.prod.outlook.com> (Claudiu Manoil's message of "Tue, 23 Jul 2019 16:07:34 +0000")

>>-----Original Message-----
>>From: Arseny Solokha <asolokha@kb.kras.ru>
>>Sent: Tuesday, July 23, 2019 6:17 PM
>>To: Claudiu Manoil <claudiu.manoil@nxp.com>; Ioana Ciornei
>><ioana.ciornei@nxp.com>; Russell King <linux@armlinux.org.uk>; Andrew Lunn
>><andrew@lunn.ch>
>>Cc: netdev@vger.kernel.org; Arseny Solokha <asolokha@kb.kras.ru>
>>Subject: [RFC PATCH 1/2] gianfar: convert to phylink
>>
>>Convert gianfar to use the phylink API for better SFP modules support.
>>
>>The driver still uses phylib for serdes configuration over the TBI
>>interface, as there seems to be no functionally equivalent API present
>>in phylink (yet). phylib usage is basically confined in two functions.
>>
>
> Thanks for your patch.  Phylink in gianfar... that would be something!
> At first glance a lot of code has changed with this patch or got relocated.
> To make it easier to swallow, I think a few cleanup patches could be
> separated before migrating to phylink.  Like for instance getting rid of the
> old* link state variables, which I think are an artifact from early phylib usage.
> Nonetheless good to see this implemented, I'll have a closer look asap.

Hi,

meanwhile I'll have to post v2 of this patch because it has some issues which
initially escaped my attention. For now I'm pasting the diff against v1 here for
reference:

--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1666,7 +1666,7 @@ static int gfar_suspend(struct device *dev)
 		gfar_start_wol_filer(priv);
 
 	} else {
-		phylink_stop(phy->phylink);
+		phylink_stop(priv->phylink);
 	}
 
 	priv->speed = SPEED_UNKNOWN;
@@ -3699,9 +3699,6 @@ static void gfar_mac_config(struct phylink_config *config, unsigned int mode,
 	if (unlikely(test_bit(GFAR_RESETTING, &priv->state)))
 		return;
 
-	if (unlikely(phylink_autoneg_inband(mode)))
-		return;
-
 	maccfg1 = gfar_read(&regs->maccfg1);
 	maccfg2 = gfar_read(&regs->maccfg2);
 	ecntrl = gfar_read(&regs->ecntrl);

The first hunk here fixes a typo which broke build with PM enabled. The second
one removes an early return from gfar_mac_config() which I believe is really
bogus and also breaks coalesce parameters calculation for SGMII and 1000Base-X
attached PHYs.

I'd like to submit a real v2 after the patches gets actual review, though.

Thanks,
Arseny

  reply	other threads:[~2019-07-24  7:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 15:17 [RFC PATCH 0/2] convert gianfar to phylink Arseny Solokha
2019-07-23 15:17 ` [RFC PATCH 1/2] gianfar: convert " Arseny Solokha
2019-07-23 16:07   ` Claudiu Manoil
2019-07-24  7:36     ` Arseny Solokha [this message]
2019-07-24  8:19   ` Russell King - ARM Linux admin
2019-07-29 23:39   ` Vladimir Oltean
2019-07-30 10:23     ` Russell King - ARM Linux admin
2019-08-24 12:49       ` Vladimir Oltean
2019-07-30 14:40     ` Arseny Solokha
2019-08-24 15:21       ` Vladimir Oltean
2019-08-28 15:20         ` Vladimir Oltean
2019-09-04 13:52         ` [PATCH 0/4] gianfar: some assorted cleanup Arseny Solokha
2019-09-04 13:52           ` [PATCH 1/4] gianfar: remove forward declarations Arseny Solokha
2019-09-04 13:52           ` [PATCH 2/4] gianfar: make five functions static Arseny Solokha
2019-09-04 13:52           ` [PATCH 3/4] gianfar: cleanup gianfar.h Arseny Solokha
2019-09-04 13:52           ` [PATCH 4/4] gianfar: use DT more consistently when selecting PHY connection type Arseny Solokha
2019-09-05 10:28           ` [PATCH 0/4] gianfar: some assorted cleanup David Miller
2019-09-05 10:39           ` Vladimir Oltean
2019-09-04 13:54         ` [RFC PATCH 1/2] gianfar: convert to phylink Arseny Solokha
2019-09-04 13:53     ` Arseny Solokha
2019-07-23 15:17 ` [RFC PATCH 2/2] net: phylink: don't start and stop SGMII PHYs in SFP modules twice Arseny Solokha
2019-07-24  9:01   ` Russell King - ARM Linux admin
2019-07-24 13:31     ` [PATCH v2] " Arseny Solokha
2019-07-24 13:36       ` Andrew Lunn
2019-07-24 13:37       ` Russell King - ARM Linux admin
2019-07-24 21:38       ` 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=87muh33mvi.fsf@kb.kras.ru \
    --to=asolokha@kb.kras.ru \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=linux@armlinux.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).