Merge 6.2-rc5 into usb-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Jan 2023 14:38:08 +0000 (15:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Jan 2023 14:38:08 +0000 (15:38 +0100)
We need the USB fixes in here and this resolves merge conflicts as
reported in linux-next in the following files:
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/typec/ucsi/ucsi.c

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed:
1  2 
MAINTAINERS
drivers/usb/gadget/configfs.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/misc/onboard_usb_hub.c
drivers/usb/typec/altmodes/displayport.c
drivers/usb/typec/tcpm/tcpm.c
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h
include/linux/usb.h

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -5502,8 -5516,8 +5516,10 @@@ void xhci_init_driver(struct hc_driver 
                        drv->check_bandwidth = over->check_bandwidth;
                if (over->reset_bandwidth)
                        drv->reset_bandwidth = over->reset_bandwidth;
+               if (over->update_hub_device)
+                       drv->update_hub_device = over->update_hub_device;
 +              if (over->hub_control)
 +                      drv->hub_control = over->hub_control;
        }
  }
  EXPORT_SYMBOL_GPL(xhci_init_driver);
@@@ -1943,8 -1944,8 +1944,10 @@@ struct xhci_driver_overrides 
                             struct usb_host_endpoint *ep);
        int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
        void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
+       int (*update_hub_device)(struct usb_hcd *hcd, struct usb_device *hdev,
+                           struct usb_tt *tt, gfp_t mem_flags);
 +      int (*hub_control)(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 +                         u16 wIndex, char *buf, u16 wLength);
  };
  
  #define       XHCI_CFC_DELAY          10
Simple merge
Simple merge
@@@ -1551,14 -1426,20 +1557,27 @@@ void ucsi_unregister(struct ucsi *ucsi
                ucsi_unregister_altmodes(&ucsi->connector[i],
                                         UCSI_RECIPIENT_CON);
                ucsi_unregister_port_psy(&ucsi->connector[i]);
-               if (ucsi->connector[i].wq)
+               if (ucsi->connector[i].wq) {
+                       struct ucsi_work *uwork;
+                       mutex_lock(&ucsi->connector[i].lock);
+                       /*
+                        * queue delayed items immediately so they can execute
+                        * and free themselves before the wq is destroyed
+                        */
+                       list_for_each_entry(uwork, &ucsi->connector[i].partner_tasks, node)
+                               mod_delayed_work(ucsi->connector[i].wq, &uwork->work, 0);
+                       mutex_unlock(&ucsi->connector[i].lock);
                        destroy_workqueue(ucsi->connector[i].wq);
+               }
++
 +              usb_power_delivery_unregister_capabilities(ucsi->connector[i].port_sink_caps);
 +              ucsi->connector[i].port_sink_caps = NULL;
 +              usb_power_delivery_unregister_capabilities(ucsi->connector[i].port_source_caps);
 +              ucsi->connector[i].port_source_caps = NULL;
 +              usb_power_delivery_unregister(ucsi->connector[i].pd);
 +              ucsi->connector[i].pd = NULL;
                typec_unregister_port(ucsi->connector[i].port);
        }
  
Simple merge
Simple merge