All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: asolokha@kb.kras.ru
Cc: claudiu.manoil@nxp.com, ioana.ciornei@nxp.com,
	linux@armlinux.org.uk, andrew@lunn.ch, netdev@vger.kernel.org
Subject: Re: [PATCH v2] net: phylink: don't start and stop SGMII PHYs in SFP modules twice
Date: Wed, 24 Jul 2019 14:38:10 -0700 (PDT)	[thread overview]
Message-ID: <20190724.143810.1816867139082751607.davem@davemloft.net> (raw)
In-Reply-To: <20190724133139.8356-1-asolokha@kb.kras.ru>

From: Arseny Solokha <asolokha@kb.kras.ru>
Date: Wed, 24 Jul 2019 20:31:39 +0700

> SFP modules connected using the SGMII interface have their own PHYs which
> are handled by the struct phylink's phydev field. On the other hand, for
> the modules connected using 1000Base-X interface that field is not set.
> 
> Since commit ce0aa27ff3f6 ("sfp: add sfp-bus to bridge between network
> devices and sfp cages") phylink_start() ends up setting the phydev field
> using the sfp-bus infrastructure, which eventually calls phy_start() on it,
> and then calling phy_start() again on the same phydev from phylink_start()
> itself. Similar call sequence holds for phylink_stop(), only in the reverse
> order. This results in WARNs during network interface bringup and shutdown
> when a copper SFP module is connected, as phy_start() and phy_stop() are
> called twice in a row for the same phy_device:
 ...
> SFP modules with the 1000Base-X interface are not affected.
> 
> Place explicit calls to phy_start() and phy_stop() before enabling or after
> disabling an attached SFP module, where phydev is not yet set (or is
> already unset), so they will be made only from the inside of sfp-bus, if
> needed.
> 
> Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>

Applied with appropriate Fixes: tag added and queued up for -stable.

Thanks.

      parent reply	other threads:[~2019-07-24 21:38 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
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 [this message]

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=20190724.143810.1816867139082751607.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=asolokha@kb.kras.ru \
    --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 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.