summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2
Commit message (Collapse)AuthorAgeFilesLines
* usb: dwc2: handle DMA buffer unmapping sanelyPaul Zimmerman2014-09-194-48/+36
| | | | | | | | | | | | | | | | | | | | The driver's handling of DMA buffers for non-aligned transfers was kind of nuts. For IN transfers, it left the URB DMA buffer mapped until the transfer completed, then synced it, copied the data from the bounce buffer, then synced it again. Instead of that, just call usb_hcd_unmap_urb_for_dma() to unmap the buffer before starting the transfer. Then no syncing is required when doing the copy. This should also allow handling of other types of mappings besides just dma_map_single() ones. Also reduce the size of the bounce buffer allocation for Isoc endpoints to 3K, since that's the largest possible transfer size. Tested on Raspberry Pi and Altera SOCFPGA. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: clip max_transfer_size to 65535Paul Zimmerman2014-09-191-0/+7
| | | | | | | | | | | Clip max_transfer_size to 65535 for host. dwc2_hc_setup_align_buf() allocates coherent buffers with this size, and if it's too large we can exhaust the coherent DMA pool. Tested on Raspberry Pi and Altera SOCFPGA. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2/gadget: disable clock when it's not neededRobert Baldyga2014-09-191-0/+9
| | | | | | | | When device is stopped or suspended clock is not needed so we can disable it for this time. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2/gadget: assign TX FIFO dynamicallyRobert Baldyga2014-09-192-30/+52
| | | | | | | | | | | | | | | | | | | | Because we have not enough memory to have each TX FIFO of size at least 3072 bytes (the maximum single packet size with 3 transactions per microframe), we create four FIFOs of lenght 1024, and four of length 3072 bytes, and assing them to endpoints dynamically according to maxpacket size value of given endpoint. Up to now there were initialized 16 TX FIFOs, but we use only 8 IN endpoints, so we can split available memory for 8 FIFOs to have more memory for each one. It needed to do some small modifications in few places in code, because there was assumption that TX FIFO numbers assigned to endpoints are the same as the endpoint numbers, which is not true since we have dynamic FIFO assigning. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2/gadget: ensure that all fifos have correct memory buffersMarek Szyprowski2014-09-192-5/+11
| | | | | | | | | Print warning if FIFOs are configured in such a way that they don't fit into the SPRAM available on the s3c hsotg module. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2/gadget: hide some not really needed debug messagesMarek Szyprowski2014-09-191-2/+2
| | | | | | | | | Some DWC2/s3c-hsotg debug messages are really useless for typical user, so hide them behind dev_dbg(). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2/gadget: Fix comment textAndrzej Pietrasiewicz2014-09-191-1/+1
| | | | | | | | Adjust the debug text to the name of the printed variable. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.17-rc5 into usb-nextGreg Kroah-Hartman2014-09-141-27/+25
|\ | | | | | | | | | | | | We need the USB fixes in there to build on top of in this branch for 3.18. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc2/gadget: avoid disabling ep0Robert Baldyga2014-09-091-1/+1
| | | | | | | | | | | | | | | | Endpoint 0 should not be disabled, so we start loop counter from number 1. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Cc: stable <stable@vger.kernel.org> # 3.16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc2/gadget: delay enabling irq once hardware is configured properlyMarek Szyprowski2014-09-091-7/+11
| | | | | | | | | | | | | | | | | | | | | | This patch fixes kernel panic/interrupt storm/etc issues if bootloader left s3c-hsotg module in enabled state. Now interrupt handler is enabled only after proper configuration of hardware registers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Cc: stable <stable@vger.kernel.org> # 3.16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc2/gadget: do not call disconnect method in pullupMarek Szyprowski2014-09-091-1/+0
| | | | | | | | | | | | | | | | | | | | This leads to potential spinlock recursion in composite framework, other udc drivers also don't call it directly from pullup method. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Cc: stable <stable@vger.kernel.org> # 3.16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc2/gadget: break infinite loop in endpoint disable codeMarek Szyprowski2014-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | This patch fixes possible freeze caused by infinite loop in interrupt context. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Cc: stable <stable@vger.kernel.org> # 3.16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc2/gadget: fix phy initialization sequenceKamil Debski2014-09-091-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Generic PHY Framework a NULL phy is considered to be a valid phy thus the "if (hsotg->phy)" check does not give us the information whether the Generic PHY Framework is used. In addition to the above this patch also removes phy_init from probe and phy_exit from remove. This is not necessary when init/exit is done in the s3c_hsotg_phy_enable/disable functions. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Cc: stable <stable@vger.kernel.org> # 3.16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc2/gadget: fix phy disable sequenceKamil Debski2014-09-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the driver is removed s3c_hsotg_phy_disable is called three times instead of once. This results in decreasing of the phy reference counter below zero and thus consecutive inserts of the module fails. This patch removes calls to s3c_hsotg_phy_disable from s3c_hsotg_remove and s3c_hsotg_udc_stop. s3c_hsotg_udc_stop is called from udc-core.c only after usb_gadget_disconnect, which in turn calls s3c_hsotg_pullup, which already calls s3c_hsotg_phy_disable. s3c_hsotg_remove must be called only after udc_stop, so there is no point in disabling phy once again there. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Cc: stable <stable@vger.kernel.org> # 3.16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: dwc2: make the scheduler handle excessive NAKs betterNick Hudson2014-09-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm seeing problems with a d-link dwcl-g122 wifi dongle that someone sent me. There are reports of other wifi dongles with the same/similar problem. The devices appear to be NAKing to the point of confusing the dwc2 driver completely. The attached patch helps with my d-link dwl-g122 - it's adapted from the Raspberry Pi dwc_otg driver, which is a modified version of the Synopsys vendor driver. The error recovery is still valid after the patch, I think. Cc: Dom Cobley <popcornmix@gmail.com> Signed-off-by: Nick Hudson <skrll@netbsd.org> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Revert "usb: dwc2: move "samsung,s3c6400-hsotg" into common platform"Robert Baldyga2014-09-112-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 8df438571cdbd5c4fcd1b25b19eea1ad5c3cf777. This patch breaks building dwc2 driver in gadget mode at samsung platforms. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Revert "usb: dwc2: Update Kconfig to support dual-role"Robert Baldyga2014-09-112-47/+37
| | | | | | | | | | | | | | | | | | | | This reverts commit e006fee6ecfed5b957bdd41c236aad751ab29042. This patch causes build break. Modifications in Makefile and Kconfig have no connection with driver code. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: dwc2: move "samsung,s3c6400-hsotg" into common platformDinh Nguyen2014-09-082-1/+1
| | | | | | | | | | | | | | | | | | Move the "samsung,s3c6400-hsotg" binding as the probe function in the gadget driver will get removed when the dual-role driver is implemented. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: dwc2: Update Kconfig to support dual-roleDinh Nguyen2014-09-082-37/+47
| | | | | | | | | | | | | | | | | | | | Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, only dwc2.ko is needed. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: dwc2: add 'mode' which based on Kconfig select or dts settingKever Yang2014-09-083-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | According to the "dr_mode", the otg controller can work as device role and host role. Some boards always want to use host mode and some other boards want to use gadget mode. We use the dts setting to set dwc2's mode, rather than fixing it to whatever hardware says. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Tested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: dwc2: Read GNPTXFSIZ when in forced HOST mode.Doug Anderson2014-09-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for GNPTXFSIZ says that "For host mode, this field is always valid." Since we're already switching to host mode for HPTXFSIZ, let's also read GNPTXFSIZ in host mode. On an rk3288 SoC, without this change we see this at bootup: dwc2 ff580000.usb: gnptxfsiz=00100400 dwc2 ff580000.usb: 128 invalid for host_nperio_tx_fifo_size. Check HW configuration. After this change we see: dwc2 ff580000.usb: gnptxfsiz=04000400 Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: dwc2: add compatible data for rockchip socKever Yang2014-09-081-0/+29
|/ | | | | | | | | | | This patch add compatible data for dwc2 controller found on rk3066, rk3188 and rk3288 processors from rockchip. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Tested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: gadget: Set the default EP max packet value as 8 bytesJingoo Han2014-08-251-1/+1
| | | | | | | | | | Set the default EP max packet value as 8 bytes, because in the case of low-speed, 'ep_mps' is not set. Thus, the default value of 'ep_mps' should be considered for the case of low-speed. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: gadget: fix below build warningPeter Chen2014-08-191-1/+1
| | | | | | | | | linux-2.6/drivers/usb/dwc2/gadget.c: In function 's3c_hsotg_irq_enumdone': linux-2.6/drivers/usb/dwc2/gadget.c:1904: warning: 'ep_mps' may be used uninitialized in this function Acked-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: gadget: remove incorrect file referenceJingoo Han2014-07-091-2/+0
| | | | | | | | | The file and folder movements resulted in the incorrect reference. So for better code maintainability, let's remove it. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: gadget: remove unnecessary OOM messagesJingoo Han2014-07-091-4/+1
| | | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: gadget: fix checkpatch errorsJingoo Han2014-07-091-2/+3
| | | | | | | | | | | Fix checkpatch errors as belows. ERROR: open brace '{' following function declarations go on the next line ERROR: space required before the open parenthesis '(' Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: Add function to calculate correct FIFO sizesDinh Nguyen2014-05-271-0/+68
| | | | | | | | | | | | | | | | | The dwc2 IP on the SOCFPGA cannot use the default HW configured FIFO sizes. The total FIFO depth as read from GHWCFG3 reports 0x1f80 or 8064 32-bit words. But the GRXFSIZ, GNPTXFSIZ, and HPTXFSIZ register defaults to 0x2000 or 8192 32-bit words. So the driver cannot just use the fifo sizes as read from those registers. For platforms that face the same issue, this commits sets the RX, periodic TX, and non-periodic TX fifo size to those that are recommended v2.93a spec for the DWC2 IP. Implements Method #2 from the Synopsys v2.93a spec for the DWC2. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: Disable descriptor dma mode by defaultDinh Nguyen2014-05-271-0/+6
| | | | | | | | | | | | | Even though the IP supports Descriptor DMA mode, it does not support SPLIT transactions in this mode. So the driver, in its currently form, will not support LS/FS devices when connected to a HS Hub if Descriptor DMA mode is enabled. So we should just default to disable descriptor dma mode. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: Remove '0x' notation when using %pad formatFabio Estevam2014-05-271-2/+2
| | | | | | | | | %pad notation automatically prints in hexadecimal format (with '0x'), so remove the unneeded '0x' to avoid a '0x0x' string. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: fix sparse warningPaul Zimmerman2014-04-251-1/+2
| | | | | | | | | | | Sparse warns about the __le16 wValue from the USB SetAddress command being used without converting it to CPU endianness. Fix that, and also add a bit of defensive masking of the received wValue before using it. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: move s3c-hsotg data structuresDinh Nguyen2014-04-242-179/+183
| | | | | | | | | | | | | | | This patch moves the data structures that are in the s3c-hsotg source into core.h. This is a necessary step towards unifying the s3c-hsotg and dwc2 into a single DRD. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> [ jh,rb,fb - For gadget part only: ] Tested-by: Jingoo Han <jg1.han@samsung.com> Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com> [ pz - Tested host part only. ] Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2/s3c-hsotg: move s3c-hsotg into dwc2 directoryDinh Nguyen2014-04-243-31/+3917
| | | | | | | | | | | | | | | | | | | | | | | | Moves the s3c-hsotg driver into the dwc2 directory and uses the dwc2 defines in hw.h. Renames s3c-hsotg.c to gadget.c. NOTE: You can build both host and peripheral as a dynamically linked module, but be aware that if you insmod dwc2_gadget, then rmmod it, then insmod dwc2 and dwc2_platform for host mode, this will not work. As the step to rmmod dwc2_gadget.ko will turn off the clock to the USB IP. The dwc2 host driver currently does not look to turn on a clock yet. A patch to fix that will be coming soon. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> [ jh,rb - For gadget part only: ] Tested-by: Jingoo Han <jg1.han@samsung.com> Tested-by: Robert Baldyga <r.baldyga@samsung.com> [ pz: Folded Kconfig/Makefile changes, which were originally in a separate patch, into this one, to avoid a build breakage. Modified Kconfig/Makefile changes a bit. Tested host part only. ] Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: add defines to support s3c-hsotg driverDinh Nguyen2014-04-241-5/+7
| | | | | | | | | | | | | | In preparation of combining the dwc2/s3c-hsotg driver in a single DRD driver, the defines in dwc2/hw.h needs to get updated so that the s3c-hsotg driver can use them. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> [ jh,rb - For gadget part only: ] Tested-by: Jingoo Han <jg1.han@samsung.com> Tested-by: Robert Baldyga <r.baldyga@samsung.com> [ pz - Tested host part only. ] Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: fix dereference before NULL checkPaul Zimmerman2014-02-151-5/+9
| | | | | | | | | In a couple of places, we were checking qtd->urb for NULL after we had already dereferenced it. Fix this by moving the check to before the dereference. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: handle the Host Port Interrupt when it occurs in device modeDinh Nguyen2014-02-071-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | According to the spec for the DWC2 controller, when the PRTINT interrupt fires, the application must clear the appropriate status bit in the Host Port Control and Status register to clear this bit. When disconnecting an A-cable when the dwc2 host driver, the PRTINT fires, but only the GINTSTS_PRTINT status is cleared, no action is done with the HPRT0 register. The HPRT0_ENACHG bit in the HPRT0 must also be poked to correctly clear the GINTSTS_PRTINT interrupt. I am seeing this behavoir on v2.93 of the DWC2 IP. When I disconnect an OTG A-cable adapter, the PRTINT interrupt fires when the DWC2 is in device mode and is never cleared. This patch adds the function to read the HPRT0 register when the PRTINT fires and the dwc2 IP has already transitioned to device mode. This function is only clearing the HPRT0_ENACHG bit for now, but can be modified to handle more. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> [ paulz: modified patch to preserve HPRT0_ENA bit ] Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: fix memory corruption in dwc2 driverPaul Zimmerman2014-02-041-11/+0
| | | | | | | | | | | | | | | | | | | The move from the staging tree to the main tree exposed a longstanding memory corruption bug in the dwc2 driver. The reordering of the driver initialization caused the dwc2 driver to corrupt the initialization data of the sdhci driver on the Raspberry Pi platform, which made the bug show up. The error is in calling to_usb_device(hsotg->dev), since ->dev is not a member of struct usb_device. The easiest fix is to just remove the offending code, since it is not really needed. Thanks to Stephen Warren for tracking down the cause of this. Reported-by: Andre Heider <a.heider@gmail.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: fix role switch breakagePaul Zimmerman2014-02-041-1/+1
| | | | | | | | | | | Commit beb7e592bc "staging: dwc2: add check on dwc2_core_reset return" broke the B -> A role switching on OTG-enabled platforms. This commit fixes it. Reported-by: Dinh Nguyen <dinguyen@altera.com> Tested-by: Dinh Nguyen <dinguyen@altera.com> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc2: bail out early when booting with "nousb"Andre Heider2014-02-041-0/+3
| | | | | | | | | | | | | | | | | | | | | Add usb_disabled() check to prevent kernel oops when booting with "nousb" in the cmdline: Unable to handle kernel NULL pointer dereference at virtual address 00000030 ... PC is at bus_add_device+0xe0/0x18c LR is at device_add_groups+0x1c/0x20 ... [<c02191c0>] (bus_add_device) from [<c0217130>] (device_add+0x41c/0x538) [<c0217130>] (device_add) from [<c023b1d4>] (usb_new_device+0x270/0x35c) [<c023b1d4>] (usb_new_device) from [<c0241174>] (usb_add_hcd+0x4fc/0x760) [<c0241174>] (usb_add_hcd) from [<c0254ce0>] (dwc2_hcd_init+0x434/0x510) [<c0254ce0>] (dwc2_hcd_init) from [<c02594f4>] (dwc2_driver_probe+0x130/0x170) [<c02594f4>] (dwc2_driver_probe) from [<c021bbd0>] (platform_drv_probe+0x28/0x58) Signed-off-by: Andre Heider <a.heider@gmail.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'usb-3.14-rc1' of ↵Linus Torvalds2014-01-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB updates from Greg KH: "Here's the big USB pull request for 3.14-rc1 Lots of little things all over the place, and the usual USB gadget updates, and XHCI fixes (some for an issue reported by a lot of people). USB PHY updates as well as chipidea updates and fixes. All of these have been in the linux-next tree with no reported issues" * tag 'usb-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (318 commits) usb: chipidea: udc: using MultO at TD as real mult value for ISO-TX usb: chipidea: need to mask INT_STATUS when write otgsc usb: chipidea: put hw_phymode_configure before ci_usb_phy_init usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28 usb: chipidea: add freescale imx28 special write register method usb: ehci: add freescale imx28 special write register method usb: core: check for valid id_table when using the RefId feature usb: cdc-wdm: resp_count can be 0 even if WDM_READ is set usb: core: bail out if user gives an unknown RefId when using new_id usb: core: allow a reference device for new_id usb: core: add sanity checks when using bInterfaceClass with new_id USB: image: correct spelling mistake in comment USB: c67x00: correct spelling mistakes in comments usb: delete non-required instances of include <linux/init.h> usb:hub set hub->change_bits when over-current happens Revert "usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28" xhci: Set scatter-gather limit to avoid failed block writes. xhci: Avoid infinite loop when sg urb requires too many trbs usb: gadget: remove unused variable in gr_queue_int() ...
* Move DWC2 driver out of stagingPaul Zimmerman2014-01-1313-0/+13214
The DWC2 driver should now be in good enough shape to move out of staging. I have stress tested it overnight on RPI running mass storage and Ethernet transfers in parallel, and for several days on our proprietary PCI-based platform. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud