diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-23 15:52:35 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-23 15:52:35 -0400 |
| commit | e04a0a5ab92d4f74d29dd749e9de8d51ee94b3da (patch) | |
| tree | 3960c0ed66b3bf833c568137aab341771b87d594 | |
| parent | d8524ae9d6f492a9c6db9f4d89c5f9b8782fa2d5 (diff) | |
| parent | 42f4891ca29a3c1535692a24acefb7015bbbc077 (diff) | |
Merge tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
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()
31 files changed, 81 insertions, 72 deletions
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index b870872e020f..70fc43027a5c 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | config USB_DWC3 | 1 | config USB_DWC3 |
| 2 | tristate "DesignWare USB3 DRD Core Support" | 2 | tristate "DesignWare USB3 DRD Core Support" |
| 3 | depends on (USB || USB_GADGET) && HAS_DMA | 3 | depends on (USB || USB_GADGET) && HAS_DMA |
| 4 | depends on EXTCON | ||
| 5 | select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD | 4 | select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD |
| 6 | help | 5 | help |
| 7 | Say Y or M here if your system has a Dual Role SuperSpeed | 6 | Say Y or M here if your system has a Dual Role SuperSpeed |
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 9b138129e856..997ebe420bc9 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | /* FIXME define these in <linux/pci_ids.h> */ | 28 | /* FIXME define these in <linux/pci_ids.h> */ |
| 29 | #define PCI_VENDOR_ID_SYNOPSYS 0x16c3 | 29 | #define PCI_VENDOR_ID_SYNOPSYS 0x16c3 |
| 30 | #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd | 30 | #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd |
| 31 | #define PCI_DEVICE_ID_INTEL_BYT 0x0f37 | ||
| 31 | 32 | ||
| 32 | struct dwc3_pci { | 33 | struct dwc3_pci { |
| 33 | struct device *dev; | 34 | struct device *dev; |
| @@ -187,6 +188,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = { | |||
| 187 | PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS, | 188 | PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS, |
| 188 | PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3), | 189 | PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3), |
| 189 | }, | 190 | }, |
| 191 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), }, | ||
| 190 | { } /* Terminating Entry */ | 192 | { } /* Terminating Entry */ |
| 191 | }; | 193 | }; |
| 192 | MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); | 194 | MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index f168eaebdef8..5452c0fce360 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
| @@ -2611,15 +2611,13 @@ int dwc3_gadget_init(struct dwc3 *dwc) | |||
| 2611 | ret = usb_add_gadget_udc(dwc->dev, &dwc->gadget); | 2611 | ret = usb_add_gadget_udc(dwc->dev, &dwc->gadget); |
| 2612 | if (ret) { | 2612 | if (ret) { |
| 2613 | dev_err(dwc->dev, "failed to register udc\n"); | 2613 | dev_err(dwc->dev, "failed to register udc\n"); |
| 2614 | goto err5; | 2614 | goto err4; |
| 2615 | } | 2615 | } |
| 2616 | 2616 | ||
| 2617 | return 0; | 2617 | return 0; |
| 2618 | 2618 | ||
| 2619 | err5: | ||
| 2620 | dwc3_gadget_free_endpoints(dwc); | ||
| 2621 | |||
| 2622 | err4: | 2619 | err4: |
| 2620 | dwc3_gadget_free_endpoints(dwc); | ||
| 2623 | dma_free_coherent(dwc->dev, DWC3_EP0_BOUNCE_SIZE, | 2621 | dma_free_coherent(dwc->dev, DWC3_EP0_BOUNCE_SIZE, |
| 2624 | dwc->ep0_bounce, dwc->ep0_bounce_addr); | 2622 | dwc->ep0_bounce, dwc->ep0_bounce_addr); |
| 2625 | 2623 | ||
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index 5a5acf22c694..e126b6b248e6 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c | |||
| @@ -113,12 +113,6 @@ static int __init cdc_do_config(struct usb_configuration *c) | |||
| 113 | c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; | 113 | c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | fi_ecm = usb_get_function_instance("ecm"); | ||
| 117 | if (IS_ERR(fi_ecm)) { | ||
| 118 | status = PTR_ERR(fi_ecm); | ||
| 119 | goto err_func_ecm; | ||
| 120 | } | ||
| 121 | |||
| 122 | f_ecm = usb_get_function(fi_ecm); | 116 | f_ecm = usb_get_function(fi_ecm); |
| 123 | if (IS_ERR(f_ecm)) { | 117 | if (IS_ERR(f_ecm)) { |
| 124 | status = PTR_ERR(f_ecm); | 118 | status = PTR_ERR(f_ecm); |
| @@ -129,35 +123,24 @@ static int __init cdc_do_config(struct usb_configuration *c) | |||
| 129 | if (status) | 123 | if (status) |
| 130 | goto err_add_ecm; | 124 | goto err_add_ecm; |
| 131 | 125 | ||
| 132 | fi_serial = usb_get_function_instance("acm"); | ||
| 133 | if (IS_ERR(fi_serial)) { | ||
| 134 | status = PTR_ERR(fi_serial); | ||
| 135 | goto err_get_acm; | ||
| 136 | } | ||
| 137 | |||
| 138 | f_acm = usb_get_function(fi_serial); | 126 | f_acm = usb_get_function(fi_serial); |
| 139 | if (IS_ERR(f_acm)) { | 127 | if (IS_ERR(f_acm)) { |
| 140 | status = PTR_ERR(f_acm); | 128 | status = PTR_ERR(f_acm); |
| 141 | goto err_func_acm; | 129 | goto err_get_acm; |
| 142 | } | 130 | } |
| 143 | 131 | ||
| 144 | status = usb_add_function(c, f_acm); | 132 | status = usb_add_function(c, f_acm); |
| 145 | if (status) | 133 | if (status) |
| 146 | goto err_add_acm; | 134 | goto err_add_acm; |
| 147 | |||
| 148 | return 0; | 135 | return 0; |
| 149 | 136 | ||
| 150 | err_add_acm: | 137 | err_add_acm: |
| 151 | usb_put_function(f_acm); | 138 | usb_put_function(f_acm); |
| 152 | err_func_acm: | ||
| 153 | usb_put_function_instance(fi_serial); | ||
| 154 | err_get_acm: | 139 | err_get_acm: |
| 155 | usb_remove_function(c, f_ecm); | 140 | usb_remove_function(c, f_ecm); |
| 156 | err_add_ecm: | 141 | err_add_ecm: |
| 157 | usb_put_function(f_ecm); | 142 | usb_put_function(f_ecm); |
| 158 | err_get_ecm: | 143 | err_get_ecm: |
| 159 | usb_put_function_instance(fi_ecm); | ||
| 160 | err_func_ecm: | ||
| 161 | return status; | 144 | return status; |
| 162 | } | 145 | } |
| 163 | 146 | ||
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 06ecd08fd57a..b8a2376971a4 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
| @@ -923,8 +923,9 @@ static int dummy_udc_stop(struct usb_gadget *g, | |||
| 923 | struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); | 923 | struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); |
| 924 | struct dummy *dum = dum_hcd->dum; | 924 | struct dummy *dum = dum_hcd->dum; |
| 925 | 925 | ||
| 926 | dev_dbg(udc_dev(dum), "unregister gadget driver '%s'\n", | 926 | if (driver) |
| 927 | driver->driver.name); | 927 | dev_dbg(udc_dev(dum), "unregister gadget driver '%s'\n", |
| 928 | driver->driver.name); | ||
| 928 | 929 | ||
| 929 | dum->driver = NULL; | 930 | dum->driver = NULL; |
| 930 | 931 | ||
| @@ -1000,8 +1001,8 @@ static int dummy_udc_remove(struct platform_device *pdev) | |||
