Re: [PATCH v4] net: usb: Convert tasklet API to new bottom half workqueue mechanism

From: Jakub Kicinski
Date: Tue Jun 17 2025 - 19:22:25 EST


On Sun, 15 Jun 2025 09:53:15 +0800 Jun Miao wrote:
> -static void usbnet_bh_tasklet(struct tasklet_struct *t)
> +static void usbnet_bh_workqueue(struct work_struct *work)
> {
> - struct usbnet *dev = from_tasklet(dev, t, bh);
> + struct usbnet *dev = from_work(dev, work, bh_work);
>
> usbnet_bh(&dev->delay);
> }
> @@ -1742,7 +1742,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
> skb_queue_head_init (&dev->txq);
> skb_queue_head_init (&dev->done);
> skb_queue_head_init(&dev->rxq_pause);
> - tasklet_setup(&dev->bh, usbnet_bh_tasklet);
> + INIT_WORK(&dev->bh_work, usbnet_bh_workqueue);

workqueue is the queue, here we're talking about the work entry.
And we use the system workqueue to schedule on (system_bh_wq)
Please replace the workqueue with work here and in the comments