All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Cc: <netdev@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] net-sysfs: allow changing sysfs carrier when interface is down
Date: Wed, 1 Jun 2022 18:01:47 -0700	[thread overview]
Message-ID: <20220601180147.40a6e8ea@kernel.org> (raw)
In-Reply-To: <20220602003523.19530-1-joakim.tjernlund@infinera.com>

On Thu, 2 Jun 2022 02:35:23 +0200 Joakim Tjernlund wrote:
> UP/DOWN and carrier are async events and it makes sense one can
> adjust carrier in sysfs before bringing the interface up.

Can you explain your use case?

> Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> Cc: stable@vger.kernel.org

Seems a little too risky of a change to push into stable.

> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index a4ae65263384..3418ef7ef2d8 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -167,8 +167,6 @@ static DEVICE_ATTR_RO(broadcast);
>  
>  static int change_carrier(struct net_device *dev, unsigned long new_carrier)
>  {
> -	if (!netif_running(dev))
> -		return -EINVAL;
>  	return dev_change_carrier(dev, (bool)new_carrier);
>  }

  reply	other threads:[~2022-06-02  1:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02  0:35 [PATCH] net-sysfs: allow changing sysfs carrier when interface is down Joakim Tjernlund
2022-06-02  1:01 ` Jakub Kicinski [this message]
2022-06-02  9:22   ` Joakim Tjernlund
2022-06-02 15:56     ` Stephen Hemminger
2022-06-02 16:26       ` Joakim Tjernlund
2022-06-02 16:57         ` Jakub Kicinski
2022-06-02 17:15           ` Joakim Tjernlund
2022-06-02 17:52             ` Jakub Kicinski
2022-06-02 18:01               ` Joakim Tjernlund
2022-06-05 18:50                 ` Andrew Lunn
2022-06-07 11:52                   ` Joakim Tjernlund
2022-06-02 18:14               ` Stephen Hemminger
2022-06-02 17:56             ` Stephen Hemminger
2022-06-02 18:09               ` Joakim Tjernlund
2022-06-02 18:38                 ` Joakim Tjernlund

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=20220601180147.40a6e8ea@kernel.org \
    --to=kuba@kernel.org \
    --cc=joakim.tjernlund@infinera.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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.