Commit graph

11798 commits

Author SHA1 Message Date
Thomas Pugliese e05a1fd946 usb: wusbcore: return -ENOENT for unlinked URBs.
Return -ENOENT for unlinked URBs.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08 17:54:15 -08:00
Thomas Pugliese bbfc34201f usb: wusbcore: add more info to debug prints in urb_unlink path
Add more info to debug prints in urb_unlink path

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08 17:54:15 -08:00
Thomas Pugliese b374487ebe usb: wusbcore: add calls to usb_hcd_link_urb_to_ep, usb_hcd_unlink_urb_from_ep, and
Add calls to usb_hcd_link_urb_to_ep, usb_hcd_unlink_urb_from_ep, and
usb_hcd_check_unlink_urb in the appropriate locations.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08 17:54:15 -08:00
Majunath Goudar d2e3d2b348 USB: OHCI: Properly handle ohci-spear suspend
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-08 17:53:18 -08:00
Majunath Goudar 14982e31da USB: OHCI: Properly handle ohci-exynos suspend
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-08 17:53:18 -08:00
Majunath Goudar 933bb1f044 USB: OHCI: Properly handle ohci-da8xx suspend
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-08 17:53:17 -08:00
Majunath Goudar 0ded36d918 USB: OHCI: Properly handle ohci-s3c2410 suspend
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-08 17:53:17 -08:00
Majunath Goudar a9d3840ed3 USB: OHCI: Properly handle ohci-at91 suspend
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-08 17:53:17 -08:00
Majunath Goudar e1bffbf622 USB: OHCI: Properly handle OHCI controller suspend
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-08 17:53:17 -08:00
Huang Rui f625099f1a usb: usbtest: update bos test coverage to usb 2.1 device
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-08 17:42:45 -08:00
Huang Rui 875bc23ac0 usb: usbtest: fix the bit mask of usb 2.0 extension descriptor
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-08 17:42:45 -08:00
Huang Rui c952a8ba71 usb: usbtest: add a test case to support bos for queue control
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-08 17:42:45 -08:00
Fengguang Wu 2e30d14f12 USB: fix coccinelle warnings
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-04 20:36:31 -08:00
Jingoo Han 2fd3f65132 USB: remove DEFINE_PCI_DEVICE_TABLE macro
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-04 16:58:47 -08:00
Geert Uytterhoeven a458677db6 usb: host: Remove superfluous name casts
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-03 11:17:28 -08:00
Geert Uytterhoeven bde5ae91e8 usb: gadget: Remove superfluous name casts
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-03 11:17:28 -08:00
Geert Uytterhoeven 9f9af82ff3 usb: core: Remove superfluous name casts
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-03 11:17:28 -08:00
Oliver Neukum c793d08ecd USB: kill #undef VERBOSE_DEBUG
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-03 10:34:33 -08:00
Oliver Neukum 1c20163d30 usb: kill DEBUG compile option
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-03 10:34:33 -08:00
Oliver Neukum 0b5fa3b21f fusbh200: kill fusbh200_vdbg
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-03 10:31:21 -08:00
Oliver Neukum c9472a2912 fusb200h: always compile in debugfs support
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-03 10:31:21 -08:00
Oliver Neukum 514fbbf663 fusbh200: always compile debugfs support
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-03 10:31:21 -08:00
Oliver Neukum cb0badad02 fusb200h: don't log on every interrupt
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-03 10:31:21 -08:00
Oliver Neukum 8f3fd9df26 fusbh200: unconditionally compile debugging helpers
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-03 10:31:20 -08:00
Oliver Neukum 9bab24afba uhci: compile debugfs conditional on CONFIG_DYNAMIC_DEBUG || DEBUG
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-03 10:31:20 -08:00
Oliver Neukum cadb375698 uhci: change dependency for debug parameter
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-03 10:31:20 -08:00
Oliver Neukum 0ada24a497 fusbh200: always build debugfs support
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-03 10:28:40 -08:00
Oliver Neukum be5ac4c43d fotg210: kill fotg210_vdbg()
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-03 10:28:40 -08:00
Oliver Neukum 3b707ece5b fotg210: remove conditional compilation
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-03 10:28:39 -08:00
Oliver Neukum f848a88d22 fotg210: change dbg_port() to evaluate parameters only if needed
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-03 10:28:39 -08:00
Oliver Neukum 063635ec3a fotg210: always compile the support for debugfs
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-03 10:28:39 -08:00
Oliver Neukum a90b8fc6f4 fotg210: remove conditional compilation
Always compile in the debugfs support

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 10:28:39 -08:00
Oliver Neukum 991fb3daac ehci: Remove debugging at every interrupt
This is overkill. Just removeit.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 10:25:22 -08:00
Oliver Neukum bbcd5cab03 ehci: no conditional compilation for interestingness
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-03 10:25:22 -08:00
Oliver Neukum 00b033bb90 ohci: no conditional debugging in root hub hadling
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-03 10:25:22 -08:00
Oliver Neukum 1714ba0e8e ohci:always register debug files
Just remove the conditional compilation.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 10:25:22 -08:00
Oliver Neukum d2c4254ff9 ohci: kill ohci_vdbg
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-03 10:25:22 -08:00
Oliver Neukum 5c2a18014f ohci: remove conditional compilation
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-03 10:25:22 -08:00
Oliver Neukum 8fdbeb26b5 cdc-acm: fix power management in ioctl
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-03 10:23:46 -08:00
Oliver Neukum 797ef13716 cdc-acm: add TIOCGICOUNT
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-03 10:23:46 -08:00
Oliver Neukum 5a6a62bdb9 cdc-acm: add TIOCMIWAIT
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-03 10:23:46 -08:00
Jingoo Han 4e065b8bba usb: chipidea: remove DEFINE_PCI_DEVICE_TABLE macro
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-03 10:22:52 -08:00
Fabio Estevam 46adcf3d82 usb: chipidea: host: Only disable the vbus regulator if it is not NULL
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-03 10:16:12 -08:00
Xenia Ragiadakou 7dd09a1af2 xhci: replace xhci_write_64() with writeq()
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-02 12:59:50 -08:00
Xenia Ragiadakou e8b373326d xhci: replace xhci_read_64() with readq()
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-02 12:59:49 -08:00
Xenia Ragiadakou 204b7793f2 xhci: replace xhci_writel() with writel()
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-02 12:59:49 -08:00
Xenia Ragiadakou b0ba972084 xhci: replace xhci_readl() with readl()
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-02 12:59:48 -08:00
Xenia Ragiadakou 2a10004748 xhci: remove conversion from generic to pci device in xhci_mem.c
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-02 12:59:48 -08:00
Xenia Ragiadakou 78d1ff0256 xhci: fix incorrect type in assignment in xhci_count_num_dropped_endpoints()
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-02 12:59:47 -08:00
Xenia Ragiadakou ef73400ca5 xhci: fix incorrect type in assignment in xhci_count_num_new_endpoints()
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-02 12:59:47 -08:00