- 31 Aug, 2013 1 commit
-
-
Xenia Ragiadakou authored
This patch fixes the incorrect assignment of a variable with type 'le16' to a variable with type 'unsigned int'. Signed-off-by:
Xenia Ragiadakou <burzalodowa@gmail.com> Reported-by:
kbuild test robot <fengguang.wu@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 30 Aug, 2013 12 commits
-
-
Xenia Ragiadakou authored
In usb_reset_and_verify_device(), hub_port_init() allocates a new bos descriptor to hold the value read by the device. The new bos descriptor has to be compared with the old one in order to figure out if device 's firmware has changed in which case the device has to be reenumerated. In the original code, none of the two descriptors was deallocated leading to memory leaks. This patch compares the old bos descriptor with the new one to detect change in firmware and releases the newly allocated bos descriptor to prevent memory leak. Signed-off-by:
Xenia Ragiadakou <burzalodowa@gmail.com> Reported-by:
Martin MOKREJS <mmokrejs@gmail.com> Tested-by:
Martin MOKREJS <mmokrejs@gmail.com> Suggested-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xenia Ragiadakou authored
This patch removes the ehci statictics information output in ehci_stop() because they do not provide interesting info. At any case, the current statistics can be viewed by reading the 'registers' file in debugfs. Signed-off-by:
Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xenia Ragiadakou authored
This patch removes the duplicate of debug_async_open() prototype following three lines below the debug_async_open() declaration. Signed-off-by:
Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xenia Ragiadakou authored
The debugging code for ehci is enabled to run if the DEBUG flag is defined. This patch enables the debugging code also when the kernel is configured with dynamic debugging on. Signed-off-by:
Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xenia Ragiadakou authored
This patch removes ehci_vdbg debugging statements from EHCI host controller driver because they produce too much information, lowering the signal to noise ratio when debugging, and because they are not used anymore. Signed-off-by:
Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hans de Goede authored
Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hans de Goede authored
Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hans de Goede authored
Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alan Stern authored
This patch fixes a build error that occurs when CONFIG_PM is enabled and CONFIG_PM_SLEEP isn't: >> drivers/usb/host/ohci-pci.c:294:10: error: 'usb_hcd_pci_pm_ops' undeclared here (not in a function) .pm = &usb_hcd_pci_pm_ops Since the usb_hcd_pci_pm_ops structure is defined and used when CONFIG_PM is enabled, its declaration should not be protected by CONFIG_PM_SLEEP. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Reported-by:
kbuild test robot <fengguang.wu@intel.com> CC: <stable@vger.kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Libo Chen authored
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &of->dev, so we can directly pass a struct platform_device. Signed-off-by:
Libo Chen <libo.chen@huawei.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Libo Chen authored
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &of->dev, so we can directly pass a struct platform_device. Signed-off-by:
Libo Chen <libo.chen@huawei.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Graham Williams authored
The gadget strings table should be null terminated. usb_gadget_get_string() loops through the table expecting a null at the end of the list. Signed-off-by:
Graham Williams <gwilli@broadcom.com> Cc: stable <stable@vger.kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 28 Aug, 2013 8 commits
-
-
Dan Carpenter authored
The test here should be ">=" instead of ">". The cdd->chan_busy[] array has "ALLOC_DECS_NUM" elements. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Acked-by:
Vinod Koul <vinod.koul@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Merge tag 'for-usb-next-2013-08-27-15-07' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next Sarah writes: xhci: Fix build breakage and new warnings. Hi Greg, This first patch should fix the build breakage Sedat Dilek reported. Apologizes for not including this patch before commit 0730d52a "xhci:prevent "callbacks suppressed" when debug is not enabled" The second patch fixes a new build warning introduced by commit c8476fb8 "usb: xhci: Disable runtime PM suspend for quirky controllers", which was caught by the 0day build system. Sarah Sharp
-
Sarah Sharp authored
The 0day build server caught a new build warning that is triggered when CONFIG_USB_DEFAULT_PERSIST is turned on: tree: git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git for-usb-next head: 0730d52a commit: c8476fb8 [1/3] usb: xhci: Disable runtime PM suspend for quirky controllers config: i386-randconfig-r6-0826 (attached as .config) All warnings: drivers/usb/host/xhci.c: In function 'xhci_free_dev': >> drivers/usb/host/xhci.c:3560:17: warning: unused variable 'dev' [-Wunused-variable] struct device *dev = hcd->self.controller; ^ drivers/usb/host/xhci.c: In function 'xhci_alloc_dev': >> drivers/usb/host/xhci.c:3648:17: warning: unused variable 'dev' [-Wunused-variable] struct device *dev = hcd->self.controller; ^ vim +/dev +3560 drivers/usb/host/xhci.c 3554 * disabled. Free any HC data structures associated with that device. 3555 */ 3556 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) 3557 { 3558 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 3559 struct xhci_virt_device *virt_dev; > 3560 struct device *dev = hcd->self.controller; 3561 unsigned long flags; 3562 u32 state; 3563 int i, ret; 3564 3565 #ifndef CONFIG_USB_DEFAULT_PERSIST 3566 /* 3567 * We called pm_runtime_get_noresume when the device was attached. 3568 * Decrement the counter here to allow controller to runtime suspend 3569 * if no devices remain. 3570 */ 3571 if (xhci->quirks & XHCI_RESET_ON_RESUME) 3572 pm_runtime_put_noidle(dev); 3573 #endif 3574 ... 3641 /* 3642 * Returns 0 if the xHC ran out of device slots, the Enable Slot command 3643 * timed out, or allocating memory failed. Returns 1 on success. 3644 */ 3645 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) 3646 { 3647 struct xhci_hcd *xhci = hcd_to_xhci(hcd); > 3648 struct device *dev = hcd->self.controller; 3649 unsigned long flags; 3650 int timeleft; 3651 int ret; Fix this. Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Shawn Nematbakhsh <shawnn@chromium.org>
-
Dmitry Kasatkin authored
When DEBUG is defined, dev_dbg_ratelimited uses dynamic debug data structures even when CONFIG_DYNAMIC_DEBUG is not defined. It leads to build break. For example, when I try to use dev_dbg_ratelimited in USB code and CONFIG_USB_DEBUG is enabled, but CONFIG_DYNAMIC_DEBUG is not, I get: CC [M] drivers/usb/host/xhci-ring.o drivers/usb/host/xhci-ring.c: In function ‘xhci_queue_intr_tx’: drivers/usb/host/xhci-ring.c:3059:3: error: implicit declaration of function ‘DEFINE_DYNAMIC_DEBUG_METADATA’ [-Werror=implicit-function-declaration] drivers/usb/host/xhci-ring.c:3059:3: error: ‘descriptor’ undeclared (first use in this function) drivers/usb/host/xhci-ring.c:3059:3: note: each undeclared identifier is reported only once for each function it appears in drivers/usb/host/xhci-ring.c:3059:3: error: implicit declaration of function ‘__dynamic_pr_debug’ [-Werror=implicit-function-declaration] drivers/usb/host/xhci-ring.c: In function ‘xhci_queue_isoc_tx_prepare’: drivers/usb/host/xhci-ring.c:3847:3: error: ‘descriptor’ undeclared (first use in this function) cc1: some warnings being treated as errors make[2]: *** [drivers/usb/host/xhci-ring.o] Error 1 make[1]: *** [drivers/usb/host] Error 2 make: *** [drivers/usb/] Error 2 This patch separates definition for CONFIG_DYNAMIC_DEBUG and DEBUG cases. [Note, Sarah moved the comment above the macro to avoid checkpatch warnings.] Signed-off-by:
Dmitry Kasatkin <d.kasatkin@samsung.com> Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alan Stern authored
Since ohci-hcd supports runtime PM, the .pm field in its pci_driver structure should be protected by CONFIG_PM rather than CONFIG_PM_SLEEP. Without this change, OHCI controllers won't do runtime suspend if system suspend or hibernation isn't enabled. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> cc: <stable@vger.kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Libo Chen authored
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by:
Libo Chen <libo.chen@huawei.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Libo Chen authored
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by:
Libo Chen <libo.chen@huawei.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Libo Chen authored
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by:
Libo Chen <libo.chen@huawei.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 Aug, 2013 19 commits
-
-
Greg Kroah-Hartman authored
Merge tag 'usb-for-v3.12-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v3.12 merge window (part 2) Here's a set of important fixes for v3.12 merge window which have been pending in the mailing list for quite some time. We have use-after-free fixes, signedness fixes, more of HAS_DMA dependencies, fixes for NULL pointer deferences, build fixes and some other fixes to the musb driver caused by recent patches. Patches are quite small and contain valuable fixes which will give us a much better -rc1 release. Please consider merging Signed-of-by:
Felipe Balbi <balbi@ti.com>
-
Greg Kroah-Hartman authored
Convert the usbsorage sysfs attribute to use the _RW macro to make it easier to determine the permissions for the file. Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lee Jones authored
Dan Carpenter's automatic Smatch checker found an anomaly in the ux500 MUSB driver, whereby board data was checked before use in all but one occasion. It is believed that it needs to be checked every time. Smatch complaint: drivers/usb/musb/ux500_dma.c:335 ux500_dma_controller_start() error: we previously assumed 'data' could be null (see line 313) Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Dan Carpenter authored
The "goto out" statements were wrong. We aren't holding any locks at that point so we should return directly. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Dan Carpenter authored
"ret" needs to be signed for the error handling to work. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Dan Carpenter authored
ffs_data_put() can sometimes free "ffs" so I have moved the call down a line below the dereference. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Dan Carpenter authored
The call to put_dev() releases "dev". Hopefully, we don't need to set the state to STATE_DEV_DISABLED anyway so I have removed those lines. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Greg Kroah-Hartman authored
Merge tag 'for-usb-next-2013-08-27' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next Sarah writes: xhci: Bug fixes for 3.12. Hi Greg, Here's three low-priority bug fixes that should be queued for 3.12. They disable runtime PM for hosts that need the XHCI_RESET_ON_RESUME quirk, fix USB 2.0 Link PM on hosts that don't have BESL support, and prevent a bunch of log spam. Please pull into usb-next for 3.12. Sarah Sharp
-
Sachin Kamat authored
otg.h header file was included twice. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Anatolij Gustschin authored
Commit 94ae9843 (usb: phy: rename all phy drivers to phy-$name-usb.c) renamed drivers/usb/phy/otg_fsm.h to drivers/usb/phy/phy-fsm-usb.h but changed drivers/usb/phy/phy-fsm-usb.c to include not existing "phy-otg-fsm.h" instead of new "phy-fsm-usb.h". This breaks building: ... drivers/usb/phy/phy-fsm-usb.c:32:25: fatal error: phy-otg-fsm.h: No such file or directory compilation terminated. make[3]: *** [drivers/usb/phy/phy-fsm-usb.o] Error 1 This commit also missed to modify drivers/usb/phy/phy-fsl-usb.h to include new "phy-fsm-usb.h" instead of "otg_fsm.h" resulting in another build breakage: ... In file included from drivers/usb/phy/phy-fsl-usb.c:46:0: drivers/usb/phy/phy-fsl-usb.h:18:21: fatal error: otg_fsm.h: No such file or directory compilation terminated. make[3]: *** [drivers/usb/phy/phy-fsl-usb.o] Error 1 Fix both issues. Signed-off-by:
Anatolij Gustschin <agust@denx.de> Cc: stable@vger.kernel.org Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Greg Kroah-Hartman authored
Convert all USB gadget sysfs attributes to use the _RO or _RW variants, to make them easier to audit and ensure that the permissions are correct. Note, two are left using the DEVICE_ATTR() macro, as there is no DEVICE_ATTR_WO() in Linus's tree, that will happen after 3.12-rc1 is out, a follow-on patch will be sent then. Reviewed-by:
Felipe Balbi <balbi@ti.com> Acked-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> -- drivers/usb/gadget/composite.c | 8 +++----- drivers/usb/gadget/dummy_hcd.c | 8 ++++---- drivers/usb/gadget/f_mass_storage.c | 14 ++++++-------- drivers/usb/gadget/net2272.c | 4 ++-- drivers/usb/gadget/net2280.c | 18 +++++++++--------- drivers/usb/gadget/storage_common.c | 25 ++++++++++++------------- drivers/usb/gadget/udc-core.c | 14 +++++++------- 7 files changed, 43 insertions(+), 48 deletions(-)
-
Sebastian Andrzej Siewior authored
With enabled pm_runtime in the kernel the device won't work because it is not "on" during the probe function. This patch enables the device via pm_runtime on probe so it remains activated. Acked-by:
Vinod Koul <vinod.koul@intel.com> Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sebastian Andrzej Siewior authored
So I assumed that Beagle bone has only one USB port in host mode because the micro USB connector had an USB-UART there. I was wrong a little. The second port runs on host mode, but the micro USB plug is connected to an internal HUB with two ports: one to the USB-UART and one to musb instance one. For that reason, this patch enables both ports: the primary in device mode only and the second in host mode only. Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sebastian Andrzej Siewior authored
This is what I observe: On the first connect, the musb starts with DEVCTL.Session set. On disconnect, musb_core calls try_idle. That functions removes the Session bit signalizing that the session is over (something that only in OTG is required). A new device, that is plugged, is no longer recognized. I've setup a timer and checked the DEVCTL register and I haven't seen a change in VBus and I saw the B-Device bit set. After setting the IDDIG into A mode and forcing the device to behave like a A device, I didn't see a change. Neither VBUS goes to 0b11 nor does a session start request comes. In the TI-v3.2 kernel they skip to call musb_platform_try_idle() in the OTG_STATE_A_WAIT_BCON state while not in OTG mode. Since the second port hast a standard A plug the patch changes the port to run in host mode only and skips the timer which would remove DEVCTL.Session so we can reconnect to another device later. Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sebastian Andrzej Siewior authored
Quite early on init there is an vbus / drvvbus interrupt comming and the dsps code sets is_active to one. As a result we see a lot of |musb_bus_suspend 2459: trying to suspend as a_wait_bcon while active until a device is plugged in with pm_runtime enabled in the kernel. After checking davinci, am35, da8xx I noticed that dsps is actually the only one doing this. So remove it and we won't flooded with mesages and the idle port can be suspended. Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sebastian Andrzej Siewior authored
This relfects the code and dts requires changes due to recent .dts binding updates: - use mg prefix for the Metor Graphics specific attributes - use power in mA not in mA/2 as specifed in the USB2.0 specification - remove the child node for USB. This is driver specific on won't be reflected in the device tree - use the "mentor" prefix instead of "mg". - use "dr_mode" istead of "mg,port-mode" for the port mode. The former is used by a few other drivers. Cc: Rob Herring <rob.herring@calxeda.com> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: devicetree@vger.kernel.org Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sebastian Andrzej Siewior authored
The support for both am335x-USB instances required changes to the device tree bindings. This patch reflects these changes in the bindings document. v3…v4: - remove the child node for USB. This is driver specific on won't be reflected in the device tree - use the "mentor" prefix instead of "mg". - use "dr_mode" istead of "mg,port-mode" for the port mode. The former is used by a few other drivers. v2…v3: - use proper usb-phy nodes in evm, bone and evmsk device tree. v1…v2: - use mg prefix for the Metor Graphics specific attributes - use power in mA not in mA/2 as specifed in the USB2.0 specification - use usbX-phy instead of usbX_phy - use dma-controller instead of dma Cc: Rob Herring <rob.herring@calxeda.com> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: devicetree@vger.kernel.org Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sebastian Andrzej Siewior authored
I forgot to separete the different names in the reg-names property. This didn't cause anything to fail because the driver does not use the names and simply relies on the order of the memory offsets in reg. This patch fixes this in case it is used later. Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sebastian Andrzej Siewior authored
musb_shutdown() removes always USB host and device. musb_init_controller() adds host and device depending on port_mode. If port mode is set to HOST then the removal of UDC leads only to: |(NULL device *): gadget not registered. and nothing else happens. If port mode is set to DEVICE and we remove the host then we oops in usb_remove_hcd(). This patch ensures that we only remove host in OTG/host mode and device only in OTG/device mode to avoid any trouble. Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-