Skip to content

Commit

Permalink
Merge tag 'usb-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/gregkh/usb

Pull USB fixes from Greg Kroah-Hartman:
 "Here are a number of tiny USB bugfixes / new device ids for 3.10-rc2

  The majority of these are USB gadget fixes, but they are all small.
  Other than that, some USB host controller fixes, and USB serial driver
  fixes for problems reported with them.

  Also hopefully a fixed up USB_OTG Kconfig dependancy, that one seems
  to be almost impossible to get right for all of the different
  platforms these days."

* tag 'usb-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (56 commits)
  USB: cxacru: potential underflow in cxacru_cm_get_array()
  USB: ftdi_sio: Add support for Newport CONEX motor drivers
  USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card
  usb: ohci: fix goto wrong tag in err case
  usb: isp1760-if: fix memleak when platform_get_resource fail
  usb: ehci-s5p: fix memleak when fallback to pdata
  USB: serial: clean up chars_in_buffer
  USB: ti_usb_3410_5052: fix chars_in_buffer overhead
  USB: io_ti: fix chars_in_buffer overhead
  USB: ftdi_sio: fix chars_in_buffer overhead
  USB: ftdi_sio: clean up get_modem_status
  USB: serial: add generic wait_until_sent implementation
  USB: serial: add wait_until_sent operation
  USB: set device dma_mask without reference to global data
  USB: Blacklisted Cinterion's PLxx WWAN Interface
  usb: option: Add Telewell TW-LTE 4G
  USB: EHCI: remove bogus #error
  USB: reset resume quirk needed by a hub
  USB: usb-stor: realtek_cr: Fix compile error
  usb, chipidea: fix link error when USB_EHCI_HCD is a module
  ...
  • Loading branch information
Linus Torvalds committed May 23, 2013
2 parents 72dd4e7 + 2a0ebf8 commit b641940
Show file tree
Hide file tree
Showing 75 changed files with 268 additions and 238 deletions.
1 change: 0 additions & 1 deletion arch/arm/configs/omap1_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ CONFIG_USB_PHY=y
CONFIG_USB_DEBUG=y
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_SUSPEND=y
CONFIG_USB_MON=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_STORAGE=y
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/omap2plus_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ CONFIG_USB=y
CONFIG_USB_DEBUG=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_MON=y
CONFIG_USB_WDM=y
CONFIG_USB_STORAGE=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/db1000_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ CONFIG_HIDRAW=y
CONFIG_USB_HID=y
CONFIG_USB_SUPPORT=y
CONFIG_USB=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/db1235_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ CONFIG_UHID=y
CONFIG_USB_HIDDEV=y
CONFIG_USB=y
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/lemote2f_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_OTG_WHITELIST=y
CONFIG_USB_MON=y
CONFIG_USB_EHCI_HCD=y
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/configs/ps3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ CONFIG_HID_SMARTJOYPLUS=m
CONFIG_USB_HIDDEV=y
CONFIG_USB=m
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_MON=m
CONFIG_USB_EHCI_HCD=m
# CONFIG_USB_EHCI_HCD_PPC_OF is not set
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)

/* usbnet already took usb runtime pm, so have to enable the feature
* for usb interface, otherwise usb_autopm_get_interface may return
* failure if USB_SUSPEND(RUNTIME_PM) is enabled.
* failure if RUNTIME_PM is enabled.
*/
if (!driver->supports_autosuspend) {
driver->supports_autosuspend = 1;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/dwc2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ config USB_DWC2
tristate "DesignWare USB2 DRD Core Support"
depends on USB
depends on VIRT_TO_BUS
select USB_OTG_UTILS
help
Say Y or M here if your system has a Dual Role HighSpeed
USB controller based on the DesignWare HSOTG IP Core.
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/gdm72xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if WIMAX_GDM72XX_USB

config WIMAX_GDM72XX_USB_PM
bool "Enable power managerment support"
depends on USB_SUSPEND
depends on PM_RUNTIME

endif # WIMAX_GDM72XX_USB

Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/atm/cxacru.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@ static int cxacru_cm_get_array(struct cxacru_data *instance, enum cxacru_cm_requ
{
int ret, len;
__le32 *buf;
int offb, offd;
int offb;
unsigned int offd;
const int stride = CMD_PACKET_SIZE / (4 * 2) - 1;
int buflen = ((size - 1) / stride + 1 + size * 2) * 4;

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/chipidea/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ config USB_CHIPIDEA_UDC
config USB_CHIPIDEA_HOST
bool "ChipIdea host controller"
depends on USB=y || USB=USB_CHIPIDEA
depends on USB_EHCI_HCD
depends on USB_EHCI_HCD=y
select USB_EHCI_ROOT_HUB_TT
help
Say Y here to enable host controller functionality of the
Expand Down
15 changes: 4 additions & 11 deletions drivers/usb/chipidea/ci13xxx_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,10 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)

ci13xxx_imx_platdata.phy = data->phy;

if (!pdev->dev.dma_mask) {
pdev->dev.dma_mask = devm_kzalloc(&pdev->dev,
sizeof(*pdev->dev.dma_mask), GFP_KERNEL);
if (!pdev->dev.dma_mask) {
ret = -ENOMEM;
dev_err(&pdev->dev, "Failed to alloc dma_mask!\n");
goto err;
}
*pdev->dev.dma_mask = DMA_BIT_MASK(32);
dma_set_coherent_mask(&pdev->dev, *pdev->dev.dma_mask);
}
if (!pdev->dev.dma_mask)
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
if (!pdev->dev.coherent_dma_mask)
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);

if (usbmisc_ops && usbmisc_ops->init) {
ret = usbmisc_ops->init(&pdev->dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ config USB_DYNAMIC_MINORS

config USB_OTG
bool "OTG support"
depends on USB_SUSPEND
depends on PM_RUNTIME
default n
help
The most notable feature of USB OTG is support for a
Expand Down
3 changes: 3 additions & 0 deletions drivers/usb/core/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Edirol SD-20 */
{ USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },

/* Alcor Micro Corp. Hub */
{ USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME },

/* appletouch */
{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },

Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/dwc3/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ choice

config USB_DWC3_HOST
bool "Host only mode"
depends on USB
depends on USB=y || USB=USB_DWC3
help
Select this when you want to use DWC3 in host mode only,
thereby the gadget feature will be regressed.

config USB_DWC3_GADGET
bool "Gadget only mode"
depends on USB_GADGET
depends on USB_GADGET=y || USB_GADGET=USB_DWC3
help
Select this when you want to use DWC3 in gadget mode only,
thereby the host feature will be regressed.

config USB_DWC3_DUAL_ROLE
bool "Dual Role mode"
depends on (USB && USB_GADGET)
depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))
help
This is the default mode of working of DWC3 controller where
both host and gadget features are enabled.
Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/dwc3/dwc3-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ static int dwc3_exynos_remove_child(struct device *dev, void *unused)
return 0;
}

static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);

static int dwc3_exynos_probe(struct platform_device *pdev)
{
struct dwc3_exynos *exynos;
Expand All @@ -118,7 +116,9 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
* Once we move to full device tree support this will vanish off.
*/
if (!dev->dma_mask)
dev->dma_mask = &dwc3_exynos_dma_mask;
dev->dma_mask = &dev->coherent_dma_mask;
if (!dev->coherent_dma_mask)
dev->coherent_dma_mask = DMA_BIT_MASK(32);

platform_set_drvdata(pdev, exynos);

Expand Down
1 change: 0 additions & 1 deletion drivers/usb/gadget/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ config USB_LPC32XX
depends on ARCH_LPC32XX
depends on USB_PHY
select USB_ISP1301
select USB_OTG_UTILS
help
This option selects the USB device controller in the LPC32xx SoC.

Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/gadget/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1992,8 +1992,6 @@ static int __init usba_udc_probe(struct platform_device *pdev)
err_get_hclk:
clk_put(pclk);

platform_set_drvdata(pdev, NULL);

return ret;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/usb/gadget/bcm63xx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2410,7 +2410,6 @@ static int bcm63xx_udc_remove(struct platform_device *pdev)
usb_del_gadget_udc(&udc->gadget);
BUG_ON(udc->driver);

platform_set_drvdata(pdev, NULL);
bcm63xx_uninit_udc_hw(udc);

return 0;
Expand Down
8 changes: 6 additions & 2 deletions drivers/usb/gadget/configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,10 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
gi->gstrings[i] = NULL;
s = usb_gstrings_attach(&gi->cdev, gi->gstrings,
USB_GADGET_FIRST_AVAIL_IDX);
if (IS_ERR(s))
if (IS_ERR(s)) {
ret = PTR_ERR(s);
goto err_comp_cleanup;
}

gi->cdev.desc.iManufacturer = s[USB_GADGET_MANUFACTURER_IDX].id;
gi->cdev.desc.iProduct = s[USB_GADGET_PRODUCT_IDX].id;
Expand All @@ -847,8 +849,10 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
}
cfg->gstrings[i] = NULL;
s = usb_gstrings_attach(&gi->cdev, cfg->gstrings, 1);
if (IS_ERR(s))
if (IS_ERR(s)) {
ret = PTR_ERR(s);
goto err_comp_cleanup;
}
c->iConfiguration = s[0].id;
}

Expand Down
5 changes: 3 additions & 2 deletions drivers/usb/gadget/dummy_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ static int dummy_udc_remove(struct platform_device *pdev)
struct dummy *dum = platform_get_drvdata(pdev);

usb_del_gadget_udc(&dum->gadget);
platform_set_drvdata(pdev, NULL);
device_remove_file(&dum->gadget.dev, &dev_attr_function);
return 0;
}
Expand Down Expand Up @@ -2661,8 +2660,10 @@ static int __init init(void)
}
for (i = 0; i < mod_data.num; i++) {
dum[i] = kzalloc(sizeof(struct dummy), GFP_KERNEL);
if (!dum[i])
if (!dum[i]) {
retval = -ENOMEM;
goto err_add_pdata;
}
retval = platform_device_add_data(the_hcd_pdev[i], &dum[i],
sizeof(void *));
if (retval)
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/gadget/f_ecm.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ ecm_unbind(struct usb_configuration *c, struct usb_function *f)
* @c: the configuration to support the network link
* @ethaddr: a buffer in which the ethernet address of the host side
* side of the link was recorded
* @dev: eth_dev structure
* Context: single threaded during gadget setup
*
* Returns zero on success, else negative errno.
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/gadget/f_subset.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ geth_unbind(struct usb_configuration *c, struct usb_function *f)
* @c: the configuration to support the network link
* @ethaddr: a buffer in which the ethernet address of the host side
* side of the link was recorded
* @dev: eth_dev structure
* Context: single threaded during gadget setup
*
* Returns zero on success, else negative errno.
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/gadget/f_uac2.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,6 @@ static int snd_uac2_remove(struct platform_device *pdev)
{
struct snd_card *card = platform_get_drvdata(pdev);

platform_set_drvdata(pdev, NULL);

if (card)
return snd_card_free(card);

Expand Down
4 changes: 3 additions & 1 deletion drivers/usb/gadget/fusb300_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,8 +1461,10 @@ static int __init fusb300_probe(struct platform_device *pdev)

fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep,
GFP_KERNEL);
if (fusb300->ep0_req == NULL)
if (fusb300->ep0_req == NULL) {
ret = -ENOMEM;
goto clean_up3;
}

init_controller(fusb300);
ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget);
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/gadget/imx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1511,8 +1511,6 @@ static int __exit imx_udc_remove(struct platform_device *pdev)
if (pdata->exit)
pdata->exit(&pdev->dev);

platform_set_drvdata(pdev, NULL);

return 0;
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/usb/gadget/m66592-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,8 +1660,10 @@ static int __init m66592_probe(struct platform_device *pdev)
m66592->epaddr2ep[0] = &m66592->ep[0];

m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL);
if (m66592->ep0_req == NULL)
if (m66592->ep0_req == NULL) {
ret = -ENOMEM;
goto clean_up3;
}
m66592->ep0_req->complete = nop_completion;

init_controller(m66592);
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/gadget/pxa25x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2236,7 +2236,6 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev)
dev->transceiver = NULL;
}

platform_set_drvdata(pdev, NULL);
the_controller = NULL;
return 0;
}
Expand Down
4 changes: 3 additions & 1 deletion drivers/usb/gadget/r8a66597-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1977,8 +1977,10 @@ static int __init r8a66597_probe(struct platform_device *pdev)

r8a66597->ep0_req = r8a66597_alloc_request(&r8a66597->ep[0].ep,
GFP_KERNEL);
if (r8a66597->ep0_req == NULL)
if (r8a66597->ep0_req == NULL) {
ret = -ENOMEM;
goto clean_up3;
}
r8a66597->ep0_req->complete = nop_completion;

ret = usb_add_gadget_udc(&pdev->dev, &r8a66597->gadget);
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ static void s3c_hsotg_unmap_dma(struct s3c_hsotg *hsotg,
if (hs_req->req.length == 0)
return;

usb_gadget_unmap_request(&hsotg->gadget, hs_req, hs_ep->dir_in);
usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions drivers/usb/gadget/s3c2410_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
irq = gpio_to_irq(udc_info->vbus_pin);
if (irq < 0) {
dev_err(dev, "no irq for gpio vbus pin\n");
retval = irq;
goto err_gpio_claim;
}

Expand Down Expand Up @@ -1948,8 +1949,6 @@ static int s3c2410_udc_remove(struct platform_device *pdev)
iounmap(base_addr);
release_mem_region(rsrc_start, rsrc_len);

platform_set_drvdata(pdev, NULL);

if (!IS_ERR(udc_clock) && udc_clock != NULL) {
clk_disable(udc_clock);
clk_put(udc_clock);
Expand Down
8 changes: 6 additions & 2 deletions drivers/usb/gadget/zero.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,16 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
ss_opts->bulk_buflen = gzero_options.bulk_buflen;

func_ss = usb_get_function(func_inst_ss);
if (IS_ERR(func_ss))
if (IS_ERR(func_ss)) {
status = PTR_ERR(func_ss);
goto err_put_func_inst_ss;
}

func_inst_lb = usb_get_function_instance("Loopback");
if (IS_ERR(func_inst_lb))
if (IS_ERR(func_inst_lb)) {
status = PTR_ERR(func_inst_lb);
goto err_put_func_ss;
}

lb_opts = container_of(func_inst_lb, struct f_lb_opts, func_inst);
lb_opts->bulk_buflen = gzero_options.bulk_buflen;
Expand Down
Loading

0 comments on commit b641940

Please sign in to comment.