Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42f4891c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'fixes-for-v3.12-rc2' of...

Merge tag 'fixes-for-v3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb

 into usb-linus

Felipe writes:

usb: fixes for v3.12-rc2

Here's first set of fixes for v3.12-rc series, patches have
been soaking in linux-usb for a while now.

We have the usual sparse and build warnings, a Kconfig fix
to a mismerge on dwc3 Kconfig, fix for a possible memory leak
in dwc3, s3c-hsotg won't disconnect when bus goes idle, locking
fix in mv_u3d_core, endpoint disable fix in f_mass_storage.

We also have one device ID added to dwc3's PCI glue layer in order
to support Intel's BayTrail devices.

Signed-of-by: default avatarFelipe Balbi <balbi@ti.com>
parents 7d26a78f d3675e3a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
config USB_DWC3
	tristate "DesignWare USB3 DRD Core Support"
	depends on (USB || USB_GADGET) && HAS_DMA
	depends on EXTCON
	select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD
	help
	  Say Y or M here if your system has a Dual Role SuperSpeed
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
/* FIXME define these in <linux/pci_ids.h> */
#define PCI_VENDOR_ID_SYNOPSYS		0x16c3
#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3	0xabcd
#define PCI_DEVICE_ID_INTEL_BYT		0x0f37

struct dwc3_pci {
	struct device		*dev;
@@ -187,6 +188,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = {
		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
				PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3),
	},
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), },
	{  }	/* Terminating Entry */
};
MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table);
+2 −4
Original line number Diff line number Diff line
@@ -2611,15 +2611,13 @@ int dwc3_gadget_init(struct dwc3 *dwc)
	ret = usb_add_gadget_udc(dwc->dev, &dwc->gadget);
	if (ret) {
		dev_err(dwc->dev, "failed to register udc\n");
		goto err5;
		goto err4;
	}

	return 0;

err5:
	dwc3_gadget_free_endpoints(dwc);

err4:
	dwc3_gadget_free_endpoints(dwc);
	dma_free_coherent(dwc->dev, DWC3_EP0_BOUNCE_SIZE,
			dwc->ep0_bounce, dwc->ep0_bounce_addr);

+1 −18
Original line number Diff line number Diff line
@@ -113,12 +113,6 @@ static int __init cdc_do_config(struct usb_configuration *c)
		c->bmAttributes |= USB_CONFIG_ATT_WAKEUP;
	}

	fi_ecm = usb_get_function_instance("ecm");
	if (IS_ERR(fi_ecm)) {
		status = PTR_ERR(fi_ecm);
		goto err_func_ecm;
	}

	f_ecm = usb_get_function(fi_ecm);
	if (IS_ERR(f_ecm)) {
		status = PTR_ERR(f_ecm);
@@ -129,35 +123,24 @@ static int __init cdc_do_config(struct usb_configuration *c)
	if (status)
		goto err_add_ecm;

	fi_serial = usb_get_function_instance("acm");
	if (IS_ERR(fi_serial)) {
		status = PTR_ERR(fi_serial);
		goto err_get_acm;
	}

	f_acm = usb_get_function(fi_serial);
	if (IS_ERR(f_acm)) {
		status = PTR_ERR(f_acm);
		goto err_func_acm;
		goto err_get_acm;
	}

	status = usb_add_function(c, f_acm);
	if (status)
		goto err_add_acm;

	return 0;

err_add_acm:
	usb_put_function(f_acm);
err_func_acm:
	usb_put_function_instance(fi_serial);
err_get_acm:
	usb_remove_function(c, f_ecm);
err_add_ecm:
	usb_put_function(f_ecm);
err_get_ecm:
	usb_put_function_instance(fi_ecm);
err_func_ecm:
	return status;
}

+4 −3
Original line number Diff line number Diff line
@@ -923,6 +923,7 @@ static int dummy_udc_stop(struct usb_gadget *g,
	struct dummy_hcd	*dum_hcd = gadget_to_dummy_hcd(g);
	struct dummy		*dum = dum_hcd->dum;

	if (driver)
		dev_dbg(udc_dev(dum), "unregister gadget driver '%s'\n",
				driver->driver.name);

@@ -1000,8 +1001,8 @@ static int dummy_udc_remove(struct platform_device *pdev)
{
	struct dummy	*dum = platform_get_drvdata(pdev);

	usb_del_gadget_udc(&dum->gadget);
	device_remove_file(&dum->gadget.dev, &dev_attr_function);
	usb_del_gadget_udc(&dum->gadget);
	return 0;
}

Loading