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

Commit e04a0a5a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB fixes from Greg KH:
 "Here are a number of small USB fixes for 3.12-rc2.

  One is a revert of a EHCI change that isn't quite ready for 3.12.
  Others are minor things, gadget fixes, Kconfig fixes, and some quirks
  and documentation updates.

  All have been in linux-next for a bit"

* tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: pl2303: distinguish between original and cloned HX chips
  USB: Faraday fotg210: fix email addresses
  USB: fix typo in usb serial simple driver Kconfig
  Revert "USB: EHCI: support running URB giveback in tasklet context"
  usb: s3c-hsotg: do not disconnect gadget when receiving ErlySusp intr
  usb: s3c-hsotg: fix unregistration function
  usb: gadget: f_mass_storage: reset endpoint driver data when disabled
  usb: host: fsl-mph-dr-of: Staticize local symbols
  usb: gadget: f_eem: Staticize eem_alloc
  usb: gadget: f_ecm: Staticize ecm_alloc
  usb: phy: omap-usb3: Fix return value
  usb: dwc3: gadget: avoid memory leak when failing to allocate all eps
  usb: dwc3: remove extcon dependency
  usb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()
  usb: dwc3: pci: add support for BayTrail
  usb: gadget: cdc2: fix conversion to new interface of f_ecm
  usb: gadget: fix a bug and a WARN_ON in dummy-hcd
  usb: gadget: mv_u3d_core: fix violation of locking discipline in mv_u3d_ep_disable()
parents d8524ae9 42f4891c
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
config USB_DWC3
config USB_DWC3
	tristate "DesignWare USB3 DRD Core Support"
	tristate "DesignWare USB3 DRD Core Support"
	depends on (USB || USB_GADGET) && HAS_DMA
	depends on (USB || USB_GADGET) && HAS_DMA
	depends on EXTCON
	select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD
	select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD
	help
	help
	  Say Y or M here if your system has a Dual Role SuperSpeed
	  Say Y or M here if your system has a Dual Role SuperSpeed
+2 −0
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@
/* FIXME define these in <linux/pci_ids.h> */
/* FIXME define these in <linux/pci_ids.h> */
#define PCI_VENDOR_ID_SYNOPSYS		0x16c3
#define PCI_VENDOR_ID_SYNOPSYS		0x16c3
#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3	0xabcd
#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3	0xabcd
#define PCI_DEVICE_ID_INTEL_BYT		0x0f37


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


	return 0;
	return 0;


err5:
	dwc3_gadget_free_endpoints(dwc);

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


+1 −18
Original line number Original line 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;
		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);
	f_ecm = usb_get_function(fi_ecm);
	if (IS_ERR(f_ecm)) {
	if (IS_ERR(f_ecm)) {
		status = PTR_ERR(f_ecm);
		status = PTR_ERR(f_ecm);
@@ -129,35 +123,24 @@ static int __init cdc_do_config(struct usb_configuration *c)
	if (status)
	if (status)
		goto err_add_ecm;
		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);
	f_acm = usb_get_function(fi_serial);
	if (IS_ERR(f_acm)) {
	if (IS_ERR(f_acm)) {
		status = PTR_ERR(f_acm);
		status = PTR_ERR(f_acm);
		goto err_func_acm;
		goto err_get_acm;
	}
	}


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

	return 0;
	return 0;


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


+4 −3
Original line number Original line 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_hcd	*dum_hcd = gadget_to_dummy_hcd(g);
	struct dummy		*dum = dum_hcd->dum;
	struct dummy		*dum = dum_hcd->dum;


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


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


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


Loading