diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 16:00:43 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 16:00:43 -0400 |
| commit | 42f4891ca29a3c1535692a24acefb7015bbbc077 (patch) | |
| tree | 4866cedc093bb53e92f531c35b7eaa92f8e9221d | |
| parent | 7d26a78f62ff4fb08bc5ba740a8af4aa7ac67da4 (diff) | |
| parent | d3675e3a481d3320e214984a10577fe06518c5bf (diff) | |
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: Felipe Balbi <balbi@ti.com>
| -rw-r--r-- | drivers/usb/dwc3/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/usb/dwc3/dwc3-pci.c | 2 | ||||
| -rw-r--r-- | drivers/usb/dwc3/gadget.c | 6 | ||||
| -rw-r--r-- | drivers/usb/gadget/cdc2.c | 19 | ||||
| -rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 7 | ||||
| -rw-r--r-- | drivers/usb/gadget/f_ecm.c | 2 | ||||
| -rw-r--r-- | drivers/usb/gadget/f_eem.c | 2 | ||||
| -rw-r--r-- | drivers/usb/gadget/f_mass_storage.c | 2 | ||||
| -rw-r--r-- | drivers/usb/gadget/multi.c | 8 | ||||
| -rw-r--r-- | drivers/usb/gadget/mv_u3d_core.c | 3 | ||||
| -rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 13 | ||||
| -rw-r--r-- | drivers/usb/host/fsl-mph-dr-of.c | 6 | ||||
| -rw-r--r-- | drivers/usb/phy/phy-omap-usb3.c | 2 |
13 files changed, 28 insertions, 45 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) | |||
| 1000 | { | 1001 | { |
| 1001 | struct dummy *dum = platform_get_drvdata(pdev); | 1002 | struct dummy *dum = platform_get_drvdata(pdev); |
| 1002 | 1003 | ||
| 1003 | usb_del_gadget_udc(&dum->gadget); | ||
| 1004 | device_remove_file(&dum->gadget.dev, &dev_attr_function); | 1004 | device_remove_file(&dum->gadget.dev, &dev_attr_function); |
| 1005 | usb_del_gadget_udc(&dum->gadget); | ||
| 1005 | return 0; | 1006 | return 0; |
| 1006 | } | 1007 | } |
| 1007 | 1008 | ||
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index edab45da3741..8d9e6f7e8f1a 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c | |||
| @@ -995,7 +995,7 @@ static void ecm_unbind(struct usb_configuration *c, struct usb_function *f) | |||
| 995 | usb_ep_free_request(ecm->notify, ecm->notify_req); | 995 | usb_ep_free_request(ecm->notify, ecm->notify_req); |
| 996 | } | 996 | } |
| 997 | 997 | ||
| 998 | struct usb_function *ecm_alloc(struct usb_function_instance *fi) | 998 | static struct usb_function *ecm_alloc(struct usb_function_instance *fi) |
| 999 | { | 999 | { |
| 1000 | struct f_ecm *ecm; | 1000 | struct f_ecm *ecm; |
| 1001 | struct f_ecm_opts *opts; | 1001 | struct f_ecm_opts *opts; |
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index d00392d879db..d61c11d765d0 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c | |||
| @@ -624,7 +624,7 @@ static void eem_unbind(struct usb_configuration *c, struct usb_function *f) | |||
| 624 | usb_free_all_descriptors(f); | 624 | usb_free_all_descriptors(f); |
| 625 | } | 625 | } |
| 626 | <|||
