summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-12-08USB: OHCI: Properly handle ohci-spear suspendMajunath Goudar
Suspend scenario in case of ohci-spear glue was not properly handled as it was not suspending generic part of ohci controller. Alan Stern suggested, properly handle ohci-spear suspend scenario. Calling explicitly the ohci_suspend() routine in spear_ohci_hcd_drv_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08USB: OHCI: Properly handle ohci-exynos suspendMajunath Goudar
Suspend scenario in case of ohci-exynos glue was not properly handled as it was not suspending generic part of ohci controller. Alan Stern suggested, properly handle ohci-exynos suspend scenario. Calling explicitly the ohci_suspend() routine in exynos_ohci_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08USB: OHCI: Properly handle ohci-da8xx suspendMajunath Goudar
Suspend scenario in case of ohci-da8xx glue was not properly handled as it was not suspending generic part of ohci controller. Alan Stern suggested, properly handle ohci-da8xx suspend scenario. Calling explicitly the ohci_suspend() routine in ohci_da8xx_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-usb@vger.kernel.or Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08USB: OHCI: Properly handle ohci-s3c2410 suspendMajunath Goudar
Suspend scenario in case of ohci-s3c2410 glue was not properly handled as it was not suspending generic part of ohci controller. Alan Stern suggested, properly handle ohci-s3c2410 suspend scenario. Calling explicitly the ohci_suspend() routine in ohci_hcd_s3c2410_drv_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08USB: OHCI: Properly handle ohci-at91 suspendMajunath Goudar
Suspend scenario in case of ohci-at91 glue was not properly handled as it was not suspending generic part of ohci controller. Alan Stern suggested, properly handle ohci-at91 suspend scenario. Calling explicitly the ohci_suspend() routine in ohci_hcd_at91_drv_suspend() will ensure proper handling of suspend scenario. This task is sugested by Alan Stern. Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08USB: OHCI: Properly handle OHCI controller suspendMajunath Goudar
Suspend scenario in case of OHCI was not properly handled in ochi_suspend()routine. Alan Stern suggested, properly handle OHCI suspend scenario. This does generic proper handling of suspend scenario to all OHCI SOC. Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08usb: usbtest: update bos test coverage to usb 2.1 deviceHuang Rui
The commit "usb: usbtest: support bos descriptor test for usb 3.0" introduced a test for bos descriptor. And USB 2.1 device also can be checked. So this patch extends the test coverage to support USB 2.1 device. Reported-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08usb: usbtest: fix the bit mask of usb 2.0 extension descriptorHuang Rui
USB 2.1 Link PM adds to use bits[1:15] according to USB 2.0 ECN Errata for Link Power Management spec. Bit Encoding 0 Reserved 1 LPM 2 BESL & Altemate HIRD definitions supported 3 Recommended Baseline BESL valid 4 Recommended Deep BESL valid 11:8 Recommended Baseline BESL value 15:12 Recommended Deep BESL value 31:16 Reserved So fix the bit mask from 0x1e to 0xfffe. Reported-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08usb: usbtest: add a test case to support bos for queue controlHuang Rui
In Test 10 of usbtest module, it queues multiple control messages and thereby tests control message queuing, protocol stalls, short reads, and fault handling. And this patch add a test case to support queue BOS control request for USB 3.0 SPEC. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04USB: fix coccinelle warningsFengguang Wu
drivers/usb/host/ehci-mv.c:181:26-27: WARNING comparing pointer to 0, suggest !E /c/kernel-tests/src/cocci/drivers/usb/host/ehci-mv.c:181:26-27: WARNING comparing pointer to 0 Compare pointer-typed values to NULL rather than 0 Semantic patch information: This makes an effort to choose between !x and x == NULL. !x is used if it has previously been used with the function used to initialize x. This relies on type information. More type information can be obtained using the option -all_includes and the option -I to specify an include path. Generated by: coccinelle/null/badzero.cocci CC: Jingoo Han <jg1.han@samsung.com> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-12-04USB: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03usb: host: Remove superfluous name castsGeert Uytterhoeven
device_driver.name is "const char *" Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03usb: gadget: Remove superfluous name castsGeert Uytterhoeven
device_driver.name is "const char *" Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03usb: core: Remove superfluous name castsGeert Uytterhoeven
device_driver.name is "const char *" Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03USB: kill #undef VERBOSE_DEBUGOliver Neukum
It is useless now. Straight removal. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03usb: kill DEBUG compile optionOliver Neukum
In the drivers that no longer need it, it is removed. It is removed from the Makefile. Drivers not fully converted to dynamic debug have it shifted down into the individual drivers. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fusbh200: kill fusbh200_vdbgOliver Neukum
With dynamic debugging this log level is no longer supported. The decision which messages are interesting is done in user space. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fusb200h: always compile in debugfs supportOliver Neukum
This allows removal of much conditional compilation. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fusbh200: always compile debugfs supportOliver Neukum
This is a step in the conversion to only use dynamic debugging. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fusb200h: don't log on every interruptOliver Neukum
That logging is overkill. Simply remove it. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fusbh200: unconditionally compile debugging helpersOliver Neukum
These helpers are used only during setup of a HCD. A small overhead is no problem. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03uhci: compile debugfs conditional on CONFIG_DYNAMIC_DEBUG || DEBUGOliver Neukum
This makes sure the header files are all there Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03uhci: change dependency for debug parameterOliver Neukum
To allow a full switch to dynamic debugging make the debug parameter conditional on defined(DEBUF) || defined(CONFIG_DYNAMIC_DEBUG) Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fusbh200: always build debugfs supportOliver Neukum
This gets rid of conditional compilation. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: kill fotg210_vdbg()Oliver Neukum
The decision what is interesting is shifted to user space by dynamic debugging. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: remove conditional compilationOliver Neukum
The decision what is interesting is made in user space. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: change dbg_port() to evaluate parameters only if neededOliver Neukum
For dynamic debug the overhead for evaluating parameters must be sacrificed only if the message is actually printed Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: always compile the support for debugfsOliver Neukum
Simply remove the conditional compilation and remove the empty stubs. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: remove conditional compilationOliver Neukum
Always compile in the debugfs support Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03ehci: Remove debugging at every interruptOliver Neukum
This is overkill. Just removeit. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03ehci: no conditional compilation for interestingnessOliver Neukum
Simple elemination of the conditional compilation Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03ohci: no conditional debugging in root hub hadlingOliver Neukum
With dynamic debugging the selection is done in user space Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03ohci:always register debug filesOliver Neukum
Just remove the conditional compilation. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03ohci: kill ohci_vdbgOliver Neukum
With the introduction of dynamic debugging it has become redundant. Collapse it with ohci_dbg() Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03ohci: remove conditional compilationOliver Neukum
Conditional compilation for debugging is removed in favor of dynamic debugging. To do so 1. the support for debugfs is always compiled 2. the support for the ancient print_urb debugging aid is removed Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03cdc-acm: fix power management in ioctlOliver Neukum
An ioctl that does depends on communication with a device should prevent suspension of teh device. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03cdc-acm: add TIOCGICOUNTOliver Neukum
Simple straightforward implementation. Just returning the statistics gathered for TIOCMIWAIT Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03cdc-acm: add TIOCMIWAITOliver Neukum
This implements TIOCMIWAIT for TIOCM_DSR, TIOCM_RI and TIOCM_CD Disconnect is handled as TIOCM_CD or an error. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03usb: chipidea: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03usb: chipidea: host: Only disable the vbus regulator if it is not NULLFabio Estevam
Commit 40ed51a4b (usb: chipidea: host: add vbus regulator control) introduced a smatch complaint because regulator_disable() is called without checking whether ci->platdata->reg_vbus is not NULL. Fix this by adding the check. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02Merge tag 'for-usb-next-2013-12-02' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next Sarah writes: xhci: Cleanup for 3.14: Sparse fixes, replace xhci_read/write, misc Hi Greg, Here's fifteen patches for 3.14. They include some non-urgent cleanups, and the patches to replace the xhci_read/write variants with standard read/write calls. As you asked, the big endian fixes are being queued for 3.14 and they aren't marked for stable. This also includes a couple of streams fixes, but not the full set from Hans. (I'll test those later this week.) The goal is to get both the xHCI driver streams support and the UAS driver fixed up for 3.14. We don't want to mark the fixes for stable, as all the code changes are really too big for stable. Please queue for 3.14. Sarah Sharp
2013-12-02xhci: replace xhci_write_64() with writeq()Xenia Ragiadakou
Function xhci_write_64() is used to write 64bit xHC registers residing in MMIO. On 32bit systems, xHC registers need to be written with 32bit accesses by writing first the lower 32bits and then the higher 32bits. The header file asm-generic/io-64-nonatomic-lo-hi.h ensures that on 32bit systems writeq() will will write 64bit registers in 32bit chunks with low-high order. Replace all calls to xhci_write_64() with calls to writeq(). This is done to reduce code duplication since 64bit low-high write logic is already implemented and to take advantage of inherent "atomic" 64bit write operations on 64bit systems. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: replace xhci_read_64() with readq()Xenia Ragiadakou
Function xhci_read_64() is used to read 64bit xHC registers residing in MMIO. On 32bit systems, xHC registers need to be read with 32bit accesses by reading first the lower 32bits and then the higher 32bits. Replace all calls to xhci_read_64() with calls to readq() and include asm-generic/io-64-nonatomic-lo-hi.h header file, so that if the system is not 64bit, readq() will read registers in 32bit chunks with low-high order. This is done to reduce code duplication since 64bit low-high read logic is already implemented and to take advantage of inherent "atomic" 64bit read operations on 64bit systems. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: replace xhci_writel() with writel()Xenia Ragiadakou
Function xhci_writel() is used to write a 32bit value in xHC registers residing in MMIO address space. It takes as first argument a pointer to the xhci_hcd although it does not use it. xhci_writel() internally simply calls writel(). This creates an illusion that xhci_writel() is an xhci specific function that has to be called in a context where a pointer to xhci_hcd is available. Remove xhci_writel() wrapper function and replace its calls with calls to writel() to make the code more straight-forward. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: replace xhci_readl() with readl()Xenia Ragiadakou
Function xhci_readl() is used to read 32bit xHC registers residing in MMIO address space. It takes as first argument a pointer to the xhci_hcd although it does not use it. xhci_readl() internally simply calls readl(). This creates an illusion that xhci_readl() is an xhci specific function that has to be called in a context where a pointer to xhci_hcd is available. Remove the unnecessary xhci_readl() wrapper function and replace its calls to with calls to readl() to make the code more straightforward. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: remove conversion from generic to pci device in xhci_mem.cXenia Ragiadakou
This patch removes the to_pci_dev() conversion performed to generic struct device since it is not actually useful (the pointer to the generic device can be used directly rather through a conversion to pci_dev) and it is pci bus specific. This isn't stable material because this code will produce harmless behavior on non-PCI xHCI hosts. The pci_device pointer is never dereferenced, only used to re-calculate the underlying device pointer. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: fix incorrect type in assignment in xhci_count_num_dropped_endpoints()Xenia Ragiadakou
The fields 'add_flags' and 'drop_flags' in struct xhci_input_control_ctx have type __le32 and need to be converted to CPU byteorder before being used to derive the number of dropped endpoints. This bug was found using sparse. This patch is not suitable for stable, since the bug would only be triggered on big endian systems, and the code only runs for Intel xHCI host controllers, which are always integrated into little endian systems. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: fix incorrect type in assignment in xhci_count_num_new_endpoints()Xenia Ragiadakou
The fields 'add_flags' and 'drop_flags' in struct xhci_input_control_ctx have type __le32 and need to be converted to CPU byteorder before being used to derive the number of added endpoints. This bug was found using sparse. This patch is not suitable for stable, since the bug would only be triggered on big endian systems, and the code only runs for Intel xHCI host controllers, which are always integrated into little endian systems. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: remove unnecessary check in xhci_free_stream_info()Xenia Ragiadakou
This patch removes the unneccessary check 'if (stream_info)' because there is already a check few lines above which ensures that stream_info is not NULL. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-02xhci: fix SCT_FOR_CTX(p) macroXenia Ragiadakou
SCT_FOR_CTX(p) is defined as (((p) << 1) & 0x7) in which case if we want to set the stream context type to SCT_SSA_256 i.e 0x7 (although secondary stream arrays are not yet supported) using this macro definition we will get actually 0x6 which is not what we want. This patch fixes the above issue by defining the SCT_FOR_CTX(p) macro as (((p) & 0x7) << 1) Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>