netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Simon Horman <simon.horman@corigine.com>
Cc: Mengyuan Lou <mengyuanlou@net-swift.com>,
	netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net-next 2/2] net: phy: add keep_data_connection to struct phydev
Date: Tue, 25 Jul 2023 14:12:02 +0100	[thread overview]
Message-ID: <ZL/KIjjw3AZmQcGn@shell.armlinux.org.uk> (raw)
In-Reply-To: <ZL+6kMqETdYL7QNF@corigine.com>

Hi Simon,

Thanks for spotting that this wasn't sent to those who should have
been.

Mengyuan Lou, please ensure that you address your patches to
appropriate recipients.

On Tue, Jul 25, 2023 at 02:05:36PM +0200, Simon Horman wrote:
> > + * @keep_data_connection: Set to true if the PHY or the attached MAC need
> > + *                        physical connection to receive packets.

Having had a brief read through, this comment seems to me to convey
absolutely no useful information what so ever.

In order to receive packets, a physical connection between the MAC and
PHY is required. So, based on that comment, keep_data_connection must
always be true!

So, the logic in phylib at the moment is:

        phydev->wol_enabled = wol.wolopts || (netdev && netdev->wol_enabled);
        /* If the device has WOL enabled, we cannot suspend the PHY */
        if (phydev->wol_enabled && !(phydrv->flags & PHY_ALWAYS_CALL_SUSPEND))
                return -EBUSY;

wol_enabled will be true if the PHY driver reports that WoL is
enabled at the PHY, or the network device marks that WoL is
enabled at the network device. netdev->wol_enabled should be set
when the network device is looking for the wakeup packets.

Then, the PHY_ALWAYS_CALL_SUSPEND flag basically says that "even
in these cases, we want to suspend the PHY".

This patch appears to drop netdev->wol_enabled, replacing it with
netdev->ncsi_enabled, whatever that is - and this change alone is
probably going to break drivers, since they will already be
expecting that netdev->wol_enabled causes the PHY _not_ to be
suspended.

Therefore, I'm not sure this patch makes much sense.

Since the phylib maintainers were not copied with the original
patch, that's also a reason to NAK it.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2023-07-25 13:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230724092544.73531-1-mengyuanlou@net-swift.com>
2023-07-24  9:24 ` [PATCH net-next 1/2] net: ngbe: add ncsi_enable flag for wangxun nics Mengyuan Lou
2023-07-25 23:22   ` Jakub Kicinski
2023-07-26  1:59     ` mengyuanlou
2023-07-26  2:44       ` Jakub Kicinski
2023-07-26  3:12         ` mengyuanlou
2023-07-26  3:23           ` Jakub Kicinski
2023-07-24  9:24 ` [PATCH net-next 2/2] net: phy: add keep_data_connection to struct phydev Mengyuan Lou
2023-07-25 12:05   ` Simon Horman
2023-07-25 13:12     ` Russell King (Oracle) [this message]
2023-07-26  2:35       ` mengyuanlou
2023-07-26  8:10         ` Russell King (Oracle)
2023-07-26  8:54         ` Andrew Lunn
2023-07-26 16:08           ` Jakub Kicinski
2023-07-26 16:43             ` Andrew Lunn
2023-07-26 18:29               ` Jakub Kicinski
2023-07-28  9:27                 ` mengyuanlou
2023-07-28  9:48                   ` Andrew Lunn
2023-07-28 15:11                     ` Jakub Kicinski
2023-07-25 12:13   ` [PATCH net-next 1/2] net: ngbe: add ncsi_enable flag for wangxun nics Simon Horman

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=ZL/KIjjw3AZmQcGn@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=simon.horman@corigine.com \
    /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).