mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
USB fixes for 6.2-rc7
Here are some small USB fixes for 6.2-rc7 that resolve some reported problems. These include: - gadget driver fixes - dwc3 driver fix - typec driver fix - MAINTAINERS file update. All of these have been in linux-next with no reported problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCY9+WCw8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yn/VwCfR7EXWarbaSbNM12kGQd5aU/r2QgAoLZy81Yg lkxWtksTfGGrHI6g9JAs =1VJG -----END PGP SIGNATURE----- Merge tag 'usb-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes that resolve some reported problems. These include: - gadget driver fixes - dwc3 driver fix - typec driver fix - MAINTAINERS file update. All of these have been in linux-next with no reported problems" * tag 'usb-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: ucsi: Don't attempt to resume the ports before they exist usb: gadget: udc: do not clear gadget driver.bus usb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait usb: dwc3: qcom: enable vbus override when in OTG dr-mode MAINTAINERS: Add myself as UVC Gadget Maintainer
This commit is contained in:
commit
c608f6b58f
@ -21730,6 +21730,7 @@ F: include/uapi/linux/uvcvideo.h
|
||||
|
||||
USB WEBCAM GADGET
|
||||
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
M: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/usb/gadget/function/*uvc*
|
||||
|
@ -901,7 +901,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
|
||||
qcom->mode = usb_get_dr_mode(&qcom->dwc3->dev);
|
||||
|
||||
/* enable vbus override for device mode */
|
||||
if (qcom->mode == USB_DR_MODE_PERIPHERAL)
|
||||
if (qcom->mode != USB_DR_MODE_HOST)
|
||||
dwc3_qcom_vbus_override_enable(qcom, true);
|
||||
|
||||
/* register extcon to override sw_vbus on Vbus change later */
|
||||
|
@ -1014,7 +1014,6 @@ static int fotg210_udc_start(struct usb_gadget *g,
|
||||
int ret;
|
||||
|
||||
/* hook up the driver */
|
||||
driver->driver.bus = NULL;
|
||||
fotg210->driver = driver;
|
||||
|
||||
if (!IS_ERR_OR_NULL(fotg210->phy)) {
|
||||
|
@ -279,8 +279,10 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)
|
||||
struct usb_request *req = ffs->ep0req;
|
||||
int ret;
|
||||
|
||||
if (!req)
|
||||
if (!req) {
|
||||
spin_unlock_irq(&ffs->ev.waitq.lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
req->zero = len < le16_to_cpu(ffs->ev.setup.wLength);
|
||||
|
||||
|
@ -1142,6 +1142,7 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
|
||||
}
|
||||
std_as_out_if0_desc.bInterfaceNumber = ret;
|
||||
std_as_out_if1_desc.bInterfaceNumber = ret;
|
||||
std_as_out_if1_desc.bNumEndpoints = 1;
|
||||
uac2->as_out_intf = ret;
|
||||
uac2->as_out_alt = 0;
|
||||
|
||||
|
@ -1830,7 +1830,6 @@ static int bcm63xx_udc_start(struct usb_gadget *gadget,
|
||||
bcm63xx_select_phy_mode(udc, true);
|
||||
|
||||
udc->driver = driver;
|
||||
driver->driver.bus = NULL;
|
||||
udc->gadget.dev.of_node = udc->dev->of_node;
|
||||
|
||||
spin_unlock_irqrestore(&udc->lock, flags);
|
||||
|
@ -2285,7 +2285,6 @@ static int fsl_qe_start(struct usb_gadget *gadget,
|
||||
/* lock is needed but whether should use this lock or another */
|
||||
spin_lock_irqsave(&udc->lock, flags);
|
||||
|
||||
driver->driver.bus = NULL;
|
||||
/* hook up the driver */
|
||||
udc->driver = driver;
|
||||
udc->gadget.speed = driver->max_speed;
|
||||
|
@ -1943,7 +1943,6 @@ static int fsl_udc_start(struct usb_gadget *g,
|
||||
/* lock is needed but whether should use this lock or another */
|
||||
spin_lock_irqsave(&udc_controller->lock, flags);
|
||||
|
||||
driver->driver.bus = NULL;
|
||||
/* hook up the driver */
|
||||
udc_controller->driver = driver;
|
||||
spin_unlock_irqrestore(&udc_controller->lock, flags);
|
||||
|
@ -1311,7 +1311,6 @@ static int fusb300_udc_start(struct usb_gadget *g,
|
||||
struct fusb300 *fusb300 = to_fusb300(g);
|
||||
|
||||
/* hook up the driver */
|
||||
driver->driver.bus = NULL;
|
||||
fusb300->driver = driver;
|
||||
|
||||
return 0;
|
||||
|
@ -1375,7 +1375,6 @@ static int goku_udc_start(struct usb_gadget *g,
|
||||
struct goku_udc *dev = to_goku_udc(g);
|
||||
|
||||
/* hook up the driver */
|
||||
driver->driver.bus = NULL;
|
||||
dev->driver = driver;
|
||||
|
||||
/*
|
||||
|
@ -1906,7 +1906,6 @@ static int gr_udc_start(struct usb_gadget *gadget,
|
||||
spin_lock(&dev->lock);
|
||||
|
||||
/* Hook up the driver */
|
||||
driver->driver.bus = NULL;
|
||||
dev->driver = driver;
|
||||
|
||||
/* Get ready for host detection */
|
||||
|
@ -1454,7 +1454,6 @@ static int m66592_udc_start(struct usb_gadget *g,
|
||||
struct m66592 *m66592 = to_m66592(g);
|
||||
|
||||
/* hook up the driver */
|
||||
driver->driver.bus = NULL;
|
||||
m66592->driver = driver;
|
||||
|
||||
m66592_bset(m66592, M66592_VBSE | M66592_URST, M66592_INTENB0);
|
||||
|
@ -1108,7 +1108,6 @@ static int max3420_udc_start(struct usb_gadget *gadget,
|
||||
|
||||
spin_lock_irqsave(&udc->lock, flags);
|
||||
/* hook up the driver */
|
||||
driver->driver.bus = NULL;
|
||||
udc->driver = driver;
|
||||
udc->gadget.speed = USB_SPEED_FULL;
|
||||
|
||||
|
@ -1243,7 +1243,6 @@ static int mv_u3d_start(struct usb_gadget *g,
|
||||
}
|
||||
|
||||
/* hook up the driver ... */
|
||||
driver->driver.bus = NULL;
|
||||
u3d->driver = driver;
|
||||
|
||||
u3d->ep0_dir = USB_DIR_OUT;
|
||||
|
@ -1359,7 +1359,6 @@ static int mv_udc_start(struct usb_gadget *gadget,
|
||||
spin_lock_irqsave(&udc->lock, flags);
|
||||
|
||||
/* hook up the driver ... */
|
||||
driver->driver.bus = NULL;
|
||||
udc->driver = driver;
|
||||
|
||||
udc->usb_state = USB_STATE_ATTACHED;
|
||||
|
@ -1451,7 +1451,6 @@ static int net2272_start(struct usb_gadget *_gadget,
|
||||
dev->ep[i].irqs = 0;
|
||||
/* hook up the driver ... */
|
||||
dev->softconnect = 1;
|
||||
driver->driver.bus = NULL;
|
||||
dev->driver = driver;
|
||||
|
||||
/* ... then enable host detection and ep0; and we're ready
|
||||
|
@ -2423,7 +2423,6 @@ static int net2280_start(struct usb_gadget *_gadget,
|
||||
dev->ep[i].irqs = 0;
|
||||
|
||||
/* hook up the driver ... */
|
||||
driver->driver.bus = NULL;
|
||||
dev->driver = driver;
|
||||
|
||||
retval = device_create_file(&dev->pdev->dev, &dev_attr_function);
|
||||
|
@ -2066,7 +2066,6 @@ static int omap_udc_start(struct usb_gadget *g,
|
||||
udc->softconnect = 1;
|
||||
|
||||
/* hook up the driver */
|
||||
driver->driver.bus = NULL;
|
||||
udc->driver = driver;
|
||||
spin_unlock_irqrestore(&udc->lock, flags);
|
||||
|
||||
|
@ -2908,7 +2908,6 @@ static int pch_udc_start(struct usb_gadget *g,
|
||||
{
|
||||
struct pch_udc_dev *dev = to_pch_udc(g);
|
||||
|
||||
driver->driver.bus = NULL;
|
||||
dev->driver = driver;
|
||||
|
||||
/* get ready for ep0 traffic */
|
||||
|
@ -1933,7 +1933,6 @@ static int amd5536_udc_start(struct usb_gadget *g,
|
||||
struct udc *dev = to_amd5536_udc(g);
|
||||
u32 tmp;
|
||||
|
||||
driver->driver.bus = NULL;
|
||||
dev->driver = driver;
|
||||
|
||||
/* Some gadget drivers use both ep0 directions.
|
||||
|
@ -1269,6 +1269,9 @@ err_unregister:
|
||||
con->port = NULL;
|
||||
}
|
||||
|
||||
kfree(ucsi->connector);
|
||||
ucsi->connector = NULL;
|
||||
|
||||
err_reset:
|
||||
memset(&ucsi->cap, 0, sizeof(ucsi->cap));
|
||||
ucsi_reset_ppm(ucsi);
|
||||
@ -1300,7 +1303,8 @@ static void ucsi_resume_work(struct work_struct *work)
|
||||
|
||||
int ucsi_resume(struct ucsi *ucsi)
|
||||
{
|
||||
queue_work(system_long_wq, &ucsi->resume_work);
|
||||
if (ucsi->connector)
|
||||
queue_work(system_long_wq, &ucsi->resume_work);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ucsi_resume);
|
||||
@ -1420,6 +1424,9 @@ void ucsi_unregister(struct ucsi *ucsi)
|
||||
/* Disable notifications */
|
||||
ucsi->ops->async_write(ucsi, UCSI_CONTROL, &cmd, sizeof(cmd));
|
||||
|
||||
if (!ucsi->connector)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ucsi->cap.num_connectors; i++) {
|
||||
cancel_work_sync(&ucsi->connector[i].work);
|
||||
ucsi_unregister_partner(&ucsi->connector[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user