netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, oneukum@suse.com, linux-usb@vger.kernel.org
Subject: Re: [PATCH net-next 04/12] net: usb: don't write directly to netdev->dev_addr
Date: Thu, 21 Oct 2021 11:55:00 +0200	[thread overview]
Message-ID: <be00cea5-3074-5a27-3e04-97c08ae60fd8@suse.com> (raw)
In-Reply-To: <20211020155617.1721694-5-kuba@kernel.org>


On 20.10.21 17:56, Jakub Kicinski wrote:
> Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
> of VLANs...") introduced a rbtree for faster Ethernet address look
> up. To maintain netdev->dev_addr in this tree we need to make all
> the writes to it got through appropriate helpers.
>
> Manually fix all net/usb drivers without separate maintainers.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---

Hi,


this looks good except for catc, which needs a more complicated fix.
Do you want me to do it and drop it from this patch?

    Regards
        Oliver

> --- a/drivers/net/usb/catc.c
> +++ b/drivers/net/usb/catc.c
> @@ -770,6 +770,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
>  	struct net_device *netdev;
>  	struct catc *catc;
>  	u8 broadcast[ETH_ALEN];
> +	u8 addr[ETH_ALEN];
>  	int pktsz, ret;
>  
>  	if (usb_set_interface(usbdev,
> @@ -870,7 +871,8 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
>  	  
>  		dev_dbg(dev, "Getting MAC from SEEROM.\n");
>  	  
> -		catc_get_mac(catc, netdev->dev_addr);
> +		catc_get_mac(catc, addr);
DMA on the stack.
> +		eth_hw_addr_set(netdev, addr);
>  		
>  		dev_dbg(dev, "Setting MAC into registers.\n");
>  	  
> @@ -899,8 +901,9 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
>  	} else {
>  		dev_dbg(dev, "Performing reset\n");
>  		catc_reset(catc);
> -		catc_get_mac(catc, netdev->dev_addr);
> -		
> +		catc_get_mac(catc, addr);
DMA on the stack.
> +		eth_hw_addr_set(netdev, addr);
> +
>  		dev_dbg(dev, "Setting RX Mode\n");
>  		catc->rxmode[0] = RxEnable | RxPolarity | RxMultiCast;
>  		catc->rxmode[1] = 0;
>
>


  reply	other threads:[~2021-10-21  9:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 15:56 [PATCH net-next 00/12] net: don't write directly to netdev->dev_addr Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 01/12] net: xen: use eth_hw_addr_set() Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 02/12] usb: smsc: " Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 03/12] net: qmi_wwan: use dev_addr_mod() Jakub Kicinski
2021-10-20 16:11   ` Bjørn Mork
2021-10-20 15:56 ` [PATCH net-next 04/12] net: usb: don't write directly to netdev->dev_addr Jakub Kicinski
2021-10-21  9:55   ` Oliver Neukum [this message]
2021-10-21 13:06     ` Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 05/12] fddi: defxx,defza: use dev_addr_set() Jakub Kicinski
2021-10-20 18:16   ` Maciej W. Rozycki
2021-10-20 15:56 ` [PATCH net-next 06/12] fddi: skfp: constify and " Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 07/12] net: fjes: constify and use eth_hw_addr_set() Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 08/12] net: hippi: use dev_addr_set() Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 09/12] net: s390: constify and use eth_hw_addr_set() Jakub Kicinski
2021-10-20 22:30   ` Julian Wiedmann
2021-10-21 13:05     ` Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 10/12] net: plip: " Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 11/12] net: sb1000,rionet: " Jakub Kicinski
2021-10-20 15:56 ` [PATCH net-next 12/12] net: hldc_fr: use dev_addr_set() Jakub Kicinski

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=be00cea5-3074-5a27-3e04-97c08ae60fd8@suse.com \
    --to=oneukum@suse.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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).