Commit Graph

8733 Commits (a10d206ef1a83121ab7430cb196e0376a7145b22)

Author SHA1 Message Date
Vikram Pandita abf710e655 usb: musb: handle nuked ep dma interrupt
User can trigger disabling of gadget at run time while the
transfers are going on.
Eg: 1: rmmod of musb driver while transfers are going on

Eg: 2: On android doing:
 echo 0       > /sys/class/android_usb/android0/enable
While a big file transfer is going on via PTP/MTP.

In such a case, musb_gadget_disable() calls nuke()
but the dma interrupt may still happen for an endpoint since hw
would raise the interrupt in anycase.

This can result in a NULL pointer access crash:

[  314.030426] PC is at txstate+0x74/0x20c
[  314.034759] LR is at musb_g_tx+0x140/0x204
[  314.039489] pc : [<c03506f4>]    lr : [<c0350bcc>]    psr: 20000193
[  314.039520] sp : c783bc68  ip : 00000002  fp : c783bc9c
[  314.052429] r10: 00000018  r9 : 00000000  r8 : 00000200
[  314.058258] r7 : 00000000  r6 : fc0ab130  r5 : c781a410  r4 : c6caf640
[  314.065643] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : c781a000
[  315.083251] Backtrace:
[  315.086242] [<c0350680>] (txstate+0x0/0x20c) from [<c0350bcc>] (musb_g_tx+0x140/0x204)
[  315.095123] [<c0350a8c>] (musb_g_tx+0x0/0x204) from [<c034eb00>] (musb_dma_completion+0x40/0x54)
[  315.104980] [<c034eac0>] (musb_dma_completion+0x0/0x54) from [<c0351e6c>] (dma_controller_irq+0x118/0x184)
[  315.115661] [<c0351d54>] (dma_controller_irq+0x0/0x184) from [<c00d86b8>] (handle_irq_event_percpu+0x54/0x188)

So put protection in code to handle possiblity of getting an interrupt for an
endpoint that might have been already nuked.

Reported-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:29:04 +03:00
Christoph Fritz 80e91fd59b usb: gadget: regression fix - usage of usb_ep
This patch removes redundant pointer to struct usb_endpoint_descriptor which
were missed in commit 79149b8:

 usb: gadget: Update fsl_udc_core to use usb_endpoint_descriptor inside the
 struct usb_ep

Due to clock framework regressions, this patch is only compile tested!

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:24:49 +03:00
Pratyush Anand 70b674bfeb usb: dwc3: Fix break from cleanup request loop
If event status says that its last completed TRB but TRB is still owned
by HW then break from the loop, because we are not going to get correct
TRB status from trb control/size register.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:23:19 +03:00
Pratyush Anand d6d6ec7b88 usb: dwc3: Fix missed isoc IN transaction
If an IN transfer is missed on isoc endpoint, then driver must insure
that next ep_queue is properly handled.
This patch fixes this issue by starting a new transfer for next queued
request.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:23:04 +03:00
Pratyush Anand d05b81824e USB: DWC3: Correct DWC3_DSTS_SOFFN_MASK definition
SOF Number is bit16:3 of DSTS. Correct the mask accordingly.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:17:29 +03:00
Pratyush Anand 389f2828bb USB: DWC3: Correct DWC3_TRB_SIZE_TRBSTS definition
Correct  define for DWC3_TRB_SIZE_TRBSTS.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:17:20 +03:00
Pratyush Anand 206dd69a62 USB: DWC3: Generate interrupt on each TRB as default option
Currently in case of isoc, interrupt is programmed after each
TRB_NUM/4 ie 8th TRB. A TRB is programmed against each submitted
request from gadget. If we do not want to limit the minimum number of
necessary request to be submitted from gadget then we must receive
interrupt on each TRB submission. There can be such situation with a
gadget working with ping-pong buffer.

If a gadget does not want to receive interrupt after each request
completion then it may set no_interrupt flag.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:17:04 +03:00
Ido Shayevitz 109f0f7183 usb: gadget: s3c-hsudc.c: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:48 +03:00
Ido Shayevitz 0561ed440f usb: gadget: s3c2410_udc: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:48 +03:00
Ido Shayevitz 3ba0b31aed usb: gadget: pxa25x_udc: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:47 +03:00
Ido Shayevitz 77964b3ce8 usb: gadget: omap_udc: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:47 +03:00
Ido Shayevitz e0f4f9d4c9 usb: gadget: mv_udc_core: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Acked-by: Yu Xu <yuxu@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:46 +03:00
Ido Shayevitz aedaa44dd3 usb: gadget: goku_udc: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:46 +03:00
Ido Shayevitz 1fa75972c7 usb: gadget: fsl_udc_core: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:45 +03:00
Ido Shayevitz fc065a0952 usb: gadget: fsl_qe_udc: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:45 +03:00
Ido Shayevitz 820234c86b usb: gadget: atmel_usba_udc: Remove unneeded condition
The removed condition is always true, since the endpoint descriptor is
set prior to calling the enable endpoint.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:15:44 +03:00
Bhupesh Sharma fbcaba0e3d usb: gadget: uvc: Add super-speed support to UVC webcam gadget
This patch adds super-speed support to UVC webcam gadget.

Also in this patch:
	- We add the configurability to pass bInterval, bMaxBurst, mult
	  factors for video streaming endpoint (ISOC IN) through module
	  parameters.

	- We use config_ep_by_speed helper routine to configure video
	  streaming endpoint.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:36 +03:00
Bhupesh Sharma 5797663674 usb: gadget: uvc: Use macro for interrupt endpoint status size instead of using a MAGIC number
This patch adds a MACRO for the UVC video control status (interrupt) endpoint and
removes the magic number which was being used earlier.

Some UDCs have issues supporting an interrupt IN endpoint having a max packet
size less than a particular value (say 32). It is easier in that case to simply
change the MACRO value instead of changing the max packet size value at a
number of locations.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:31 +03:00
Bhupesh Sharma 3de6e63f78 usb: gadget: uvc: Fix string descriptor STALL issue when multiple uvc functions are added to a configuration
This patch solved the string descriptor STALL issue when we add multiple UVC
functions in a single configuration using a 'webcam.c' like composite driver.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:25 +03:00
Joe Perches 0a00790ff4 usb: gadget: pch_udc: Fix likely misuse of | for &
Using | with a constant is always true.
Likely this should have be &.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:06 +03:00
Koen Beel 560f118799 usb: gadget: ffs: add HID descriptor support.
When writing the descriptors to the ep0 file of functionfs, the HID descriptors where not recognized which caused the initialization from user space to fail.

Signed-off-by: Koen Beel <koen.beel@barco.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:11:59 +03:00
Michal Nazarewicz fa84c57516 usb: gadget: f_mass_storage: change default value of the removable parameter
This commit changes the default value of the removable module parameter
from “y” to “n”.  This comes with line with file_storag's default and
seems to be a better default.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:11:35 +03:00
Sachin Kamat 338edabcd8 usb: s3c-hsotg: Use devm_* functions in s3c-hsotg.c file
devm_* functions are used to replace kzalloc, request_mem_region, ioremap
and request_irq functions in probe call. With the usage of devm_* functions
explicit freeing and unmapping is not required.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:07:45 +03:00
Tony Lindgren b924b20470 ARM: OMAP: Make FS USB omap1 only
As the FS USB code is not being actively used for omap2+
there's no point keeping it around for omap2+.

Let's make the FS USB platform init code omap1 only so
we can remove the last user of omap_read/write for omap2+,
and simplify things for further USB, DMA, and device tree
related work.

While at it, also group the mach includes for the related
drivers.

Cc: linux-usb@vger.kernel.org
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-06-04 00:57:57 -07:00
Felipe Balbi dd8e93814a usb: gadget: omap_udc: use generic map/unmap routines
This patch makes use of the generic map/unmap
routines on the omap_udc driver. Removes
some useless and duplicated code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:35 +03:00
Felipe Balbi 23673d7d26 usb: gadget: omap_udc: kfree(NULL) is safe
we don't need to check for _req because
kfree(NULL) is safe. Also, if someone
actually passes a NULL pointer to be freed
by usb_ep_free_request(), he deserves any
issue he faces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:34 +03:00
Felipe Balbi 70617db7ad usb: gadget: omap_udc: remove possiblity of NULL pointer de-reference
when allocating a request, it's better programming
practice to make sure we return NULL if allocation
failed.

This will ensure that, if struct usb_request isn't
the first member on our structure, we don't cheat
the gadget driver into thinking allocating worked
because pointer isn't 0.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:33 +03:00
Felipe Balbi dc1737cdd7 usb: gadget: omap_udc: let it work as a module
this also helps removing a few lines of boilerplate
code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:32 +03:00
Felipe Balbi 5b6d84b789 usb: gadget: omap_udc: remove useless print
that print isn't needed at all. Remove it
and move the use_dma reinitialization to
probe() function.

Note that ideally we would drop all
cpu_is_* and machine_is_* checks from
this driver instead. Later patches will
come to get rid of those.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:30 +03:00
Felipe Balbi 80dd1358d3 usb: gadget: omap_udc: make checkpatch.pl happy
This patch is just a cleanup patch to make
checkpatch.pl a little happier with the
omap_udc.c driver.

No functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:29 +03:00
Tony Lindgren ae3725716e usb: gadget: omap_udc: Remove omap2 support
There are no active users of this code for omap2 as
the boards in use have either TUSB or MUSB controller.

While at it, also fix warnings related to uninitialized
dc_clk and hhc_clk.

Cc: linux-usb@vger.kernel.org
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:27 +03:00
Felipe Balbi 85a781019b usb: dwc3: ep0: rename dwc3_ep0_complete_req to dwc3_ep0_complete_status
That's a much more intuitive name as that function
is only called at the completion of a Status Phase.

It also matches dwc3_ep0_complete_data() for
the completion of Data Phase.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:28 +03:00
Felipe Balbi c8cf7af452 usb: dwc3: ep0: be careful with endianness on SetSEL command
USB is always little endian, but this driver
could run on non little endian cpus. Let's
be carefull with that.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:27 +03:00
Felipe Balbi ef21ede65e usb: dwc3: ep0: simplify error handling on dwc3_ep0_inspect_setup
There's no need for returning early. Instead,
we can call dwc3_ep0_stall_and_restart()
conditionally.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:27 +03:00
Gerard CAUVY 5cbe8c220c usb: dwc3: gadget: move AcceptU1Ena and AcceptU2Ena to Reset IRQ
According to the databook, the DWC3 Core will
reset those bits to 0 on USB Bus Reset. This
means we must re-enable those bits on every
reset interrupt.

Because we will always get a Reset interrupt
after loading a gadget driver, we can, instead
of re-enabling something that was just lost,
move the handling of those bits to the Reset
Interrupt.

This patch fixes USB30CV U1/U2 Test.

Signed-off-by: Gerard CAUVY <g-cauvy1@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:26 +03:00
Felipe Balbi c4430a2694 usb: dwc3: gadget: disable U1/U2 on disconnect
If we get a disconnect IRQ, we should take
the core out of low power mode so we can
reconnect afterwards.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:25 +03:00
Felipe Balbi fcc023c726 usb: dwc3: gadget: prevent DCTL register corruption
If we don't read out the contents of the register
(in order to reinitialize 'reg' variable) we will
be writing unknown contents to the DCTL register
whenever we try to use dwc3_gadget_wakeup() function.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:25 +03:00
Paul Zimmerman 7acd85e0eb usb: dwc3: core: make sure evt->lpos is correctly initialized
The same event buffers will be reused when coming
out of hibernation, so we must reinitialize them
properly to avoid any mistakes.

While at that, also take dwc3_event_buffers_setup()
out of __devinit section.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:24 +03:00
Paul Zimmerman 802fde983e usb: dwc3: support new revisions of DWC3 core
Recent cores (>= 1.94a) have a set of new features,
commands and a slightly different programming model.

This patch aims to support those changes.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:23 +03:00
Paul Zimmerman d7a46a8dfc usb: dwc3: gadget: rename phy_power() to phy_suspend()
those two functions don't power PHYs, they simply
put them in suspend state. Rename to reflect better
what functions actually do.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:23 +03:00
Paul Zimmerman aed430e513 usb: dwc3: gadget: reinitialize retries
retries is used twice without being reinitialized.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:22 +03:00
Paul Zimmerman 2c61a8efce usb: dwc3: add definitions for new registers
This patch adds definitions for some new registers that have been
added to later versions of the controller, up to v2.10a.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:21 +03:00
Felipe Balbi a092532483 usb: dwc3: gadget: remove trailing semicolon
That semicolon doesn't do anything, it's not
needed and should be removed.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:21 +03:00
Felipe Balbi 33b84c2c06 usb: dwc3: ep0: fix a typo in comment
s/has/have. No functional changes, just
a typo fix on a code comment.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:20 +03:00
Felipe Balbi 788a23f496 usb: dwc3: ep0: align on function signature
On our Transfer Not Ready handlers, only
dwc3_ep0_do_control_status() had a different
list of parameters.

Align on the parameters in order to keep consistency.

No functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:19 +03:00
Felipe Balbi c74c6d4a02 usb: dwc3: ep0: switch over to IS_ALIGNED
IS_ALIGNED provides a much faster operation for
checking proper size alignment then a modulo
operation. Let's use it.

Reported-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:19 +03:00
Felipe Balbi a0807881af usb: dwc3: handle pending unaligned Control OUT data phase correctly
When DWC3_EP_PENDING_REQUEST flag is set for a Control OUT Data
phase transfer, we would be missing the proper handling for
unaligned OUT requests, thus hanging a transfer.

Since proper handling is already done on dwc3_ep0_do_control_data(),
we simply re-factor that function so it can be re-used from
__dwc3_gadget_ep0_queue().

Reported-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:18 +03:00
Felipe Balbi 4552a0ca61 usb: dwc3: fix a WARN and a comment
we're now have DWC3_EP0_BOUNCE_SIZE to tell
us the actual size of the bufer. Let's use that
instead of ep0 wMaxPacketSize.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:08:17 +03:00
Linus Torvalds 2795343705 arm-soc: clock driver changes
The new clock subsystem was merged in linux-3.4 without any users, this
 now moves the first three platforms over to it: imx, mxs and spear.
 
 The series also contains the changes for the clock subsystem itself,
 since Mike preferred to have it together with the platforms that require
 these changes, in order to avoid interdependencies and conflicts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuexPAAoJEIwa5zzehBx3YBsP/0nFhXjb5t1PdLfFzGKtcZVB
 j4zXWXMHQ1fA7wIfEpZF3Nnco6MQkufF5wJPoPdn1+wmkzCn3D6IwNVWVtW4U5i9
 VGyShSbgusAAYXUe/9yYj8eN+bbRQSvdN4eWYWU6+rRXShGZ5dZZmp+IPNl54dnW
 6F8uCnHX0cnIMCpGqV+41zZgZ/4wL2k9gdqu0LO6pi07o4tGd0Z4gcySgUFAnn1R
 kofNHueYIP4UgOg8DREoBzVKlpRqMou3S2kSZUfMeb3Q9ryF7UIvaGqIILyi7PKL
 kWd3nptg0EPavfL21SwXHiGpnDpB/Gj/F70kcPLus5RYujB24C9bvBmc26z68NZx
 Sz9mbElkkIU5duZsl1nxBWJ8IZ/tSWdtmC2xQMznmV7gHyGgVwr4j47f4Uv5sBvM
 14JHDO7mqN6E6FnTFZu/oPAN5pDjgL+TVNK5BU6Wkq0zitrA6eyKDqCvBCqkO6Nn
 tNzOuyRDzMOwM7HzqXhxqtzJWXylO1Mldc4bM8X4Cocf4pnLna/X6uP6dgE6A+JY
 azVYx4I/0NdEPerDTzIcEhBDgZeBVROhUQr+kHxc4rf6WzUUbu/wEo1UKXWV66oW
 1jb1yAFFWqYjkQuQc2PD4JSx35sFJaoSaoneRtmzBzRDfzSr5KjKj1E0e1skyMFq
 7ZVLCqZD0cB9DhmMDkWP
 =rwFF
 -----END PGP SIGNATURE-----

Merge tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc clock driver changes from Olof Johansson:
 "The new clock subsystem was merged in linux-3.4 without any users,
  this now moves the first three platforms over to it: imx, mxs and
  spear.

  The series also contains the changes for the clock subsystem itself,
  since Mike preferred to have it together with the platforms that
  require these changes, in order to avoid interdependencies and
  conflicts."

Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code
removed in one branch, added OF support in another) and
drivers/dma/imx-sdma.c (independent changes next to each other).

* tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  SPEAr: Update defconfigs
  SPEAr: Add SMI NOR partition info in dts files
  SPEAr: Switch to common clock framework
  SPEAr: Call clk_prepare() before calling clk_enable
  SPEAr: clk: Add General Purpose Timer Synthesizer clock
  SPEAr: clk: Add Fractional Synthesizer clock
  SPEAr: clk: Add Auxiliary Synthesizer clock
  SPEAr: clk: Add VCO-PLL Synthesizer clock
  SPEAr: Add DT bindings for SPEAr's timer
  ARM i.MX: remove now unused clock files
  ARM: i.MX6: implement clocks using common clock framework
  ARM i.MX35: implement clocks using common clock framework
  ARM i.MX5: implement clocks using common clock framework
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ...
2012-05-26 12:42:29 -07:00
Linus Torvalds ce53044c68 arm-soc: driver specific updates
These changes are specific to some driver that may be used by multiple
 boards or socs. The most significant change in here is the move of the
 samsung iommu code from a platform specific in-kernel interface to the
 generic iommu subsystem.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuevXAAoJEIwa5zzehBx3D8YQAKfoY3TFjJ9KmJgk69/pc7cf
 Of0rvX+35NezGFljIyRdspz+DsV+vhJravwdVxOagRKvVBOb9qnZIXnl3gkLnTw4
 dCVMFMqCwXhBeXlXCzHSeRmt2+4/fmJnr7jr4xh9omOAJ9BZv5ftmKNW4zP5wr1L
 +9HBwzkxlVisR4NCz2q66YBjsV2dXA3dv2hZxEFkUdQFYJGqZoUXLYHF9yno20i3
 knKNXEyAFYFUKHiFVBQJ1tYGmZlaIjw14g+GTqzZay2Pi/HjUXfrPd0VwNkBzZf/
 H1N3/cf4GJ2+K/zYqh+H/Xjf/Fjkp1dFNhlUQ7+l5Jwbu7C1B2euvwTO4OaqrfdD
 7eqG3+uIKhPO2Z8ZySLFgx4ghybtwgZrAwOjsa+ymTugqPbiWYB/zZR1iWu5DMk/
 TnNb6P3ciP+WMpoMFh1kXRc/eCCCHtuQ0rLRxizSX6HIpxWvjYFNLH7L3wS+KtlB
 7vsS764d1JFW318bsdBi+V/LWRVXeSWWetTzdzDcM/Syz3ZqfPy7e3Ge6qx0lvYe
 5ojgzKwVqpJenZdt91UC16cMXNqDTzmZObz6LOCmVm1mB5kYSgEHYxAQQvuGFjXT
 28kGyBQNsBboJGaYh2O/CTsVXnHnaPXrtDDWMDacWNwwPYnnA2L8lUNfAg1DgA1j
 Z6CO8Knfct01EpQLtybK
 =hgkg
 -----END PGP SIGNATURE-----

Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc driver specific updates from Olof Johansson:
 "These changes are specific to some driver that may be used by multiple
  boards or socs.  The most significant change in here is the move of
  the samsung iommu code from a platform specific in-kernel interface to
  the generic iommu subsystem."

Fix up trivial conflicts in arch/arm/mach-exynos/Kconfig

* tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
  mmc: dt: Consolidate DT bindings
  iommu/exynos: Add iommu driver for EXYNOS Platforms
  ARM: davinci: optimize the DMA ISR
  ARM: davinci: implement DEBUG_LL port choice
  ARM: tegra: Add SMMU enabler in AHB
  ARM: tegra: Add Tegra AHB driver
  Input: pxa27x_keypad add choice to set direct_key_mask
  Input: pxa27x_keypad direct key may be low active
  Input: pxa27x_keypad bug fix for direct_key_mask
  Input: pxa27x_keypad keep clock on as wakeup source
  ARM: dt: tegra: pinmux changes for USB ULPI
  ARM: tegra: add USB ULPI PHY reset GPIO to device tree
  ARM: tegra: don't hard-code USB ULPI PHY reset_gpio
  ARM: tegra: change pll_p_out4's rate to 24MHz
  ARM: tegra: fix pclk rate
  ARM: tegra: reparent sclk to pll_c_out1
  ARM: tegra: Add pllc clock init table
  ARM: dt: tegra cardhu: basic audio support
  ARM: dt: tegra30.dtsi: Add audio-related nodes
  ARM: tegra: add AUXDATA required for audio
  ...
2012-05-26 12:22:27 -07:00
Linus Torvalds ab11ca34ee Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 - some V4L2 API updates needed by embedded devices
 - DVB API extensions for ATSC-MH delivery system, used in US for mobile
   TV
 - new tuners for fc0011/0012/0013 and tua9001
 - a new dvb driver for af9033/9035
 - a new ATSC-MH frontend (lg2160)
 - new remote controller keymaps
 - Removal of a few legacy webcam driver that got replaced by gspca on
   several kernel versions ago
 - a new driver for Exynos 4/5 webcams(s5pp fimc-lite)
 - a new webcam sensor driver (smiapp)
 - a new video input driver for embedded (sta2x1xx)
 - several improvements, fixes, cleanups, etc inside the drivers.

Manually fix up conflicts due to err() -> dev_err() conversion in
drivers/staging/media/easycap/easycap_main.c

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (484 commits)
  [media] saa7134-cards: Remove a PCI entry added by mistake
  [media] radio-sf16fmi: add support for SF16-FMD
  [media] rc-loopback: remove duplicate line
  [media] patch for Asus My Cinema PS3-100 (1043:48cd)
  [media] au0828: Move the Kconfig knob under V4L_USB_DRIVERS
  [media] em28xx: simple comment fix
  [media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2
  [media] smiapp: Use v4l2_ctrl_new_int_menu() instead of v4l2_ctrl_new_custom()
  [media] smiapp: Add support for 8-bit uncompressed formats
  [media] smiapp: Allow generic quirk registers
  [media] smiapp: Use non-binning limits if the binning limit is zero
  [media] smiapp: Initialise rval in smiapp_read_nvm()
  [media] smiapp: Round minimum pre_pll up rather than down in ip_clk_freq check
  [media] smiapp: Use 8-bit reads only before identifying the sensor
  [media] smiapp: Quirk for sensors that only do 8-bit reads
  [media] smiapp: Pass struct sensor to register writing commands instead of i2c_client
  [media] smiapp: Allow using external clock from the clock framework
  [media] zl10353: change .read_snr() to report SNR as a 0.1 dB
  [media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300)
  [media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
  ...
2012-05-24 10:21:51 -07:00
Linus Torvalds e8650a0823 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial updates from Jiri Kosina:
 "As usual, it's mostly typo fixes, redundant code elimination and some
  documentation updates."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
  edac, mips: don't change code that has been removed in edac/mips tree
  xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
  lib: Change mail address of Oskar Schirmer
  net: Change mail address of Oskar Schirmer
  arm/m68k: Change mail address of Sebastian Hess
  i2c: Change mail address of Oskar Schirmer
  net: Fix tcp_build_and_update_options comment in struct tcp_sock
  atomic64_32.h: fix parameter naming mismatch
  Kconfig: replace "--- help ---" with "---help---"
  c2port: fix bogus Kconfig "default no"
  edac: Fix spelling errors.
  qla1280: Remove redundant NULL check before release_firmware() call
  remoteproc: remove redundant NULL check before release_firmware()
  qla2xxx: Remove redundant NULL check before release_firmware() call.
  aic94xx: Get rid of redundant NULL check before release_firmware() call
  tehuti: delete redundant NULL check before release_firmware()
  qlogic: get rid of a redundant test for NULL before call to release_firmware()
  bna: remove redundant NULL test before release_firmware()
  tg3: remove redundant NULL test before release_firmware() call
  typhoon: get rid of redundant conditional before all to release_firmware()
  ...
2012-05-22 19:22:50 -07:00
Linus Torvalds 94b5aff4c6 TTY pull request for 3.5-rc1
Here's the big TTY/serial driver pull request for the 3.5-rc1 merge window.
 
 Nothing major in here, just lots of incremental changes from Alan and
 Jiri reworking some tty core things to behave better and to get a more
 solid grasp on some of the nasty tty locking issues.
 
 There are a few tty and serial driver updates in here as well.
 
 All of this has been in the linux-next releases for a while with no problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk+7rBoACgkQMUfUDdst+ykXsgCfeDKx6ZgLidYy3H40Y2Pt3XEO
 TicAn1fcdGwOmMR/mowa+kTA68D/J6i2
 =S7tG
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull TTY updates from Greg Kroah-Hartman:
 "Here's the big TTY/serial driver pull request for the 3.5-rc1 merge
  window.

  Nothing major in here, just lots of incremental changes from Alan and
  Jiri reworking some tty core things to behave better and to get a more
  solid grasp on some of the nasty tty locking issues.

  There are a few tty and serial driver updates in here as well.

  All of this has been in the linux-next releases for a while with no
  problems.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'tty-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (115 commits)
  serial: bfin_uart: Make MMR access compatible with 32 bits bf609 style controller.
  serial: bfin_uart: RTS and CTS MMRs can be either 16-bit width or 32-bit width.
  serial: bfin_uart: narrow the reboot condition in DMA tx interrupt
  serial: bfin_uart: Adapt bf5xx serial driver to bf60x serial4 controller.
  Revert "serial_core: Update buffer overrun statistics."
  tty: hvc_xen: NULL dereference on allocation failure
  tty: Fix LED error return
  tty: Allow uart_register/unregister/register
  tty: move global ldisc idle waitqueue to the individual ldisc
  serial8250-em: Add DT support
  serial8250-em: clk_get() IS_ERR() error handling fix
  serial_core: Update buffer overrun statistics.
  tty: drop the pty lock during hangup
  cris: fix missing tty arg in wait_event_interruptible_tty call
  tty/amiserial: Add missing argument for tty_unlock()
  tty_lock: Localise the lock
  pty: Lock the devpts bits privately
  tty_lock: undo the old tty_lock use on the ctty
  serial8250-em: Emma Mobile UART driver V2
  Add missing call to uart_update_timeout()
  ...
2012-05-22 16:12:24 -07:00
Linus Torvalds 5d4e2d08e7 Driver core pull for 3.5-rc1
Here's the driver core, and other driver subsystems, pull request for
 the 3.5-rc1 merge window.
 
 Outside of a few minor driver core changes, we ended up with the
 following different subsystem and core changes as well, due to
 interdependancies on the driver core:
  - hyperv driver updates
  - drivers/memory being created and some drivers moved into it
  - extcon driver subsystem created out of the old Android staging switch
    driver code
  - dynamic debug updates
  - printk rework, and /dev/kmsg changes
 
 All of this has been tested in the linux-next releases for a few weeks
 with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk+7q28ACgkQMUfUDdst+ykXmwCfcPASzC+/bDkuqdWsqzxlWZ7+
 VOQAnAriySv397St36J6Hz5bMQZwB1Yq
 =SQc+
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg Kroah-Hartman:
 "Here's the driver core, and other driver subsystems, pull request for
  the 3.5-rc1 merge window.

  Outside of a few minor driver core changes, we ended up with the
  following different subsystem and core changes as well, due to
  interdependancies on the driver core:
   - hyperv driver updates
   - drivers/memory being created and some drivers moved into it
   - extcon driver subsystem created out of the old Android staging
     switch driver code
   - dynamic debug updates
   - printk rework, and /dev/kmsg changes

  All of this has been tested in the linux-next releases for a few weeks
  with no reported problems.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

Fix up conflicts in drivers/extcon/extcon-max8997.c where git noticed
that a patch to the deleted drivers/misc/max8997-muic.c driver needs to
be applied to this one.

* tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (90 commits)
  uio_pdrv_genirq: get irq through platform resource if not set otherwise
  memory: tegra{20,30}-mc: Remove empty *_remove()
  printk() - isolate KERN_CONT users from ordinary complete lines
  sysfs: get rid of some lockdep false positives
  Drivers: hv: util: Properly handle version negotiations.
  Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp()
  memory: tegra{20,30}-mc: Use dev_err_ratelimited()
  driver core: Add dev_*_ratelimited() family
  Driver Core: don't oops with unregistered driver in driver_find_device()
  printk() - restore prefix/timestamp printing for multi-newline strings
  printk: add stub for prepend_timestamp()
  ARM: tegra30: Make MC optional in Kconfig
  ARM: tegra20: Make MC optional in Kconfig
  ARM: tegra30: MC: Remove unnecessary BUG*()
  ARM: tegra20: MC: Remove unnecessary BUG*()
  printk: correctly align __log_buf
  ARM: tegra30: Add Tegra Memory Controller(MC) driver
  ARM: tegra20: Add Tegra Memory Controller(MC) driver
  printk() - restore timestamp printing at console output
  printk() - do not merge continuation lines of different threads
  ...
2012-05-22 16:02:13 -07:00
Linus Torvalds a481991467 USB 3.5-rc1 pull request
Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window.
 
 It's touches a lot of different parts of the kernel, all USB drivers,
 due to some API cleanups (getting rid of the ancient err() macro) and
 some changes that are needed for USB 3.0 power management updates.
 
 There are also lots of new drivers, pimarily gadget, but others as well.
 We deleted a staging driver, which was nice, and finally dropped the
 obsolete usbfs code, which will make Al happy to never have to touch
 that again.
 
 There were some build errors in the tree that linux-next found a few
 days ago, but those were fixed by the most recent changes (all were due
 to us not building with CONFIG_PM disabled.)
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk+7qs0ACgkQMUfUDdst+ymjOgCfeoWqWk1bsKKt6SZULvQois5i
 3csAn1Uapcm8Uswwpnj2v1/2Zh4rBHLA
 =4jM1
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB 3.5-rc1 changes from Greg Kroah-Hartman:
 "Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window.

  It's touches a lot of different parts of the kernel, all USB drivers,
  due to some API cleanups (getting rid of the ancient err() macro) and
  some changes that are needed for USB 3.0 power management updates.

  There are also lots of new drivers, pimarily gadget, but others as
  well.  We deleted a staging driver, which was nice, and finally
  dropped the obsolete usbfs code, which will make Al happy to never
  have to touch that again.

  There were some build errors in the tree that linux-next found a few
  days ago, but those were fixed by the most recent changes (all were
  due to us not building with CONFIG_PM disabled.)

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits)
  xhci: Fix DIV_ROUND_UP compile error.
  xhci: Fix compile with CONFIG_USB_SUSPEND=n
  USB: Fix core compile with CONFIG_USB_SUSPEND=n
  brcm80211: Fix compile error for .disable_hub_initiated_lpm.
  Revert "USB: EHCI: work around bug in the Philips ISP1562 controller"
  MAINTAINERS: Add myself as maintainer to the USB PHY Layer
  USB: EHCI: fix command register configuration lost problem
  USB: Remove races in devio.c
  USB: ehci-platform: remove update_device
  USB: Disable hub-initiated LPM for comms devices.
  xhci: Add Intel U1/U2 timeout policy.
  xhci: Add infrastructure for host-specific LPM policies.
  USB: Add macros for interrupt endpoint types.
  xhci: Reserve one command for USB3 LPM disable.
  xhci: Some Evaluate Context commands must succeed.
  USB: Disable USB 3.0 LPM in critical sections.
  USB: Add support to enable/disable USB3 link states.
  USB: Allow drivers to disable hub-initiated LPM.
  USB: Calculate USB 3.0 exit latencies for LPM.
  USB: Refactor code to set LPM support flag.
  ...

Conflicts:
	arch/arm/mach-exynos/mach-nuri.c
	arch/arm/mach-exynos/mach-universal_c210.c
	drivers/net/wireless/ath/ath6kl/usb.c
2012-05-22 15:50:46 -07:00
Linus Torvalds 813a95e5b4 arm-soc: soc-specific pinctrl changes
With this, five platforms are moving to the relatively new pinctrl
 subsystem for their pin management, replacing the older soc specific
 in-kernel interfaces with common code.
 
 There is quite a bit of net addition of code for each platform being
 added to the pinctrl subsystem. but the payback comes later when adding
 new boards can be done by only providing new device trees instead.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuw1/AAoJEIwa5zzehBx3wbsP/RFCYzMVyz85BNLQuRyY9eO2
 GCRWd0Vvy3fIfypiPdHdhkq6nIU/JnxgsfBbKX9FvWqvxXi96Ojh13KSIhSI1rQ9
 t14VyuwUXaS3leeCyKxhNF1vRscz2iyEGXJqp+XEN4ckf2nrQCpKBiY5Eg9sH6/J
 fvYgSBY9Lf9nFAn+/wqSKIfdvw7H0NXwUdsLvNU0uCwvrSG929bTxx2AnHX00TdJ
 qf4XLhmatMg1uwdUgL/99ZxxgHlj6o55u7S6aRhUWXNXCimV6uEZ1F35ET37b+x3
 YUltBCIaXjFR7iwNHmkkl42d8uyfkBznB555sY5qS3G/uF5Ma1R5I7fv8EIEy+2w
 bVHsva4lj1yFazic6m8yKTET4i8n6OPiKVNqGnDsp2yb6WzOGSliKdr0Jlo1oNG2
 gS69LcDZxCkXrqEq0Ht8uUoCo9TWei+qhJ6ZOJ1Z3+9ZyFq1iRTKgPVxyA5VaHaB
 wwBbqKrohAwuExY8/gkAj6SYqBOF3l/J8QSB2JjXyj4trLC5UMq+l3L4cIWyMRPc
 fil83hV6460CiIBoKcsnV9hDUS0oh74mv52zHo0Xj73qABqZ4dcrpHVayWjtMtpl
 Z+tUpvD1rMQ+E0gdXDrwMrwILVyCDsBvpFKF4avnujDJ4WmyywtKZ+xvnpMd73VZ
 YrI/+XQsMT8ZfVkkj54D
 =HIfz
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm soc-specific pinctrl changes from Olof Johansson:
 "With this, five platforms are moving to the relatively new pinctrl
  subsystem for their pin management, replacing the older soc specific
  in-kernel interfaces with common code.

  There is quite a bit of net addition of code for each platform being
  added to the pinctrl subsystem.  But the payback comes later when
  adding new boards can be done by only providing new device trees
  instead."

Fix up trivial conflicts in arch/arm/mach-ux500/{Makefile,board-mop500.c}

* tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (61 commits)
  mtd: nand: gpmi: fix compile error caused by pinctrl call
  ARM: PRIMA2: select PINCTRL and PINCTRL_SIRF in Kconfig
  ARM: nomadik: enable PINCTRL_NOMADIK where needed
  ARM: mxs: enable pinctrl support
  video: mxsfb: adopt pinctrl support
  ASoC: mxs-saif: adopt pinctrl support
  i2c: mxs: adopt pinctrl support
  mtd: nand: gpmi: adopt pinctrl support
  mmc: mxs-mmc: adopt pinctrl support
  serial: mxs-auart: adopt pinctrl support
  serial: amba-pl011: adopt pinctrl support
  spi/imx: adopt pinctrl support
  i2c: imx: adopt pinctrl support
  can: flexcan: adopt pinctrl support
  net: fec: adopt pinctrl support
  ARM: ux500: switch MSP to using pinctrl for pins
  ARM: ux500: alter MSP registration to return a device pointer
  ARM: ux500: switch to using pinctrl for uart0
  ARM: ux500: delete custom pin control system
  ARM: ux500: switch over to Nomadik pinctrl driver
  ...
2012-05-22 09:39:42 -07:00
Linus Torvalds 9bc747bea5 arm-soc: First batch of cleanups
These cleanups are basically all over the place. The idea is to collect
 changes with minimal impact but large number of changes so we can avoid
 them from distracting in the diffstat in the other series.
 
 A significant number of lines get removed here, in particular because
 the ixp2000 and ixp23xx platforms get removed. These have never been
 extremely popular and have fallen into disuse over time with no active
 maintainer taking care of them. The u5500 soc never made it into a
 product, so we are removing it from the ux500 platform.
 
 Many good cleanups also went into the at91 and omap platforms, as has
 been the case for a number of releases.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuemiAAoJEIwa5zzehBx3L9oQAKiu0bsCiT6BM3VC5VGpluk7
 YVLH/fkYGdSUTeGrpjeaoxxZnN5M1CLwErg3DxWcyYidy0zfmqitC8t2KQxZMxuf
 bt+hn4flpFnXMNm31B9xBCXOOVAvteZHYS35FdSKGyWo5Kz2WKM8ZrrihkAA7jVi
 U75x4+shFPtIhLNg2sJg4e/9D1T14ypElB7W989NzxMtco5fbukVd6vDBHPlFDG3
 RVI2z2MbWUj3HVmdoyB+09ekruys0MQsbPOGo8D4aeJicrli/JBtL1r1w6ZZ6I8v
 Pe0+CbgemMWS69I37Zuxt35Bejpdofa8nKhT1jBrH4uHYxroKkhhx+VMTtuCcFVw
 Q2DhbbHImiW3598c0jkGi7Gk+TalTxkStMQiO3bqYAHApftdqFUgkpFSnOC/Jxgj
 Y6nUmd+GVPS+r0dDwZg4z5/AnUQd6t8Azp784muPDDxgTV1ZfdaC0LlLjdWesvMO
 x+PQib/U7NdxN5lifV6xCXpPoCQsgshrOkVUQiKVHmzaghm9MXgB8qrzXdTz3dLL
 XtR3+1KmSDTfHPSlTq/9vIN4RJtsKUnDWzNViTElEql36KzT7l5mJnBe6CJWirJh
 7JNyH0p6XDZfc2q7LgdiSU0dv/j9LzBaYUukQCyUI3Tk+5zKgAdKbYNJpRcfPuoO
 BK6OKbjCAoAHL+/nDU2s
 =Hcjs
 -----END PGP SIGNATURE-----

Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull first batch of arm-soc cleanups from Olof Johansson:
 "These cleanups are basically all over the place.  The idea is to
  collect changes with minimal impact but large number of changes so we
  can avoid them from distracting in the diffstat in the other series.

  A significant number of lines get removed here, in particular because
  the ixp2000 and ixp23xx platforms get removed.  These have never been
  extremely popular and have fallen into disuse over time with no active
  maintainer taking care of them.  The u5500 soc never made it into a
  product, so we are removing it from the ux500 platform.

  Many good cleanups also went into the at91 and omap platforms, as has
  been the case for a number of releases."

Trivial modify-delete conflicts in arch/arm/mach-{ixp2000,ixp23xx}

* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (152 commits)
  ARM: clps711x: Cleanup IRQ handling
  ARM clps711x: Removed unused header mach/time.h
  ARM: clps711x: Added note about support EP731x CPU to Kconfig
  ARM: clps711x: Added missing register definitions
  ARM: clps711x: Used own subarch directory for store header file
  Dove: Fix Section mismatch warnings
  ARM: orion5x: ts78xx debugging changes
  ARM: orion5x: remove PM dependency from ts78xx
  ARM: orion5x: ts78xx fix NAND resource off by one
  ARM: orion5x: ts78xx whitespace cleanups
  Orion5x: Fix Section mismatch warnings
  Orion5x: Fix warning: struct pci_dev declared inside paramter list
  ARM: clps711x: Combine header files into one for clps711x-targets
  ARM: S3C24XX: Use common macro to define resources on mach-qt2410.c
  ARM: S3C24XX: Use common macro to define resources on mach-osiris.c
  ARM: EXYNOS: Adapt to cpuidle core time keeping and irq enable
  ARM: S5PV210: Use common macro to define resources on mach-smdkv210.c
  ARM: S5PV210: Use common macro to define resources on dev-audio.c
  ARM: S5PC100: Use common macro to define resources on dev-audio.c
  ARM: S5P64X0: Use common macro to define resources on dev-audio.c
  ...
2012-05-22 09:23:24 -07:00
Linus Torvalds ba01a87e37 Merge branch 'usb-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull usb-gadget scsi-target merge from Nicholas Bellinger:
 "As promised, here is the pull request for Sebastian's usb-gadget
  target UASP / BOT driver for v3.5-rc1.  This code has been in
  linux-next for a number of weeks, and is now ready for an initial
  merge.

  This fabric uses the target framework to provide a usb gadget device.
  This gadget supports the USB Attached SCSI Protocol (UASP) and Bulk
  Only Transfers (BOT or BBB).  BOT is the primary interface, UAS is the
  alternative interface.

  Note this series is dependent upon a single target core patch for
  adding se_cmd->unknown_data_length in target-pending/for-next, that
  got merged in the parent.

  Kudos to Sebastian for making this driver happen so easily, and for
  his patches to improve usb-core and target core along the way to his
  goal.  Also thanks to Felipe + Greg-KH for their help in getting this
  driver ready for mainline."

* 'usb-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  usb-gadget: Initial merge of target module for UASP + BOT
2012-05-21 17:40:42 -07:00
Linus Torvalds 881bcabbde Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Setup CROSS_COMPILE at the top
  m68k: Correct the Atari ALLOWINT definition
  m68k/video: Create <asm/vga.h>
  m68k: Make sure {read,write}s[bwl]() are always defined
  m68k/mm: Port OOM changes to do_page_fault()
  scsi/atari: Make more functions static
  scsi/atari: Revive "atascsi=" setup option
  net/ariadne: Improve debug prints
  m68k/atari: Change VME irq numbers from unsigned long to unsigned int
  m68k/amiga: Use arch_initcall() for registering platform devices
  m68k/amiga: Add error checks when registering platform devices
  m68k/amiga: Mark z_dev_present() __init
  m68k: Remove unused MAX_NOINT_IPL definition
2012-05-21 12:43:54 -07:00
Greg Kroah-Hartman cda4db53e9 xhci/usb: Build error fixes for 3.5
Hi Greg,
 
 Here's four patches that fix the build errors introduced by the USB 3.0 Link PM
 patches.  Please pull for inclusion in 3.5.
 
 Sarah Sharp
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPumdCAAoJEBMGWMLi1Gc5veoQAKc+DKLsLrCvXXVPkVNIzrxh
 otE9eNyxqAHd5w7jeteSYwhbR5GfA912OJ6bItz2Bm0Sh/a+VI55QwMd8hV+OW4b
 nIo4Qu5urBsSI82qO9LQV1jS+DHHBAcRQec2FFR9h0Y8cTJkvMLjGcaCSOomvBGq
 HmQ3MRSyKfdUtbFc0pyfjzfbvAftI8Fq1r5XDuce0WXZSPDvlSTvqGCUK7nTo7Pb
 TIW2rLtOJG4xDi6S3gMwlEDilco40EJpem13GdJvoCwLi2bM+FVjTvYHkoSNqtut
 Pv02iyYE+a0mdpwQ5MOyNb0A+QbezyY1YbLF4ZmWRnPjKTOpu3PO1nLLHuWgVJDI
 kEtafG8tcVUcMCczN8Ft0JcHV34pFxLiT8pzJ86684zjRJ9QxlbDISsrZyS45oES
 4lfqgn8rfIV+Qks7MzgBgzDj6ALl+n4JTz4tFE7qK2p7KsLNy2d4gnukHmZvm0AP
 BWW9ACM5NfgDgADWLLGmMh+igCAAWCbrZE2fNcVGONEpDjGyoGZlQYdTyK4ZTHua
 0SzgFdHSvJmHVb7CXxyvcpFPUWznPje4XwkRm2XxkwJ79nl1WkWJwsLw4wMwFUB+
 Chp1wkwHd3U7RilkJJXNLkSeq59CkpxYDZa1FOqmfpYfLWupaFmdHm7Q+W7scM9z
 HXtI18OAErS1+DgSeypG
 =h+NT
 -----END PGP SIGNATURE-----

Merge tag 'for-usb-next-2012-05-21' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next

xhci/usb: Build error fixes for 3.5

Hi Greg,

Here's four patches that fix the build errors introduced by the USB 3.0 Link PM
patches.  Please pull for inclusion in 3.5.

Sarah Sharp
2012-05-21 09:59:23 -07:00
Sarah Sharp c88db160a3 xhci: Fix DIV_ROUND_UP compile error.
Fengguang reports that the xHCI driver isn't linked properly on his
machine:

ERROR: "__udivdi3" [drivers/usb/host/xhci-hcd.ko] undefined!
ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined!
ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined!

The driver compiles fine on my 64-bit box (gcc version 4.6.1).
Fengguang thinks it's because the xHCI driver was using DIV_ROUND_UP()
instead of DIV_ROUND_UP_ULL() with arguments that were unsigned long
long variables.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Wu Fengguang <wfg@linux.intel.com>
2012-05-21 09:00:43 -07:00
Sarah Sharp b01bcbf7ae xhci: Fix compile with CONFIG_USB_SUSPEND=n
The USB 2.0 Link PM code is conditionally compiled when
CONFIG_USB_SUSPEND=y.  I believe that's a mistake, since Link PM is not
directly related to USB device suspend and Link PM is implemented
without relying on any of the suspend code in the USB core.  For now,
keep the USB 2.0 Link PM code conditionally compiled if
CONFIG_USB_SUSPEND=y.

This patch does move the code to implement USB 3.0 Link PM out of the
xHCI driver #ifdefs for CONFIG_USB_SUSPEND and moves it into a section
dependent on CONFIG_PM.  The USB core functions for USB 3.0 Link PM are
already conditionally compiled when CONFIG_PM=y.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-21 09:00:05 -07:00
Sarah Sharp e9261fb62a USB: Fix core compile with CONFIG_USB_SUSPEND=n
When CONFIG_PM=n, make sure that the usb_[unlocked_][en/dis]able_lpm
declarations are visible in include/linux/usb.h, and exported from
drivers/usb/core/hub.c.

Before this patch, if CONFIG_USB_SUSPEND was turned off, it would cause
build errors:

drivers/usb/core/hub.c: In function 'usb_disable_lpm':
drivers/usb/core/hub.c:3394:2: error: implicit declaration of function 'usb_enable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/hub.c: At top level:
drivers/usb/core/hub.c:3424:6: warning: conflicting types for 'usb_enable_lpm' [enabled by default]
drivers/usb/core/hub.c:3394:2: note: previous implicit declaration of 'usb_enable_lpm' was here
drivers/usb/core/driver.c: In function 'usb_probe_interface':
drivers/usb/core/driver.c:339:2: error: implicit declaration of function 'usb_unlocked_disable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/driver.c:364:3: error: implicit declaration of function 'usb_unlocked_enable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/message.c: In function 'usb_set_interface':
drivers/usb/core/message.c:1314:2: error: implicit declaration of function 'usb_disable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/message.c:1323:3: error: implicit declaration of function 'usb_enable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/message.c:1368:2: error: implicit declaration of function 'usb_unlocked_enable_lpm' [-Werror=implicit-function-declaration]

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Chen Peter-B29397 <B29397@freescale.com>
2012-05-21 09:00:03 -07:00
Greg Kroah-Hartman 8e192910d9 Revert "USB: EHCI: work around bug in the Philips ISP1562 controller"
This reverts commit 1996e6c572.

It turned out to not be needed, now that the real fix has been
committed.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-21 08:54:43 -07:00
Ming Lei 1c01f1d9a6 USB: EHCI: fix command register configuration lost problem
The 3d9545cc375d117554a9b35dfddadf9189c62775(EHCI: maintain the
ehci->command value properly) introducs one command register
configuration lost problem by the below line in ehci_reset:

	ehci->command = ehci_readl(ehci, &ehci->regs->command);

After writting RESET into command register, it is restored to
its default value per EHCI spec[1], so the previous configuration
will be lost, and may introduce some problems reported recently:
	- imx51 Babbage board detect usb hub failed[2], reported
	by Richard Zhao.
	- mouse and keyboard hangs in linux-next found by
	Dan Carpenter and Greg-KH.

So this patch just removes the line to fix these problems, and
keep configurating command register consistent as before the commit
3d9545cc(EHCI: maintain the ehci->command value properly).

[1], 4.1 Host Controller Initialization of EHCI Specification 1.0
[2], failed dmesg log:
	usb 1-1: new high-speed USB device number 2 using mxc-ehci
	hub 1-1:1.0: USB hub found
	hub 1-1:1.0: 7 ports detected
	mxc-ehci mxc-ehci.1: fatal error
	mxc-ehci mxc-ehci.1: HC died; cleaning up
	mxc-ehci mxc-ehci.1: force halt; handshake f5780344 00004000 00004000 -> -110
	mxc-ehci mxc-ehci.1: HC died; cleaning up
	usb 1-1: USB disconnect, device number 2

Reported-by: Richard Zhao <richard.zhao@freescale.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Chen Peter-B29397 <B29397@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-19 09:31:29 -07:00
Huajun Li 4e09dcf20f USB: Remove races in devio.c
There exist races in devio.c, below is one case,
and there are similar races in destroy_async()
and proc_unlinkurb().  Remove these races.

 cancel_bulk_urbs()        async_completed()
-------------------                -----------------------
 spin_unlock(&ps->lock);

                           list_move_tail(&as->asynclist,
		                    &ps->async_completed);

                           wake_up(&ps->wait);

                           Lead to free_async() be triggered,
                           then urb and 'as' will be freed.

 usb_unlink_urb(as->urb);
 ===> refer to the freed 'as'

Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Oncaphillis <oncaphillis@snafu.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-18 16:37:55 -07:00
Hauke Mehrtens 8377c94f62 USB: ehci-platform: remove update_device
The update_device callback is not needed and the function used here is
from the pci ehci driver. Without this patch we get a compile error if
ehci-platform is compiled without ehci-pci.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: stable <stable@vger.kernel.org> [3.4]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-18 16:37:55 -07:00
Greg Kroah-Hartman f06b9f3ced xhci: Link PM and bug fixes for 3.5.
Hi Greg,
 
 Here's the final Link Power Management patches, along with a couple of bug
 fixes that have been sitting in my queue.  I've fixed all the comments that
 Alan and Andiry had on the Link PM patches, so I think they're ready to go.
 
 Sarah Sharp
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPttDmAAoJEBMGWMLi1Gc5IJgP/jPNhCjHWr+YqsmcvJdlHxkE
 1TrMCScAhAk7OkAaZ+4xpFsD4G3bN5+SS4U6x3hEdhqgJIWbtDazOBctfVKezJQ1
 uywnJNW08aW6GWYCTtoDVHY/ofLjpRnSRC21RXW4zKW8U4dHp1UcoCfkLRpqbb1C
 /GYuLb03Ipl25+wDDDQAmFIs5IlEGHfE7a1r27I43MHIHvg6iw7rzgJPI5HKEIH2
 3Usw4+DL1aMAlU1YKRwiwVoOVnmujzlb4a0ONhuBUdHKCGbfi6/Tce6lH0ElXavH
 mJgv5S9Ro2H/rMtYFq1ZoR9NxeizqtKT2Dv0KOsWiFwZBOfhjvmDel62N+7w1akt
 EWgahjASunwS56LBMg5ni0eK0VOt1kHQl3yeF6HmSdRftljN5Fke2r4BDA83sfl/
 VggQPPoLNdHou9LRO+XLOKe3sW5+nIH/b+SJUvWYktCSN9wMPCH5wbXNp8WIh/7p
 MvD2Kj7iqgF2PPzqpYGIwTHNwh5YdmnyYeCkr/IaoCBmUV0qD8HConsRN6USVIRI
 aBCZR4APWlaTzhu/eP5inuuGwNBGTVi3aJKe/WgN2aG2TsYnAzKhmvbELpYaheZj
 /Fe2itLuejVSjVsQI6KfhneCZyM45M7Ip8FTcEE1/z4R3cTEc5vE1adjFGWIzHRo
 bHPQ0JRfpamuJkxaSTOY
 =ixwg
 -----END PGP SIGNATURE-----

Merge tag 'for-usb-next-2012-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next

xhci: Link PM and bug fixes for 3.5.

Hi Greg,

Here's the final Link Power Management patches, along with a couple of bug
fixes that have been sitting in my queue.  I've fixed all the comments that
Alan and Andiry had on the Link PM patches, so I think they're ready to go.

Sarah Sharp
2012-05-18 16:32:52 -07:00
Sarah Sharp e1f12eb6ba USB: Disable hub-initiated LPM for comms devices.
Hub-initiated LPM is not good for USB communications devices.  Comms
devices should be able to tell when their link can go into a lower power
state, because they know when an incoming transmission is finished.
Ideally, these devices would slam their links into a lower power state,
using the device-initiated LPM, after finishing the last packet of their
data transfer.

If we enable the idle timeouts for the parent hubs to enable
hub-initiated LPM, we will get a lot of useless LPM packets on the bus
as the devices reject LPM transitions when they're in the middle of
receiving data.  Worse, some devices might blindly accept the
hub-initiated LPM and power down their radios while they're in the
middle of receiving a transmission.

The Intel Windows folks are disabling hub-initiated LPM for all USB
communications devices under a xHCI USB 3.0 host.  In order to keep
the Linux behavior as close as possible to Windows, we need to do the
same in Linux.

Set the disable_hub_initiated_lpm flag for for all USB communications
drivers.  I know there aren't currently any USB 3.0 devices that
implement these class specifications, but we should be ready if they do.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Jan Dumon <j.dumon@option.com>
Cc: Petko Manolov <petkan@users.sourceforge.net>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Roland Vossen <rvossen@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
Cc: Kan Yan <kanyan@broadcom.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: Daniel Drake <dsd@gentoo.org>
Cc: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:42:55 -07:00
Sarah Sharp e3567d2c15 xhci: Add Intel U1/U2 timeout policy.
All Intel xHCI host controllers support USB 3.0 Link Power Management.

The Panther Point xHCI host controller needs the xHCI driver to
calculate the U1 and U2 timeout values, because it will blindly accept a
MEL that would cause scheduling issues.

The Lynx Point xHCI host controller will reject MEL values that are too
high, but internally it implements the same algorithm that is needed for
Panther Point xHCI.

Simplify the code paths by just having the xHCI driver calculate what
the U1/U2 timeouts should be.  Comments on the policy are in the code.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:42:04 -07:00
Sarah Sharp 3b3db02641 xhci: Add infrastructure for host-specific LPM policies.
The choice of U1 and U2 timeouts for USB 3.0 Link Power Management (LPM)
is highly host controller specific.  Here are a few examples of why it's
host specific:

 1. Setting the U1/U2 timeout too short may cause the link to go into
    U1/U2 in between service intervals, which some hosts may tolerate,
    and some may not.

 2. The host controller has to modify its bus schedule in order to take
    into account the Maximum Exit Latency (MEL) to bring all the links
    from the host to the device into U0.  If the MEL is too big, and it
    takes too long to bring the links into an active state, the host
    controller may not be able to service periodic endpoints in time.

 3. Host controllers may also have scheduling limitations that force
    them to disable U1 or U2 if a USB device is behind too many tiers of
    hubs.

We could take an educated guess at what U1/U2 timeouts may work for a
particular host controller.  However, that would result in a binary
search on every new configuration or alt setting installation, with
multiple failed Evaluate Context commands.  Worse, the host may blindly
accept the timeouts and just fail to update its schedule for U1/U2 exit
latencies, which could result in randomly delayed periodic transfers.

Since we don't want to cause jitter in periodic transfers, or delay
config/alt setting changes too much, lay down a framework that xHCI
vendors can extend in order to add their own U1/U2 timeout policies.

To extend the framework, they will need to:

 - Modify the PCI init code to add a new xhci->quirk for their host, and
   set the XHCI_LPM_SUPPORT quirk flag.
 - Add their own vendor-specific hooks, like the ones that will be added
   in xhci_call_host_update_timeout_for_endpoint() and
   xhci_check_tier_policy()
 - Make the LPM enable/disable methods call those functions based on the
   xhci->quirk for their host.

An example will be provided for the Intel xHCI host controller in the
next patch.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:42:03 -07:00
Sarah Sharp dbc33303e4 xhci: Reserve one command for USB3 LPM disable.
We want to do everything we can to ensure that USB 3.0 Link Power
Management (LPM) can be disabled when it is enabled.  If LPM can't be
disabled, we can't suspend USB 3.0 devices, or reset them.  To make sure
we can submit the command to disable LPM, allocate a command in the
xhci_hcd structure, and reserve one TRB on the command ring.

We only need one command per xHCI driver instance, because LPM is only
disabled or enabled while the USB core is holding the bandwidth_mutex
that is shared between the xHCI USB 2.0 and USB 3.0 roothubs.  The
bandwidth_mutex will be held until the command completes, or times out.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:42:01 -07:00
Sarah Sharp 4b2665418c xhci: Some Evaluate Context commands must succeed.
The upcoming USB 3.0 Link PM patches will introduce new API to enable
and disable low-power link states.  We must be able to disable LPM in
order to reset a device, or place the device into U3 (device suspend).
Therefore, we need to make sure the Evaluate Context command to disable
the LPM timeouts can't fail due to there being no room on the command
ring.

Introduce a new flag to the function that queues the Evaluate Context
command, command_must_succeed.  This tells the ring handler that a TRB
has already been reserved for the command (by incrementing
xhci->cmd_ring_reserved_trbs), and basically ensures that prepare_ring()
won't fail.  A similar flag was already implemented for the Configure
Endpoint command queuing function.

All functions that currently call xhci_configure_endpoint() to issue an
Evaluate Context command pass "false" for the "must_succeed" parameter,
so this patch should have no effect on current xHCI driver behavior.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:42:00 -07:00
Sarah Sharp 8306095fd2 USB: Disable USB 3.0 LPM in critical sections.
There are several places where the USB core needs to disable USB 3.0
Link PM:
 - usb_bind_interface
 - usb_unbind_interface
 - usb_driver_claim_interface
 - usb_port_suspend/usb_port_resume
 - usb_reset_and_verify_device
 - usb_set_interface
 - usb_reset_configuration
 - usb_set_configuration

Use the new LPM disable/enable functions to temporarily disable LPM
around these critical sections.

We need to protect the critical section around binding and unbinding USB
interface drivers.  USB drivers may want to disable hub-initiated USB
3.0 LPM, which will change the value of the U1/U2 timeouts that the xHCI
driver will install.  We need to disable LPM completely until the driver
is bound to the interface, and the driver has a chance to enable
whatever alternate interface setting it needs in its probe routine.
Then re-enable USB3 LPM, and recalculate the U1/U2 timeout values.

We also need to disable LPM in usb_driver_claim_interface,
because drivers like usbfs can bind to an interface through that
function.  Note, there is no way currently for userspace drivers to
disable hub-initiated USB 3.0 LPM.  Revisit this later.

When a driver is unbound, the U1/U2 timeouts may change because we are
unbinding the last driver that needed hub-initiated USB 3.0 LPM to be
disabled.

USB LPM must be disabled when a USB device is going to be suspended.
The USB 3.0 spec does not define a state transition from U1 or U2 into
U3, so we need to bring the device into U0 by disabling LPM before we
can place it into U3.  Therefore, call usb_unlocked_disable_lpm() in
usb_port_suspend(), and call usb_unlocked_enable_lpm() in
usb_port_resume().  If the port suspend fails, make sure to re-enable
LPM by calling usb_unlocked_enable_lpm(), since usb_port_resume() will
not be called on a failed port suspend.

USB 3.0 devices lose their USB 3.0 LPM settings (including whether USB
device-initiated LPM is enabled) across device suspend.  Therefore,
disable LPM before the device will be reset in
usb_reset_and_verify_device(), and re-enable LPM after the reset is
complete and the configuration/alt settings are re-installed.

The calculated U1/U2 timeout values are heavily dependent on what USB
device endpoints are currently enabled.  When any of the enabled
endpoints on the device might change, due to a new configuration, or new
alternate interface setting, we need to first disable USB 3.0 LPM, add
or delete endpoints from the xHCI schedule, install the new interfaces
and alt settings, and then re-enable LPM.  Do this in usb_set_interface,
usb_reset_configuration, and usb_set_configuration.

Basically, there is a call to disable and then enable LPM in all
functions that lock the bandwidth_mutex.  One exception is
usb_disable_device, because the device is disconnecting or otherwise
going away, and we should not care about whether USB 3.0 LPM is enabled.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:41:59 -07:00
Sarah Sharp 1ea7e0e8e3 USB: Add support to enable/disable USB3 link states.
There are various functions within the USB core that will need to
disable USB 3.0 link power states.  For example, when a USB device
driver is being bound to an interface, we need to disable USB 3.0 LPM
until we know if the driver will allow hub-initiated LPM transitions.
Another example is when the USB core is switching alternate interface
settings.  The USB 3.0 timeout values are dependent on what endpoints
are enabled, so we want to ensure that LPM is disabled until the new alt
setting is fully installed.

Multiple functions need to disable LPM, and those functions can even be
nested.  For example, usb_bind_interface() could disable LPM, and then
call into the driver probe function, which may attempt to switch to a
different alt setting.  Therefore, we need to keep a count of the number
of functions that require LPM to be disabled at any point in time.

Introduce two new USB core API calls, usb_disable_lpm() and
usb_enable_lpm().  These functions increment and decrement a new
variable in the usb_device, lpm_disable_count.  If usb_disable_lpm()
fails, it will call usb_enable_lpm() in order to balance the
lpm_disable_count.

These two new functions must be called with the bandwidth_mutex locked.
If the bandwidth_mutex is not already held by the caller, it should
instead call usb_unlocked_disable_lpm() and usb_enable_lpm(), which take
the bandwidth_mutex before calling usb_disable_lpm() and
usb_enable_lpm(), respectively.

Introduce a new variable (timeout) in the usb3_lpm_params structure to
keep track of the currently enabled U1/U2 timeout values.  When
usb_disable_lpm() is called, and the USB device has the U1 or U2
timeouts set to a non-zero value (meaning either device-initiated or
hub-initiated LPM is enabled), attempt to disable LPM, regardless of the
state of the lpm_disable_count.  We want to ensure that all callers can
be guaranteed that LPM is disabled if usb_disable_lpm() returns zero.

Otherwise the following scenario could occur:

1. Driver A is being bound to interface 1.  usb_probe_interface()
disables LPM.  Driver A doesn't care if hub-initiated LPM is enabled, so
even though usb_disable_lpm() fails, the probe of the driver continues,
and the bandwidth mutex is dropped.

2. Meanwhile, Driver B is being bound to interface 2.
usb_probe_interface() grabs the bandwidth mutex and calls
usb_disable_lpm().  That call should attempt to disable LPM, even
though the lpm_disable_count is set to 1 by Driver A.

For usb_enable_lpm(), we attempt to enable LPM only when the
lpm_disable_count is zero.  If some step in enabling LPM fails, it will
only have a minimal impact on power consumption, and all USB device
drivers should still work properly.  Therefore don't bother to return
any error codes.

Don't enable device-initiated LPM if the device is unconfigured.  The
USB device will only accept the U1/U2_ENABLE control transfers in the
configured state.  Do enable hub-initiated LPM in that case, since
devices are allowed to accept the LGO_Ux link commands in any state.

Don't enable or disable LPM if the device is marked as not being LPM
capable.  This can happen if:
 - the USB device doesn't have a SS BOS descriptor,
 - the device's parent hub has a zeroed bHeaderDecodeLatency value, or
 - the xHCI host doesn't support LPM.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Andiry Xu <andiry.xu@amd.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:41:58 -07:00
Sarah Sharp 51e0a01206 USB: Calculate USB 3.0 exit latencies for LPM.
There are several different exit latencies associated with coming out of
the U1 or U2 lower power link state.

Device Exit Latency (DEL) is the maximum time it takes for the USB
device to bring its upstream link into U0.  That can be found in the
SuperSpeed Extended Capabilities BOS descriptor for the device.  The
time it takes for a particular link in the tree to exit to U0 is the
maximum of either the parent hub's U1/U2 DEL, or the child's U1/U2 DEL.

Hubs introduce a further delay that effects how long it takes a child
device to transition to U0.  When a USB 3.0 hub receives a header
packet, it takes some time to decode that header and figure out which
downstream port the packet was destined for.  If the port is not in U0,
this hub header decode latency will cause an additional delay for
bringing the child device to U0.  This Hub Header Decode Latency is
found in the USB 3.0 hub descriptor.

We can use DEL and the header decode latency, along with additional
latencies imposed by each additional hub tier, to figure out the exit
latencies for both host-initiated and device-initiated exit to U0.

The Max Exit Latency (MEL) is the worst-case time it will take for a
host-initiated exit to U0, based on whether U1 or U2 link states are
enabled.  The ping or packet must traverse the path to the device, and
each hub along the way incurs the hub header decode latency in order to
figure out which device the transfer was bound for.  We say worst-case,
because some hubs may not be in the lowest link state that is enabled.
See the examples in section C.2.2.1.

Note that "HSD" is a "host specific delay" that the power appendix
architect has not been able to tell me how to calculate.  There's no way
to get HSD from the xHCI registers either, so I'm simply ignoring it.

The Path Exit Latency (PEL) is the worst-case time it will take for a
device-initiate exit to U0 to place all the links from the device to the
host into U0.

The System Exit Latency (SEL) is another device-initiated exit latency.
SEL is useful for USB 3.0 devices that need to send data to the host at
specific intervals.  The device may send an NRDY to indicate it isn't
ready to send data, then put its link into a lower power state.  If it
needs to have that data transmitted at a specific time, it can use SEL
to back calculate when it will need to bring the link back into U0 to
meet its deadlines.

SEL is the worst-case time from the device-initiated exit to U0, to when
the device will receive a packet from the host controller.  It includes
PEL, the time it takes for an ERDY to get to the host, a host-specific
delay for the host to process that ERDY, and the time it takes for the
packet to traverse the path to the device.  See Figure C-2 in the USB
3.0 bus specification.

Note: I have not been able to get good answers about what the
host-specific delay to process the ERDY should be.  The Intel HW
developers say it will be specific to the platform the xHCI host is
integrated into, and they say it's negligible.  Ignore this too.

Separate from these four exit latencies are the U1/U2 timeout values we
program into the parent hubs.  These timeouts tell the hub to attempt to
place the device into a lower power link state after the link has been
idle for that amount of time.

Create two arrays (one for U1 and one for U2) to store mel, pel, sel,
and the timeout values.  Store the exit latency values in nanosecond
units, since that's the smallest units used (DEL is in us, but the Hub
Header Decode Latency is in ns).

If a USB 3.0 device doesn't have a SuperSpeed Extended Capabilities BOS
descriptor, it's highly unlikely it will be able to handle LPM requests
properly.  So it's best to disable LPM for devices that don't have this
descriptor, and any children beneath it, if it's a USB 3.0 hub.  Warn
users when that happens, since it means they have a non-compliant USB
3.0 device or hub.

This patch assumes a simplified design where links deep in the tree will
not have U1 or U2 enabled unless all their parent links have the
corresponding LPM state enabled.  Eventually, we might want to allow a
different policy, and we can revisit this patch when that happens.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
2012-05-18 15:41:56 -07:00
Sarah Sharp d9b2099cd6 USB: Refactor code to set LPM support flag.
Refactor the code that sets the usb_device flag to indicate the device
support link power management (lpm_capable).  The current code sets
lpm_capable unconditionally if the USB devices have a USB 2.0 Extended
Capabilities Descriptor.  USB 3.0 devices can also have that descriptor,
but the xHCI driver code that uses lpm_capable will not run the USB 2.0
LPM test for devices under the USB 3.0 roothub.  Therefore, it's fine
only set lpm_capable for high speed devices in this refactoring.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:41:54 -07:00
Sarah Sharp 448b6eb1e0 USB: Make sure to fetch the BOS desc for roothubs.
The BOS descriptor is normally fetched and stored in the usb_device->bos
during enumeration.  USB 3.0 roothubs don't undergo enumeration, but we
need them to have a BOS descriptor, since each xHCI host has a different
U1 and U2 exit latency.  Make sure to fetch the BOS descriptor for USB
3.0 roothubs.  It will be freed when the roothub usb_device is released.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Andiry Xu <andiry.xu@amd.com>
2012-05-18 15:41:53 -07:00
Sarah Sharp 797b0ca5e6 xhci: Add roothub code to set U1/U2 timeouts.
USB 3.0 hubs can be put into a mode where the hub can automatically
request that the link go into a deeper link power state after the link
has been idle for a specified amount of time.  Each of the new USB 3.0
link states (U1 and U2) have their own timeout that can be programmed
per port.

Change the xHCI roothub emulation code to handle the request to set the
U1 and U2 timeouts.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-18 15:41:52 -07:00
Sarah Sharp 33b2831ac8 xhci: Reset reserved command ring TRBs on cleanup.
When the xHCI driver needs to clean up memory (perhaps due to a failed
register restore on resume from S3 or resume from S4), it needs to reset
the number of reserved TRBs on the command ring to zero.  Otherwise,
several resume cycles (about 30) with a UAS device attached will
continually increment the number of reserved TRBs, until all command
submissions fail because there isn't enough room on the command ring.

This patch should be backported to kernels as old as 2.6.32,
that contain the commit 913a8a344f
"USB: xhci: Change how xHCI commands are handled."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-05-18 15:41:51 -07:00
Oliver Neukum f8a9e72d12 USB: fix resource leak in xhci power loss path
Some more data structures must be freed and counters
reset if an XHCI controller has lost power. The failure
to do so renders some chips inoperative after a certain number
of S4 cycles.

This patch should be backported to kernels as old as 3.2,
that contain the commits c29eea6219
"xhci: Implement HS/FS/LS bandwidth checking." and
commit 839c817ce6
"xhci: Implement HS/FS/LS bandwidth checking."

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-05-18 15:41:39 -07:00
Shinya Kuribayashi 7cbb062ade USB: gpio_vbus: wakeup support on GPIO VBUS interrupts
We'd like to see the system waking up from the system-wide suspend
when it gets plugged-in, or the USB cable is pulled out.

Also makes it configurable via platform data 'wakeup'.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 11:20:34 -07:00
Shinya Kuribayashi ec1ac6e169 USB: gpio_vbus: a missing cancellation of workqueue in remove() function
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 11:20:34 -07:00
Shinya Kuribayashi c8240c1b81 USB: gpio_vbus: handle IRQ flags properly
Currently, 'res->flags' handlings are wrong in three respects:
* the driver _modifies_ the contents of platform data
* res->flags is set up, but not used anywhere in the driver
* request_irq() always takes VBUS_IRQ_FLAGS, regardless of refs->flags

This patch tries to fix this with a policy: If a platform IRQ resource
is available, give preference to its IRQ flag(s) over a default one
(VBUS_IRQ_FLAGS).

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 11:20:34 -07:00
Shinya Kuribayashi da020b49fa USB: gpio_vbus: remove IRQF_SAMPLE_RANDOM use
IRQF_SAMPLE_RANDOM has been scheduled for removal for years (it was
scheduled by July 2009, but not yet remvoed).

I'm not sure when it's going to take place, but would be better to
remove it now.  Thanks for scripts/checkpatch secretary.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 11:20:34 -07:00
Shinya Kuribayashi 123bbceebe USB: gpio_vbus: use cached IRQ number for consistency with the probed one
gpio_vbus is designed to be able to get an IRQ number for VBUS change
interrupt either (1) through platform_get_resource(IORESOURCE_IRQ) or
(2) by processing gpio_to_irq(pdata->gpio_vbus), in probe() function.

On the other hand, gpio_vbus_set_peripheral() and gpio_vbus_remove()
are always doing gpio_to_irq(pdata->gpio_vbus) to get an IRQ number.

This is not just inconsistent, but also broken.  There is no guarantee
that an IRQ number obtained by platform_get_resource() is equal to
gpio_to_irq(pdata->gpio_vbus).

Cache an IRQ number in probe() function, and use it where necessary.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 11:20:34 -07:00
Andiry Xu c3e751e4f4 usbcore: enable USB2 LPM if port suspend fails
USB2 LPM is disabled when device begin to suspend and enabled after device
is resumed. That's because USB spec does not define the transition from
U1/U2 state to U3 state.

If usb_port_suspend() fails, usb_port_resume() is never called, and USB2 LPM
is disabled in this situation. Enable USB2 LPM if port suspend fails.

This patch should be backported to kernels as old as 3.2, that contain
the commit 65580b4321 "xHCI: set USB2
hardware LPM".

Signed-off-by: Andiry Xu <andiry.xu@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-05-17 10:36:57 -07:00
Sarah Sharp 1530bbc627 xhci: Add new short TX quirk for Fresco Logic host.
Sergio reported that when he recorded audio from a USB headset mic
plugged into the USB 3.0 port on his ASUS N53SV-DH72, the audio sounded
"robotic".  When plugged into the USB 2.0 port under EHCI on the same
laptop, the audio sounded fine.  The device is:

Bus 002 Device 004: ID 046d:0a0c Logitech, Inc. Clear Chat Comfort USB Headset

The problem was tracked down to the Fresco Logic xHCI host controller
not correctly reporting short transfers on isochronous IN endpoints.
The driver would submit a 96 byte transfer, the device would only send
88 or 90 bytes, and the xHCI host would report the transfer had a
"successful" completion code, with an untransferred buffer length of 8
or 6 bytes.

The successful completion code and non-zero untransferred length is a
contradiction.  The xHCI host is supposed to only mark a transfer as
successful if all the bytes are transferred.  Otherwise, the transfer
should be marked with a short packet completion code.  Without the EHCI
bus trace, we wouldn't know whether the xHCI driver should trust the
completion code or the untransferred length.  With it, we know to trust
the untransferred length.

Add a new xHCI quirk for the Fresco Logic host controller.  If a
transfer is reported as successful, but the untransferred length is
non-zero, print a warning.  For the Fresco Logic host, change the
completion code to COMP_SHORT_TX and process the transfer like a short
transfer.

This should be backported to stable kernels that contain the commit
f5182b4155 "xhci: Disable MSI for some
Fresco Logic hosts."  That commit was marked for stable kernels as old
as 2.6.36.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Sergio Correia <lists@uece.net>
Tested-by: Sergio Correia <lists@uece.net>
Cc: stable@vger.kernel.org
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-05-17 10:36:57 -07:00
Ming Lei 8f9d973a0d USB: twl6030-usb: pass IRQF_ONESHOT to request_threaded_irq
The flag of IRQF_ONESHOT should be passed to request_threaded_irq,
otherwise the following failure message will be dumped because
hardware handler is defined as NULL:

[    2.271148] genirq: Threaded irq requested with handler=NULL and
!ONESHOT for irq 356
[    2.279541] twl6030_usb twl6030_usb: can't get IRQ 356, err -22
[    2.285919] twl6030_usb: probe of twl6030_usb failed with error -22

The patch fixes the twl6030-usb probe failure.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 09:49:23 -07:00
Jeffrin Jose db2c862484 USB: storage: fixed keyword related space issues.
Fixed keyword related space issues found by
checkpatch.pl tool in drivers/usb/storage/usb.c

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 09:48:29 -07:00
Jeffrin Jose a1631062f2 USB: storage: fixed several trailing white spaces issues.
Fixed several trailing white spaces issues found
by checkpatch.pl tool in drivers/usb/storage/usb.c

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 09:48:29 -07:00
Jeffrin Jose a7edf6823a USB: storage: fixed C99 comment issue.
Fixed C99 comment issue in drivers/usb/storage/usb.c
found using checkpatch.pl tool.

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17 09:48:29 -07:00
Greg Kroah-Hartman 0b623f871d Revert "USB: serial: sierra: put reset_resume callback back."
This reverts commit 6971113e10.

As Alan pointed out, this really isn't needed as it doesn't handle this
properly.  Ideally this should be handled by the usb-serial core one
day.  So revert it.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Anton Samokhvalov <pg83@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-16 08:39:56 -07:00
Greg Kroah-Hartman dcd82cd1c2 USB: serial: fix up reset_resume callback
If the usb-serial driver doesn't have a reset_resume callback, then we
need to tell the USB core that it doesn't, and it needs to rebind the
device.

Thanks to Alan for pointing out my mistake, and providing the fix.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-16 08:37:17 -07:00
Greg Kroah-Hartman 1c1eaba8e7 USB: serial: ch341: make the reset_resume callback actually work.
I hooked up the wrong callback in my previous patch, this should fix it.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-16 08:36:13 -07:00
Arnd Bergmann 3c0dec5f58 Merge branch 'clk-next' of git://git.linaro.org/people/mturquette/linux into next/clock
* 'clk-next' of git://git.linaro.org/people/mturquette/linux:
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ARM: Orion: SDIO: Add support for clk.
  ARM: Orion: NAND: Add support for clk, if there is one.
  ARM: Orion: EHCI: Add support for enabling clocks
  ARM: Orion: SATA: Add per channel clk/clkdev support.
  ARM: Orion: UART: Get the clock rate via clk_get_rate().
  ARM: Orion: WDT: Add clk/clkdev support
  ARM: Orion: Eth: Add clk/clkdev support.
  ARM: Orion: SPI: Add clk/clkdev support.
  ARM: Orion: Add clocks using the generic clk infrastructure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-16 16:35:25 +02:00
Bjørn Mork 3a2300385f USB: serial: generic driver is only for testing
Make some noise during probe to make sure the users
are aware of the intended purpose of this driver.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-16 05:29:20 -07:00
Nicolas Ferre 5eaee54b1c usb: gadget: at91_udc: fix endpoint descriptor dereference
The patch 5a6506f (Update at91_udc to use usb_endpoint_descriptor inside the
struct usb_ep) removes the desc field of struct at91_ep. This convertion had
not been completed which leads to a compilation error.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-16 05:29:20 -07:00
Sasha Levin ea79c2ed6e usb: fix breakage on systems without ACPI
Commit da0af6e ("usb: Bind devices to ACPI devices when possible") really
tries to force-bind devices even when impossible, unlike what it says in
the subject.

CONFIG_ACPI is not an indication that ACPI tables are actually present, nor
is an indication that any USB relevant information is present in them. There
is no reason to fail the creation of a USB bus if it can't bind it to
ACPI device during initialization.

On systems with CONFIG_ACPI set but without ACPI tables it would cause a
boot panic.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-16 05:29:19 -07:00
Greg Kroah-Hartman e4083ea5a7 USB: symbolserial.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the symbolserial.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:32 -07:00
Greg Kroah-Hartman fe2baf87a8 USB: spcp8x5.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the spcp8x5.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:30 -07:00
Greg Kroah-Hartman 9760b28324 USB: qcserial.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the qcserial.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Thomas Tuttle <ttuttle@chromium.org>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:27 -07:00
Greg Kroah-Hartman 00c533fd64 USB: navman.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the navman.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:25 -07:00
Greg Kroah-Hartman 9f857ae922 USB: ir-usb.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the ir-usb.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:23 -07:00
Greg Kroah-Hartman f73e1ffa27 USB: ipaq.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the ipaq.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:20 -07:00
Greg Kroah-Hartman 689c2781ee USB: generic.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the generic.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:18 -07:00
Greg Kroah-Hartman a94e9b94cc USB: f81232.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the f81232.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:17 -07:00
Greg Kroah-Hartman c89aa63898 USB: belkin_sa.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the belkin_sa.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: William Greathouse <wgreathouse@smva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:11 -07:00
Greg Kroah-Hartman d2f20e12e9 USB: ark3116.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the ark3116.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: Bart Hartgers <bart.hartgers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:11 -07:00
Greg Kroah-Hartman 66afb5b535 USB: aircable.c: remove dbg() usage
dbg() is a usb-serial specific macro.  This patch converts
the aircable.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 16:27:08 -07:00
Greg Kroah-Hartman 6971113e10 USB: serial: sierra: put reset_resume callback back.
A few patches ago, I removed the reset_resume callback in this driver.
Now that the usb-serial core supports reset_resume, put this driver
callback back as well, so it should work identically to how it was
originally.

Now if this function really is doing what it should be doing, well,
that's a different story, but we are at least doing the identical thing
that we were before...

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Anton Samokhvalov <pg83@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 15:43:19 -07:00
Greg Kroah-Hartman 622b80cf6a USB: serial: ch341: put reset_resume callback back.
A few patches ago, I removed the reset_resume callback, changing it to
resume instead.  Now that the usb-serial core supports reset_resume, put
this driver callback back as well, so it should work identically to how
it was originally.

Now if this function really is doing what it should be doing, well,
that's a different story, but we are at least doing the identical thing
that we were before...

Cc: Johan Hovold <jhovold@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 15:41:47 -07:00
Greg Kroah-Hartman 7186364e46 USB: serial: hook up reset_resume callback
The callback is now hooked up for any USB to serial driver that wants
it.  We only register the callback if any of the usb-serial structures
want it, this keeps the USB core happy.

Thanks to Alan Stern for the ideas on how to do this.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 15:40:00 -07:00
Richard Zhao 09c94e628a usb: chipidea: remove zero check of hw_ep_max
It's 0 for host only device.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 08:43:40 -07:00
Marek Vasut a756186b61 USB: CI13xxx: Use usb_put_hcd() on failure to drop HCD
Use usb_put_hcd() call instead of usb_remove_hcd() as that's the appropriate
call to drop hcd which failed registration.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 08:43:40 -07:00
Marek Vasut b12909b505 USB: CI13xxx: Allow use of CONFIG_USB_EHCI_ROOT_HUB_TT
The CI13xxx usb host needs the root TT support to work properly.
Allow selecting this for the CI13xxx too.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 08:43:40 -07:00
Mauro Carvalho Chehab 69ecdbac14 Merge remote-tracking branch 'linus/master' into staging/for_v3.5
* linus/master: (805 commits)
  tty: Fix LED error return
  openvswitch: checking wrong variable in queue_userspace_packet()
  bonding: Fix LACPDU rx_dropped commit.
  Linux 3.4-rc7
  ARM: EXYNOS: fix ctrlbit for exynos5_clk_pdma1
  ARM: EXYNOS: use s5p-timer for UniversalC210 board
  ARM / mach-shmobile: Invalidate caches when booting secondary cores
  ARM / mach-shmobile: sh73a0 SMP TWD boot regression fix
  ARM / mach-shmobile: r8a7779 SMP TWD boot regression fix
  ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
  ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
  MAINTAINERS: Add myself as the cpufreq maintainer
  dm mpath: check if scsi_dh module already loaded before trying to load
  dm thin: correct module description
  dm thin: fix unprotected use of prepared_discards list
  dm thin: reinstate missing mempool_free in cell_release_singleton
  gpio/exynos: Fix compiler warnings when non-exynos machines are selected
  gpio: pch9: Use proper flow type handlers
  powerpc/irq: Fix another case of lazy IRQ state getting out of sync
  ks8851: Update link status during link change interrupt
  ...

Conflicts:
	drivers/media/common/tuners/xc5000.c
	drivers/media/common/tuners/xc5000.h
	drivers/usb/gadget/uvc_queue.c
2012-05-15 08:39:25 -03:00
Alan Stern 1996e6c572 USB: EHCI: work around bug in the Philips ISP1562 controller
This patch (as1556) works around a bug in the Philips ISP1562 EHCI
controller.  Although the controller claims to support frame-list
lengths smaller than the default of 1024 for its periodic schedule, in
fact smaller values don't work.  A new quirk flag is added to indicate
when the bug is present, and if it is then the schedule size is left
at the default value.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 12:50:22 -07:00
Alan Stern 65b8e5cbdd USB: EHCI: improve full-speed isochronous scheduling routine
This patch (as1555) improves the code ehci-hcd uses while checking the
periodic schedule for isochronous transfers to full-speed devices.  In
addition to making sure that a new transfer does not violate the
restrictions on the high-speed schedule, it also has to check the
restrictions on the full-speed part of the bus, i.e., the part beyond
the Transaction Translator (TT).

It does this by calling tt_available() (or tt_no_collision() if
CONFIG_USB_EHCI_TT_NEWSCHED isn't enabled).  However it calls that
routine on each pass through a loop over the frames being modified,
which is an unnecessary expense because tt_available() (or
tt_no_collision) already does its own loop over frames.  It is
sufficient to do the check just once, before starting the loop.

In addition, the function calls incorrectly converted the transfer's
period from microframes to frames by doing a left shift instead of a
right shift.  The patch fixes this while moving the calls.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 12:50:22 -07:00
Reinhard Tartler 61af9c3f89 usb: musb: cppi: add missing include to fix compilation
This fixes compilation as module.

Signed-off-by: Reinhard Tartler <tartler@cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 12:45:45 -07:00
Alan Stern 356c05d58a sysfs: get rid of some lockdep false positives
This patch (as1554) fixes a lockdep false-positive report.  The
problem arises because lockdep is unable to deal with the
tree-structured locks created by the device core and sysfs.

This particular problem involves a sysfs attribute method that
unregisters itself, not from the device it was called for, but from a
descendant device.  Lockdep doesn't understand the distinction and
reports a possible deadlock, even though the operation is safe.

This is the sort of thing that would normally be handled by using a
nested lock annotation; unfortunately it's not feasible to do that
here.  There's no sensible way to tell sysfs when attribute removal
occurs in the context of a parent attribute method.

As a workaround, the patch adds a new flag to struct attribute
telling sysfs not to inform lockdep when it acquires a readlock on a
sysfs_dirent instance for the attribute.  The readlock is still
acquired, but lockdep doesn't know about it and hence does not
complain about impossible deadlock scenarios.

Also added are macros for static initialization of attribute
structures with the ignore_lockdep flag set.  The three offending
attributes in the USB subsystem are converted to use the new macros.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Tejun Heo <tj@kernel.org>
CC: Eric W. Biederman <ebiederm@xmission.com>
CC: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 12:19:56 -07:00
Bjørn Mork ef206f3f01 USB: add read support to usb-serial/../new_id
Keep the usb-serial support for dynamic IDs in sync with the usb
support.  This enables readout of dynamic device IDs for
usb-serial drivers.  Common code is exported from the usb core
system and reused by the usb-serial bus driver.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:30:40 -07:00
Bjørn Mork e6bbcef021 USB: let both new_id and remove_id show dynamic id list
This enables the current list of dynamic IDs to be read out through
either new_id or remove_id.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:30:40 -07:00
Andrzej Pietrasiewicz 581791f5c7 FunctionFS: enable multiple functions
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:25:44 -07:00
Greg Kroah-Hartman 304f0b2453 Revert "usb: add struct usb_hub_port to store port related members."
This reverts commit f397d7c4c5.

This series isn't quite ready for 3.5 just yet, so revert it and give
the author more time to get it correct.

Cc: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:22:58 -07:00
Greg Kroah-Hartman fa286188ce Revert "usb: move struct usb_device->children to struct usb_hub_port->child"
This reverts commit bebc56d58d.

The call here is fragile and not well thought out, so revert it, it's
not fully baked yet and I don't want this to go into 3.5.

Cc: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:20:37 -07:00
Shinya Kuribayashi e44694e858 USB: gpio_vbus: avoid consecutive vbus_session calls with the same "is_active"
Basically, ->vbus_session() calls should be served when VBUS session
starts and ends (it's not whenever transciever drivers detect VBUS
_changes_).  Otherwise, if UDC gadget drivers don't want for some
reason ->vbus_session() calls with the same "is_active" value, either
OTG or UDC drivers need to have some protection handlings.

Also, on platforms using this 'gpio_vbus' driver, the driver is only
allowed to check whether VBUS is applied.  There is no kernel-standard
way prepared for UDC gadget drivers to do that.

With this in mind, gpio_vbus should try to prevent unnecessary
consecutive vbus_session calls being served with the same "in_active"
value.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:02:23 -07:00
Shinya Kuribayashi a6dc9cf76b USB: gpio_vbus: put a missing regulator_put() on error
Note that regulator_put() doesn't care about whether ->vbus_draw is
valid or not.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:02:23 -07:00
Shinya Kuribayashi 934ccec4da USB: gpio_vbus: provide an appropriate debounce interval
In commit c2344f13b5 (USB: gpio_vbus:
add delayed vbus_session calls, 2009-01-24), usb_gadget_vbus_connect()
and ...disconnect() were extracted from the interrupt handler, so to
allow vbus_session handlers to deal with msleep() calls.

This patch takes the approach one step further.

USB2.0 specification (7.1.7.3 Connect and Disconnect Signaling) says
that the USB system software (shall) provide a debounce interval with
a minimum duration of 100 ms, which ensures that the electrical and
mechanical connection is stable before software attempts to reset
the attached device.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:01:50 -07:00
Shinya Kuribayashi 0d13eebcab USB: gpio_vbus: fix inconsistent 'dev_id' parameters at free_irq()
'dev_id' has to be the same with the one passed to request_irq().

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 09:01:50 -07:00
David Herrmann 1b0159bab9 usb: Kconfig: remove unneeded default value
If no default value is specified, then 'n' is used so the default value
used here is not needed. Furthermore, we should never change default
values depending on EXPERT mode. EXPERT mode should only make options
visible, not change them.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 08:49:50 -07:00
Jarkko Nikula 0686a1fab0 USB: ohci-omap: Use usb_put_transceiver instead of put_device
Currently usb_put_transceiver calls put_device so this is a no-op but it
is better to keep API usage consistent as ohci->transceiver is allocated
with usb_get_transceiver.

While at there remove one extra ohci->transceiver test as the code block
has already tested it.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 08:49:50 -07:00
Jarkko Nikula fee8bc1c8e USB: ehci-fsl: Use usb_put_transceiver instead of put_device
Currently usb_put_transceiver calls put_device so this is a no-op but it
is better to keep API usage consistent as ehci->transceiver is allocated
with usb_get_transceiver.

While at there remove one extra ehci->transceiver test as the code block
has already tested it.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 08:49:50 -07:00
Linus Walleij e20289ed3f usb/net: rndis: fixup a few name prefixes
This switches a horde of NDIS_*-prefixed variables to the RNDIS_*
prefix. Most of them aren't used much and causes no changes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12 15:13:39 -04:00
Linus Walleij 514911678f usb/net: rndis: merge command codes
Switch the hyperv filter and rndis gadget driver to use the same command
enumerators as the other drivers and delete the surplus command codes.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12 15:11:18 -04:00
Linus Walleij 17c51b6ccc usb/net: rndis: merge media type definitions
Let's have a unified table of RNDIS media. We used to have a similar
table with NDIS_* prefix from the gadget driver, but since we're only
using RNDIS in the kernel (IIRC NDIS, non-remote, is for the windows-
internal network drivers so what do we care) let's prefix everything
with RNDIS. Some of the definitions were conflicting, in one of the
defines 0x0B is bearer "CO WAN" and in two others "BPC". Well I took
the majority vote. Two definition of medium 0x09 calls it "wireless
WAN" but one vote for "wireless LAN" but in this case I am sticking
with the minority, "Wide Area Network" does not make much sense in
this case as far as I can tell.

NOTE: latin singular and plural is so screwed up in these defines
that it makes my eyes bleed. But I will not attempt to submit a
patch converting all use of _MEDIA_ to _MEDIUM_ while I can probably
tell from the semantics of the code that RNDIS_MEDIA_STATE_CONNECTED
is most probably (erroneously) referring to a singular, unless it
can return an array of connected media. I suspect these erroneous
plurals are used in documentation and such so I don't want to
mess around with things for no functional change.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12 15:08:06 -04:00
Linus Walleij 4cc6c4d584 usb/net: rndis: merge duplicate 802_* OIDs
The 802_* network OIDs were duplicated, so let's merge them and
use the RNDIS_* prefixed definitions from the hyperV driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12 15:05:59 -04:00
Linus Walleij 8cdddc3f9d usb/net: rndis: eliminate first set of duplicate OIDs
The RNDIS protocol contains a vast number of Object ID:s (OIDs).
The current definitions had multiple definitions of these ID:s,
let's use the nicely RNDIS_*-prefixed defines from the HyperV
implementation, rename everywhere they're used, and copy+rename
the few that were missing from this list of objects.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12 15:04:19 -04:00
Linus Walleij 7591157e18 usb/net: rndis: break out <linux/rndis.h> defines
As a first step to consolidate the RNDIS implementations, break out
a common file with all the #defines and move it to <linux/rndis.h>.

This also deletes the immediate duplicated defines in the
<linux/rndis.h> file that yields a lot of compilation warnings.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-12 15:02:22 -04:00
Olof Johansson 4a0dfe69fe Merge branch 'imx/pinctrl/for-3.5' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/pinctrl
* 'imx/pinctrl/for-3.5' of git://git.linaro.org/people/shawnguo/linux-2.6: (290 commits)
  ARM: mxs: enable pinctrl support
  video: mxsfb: adopt pinctrl support
  ASoC: mxs-saif: adopt pinctrl support
  i2c: mxs: adopt pinctrl support
  mtd: nand: gpmi: adopt pinctrl support
  mmc: mxs-mmc: adopt pinctrl support
  serial: mxs-auart: adopt pinctrl support
  serial: amba-pl011: adopt pinctrl support
  spi/imx: adopt pinctrl support
  i2c: imx: adopt pinctrl support
  can: flexcan: adopt pinctrl support
  net: fec: adopt pinctrl support
  tty: serial: imx: adopt pinctrl support
  mmc: sdhci-imx-esdhc: adopt pinctrl support
  ARM: imx6q: switch to use pinctrl subsystem
  ARM: mxs: enable pinctrl dummy states
  ARM: imx: enable pinctrl dummy states
  +3.4-rc5 update
2012-05-11 22:59:11 -07:00
Lan Tianyu bebc56d58d usb: move struct usb_device->children to struct usb_hub_port->child
Move child's pointer to the struct usb_hub_port since the child device
is directly associated with the port. Provide usb_get_hub_child_device()
to get child's pointer.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 17:08:41 -07:00
Lan Tianyu f397d7c4c5 usb: add struct usb_hub_port to store port related members.
Add struct usb_hub_port pointer port_data in the struct usb_hub and allocate
struct usb_hub_port perspectively for each ports to store private data.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 17:08:41 -07:00
Matthew Garrett 54d3f8c63d usb: Set device removable state based on ACPI USB data
ACPI offers two methods that allow us to infer whether or not a USB port
is removable. The _PLD method gives us information on whether the port is
"user visible" or not. If that's not present then we can fall back to the
_UPC method which tells us whether or not a port is connectable.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 17:07:02 -07:00
Matthew Garrett da0af6e78e usb: Bind devices to ACPI devices when possible
Built-in USB devices will typically have a representation in the system
ACPI tables. Add support for binding the two together so the USB code can
make use of the associated methods.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 17:06:13 -07:00
Alexander Shishkin 4fd09e8e02 usb: gadget: remove langwell_udc
We have the chipidea driver now that supports both langwell and penwell,
so there is no need for this one any more.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 17:01:06 -07:00
Alexander Shishkin ab3999a261 usb: chipidea: drop unused field "device" from ci13xxx_ep
It was used as a shorthand for gadget's device in request mapping/unmapping
code, but now it's not used any more.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:59:36 -07:00
Alexander Shishkin 5e0aa49ec6 usb: chipidea: use generic map/unmap routines
We're one of the remaining drivers to map/unmap requests by hand. Switch
to using generic gadget routines for that instead.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:59:35 -07:00
Alexander Shishkin bd841986e4 usb: chipidea: add power_budget limit for ehci to platform data
Some implementations need this limitation to work correctly.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:59:35 -07:00
Alexander Shishkin eb70e5ab8f usb: chipidea: add host role
This adds EHCI host support to the chipidea driver. We want it to be
part of the hdrc driver and not a standalone (sub-)driver module, as
the structure of ehci-hcd.c suggests, so for chipidea controller we
hack it to not provide platform-related code, but only the ehci hcd.

The ehci-platform driver won't work for us here too, because the
controller uses the same registers for both device and host mode and
also otg-related bits, so it's not really possible to put ehci registers
into a separate resource.

This is not a pretty solution, but the alternative is exporting symbols
from the chipidea driver to a ehci-chipidea driver and doing all the
module refcounting.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:56:15 -07:00
Alexander Shishkin 758fc9860c usb: chipidea: use common definition for USBMODE bits
Some of the bits of USBMODE register are defined in <usb/ehci_def.h>,
use them instead of having our own definitions.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:54:54 -07:00
Alexander Shishkin f7daaa2d6e usb: chipidea: drop unused msm register definitions
These definitions are unused, and the same registers are also defined
in <linux/usb/msm_hsusb_hw.h>.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:54:11 -07:00
Alexander Shishkin cac0961474 usb: chipidea: drop redundant NULL check
Currently, gadget can't be NULL in _gadget_stop_activity().

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reported-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:54:11 -07:00
Michael Grzeschik b932225272 usb: chipidea: isr_reset_handler fix missing locking
Move spin_lock under the done label, so the
lock will also be pulled in the error paths.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
[rebased on top of the patchset]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:54:11 -07:00
Alexander Shishkin 551a8ac64e usb: chipidea: brush up structure definitions
Get rid of trailing comments in the structure definitions in favor of
kernel-doc.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:54:11 -07:00
Alexander Shishkin f8c1376c22 usb: chipidea: remove unused field "regs" from ci13xxx
The old implementation used global hw_bank, the new implementation uses
udc-local hw_bank. This field seems to be a leftover from previous coding
experiments.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:52:49 -07:00
Alexander Shishkin 5f36e231e9 usb: chipidea: add support for roles
Add some generic code for roles and implement simple role switching
based on ID pin state and/or a sysfs file. At this, we also rename
the device to ci_hdrc, which is what it is.

The "manual" switch is made into a sysfs file and not debugfs, because
it might be useful even in non-debug context. For some boards, like
sheevaplug, it seems to be the only way to switch roles without modifying
the hardware, since the ID pin is always grounded.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:52:10 -07:00
Alexander Shishkin e443b33362 usb: chipidea: split the driver code into units
Split the driver into the following parts:
  * core  -- resources, register access, capabilities, etc;
  * udc   -- device controller functionality;
  * debug -- logging events.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:49:51 -07:00
Alexander Shishkin bc25a80d12 usb: move ci13xxx and related code to drivers/usb/chipidea
Since chipidea is a dual role controller, it makes sense to move it
to its own directory, where we can also have host, otg and platform
code related to this controller. It also makes sense to break out
the driver into several compilation units like udc, host, debugging
code, etc.

Firstly, let's move the udc and platform code to drivers/usb/chipidea.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:45:30 -07:00
Alexander Shishkin ce9d6fbcbf usb: gadget: ci13xxx: print basic device info when probing
Report basic information about capabilities and register addresses on
probe.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:43:21 -07:00
Alexander Shishkin ef15e5490e usb: gadget: ci13xxx: don't use "advance" feature when setting address
Newer versions of the chipidea controller support the "advance" setting
of usb address, which means instead of setting it immediately, deferring
it till the status completion. Unfortunately, older versions of the
controller don't have this feature, so in order to support those too, we
simply don't use it. It's about 4 lines of extra code, and isn't in any
way critical to performance. While at it, change the return value of the
hw_usb_set_address() to void, since it can't fail in any measurable way.

With this patch, ci13xxx_udc driver works with the chipidea controller in
kirkwood (feroceon SoC), as found in, for example, sheevaplug.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:43:21 -07:00
Alexander Shishkin 405b844874 usb: gadget: ci13xxx: fix the context of register map
The regmap field is an array of register pointers, not the other way
around.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:35:38 -07:00
Alexander Shishkin 177a83006d usb: gadget: ci13xxx: get rid of local tracing for good
There is no point in having tracing output in the kernel these days.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:35:38 -07:00
Alexander Shishkin 1989b5ceb5 usb: gadget: ci13xxx_pci: guard against devices without driver_data
Don't try to initialize devices that don't have driver_data assigned
to their pci ids.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 16:35:38 -07:00
Bjørn Mork 6286d85e8e USB: cdc-wdm: remove from device list on disconnect
Prevents dereferencing an invalid struct usb_interface
pointer.

Always delete entry from device list whether or not the
rest of the device state cleanup is postponed. The device
list uses desc->intf as key, and wdm_open will dereference
this key while searching for a matching device.  A device
should not appear in the list unless probe() has succeeded
and disconnect() has not finished.

Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 15:19:22 -07:00
Bjørn Mork 6b0b79d388 USB: cdc-wdm: cannot use dev_printk when device is gone
We cannot dereference a removed USB interface for
dev_printk. Use pr_debug instead where necessary.

Flush errors are expected if device is unplugged and are
therefore best ingored at this point.

Move the kill_urbs() call in wdm_release with dev_dbg()
for the non disconnect, as we know it has already been
called if WDM_DISCONNECTING is set.  This does not
actually fix anything, but keeps the code more consistent.

Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 15:19:22 -07:00
Bjørn Mork 616b6937e3 USB: cdc-wdm: poll must return POLLHUP if device is gone
Else the poll will be restarted indefinitely in a tight loop,
preventing final device cleanup.

Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 15:19:22 -07:00
joseph daniel b8cacf33f0 usb: dwc3: Fix the dwc3 dependency
The warning shown up when ran with randconfig,

warning: (USB_DWC3) selects USB_XHCI_PLATFORM which has unmet direct dependencies (USB_SUPPORT && USB_XHCI_HCD)

Signed-off-by: joseph daniel <josephdanielwalter@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 15:17:31 -07:00
Sasha Levin 72688dc95a usb: gadget: dummy_hcd: fix build when BUG is not set
Use WARN_ON() instead of __WARN, which also means we won't use any
internal macros.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 15:17:31 -07:00
Steven J. Hill fdf6e6390a usb: host: mips: sead3: Fix for big endian.
Fix driver to work properly in big endian mode.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 15:17:30 -07:00
Darren Hart 975dc33b82 USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial console
The Kontron M2M development board, also known as the Fish River Island II,
has an optional daughter card providing access to the PCH_UART (EG20T) via
a ti_usb_3410_5052 uart to usb chip.

http://us.kontron.com/products/systems+and+platforms/m2m/m2m+smart+services+developer+kit.html

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Al Borchers <alborchers@steinerpoint.com>
CC: Peter Berger <pberger@brimson.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11 15:14:07 -07:00
Arnd Bergmann 93c6d8927f Merge branch 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/clock
Shawn Guo <shawn.guo@linaro.org> writes:

  mxs common clk porting for v3.5.  It depends on the following two branches.

  [1] git://git.linaro.org/people/mturquette/linux.git clk-next
  [2] http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm.git clkdev

  As the mxs device tree conversion will constantly touch clock files,
  to save the conflicts, the updated mxs/dt branch coming later will
  based on this pull-request.

* 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: mxs: remove now unused timer_clk argument from mxs_timer_init
  ARM: mxs: remove old clock support
  ARM: mxs: switch to common clk framework
  ARM: mxs: change the lookup name for fec phy clock
  ARM: mxs: request clock for timer
  clk: mxs: add clock support for imx28
  clk: mxs: add clock support for imx23
  clk: mxs: add mxs specific clocks

Includes an update to Linux 3.4-rc6

Conflicts:
	drivers/clk/Makefile

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-11 17:15:31 +02:00
Greg Kroah-Hartman d530296f63 USB: serial: opticon: hook up suspend/resume callbacks
With a previous patch, the usb_driver suspend/resume callbacks got
overridden and were never called if a usb_serial driver defined them.
This patch fixes the opticon driver to move the suspend/resume callbacks
into the usb_serial_driver structure where they will be properly called.

It then removes the unused usb_driver structure.

Cc: Johan Hovold <jhovold@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 14:35:21 -07:00
Bill Pemberton f88e6a30da USB: serial: add copyright and license to quatech2
Add a copyright and license statement to the head of quatech.c source
file.  No code change here.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 14:05:01 -07:00
Bill Pemberton f7a33e608d USB: serial: add quatech2 usb to serial driver
This supports the Quatech USB 2 usb to serial adapters.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:46:20 -07:00
Benoit Goby 1fbfeff927 usb: gadget: f_rndis: Set rndis vendor parameters
Add a variant of rndis_bind_config to let gadget drivers change
rndis vendorID and manufacturer parameters.

Signed-off-by: Benoit Goby <benoit@android.com>
	[make rndis_bind_config a static inline function]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:27:58 -07:00
Benoit Goby 80134da9d2 usb: gadget: rndis: Fix re-binding f_rndis
f_rndis checks if rndis_string_defs[0].id is null to setup rndis
and allocate string ids when it is bound to the first configuration:

	/* maybe allocate device-global string IDs */
	if (rndis_string_defs[0].id == 0) {

		/* ... and setup RNDIS itself */
		status = rndis_init();
		if (status < 0)
			return status;

rndis_string_defs[0].id must be reset to 0 on unbind for rndis to be
correctly initialized on the next composite_bind.

Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:26:47 -07:00
Mike Lockwood 036e98b216 usb: gadget: Add variant of gether_setup to customize the device name
This is needed to avoid name collisions on SoCs that have both usb
gadget and usb host, where usb0 may be the rndis interface or a usb
ethernet adapter.

Signed-off-by: Mike Lockwood <lockwood@android.com>
Signed-off-by: Benoit Goby <benoit@android.com>
	[make gether_setup a static inline function]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:26:17 -07:00
Benoit Goby c3c04b2945 usb: gadget: u_serial: Allow calling gserial_setup after init
Remove geserial_setup from the init section. The android gadget
driver calls it after probe, after userspace has configured the
gadget driver.

Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:26:17 -07:00
Andrzej Pietrasiewicz cad4cd8fbd usb: gadget: composite: add iSerialNumber to usb_composite_driver
Add iSerialNumber to usb_composite_driver to allow setting a default value.
This is useful when the module is compiled-in. Then the composite_bind
is executed at kernel boot and string id for iSerialNumber can be overridden
even if there is no iSerialNumber kernel commandline parameter.
If the string id is not overridden, then get_string will never attempt to
look for the alternative string contents using cdev->serial_override.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:22:43 -07:00
Andrzej Pietrasiewicz 4fffd6e5a2 usb: gadget: composite: make module parameters accessible at runtime
Enable module parameters to be modified at runtime, especially
if the module is compiled-in.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:22:43 -07:00
Benoit Goby 02e8161e34 usb: gadget: composite: Initialize config->interface
Reset config->interface in usb_add_config, as it may contain pointers to
functions from a previous session if config is removed and re-added.

Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:21:32 -07:00
Benoit Goby 51cce6fc15 usb: gadget: composite: Add usb_remove_config
Add usb_remove_config to unbind a configuration and remove it from
the configs list. This allows implementing composite gadget drivers that
can disconnect themself from the bus and that will later be re-enumerated
with a different configuration.

Gadget drivers must call usb_gadget_disconnect before calling this
function to disable the pullup, disconnect the device from the host,
and prevent the host from enumerating the device while we are changing
the gadget configuration.

Signed-off-by: Benoit Goby <benoit@android.com>
	[change return type of [usb_]remove_config]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 12:21:32 -07:00
Greg Kroah-Hartman 56d95f3174 USB: gadget: ci13xx_pci: remove unneeded check in ci13xxx_pci_probe()
As pointed out by Dan Carpenter, the check for NULL for the id variable
is no longer needed, especially as we just dereferenced it a few lines
earlier, causing an oops if it really was NULL.

This was caused by 62bb84ed0e4d: "usb: gadget: ci13xxx: convert to
platform device".

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 11:41:49 -07:00
Greg Kroah-Hartman f639554b8a USB: gadget: ci13xx_udc: fix potential crash in irq handler
As pointed out by Dan Carpenter, we should not be trying to call
dev_err() on a structure that was previously determined to be NULL,
that's just foolish and asking for trouble.

So just delete the message, it's not going to do anyone any good to have
it anyway.

This problem was caused by 0f089094cde5: "usb: gadget: ci13xxx: replace
home-brewed logging with dev_{err,warn,info}"

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10 11:37:18 -07:00
Olof Johansson caafc71b1a DaVinci SoC updates for v3.5
This pull request updates the DaVinci SoC support to implement DEBUG_LL port
 choice and optimizes the DMA ISR by removing unnecessary register reads.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPqq+jAAoJEGFBu2jqvgRNs1MP/R1z0/h7nrN26aspSS9kxIJr
 M8HpG+qSmfLg+h6RSpQYY8SoMJ5mN7vA1AJQr9M2zUZXDYMy+AXYXdlJ2Q9p5ene
 A3Iz4yTfHgosrj9fd6fY7vH/Bd9v2T7H366SKPdk0gsSufzkSzEHvVkIROGLIQF2
 2kKgBdp94Vdgi+9nimePePIE5EyLxsMW3BNcFLVNkcdfZTFGlbtSav5zT4OCJoIm
 d/WI1Xh34nvzkHZptLqUwPF0u62YTcGY+Z6n6KhYk6mSJ2JHWfycwGOf7V9CFVkZ
 k7wdSaGfZbPrGQbKjK66Oahq+RN5kIklVB/GIyF5ZectxX+E+Mr8XLO8wKtCMxnf
 SvB9jy/LBIqPQlzodEy2FWryzh5gRB/KnDC3sYonpm81scYLEr9T1sw1k4yzR0cS
 ZgV2WfaqgfY9HoHzhoxwNB7hCo7VVHGL3r6BsB/30NUk8rnN/SGcDHdu5cTPT7gW
 qFfz4uGRC40kvUm2gq3yJh95r3iAnKmawFGjqhBSSMjHcPEVhEgsa913uSclR99w
 uKDWqsbhJN7h+W3nLPU7H4qq1PA+d3UGm7eWI8FBXxwf7qng00XJINBAssfxVRvJ
 xR0jC7/VeVypcvICPiKdDt2wxl80ptTF80461P0ieXKZsu/PXltLJXd+m7U/gq1u
 mhkE90gNGeSH7EsKC2A2
 =/we3
 -----END PGP SIGNATURE-----

Merge tag 'v3.5-soc' of git://gitorious.org/linux-davinci/linux-davinci into next/drivers

DaVinci SoC updates for v3.5

This pull request updates the DaVinci SoC support to implement DEBUG_LL port
choice and optimizes the DMA ISR by removing unnecessary register reads.

* tag 'v3.5-soc' of git://gitorious.org/linux-davinci/linux-davinci:
  ARM: davinci: optimize the DMA ISR
  ARM: davinci: implement DEBUG_LL port choice
  + sync with Linux 3.4-rc6

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-10 00:23:17 -07:00
Olof Johansson bd69e27304 Merge branch 'for-3.5/usb-ulpi' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/drivers
By Stephen Warren (30) and others
via Stephen Warren
* 'for-3.5/usb-ulpi' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: (7 commits)
  ARM: dt: tegra: pinmux changes for USB ULPI
  ARM: tegra: add USB ULPI PHY reset GPIO to device tree
  ARM: tegra: don't hard-code USB ULPI PHY reset_gpio
  ARM: tegra: change pll_p_out4's rate to 24MHz
  ARM: tegra: fix pclk rate
  ARM: tegra: reparent sclk to pll_c_out1
  ARM: tegra: Add pllc clock init table
  + depends/pinctrl/mergebase branch

Pinctrl mergebase has a conflict in drivers/pinctrl/core.c that was resolved.

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-09 23:47:14 -07:00
Olof Johansson 7488185d07 Merge branch 'for-3.5/gpio-pinmux' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/pinctrl
By Stephen Warren
via Stephen Warren
* 'for-3.5/gpio-pinmux' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  pinctrl: tegra: error reporting cleanup
  pinctrl: tegra: debugfs enhancements
  pinctrl: tegra: refactor probe handling
  ARM: dt: tegra20: add pinmux to device tree
  ARM: dt: tegra cardhu: add pinmux to device tree
  ARM: tegra: Remove pre-pinctrl pinmux driver
  ARM: tegra: Switch to new pinctrl driver
  gpio: tegra: Hide tegra_gpio_enable/disable()
  ARM: tegra: seaboard: Don't gpio_request() ISL29018_IRQ
  gpio: tegra: configure pins during irq_set_type
  ARM: tegra: Remove VBUS_GPIO handling from board files
  usb: ehci-tegra: Add vbus_gpio to platform data
2012-05-09 23:43:04 -07:00
Sebastian Andrzej Siewior c52661d60f usb-gadget: Initial merge of target module for UASP + BOT
This fabric uses the target framework to provide a usb gadget
device.  This gadget supports the USB Attached SCSI Protocol (UASP)
and Bulk Only Transfers (BOT or BBB). BOT is the primary interface,
UAS is the alternative interface.

It has been tested with dummy_hcd on HS and SS. On SS USB3 are
supported. I also took my omap device and tried it there against
WindowsXP.  UAS implements basic command passing (i.e. read/write
requests) and TASK MANAGEMENT functions are missing.

I had to add a little of error recovery to BOT because Windows was
issuing some strange commands and it does not complain after the
gadget responded with CSW.status=1.

(nab: Move to drivers/usb/gadget as per Sebastian to address legacy
      limitations for built-in gadget code)

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-05-09 15:25:59 -07:00
Lukasz Majewski 126625e1bf usb:hsotg:samsung:cosmetic Move <linux/platform_data/s3c-hsotg.h> to proper place
This commit adds a cosmetic change to the s3c-hsotg UDC driver.
It moves s3c-hsotg.h to other linux/ related inclusions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 15:24:40 -07:00
Nicolas Ferre 07e4e556ef USB: ohci-at91: add a reset function to fix race condition
A possible race condition appears because we are not initializing
the ohci->regs before calling usb_hcd_request_irqs().
We move the call to ohci_init() in hcd->driver->reset() instead of
hcd->driver->start() to fix this.
This was experienced when we share the same IRQ line between OHCI and EHCI
controllers.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Christian Eggers <christian.eggers@kathrein.de>
Cc: stable <stable@vger.kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 15:22:27 -07:00
Nicolas Ferre 7a82f612fa USB: ohci-at91: use resource_size() for memory/io resource length
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 15:20:45 -07:00
Igor Grinberg 7b18389dd4 ARM: OMAP: USB: fix warning on EHCI PHY reset path
When PHY reset pin is connected to a GPIO on external GPIO chip
(e.g. I2C), we should not call the gpio_set_value() function, but
gpio_set_value_cansleep().

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Felipe Balbi <balbi@ti.com>
Tested-by: Govindraj.R <govindraj.raja@ti.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 15:20:12 -07:00
Alexander Shishkin 1f339d8440 usb: gadget: ci13xxx: convert to new style
Finally, convert to the new style framework, using udc_start/udc_stop
methods. Since there is no need in the global _udc pointer, remove it.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 15:02:46 -07:00
Alexander Shishkin 790c2d52b2 usb: gadget: ci13xxx: move endpoint (de-)initialization to probe/remove
Currently, endpoints are initialized in gadget start/stop methods, however
for the new style gadgets it is expected that bind() can be called before
controller's start(), and we need endpoints already initialized at that
point. So, move endpoint initialization to controller's probe before we
switch to the "new style" gadget framework.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 15:00:26 -07:00
Alexander Shishkin 0f089094cd usb: gadget: ci13xxx: replace home-brewed logging with dev_{err,warn,info}
Logging output in the driver is mostly done using custom err/warn/info
macros which rely on the existence of the global variable _udc, which
is a global reference to the udc controller structure. This reference
will have to go in order to allow us to have more than one chipidea udc
in the system.

Thus, replace custom macros with dev_{err,warn,info} using the platform
device where possible. The trace() macro, which is a nop by default is
left for tracing purposes.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 15:00:26 -07:00
Alexander Shishkin 62bb84ed0e usb: gadget: ci13xxx: convert to platform device
Let's break ci13xxx driver into a separate udc driver and platform
drivers _pci and _msm, which will create a platform device for each pci
(or msm) device found. The approach was introduced by Felipe in dwc3
driver and there seems to be no reason not to use it.

msm related code is only compile-tested.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 14:54:12 -07:00
Alexander Shishkin ed6c6f419f usb: gadget: conversion of controllers choice to menu
After the UDC class conversion, there is no reason to limit the kernel
to have only one UDC controller in the system.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 14:52:14 -07:00
Alexander Shishkin 262c16320a usb: gadget: ci13xxx: redo register access
Use lookup table instead of conditional macrodefinitions of register
addresses. With two different possible register layouts and different
register offsets, it's easiest to build a table with register addresses
at probe time, based on the information supplied from the platform and
device capabilities. This way we get rid of branch-per-register-access.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 14:51:24 -07:00
Alexander Shishkin d3595d132b usb: gadget: ci13xxx: move global variables inside struct ci13xxx
Make global variables that are specific for each UDC instance part of
struct ci13xxx.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 14:51:24 -07:00
Alexander Shishkin 1155a7b831 usb: gadget: ci13xxx: drop needless parens
Small and self-evident cleanup.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 14:51:24 -07:00
Alan Stern df767b71e5 usb-storage: unusual_devs entry for Yarvik PMP400 MP4 player
This patch (as1553) adds an unusual_dev entrie for the Yarvik PMP400
MP4 music player.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Jesse Feddema <jdfeddema@gmail.com>
Tested-by: Jesse Feddema <jdfeddema@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 14:45:19 -07:00
Olof Johansson d5a2a1ba83 Linux 3.4-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPpvY9AAoJEHm+PkMAQRiGpEoIAJgbu+Y8gITnBK/wh9O6zy3S
 5jie5KK4YWdbJsvO58WbNr3CyVIwGIqQ2dUZLiU59aBVLarlGw8xor0MmW+cZwhp
 6fBHaf0qDYAV0MZjD+mnnExOiCRyISa2lPmsfu9dAWywh5KGe6/oAP6/qcXIyok3
 KZyl3qQf4ENpaZPHwZPXCEkUvtuyHgNiszN+QXEadA3s19Ot4VGe9A3VGw+GNrSm
 JqFIq3acQAbKa5BYaqf7TQC02v2FI7//eqt6QHxTqbE6a7LGbTvLfX3HlJ2mnfqa
 1R6QHhM4y4OZDHbaMT2raHZ8WuLXzhehJzhP8Co7AHFOKwVKOb5XbcUr2RrukMU=
 =HkMd
 -----END PGP SIGNATURE-----

Merge tag 'v3.4-rc6' into next/cleanup

Linux 3.4-rc6

Resolve conflict where an u5500 file had a bugfix go in, but was
deleted in the branch staged for next merge window.

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-09 02:31:01 -07:00
Olof Johansson cba3309e38 Sparse and cppcheck warning fixes
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPqEJlAAoJEBvUPslcq6Vz8oYP/RuLK0emKF0efxZxIyIm/Vi8
 XJteTnxbptFhCm8tnBoQq0F68eJuvxJKa60tmqjiODFfBXpZZLZewsByogo5cbq3
 dUCxXJbCQWGOwvTrhf2k31S+Bysp/fG+CHlOZgfHWq6XQYvZxUZUsyCCxZC/5h+k
 9df3t2Kjm7wtcOHWTqmoLI5xZM+XbUUQdCdOjiShpiF2+lu22U3g6xj5k0ryJEOH
 YQRU35zNSaI+g1jEe7alyTGGMVE3WMm4dDin62RhRVoFRm/JxiP+8S0BuOQBI8IS
 vY46mvKG5baw2v6VKFh3O8sXDAZ8ZMWV9Hc/9WEHf2aQljB0J+he2alsC4FC0BsX
 R467DZj4jwh0KuN/N2OiDr8/rufMkc4CMYneEAfPdZoOaa5f5OplL5YPKPmi4LVB
 sYNbvJKwrDS/aRY4iBjdxDnQyZ89chYYQWV+43Fsq/ffp0LJPqZYPKwIbtGcIa4E
 KoMARTQyY1PN8l3NhcqPwmK2Xa5RjwO+an8arPPY9H7BLCpzt8/HINc3sz3wZiUQ
 SjrTYwqsT6eHD2A9ciwQiaFNKie/rYj6zaZ5212RXjX/Nl0RyQz2W1vIbzZ/c776
 zsoTwzvjHy5O9UuqT/HUjaxLQOctWFZT5+5HMqCixcjH9sCWjsnq+h8DCjicFvWX
 q1ajdKcZM/29soH3r2VL
 =MQ+t
 -----END PGP SIGNATURE-----

Merge tag 'omap-cleanup-sparse-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

Sparse and cppcheck warning fixes

By Paul Walmsley
via Paul Walmsley (1) and Tony Lindgren (1)
* tag 'omap-cleanup-sparse-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: clean up some cppcheck warnings
  ARM: OMAP1: board files: deduplicate and clean some NAND-related code
  ARM: OMAP: USB: remove unnecessary sideways include
  ARM: OMAP: DMA: use constant array maximum, drop some LCD DMA code
  ARM: OMAP: OCM RAM: use memset_io() when clearing SRAM
  ARM: OMAP: fix 'using plain integer as NULL pointer' sparse warnings
  ARM: OMAP2+: GPMC: resolve type-conversion warning from sparse
  ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus
  ARM: OMAP1: OCPI: move to mach-omap1/
  ARM: OMAP: add includes for missing prototypes
  ARM: OMAP2+: declare file-local functions as static

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-09 02:28:46 -07:00
Andrew Lunn 8c869edaee ARM: Orion: EHCI: Add support for enabling clocks
Not all platforms support gating the clock, so it is not an error if
the clock does not exist. However, if it does exist, we should
enable/disable it as appropriate.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-05-08 16:33:59 -07:00
Greg Kroah-Hartman 68e2411345 USB: serial: rework usb_serial_register/deregister_drivers()
This reworks the usb_serial_register_drivers() and
usb_serial_deregister_drivers() to not need a pointer to a struct
usb_driver anymore.  The usb_driver structure is now created dynamically
and registered and unregistered as needed.

This saves lines of code in each usb-serial driver.  All in-kernel users
of these functions were also fixed up at this time.  The pl2303 driver
was tested that everything worked properly.

Thanks for the idea to do this from Alan Stern.

Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Support Department <support@connecttech.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: William Greathouse <wgreathouse@smva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 15:46:14 -07:00
Alexander Shishkin d56ba3205f usb: gadget: ci13xxx_pci: add langwell/penwell pci ids
Add pci ids for ChipIdea UDC as found in langwell/penwell SoCs.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 10:04:22 -07:00
Alexander Shishkin f9df8395c7 usb: gadget: ci13xxx: rename register layouts
Currently, the register prefixes in the driver seem to be mixed: the
capability registers are the ones that contain capability information,
such as number of hardware endpoints, while the registers that are
used to program the controller are called operational registers.

Normally, capability registers start at 0x100 offset of the register
window and are followed by operational registers. In some versions,
however, capability registers start at 0x0 offset.

This patch renames the register and adjusts their offsets appropriately,
leaving the possibility of having a non-standard capability offset.

I couldn't find any mentions of the TESTMODE register anywhere, so I
suspect it might only be enabled in chipidea internal versions of the
controller and I'm really inclined to remove it from the driver or at
least hiding it behind a config option.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 09:27:57 -07:00
Alexander Shishkin d36ade60e3 usb: gadget: ci13xxx: initialize ep0{out,in} dynamically
Change ep0{out,in} macros into dynamically assigned pointers in
gadget initialization time.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 09:27:56 -07:00
Alexander Shishkin efa015bbc4 usb: gadget: ci13xxx: fix ep list removal in gadget unregistering code
Since ep0{out,in} are never on gadget's ep_list, there's no need to try
to unlink them, even more so because ep_list linkage is not initialized
for these endpoints.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 09:27:56 -07:00
Jan Luebbe ab59ac0155 ohci-da8xx: set MODULE_ALIAS to allow autoloading
The Davinci USB platform device (in mach-davinci/usb.c) uses "ohci"
as the name. To allow autoloading of the relevant driver, the module
needs to set the MODULE_ALIAS.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 09:26:10 -07:00
Paul Bolle bfb8bfad18 USB: make vendor id of root hubs greppable
It took me surprisingly long to find the location where the Linux
Foundation vendor id (0x1d6b) is set for the root hubs. A minor update
to three comments makes those locations (trivially) greppable.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 16:52:08 -07:00
girish verma ccd68bb8d8 USB: xhci: testing sizeof xhci_doorbell_array 2 time
Testing BUILD_BUG_ON xhci_doorbell_array structure 2 time, redundant statement

Signed-off-by: Girish Verma <girish.gcet@gmail.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>

 ---
 drivers/usb/host/xhci.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 16:44:49 -07:00
Alan Stern 1949f9e243 USB: xhci-hcd: print URB's expected length in decimal, not hex
This patch changes the output format specifier of a debugging line in
the xhci-hcd driver.  An URB's transfer_buffer_length should be
printed in decimal; there's no reason to print it in hex.  Especially
since the actual_length value, printed earlier on the same line, is
already in decimal.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 16:43:58 -07:00
Éric Piel b69cc67205 USB: ftdi-sio: add support for Physik Instrumente E-861
This adds VID/PID for the PI E-861. Without it, I had to do:
modprobe -q ftdi-sio product=0x1008 vendor=0x1a72

http://www.physikinstrumente.com/en/products/prdetail.php?sortnr=900610

Signed-off-by: Éric Piel <piel@delmic.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 16:43:35 -07:00
Greg Kroah-Hartman 2edd284bd7 USB: serial: remove bizarre generic_serial probe function
I can't remember why I wrote it like this many many years ago, but it's
not needed at all, let's rely on the usb-serial core for this function,
especially as it is being overridden by it anyway.

This lets us make usb_serial_probe() a static function, which it should
be.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 14:46:48 -07:00
Greg Kroah-Hartman 3abee859c1 USB: serial: sierra: remove reset_resume callback
This really just is the resume callback for the device, so use that,
especially as the usb-serial core just overrode this callback so it
wasn't being made anyway.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Anton Samokhvalov <pg83@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 14:12:11 -07:00
Greg Kroah-Hartman 2bfd1c96a9 USB: serial: ch341: remove reset_resume callback
This really just is the resume callback for the device, so use that,
especially as the usb-serial core just overrode this callback so it
wasn't being made anyway.

Cc: Johan Hovold <jhovold@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 14:10:27 -07:00
Greg Kroah-Hartman 32078f915d USB: serial: remove usb_serial_disconnect call in all drivers
This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 14:02:13 -07:00
Greg Kroah-Hartman 5026bb07be USB: serial: remove usb_serial_probe call in all drivers
This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 13:48:33 -07:00
Alan Stern c7f3619b90 usb-serial: clean up unneeded PM-related fields
This patch (as1551) cleans up the PM-related entries in the usb_driver
structures of the various USB serial driver modules.  Those entries
are now filled in by the usb-serial core during driver registration,
so they don't need to be initialized explicitly in the source code.

The same is true of the one remaining no_dynamic_id entry.

reset_resume remains a small problem, because the serial core doesn't
support it.  The patch ignores these entries.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 13:05:51 -07:00
Alan Stern 5cbe61c5af usb-serial: ftdi_sio: fix oops during autosuspend
This patch (as1550) fixes a bug in the usb-serial core that affects
the ftdi_sio driver and most likely others as well.  The core
implements suspend and resume routines, but it doesn't store pointers
to those routines in the usb_driver structures that it registers,
even though it does set those drivers' supports_autosuspend flag.  The
end result is that when one of these devices is autosuspended, we try
to call through a NULL pointer.

The patch fixes the problem by setting the suspend and resume method
pointers to the appropriate routines in the USB serial core, along
with the supports_autosuspend field, in each driver as it is
registered.

This should be back-ported to all the stable kernels that have the new
usb_serial_register_drivers() interface.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Frank Schäfer <schaefer.frank@gmx.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 12:59:02 -07:00
Hans de Goede c53c254933 [media] v4l2-event: Add v4l2_subscribed_event_ops
Just like with ctrl events, drivers may want to get called back on
listener add / remove for other event types too. Rather then special
casing all of this in subscribe / unsubscribe event it is better to
use ops for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-07 16:28:35 -03:00
Greg Kroah-Hartman 23063b378d usb: dwc3: patches for v3.5 merge window
This pull request contains one workaround for a Silicon
 Issue found on all RTL releases prior to 2.20a, which
 would cause a metastability state on Run/Stop bit.
 
 We also have some patches implementing a few extra Standard
 requests introduced by USB3 spec (Set SEL and Set Isoch Delay),
 as well as one patch, which has been pending for a long time,
 implementing LPM support.
 
 Last, but not least, we are splitting the host address space
 out of the dwc3 core driver otherwise xHCI won't be able to
 request_mem_region() its own address space. This patch is
 only needed because we are (as we should) re-using the xHCI
 driver, which is a completely separate module.
 
 Together with these three big changes, come a few extra preparatory
 patches which most move code around, define macros and so on, as
 well as a fix for Isochronous transfers which hasn't been triggered
 before.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPo7lXAAoJEIaOsuA1yqRESaIP/AgxZIfOAUbPx0GWLnhub3qr
 SxaUplweFc9q4KXRLn0kGdY9QArPR3bqW9g8KOTiRCBYRtjpACyMjibAUaAht81h
 +vLdPt87Slj2c14t1uguWFvgCUYQOCugkVvDIjRg9PCLIuTahm4cIBFqL3RJOHFf
 9WCd8JjH9ahr85ZtoCBk9B5bDNn71nS+Yh6/8+Ab90AE4vZ6t8Xx3+wLTHy2CBYQ
 UH1o61QZreAJ0J3OiUobjqrVbYwz6TM0dFYMjA6ko+OiPRhVOj8/C8aNl/U1whRm
 +7jjJiWO9aHp+Tu2OAQOBF6ydc3ZLBEiCl9RiE+O9MppmtOykzkTHFm1ZXatCEY7
 UUYOy43VXLNlHoz8nidNw6P25hAwwlSijzlyawpihKbIaE8le2MpE6I00AlciM2q
 BEo4LpluC8Rr6CUUr5W9dPZUexRlzxdAL5nQSJUnJgfEPphpP3x7dWTxUZBaWjq6
 akqjgGqVj1QKwMnqL4GILtRgdqWj6WYrw67fYVLHqj8QQla4cgXQ2sHp9/R0imvT
 nmjiL5ZiuIWWr965DgVHZwqIkdvMpSQb99a1xmptw8lFDGkVJDCssPDdEErbBMwy
 KmOSaqKeg/Yway05i+Pwo/NUKHQSZeiyuguzniMrF7iYFF1/2hVYRgfpH4V+95w/
 Xrnz4uH2YJGQGPddf87P
 =qgf/
 -----END PGP SIGNATURE-----

Merge tag 'dwc3-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

usb: dwc3: patches for v3.5 merge window

This pull request contains one workaround for a Silicon
Issue found on all RTL releases prior to 2.20a, which
would cause a metastability state on Run/Stop bit.

We also have some patches implementing a few extra Standard
requests introduced by USB3 spec (Set SEL and Set Isoch Delay),
as well as one patch, which has been pending for a long time,
implementing LPM support.

Last, but not least, we are splitting the host address space
out of the dwc3 core driver otherwise xHCI won't be able to
request_mem_region() its own address space. This patch is
only needed because we are (as we should) re-using the xHCI
driver, which is a completely separate module.

Together with these three big changes, come a few extra preparatory
patches which most move code around, define macros and so on, as
well as a fix for Isochronous transfers which hasn't been triggered
before.

[ resolved conflicts and build error in drivers/usb/dwc3/gadget.c - gregkh]
2012-05-07 10:09:55 -07:00
Greg Kroah-Hartman a5c708e841 usb: musb: patches for v3.5 merge window
MUSB has only two patches for this merge window adding
 support for TI's TI81xx platforms which contains two
 MUSB IP instances.
 
 Nothing scary here, just yet another glue layer for MUSB.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPo7cWAAoJEIaOsuA1yqREIKoQAJxUgylvK0q9JnY6HGfOjHJt
 PZ1BYLpo6LHvmj4hezEgPgEYWnI5PitgUTB0499onNDpI1f+d5kLP7ryYbRBQD/y
 HJp50/cm8gzF9AteczxBuQ+UNsQ9rxP9bizze+2rrB8yNKxTmrf3EWUJ6sUok/qV
 zIYQed4+ZpLd+BCv6D5KRYigNsGPLCG3jXKGkZvUh/O1w28rswahZ/lPljOmfwmU
 Ow4ACQivem+DUo4BRm1t0BTCVGsa3oFZOaqsgmo11Ks3XBmg2bHYi/UAUzw8F9Y3
 XN/aoJGLns+R+sCvRa2RJkusDTkwIqeZo9H9QTa9BNgTslPeYpgqOpj3/fIx+vcc
 kEp/fyJ+8p0lx5cf/drHy9BW3qNqHSPuiHTDLxizQQqjMpfxclnlEquS3zR3jc+R
 mLUzoNxAevmenDyIK1itcG2GqF+AuEIbfgCM818LYqYWY2OlxLPFj3gVasNXixiI
 AhD+hR/lbn3rJi4NpezerFw6R/rZ7eQGg9FgaHtqSykkwhGkqtpRQUb7WtINwNXR
 G9f2Wfc11se2k017K0j0UwuEoEVENb33uRy0PzvaHcxCGywKZmlAipJtafTaTgvZ
 ivyuxFjE/+IhHlqVsxrBp326TW6u8ki1J5fna8DlKXnH+9k6veK1NgLYVOlSCgfT
 ae4ix9QXbqSr08PuVCCi
 =wdYo
 -----END PGP SIGNATURE-----

Merge tag 'musb-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

usb: musb: patches for v3.5 merge window

MUSB has only two patches for this merge window adding
support for TI's TI81xx platforms which contains two
MUSB IP instances.

Nothing scary here, just yet another glue layer for MUSB.
2012-05-07 10:02:01 -07:00
Greg Kroah-Hartman 6a1e1d71d0 usb: gadget: patches for v3.5
This pull request is quite big, but mainly because there's a
 giant rework of the s3c_hsotg.c driver to make it friendlier
 for other users. Samsung Exynos platforms use the DesignWare
 Core USB2 IP from Synopsys so it's a bit unfair to have the
 driver work for Samsung platforms only. In short, the big
 rework is in preparation to make the driver more reusable.
 
 Another big rework in this pull request came from Ido, where
 he's removing the redundant pointer for the endpoint descriptor
 from the controller driver's own endpoint representation. The
 same pointer is available through the generic struct usb_ep
 structure.
 
 Also on this pull request is the conversion of a few extra
 controller drivers to the new style registration, which allows
 multiple controllers to be available on the same platform and
 helps remove global pointers from those drivers.
 
 Together with those big changes, there's the usual fixes and cleanups
 to gadget drivers. Nothing major.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPp3l8AAoJEIaOsuA1yqRECjkP/3mScTFWEgjQsa7ynlYW6bfE
 9uI3yP0VPws8EK0MBIOeXOhz7z/x/of/9XEEvnVjqnVkXlYc23IEJactbc1sYHQY
 WsUyeuD6D+W5UHkomV0W8Xh1agVeW9QYDubQxI62KL81pWCC3MVa+BfW+430lrdi
 7FUxWykCByYu1VYNZYfaGFyKalkpOpIydFtAZp2ykawUJMyB1PPl+2uzA1u/zB9A
 Tm6E2Su+CzWp59/Udc64O25FhPo/g5GQWX2VbO1XneUrpNQgfihq6RjSi3hHYZdq
 NkeR0eWwc5KeWZfsfm57AErQlN97uP3fAUSHz9o6c5N9V7bW221sCh4ZH3s32+IB
 Dnps2WbW7IslUntYd1GyakfRILTrhMbg7GJZbmxdzWmIK6Pv0NLISPq4bZ64QJOH
 iqa8NtluN0m1DSwUNX7UBHQZ6Cj1X3xZIdAJvdg4IlqUJ+Q2UmgCG9/kloF1H0C3
 QnRXUEgbmMZ42sVVWEafUhwfEQTNFJyWd7OpFuyo8R3vARJg/miaEy7Lf+IqpRxD
 5WV6o/TVCL2c6lQP2NbJoCSr10K2VcHOJpUS8cYv6K+ZIyTbKvOh8rlArX2+/W3a
 YZtd+nfq2FyuRVxAasXwpsVCDT319LWt+Myq+9cl23+PyN54j+OnhHPJr15tBru1
 OB/Z6arXyc17Gq/Ng2ur
 =irDV
 -----END PGP SIGNATURE-----

Merge tag 'gadget-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

usb: gadget: patches for v3.5

This pull request is quite big, but mainly because there's a
giant rework of the s3c_hsotg.c driver to make it friendlier
for other users. Samsung Exynos platforms use the DesignWare
Core USB2 IP from Synopsys so it's a bit unfair to have the
driver work for Samsung platforms only. In short, the big
rework is in preparation to make the driver more reusable.

Another big rework in this pull request came from Ido, where
he's removing the redundant pointer for the endpoint descriptor
from the controller driver's own endpoint representation. The
same pointer is available through the generic struct usb_ep
structure.

Also on this pull request is the conversion of a few extra
controller drivers to the new style registration, which allows
multiple controllers to be available on the same platform and
helps remove global pointers from those drivers.

Together with those big changes, there's the usual fixes and cleanups
to gadget drivers. Nothing major.
2012-05-07 09:49:32 -07:00
Greg Kroah-Hartman 61906313bd Merge 3.4-rc6 into usb-next
This resolves the conflict with:
	drivers/usb/host/ehci-tegra.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 09:03:39 -07:00
Paul Bolle d132d7f6fb Kconfig: replace "--- help ---" with "---help---"
There are three Kconfig entries with "--- help ---" attributes, and over
2000 Kconfig entries with "---help---" attributes.  Apparently the three
attributes with embedded spaces are valid. Still, I see little reason
for using this obscure variant. And replacing those three attributes
with the common variant makes grepping Kconfig files for help texts a
bit easier too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-05-07 15:01:22 +02:00
Russ Dill 3aa2ae74ba USB: EHCI: OMAP: Finish ehci omap phy reset cycle before adding hcd.
'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' (1fcb57d0f) created a regression
with Beagleboard xM if booting the kernel after running 'usb start' under u-boot.

Finishing the reset before calling 'usb_add_hcd' fixes the regression. This is most likely due to
usb_add_hcd calling the driver's reset and init functions which expect the hardware to be
up and running.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: stable <stable@vger.kernel.org> [3.4]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 17:05:45 -07:00
Greg Kroah-Hartman 7275fc4c16 USB: gadget: ci13xx_udc: remove unused err() macro
I previously cleaned up the err() call usage in this driver, but it
really was calling this macro instead.  To remove future confusion, just
delete this unused macro now.

Ideally, the warn() and info() macros should also be removed, and the
"real" dev_warn() and dev_info() calls should be used instead.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:39:11 -07:00
Lukasz Majewski 1d144c6732 usb:hsotg:samsung: err_irq: support for probe function
Missing handler for freeing requested IRQ added.
Moreover clk_ calls has been reorganized.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:18 +03:00
Lukasz Majewski 04b4a0fce5 usb:hsotg:samsung: Use clk_prepare_enable and clk_disable_unprepare
This commit adjust the s3c-hsotg to new clock API.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:18 +03:00
Lukasz Majewski 94cb8fd637 usb:hsotg:samsung: Remove the S3C_ prefix from registers definition.
This code removes the S3C_ prefix from s3c-hsotg driver. This change
provides more architecture independent code.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:17 +03:00
Lukasz Majewski f026a52d43 usb:hsotg:samsung: Add release function for hsotg device
Add release function to prevent kernel warning.
Kfree is performed when all references are gone.

Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:17 +03:00
Lukasz Majewski f99b2bfebe usb:hsotg:samsung: Remove our_hsotg global pointer
The our_hsotg global pointer to hsotg USB device state is removed.
It has been replaced with to_hsotg(gadget) function.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:16 +03:00
Lukasz Majewski 8b9bc4608e usb:hsotg:samsung: Comments reorganization and cleanup
Refactor all comments to comply with kernel codding style.
Moreover doxygen descriptions have been added for selected functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:16 +03:00
Lukasz Majewski f65f0f1098 usb:hsotg:samsung: Use new udc_start and udc_stop callbacks
Replace of deprecated start and stop callbacks with a udc_start and
udc_stop ones.

Now the bind from composite driver is NOT called explicitly, so more
work needs to be done at s3c_udc_probe. Especially enabling SoC clocks
and power for runtime determination of EP number.
After probing, those sources are disabled and enabled again at udc_start
and pullup afterwards.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:15 +03:00
Lukasz Majewski b3f489b2b6 usb:hsotg:samsung: Determine number of EPs from HW configuration register
This commit adds support for determining of EPs number during run time.

Configuration is read from a HW configuration register in a specially
created s3c_hsotg_hw_cfg function.

Moreover it was necessary to defer at probe allocation of the
struct s3c_hsotg_ep instances until number of endpoints is known.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:15 +03:00
Lukasz Majewski 12a1f4dc0d usb:hsotg:samsung: Cable disconnection recovery code
This code allows Samsung SoC's to recover its state when
device is disconnected and connected during transfer.

It is necessary, in such a scenario, to reinitialize the USB core
to assure correct initial state of the driver.
This operation is needed since the disconnect interrupt is only
available at HOST mode, which is not supported by this driver.

A simple mechanism with jiffies has been used to perform core reset
only once.

Tested with:
- DFU gadget (various size of the sent data - also packet = MPS)
- Ethernet gadget (CDC and RNDIS)
- Multi Function Gadget (g_multi)

HW:
- Samsung's C210 Universal rev.0

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:14 +03:00
Lukasz Majewski 5e891342fd usb:hsotg:samsung: Rename s3c_hsotg_disconnect function
The s3c_hsotg_disconnect_irq function has been renamed to
reflect, that it can be used not only during the host
disconnect irq.

The s3c_hsotg_disconnect shall be used as a fall back for
scenario when USB cable is unplugged and plugged to the
device.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:14 +03:00
Lukasz Majewski b3546c97c7 usb:hsotg:samsung: Remove Disconnect Interrupt handler
The USB Disconnect Interrupt handler, according to specification,
is only working at HOST mode.

Samsung SoCs (e.g. Exynos4) are working at device mode, so
this interrupt is never caught.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:13 +03:00
Lukasz Majewski 308d734e9e usb:hsotg:samsung: Extract core initialization function
The s3c_hsotg_core_init function has been added to exclude
code responsible for Samsung's SoCs USB core initialization.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:13 +03:00
Lukasz Majewski d3ca0259c5 usb:hsotg:samsung: Sending ZLP packet for IN EP0 transfers
This commit targets following scenarios for IN requests:

1. HOST requests e.g. 256B (which is a multiple of MPS = 64B).
Then NO ZLP shall be sent, since host expects exact number of bytes.

2. HOST requested 4096B, but our data for sending is 256B. In this
situation ZLP shall be send to tell HOST that no more data is available
and it shall not wait for more data. This prevents HOST from hanging.

Tested with:
- DFU gadget (various size of the sent data - also packet = MPS)
- Ethernet gadget (CDC and RNDIS)
- Multi Function Gadget (g_multi)

HW:
- Samsung's C210 Universal rev.0
- Samsung's C110 GONI

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:12 +03:00
Lukasz Majewski 71225beeeb usb:hsotg:samsung: NAK management for EP0 (Setup stage of control transfers)
For SETUP stage of USB control transmission, the NAK shall NOT be
CLEAR.

The SNAK/CNAK control is crucial for this type of driver,
since data arrives to earlier defined requests.

Tested with:
- DFU gadget (various size of the sent data - also packet = MPS)
- Ethernet gadget (CDC and RNDIS)
- Multi Function Gadget (g_multi)

HW:
- Samsung's C210 Universal rev.0

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:12 +03:00
Lukasz Majewski fc9a731ed0 usb:hsotg:samsung: Use of regulator_bulk_* functions for USB regulators
This commit adds support for supply voltage management for s3c-hsotg IP
block. For that purpose a convenient regulator_bulk_* functions have been
used.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:11 +03:00
Lukasz Majewski 4118878697 usb:hsotg:samsung: Wrappers for USB PHY methods
Wrappers for PHY methods have been added for readability and reduction
of code repetition.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:11 +03:00
Lukasz Majewski d77039c111 usb:hsotg:samsung: Remove platform dependent functions from s3c-hsotg
Two functions - namely: s3c_hsotg_gate and s3c_hsotg_otgreset are platform
dependent and therefore removed from Samsung's generic s3c-hsotg code.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:10 +03:00
Lukasz Majewski 127d42ae47 usb:hsotg:samsung: Remove platform dependency from s3c-hsotg
This code removes platform dependency from s3c-hsotg driver.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:09 +03:00
Peter Korsgaard 4f06539ffa f_fs: ffs_func_free: cleanup requests allocated by autoconfig
functionfs was leaking request objects created by autoconfig.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:09 +03:00
Paul Zimmerman b4036ccdd2 usb: gadget: add isochronous support to gadget zero
Add two isochronous endpoints to the gadget zero source/sink
function. They are enabled by selecting alternate interface 1, so
by default they are not enabled. Module parameters for setting all
the isoc endpoint characteristics are also provided.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:08 +03:00
Dan Carpenter 20c5e74c7b usb: gadget: add a sparse endian notation
The original code works fine, but Sparse complains because it isn't
annotated properly.

drivers/usb/gadget/composite.c:793:26: warning: incorrect type in assignment (different base types)
drivers/usb/gadget/composite.c:793:26:    expected unsigned short [unsigned] [usertype] language
devel/drivers/usb/gadget/composite.c:793:26:    got restricted __le16 [usertype] <noident>
devel/drivers/usb/gadget/composite.c:795:29: warning: restricted __le16 degrades to integer
drivers/usb/gadget/composite.c:798:24: warning: incorrect type in assignment (different base types)
drivers/usb/gadget/composite.c:798:24:    expected restricted __le16 [usertype] <noident>
devel/drivers/usb/gadget/composite.c:798:24:    got unsigned short [unsigned] [usertype] language

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:08 +03:00
Shimoda, Yoshihiro 1ec9c8a299 usb: gadget: r8a66597-udc: add support for set_selfpowered
The previous code always set to USB_DEVICE_SELF_POWERED in GET_STATUS.
So, this patch adds set_selfpowered().

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:07 +03:00
Fabio Estevam 00c16f9f91 usb: gadget: Include i.MX processors in the USB_FSL_USB2 help text
USB_FSL_USB2 driver can be used on PowerPC and i.MX processors.

Include i.MX processors in the USB_FSL_USB2 help text.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:07 +03:00
Peter Chen 4d0947dec4 usb: gadget: fsl_udc_core: dTD's next dtd pointer need to be updated once written
dTD's next dtd pointer need to be updated once CPU writes it, or this
request may not be handled by controller, then host will get NAK from
device forever.

This problem occurs when there is a request is handling, we need to add
a new request to dTD list, if this new request is added before the current
one is finished, the new request is intended to added as next dtd pointer
at current dTD, but without wmb(), the dTD's next dtd pointer may not be
updated when the controller reads it. In that case, the controller will
still get Terminate Bit is 1 at dTD's next dtd pointer, that means there is
no next request, then this new request is missed by controller.

CC: <stable@vger.kernel.org>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:06 +03:00
Yongsul Oh 124ef38925 usb: gadget: composite: prevent a memory leak when configuration bind fails
In some USB composite gadget drivers, the configuration's bind function called
by the usb_add_config() calls multiple bind config functions. (for example cdc2
configuration bind function in the cdc_do_config() of the cdc2.c has two
functionality bind config functions.
  - the ecm_bind_config() & the acm_bind_config())

In each functionality bind config function, new instance is allocated and
finally added by the usb_add_function().

So if an error occurred during the second functionality bind config (for
example an error occurred at the acm_bind_config() after succeeding of the
ecm_bind_function()), the instance created by the acm_bind_config() cannot be
freed creating a memory leak.

This patch fixes this issue.

Signed-off-by: Yongsul Oh <yongsul96.oh@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:06 +03:00
Michal Nazarewicz c2484606a1 usb: gadget: f_mass_storage: remove deprecated fsg_add()
There are no in-tree fsg_add() users and it has been deprecated
since 2.6.35 [1dc90985d1: fsg_add() renamed to fsg_bind_config()] so
out-of-tree users had more then enough time to convert.  Removing.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:05 +03:00
Shimoda, Yoshihiro cac402dd08 usb: renesas_usbhs: gadget: add support for set_selfpowered
The previous code always set to USB_DEVICE_SELF_POWERED in GET_STATUS.
So, this patch adds set_selfpowered().

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:05 +03:00
Sebastian Andrzej Siewior f99987bb26 usb: gadget: dummy_hcd: allow to free requests on disabled endpoints
ep->desc is set to NULL on endpoint disable. That means once an endpoint
is disabled it is not possible to free requests. In my target gadget I
first disable endpoints to make sure I have no requests on the fly and
then free frequests. On dummy I am leaking memory here.
Since I can't imagine a reason why it should be a bad thing, lets allow
to free requests on disabled endpoints. On removal of composite the ep0
request is removed so lets allow that here as well.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:04 +03:00
Sebastian Andrzej Siewior 2e87edf492 usb: gadget: make g_printer use composite
This patch converts the g_printer to make use of the compoiste framework
for descriptor parsing instead of its own implementation of it.
This gadget contains now one function which is the printer gadget.
Compile tested only.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:04 +03:00
Sebastian Andrzej Siewior d3bfd25821 usb: gadget: remove DUALSPEED from printer
This patch removes the DUALSPEED macro and makes the HS (and FS) case
the default. This is one little step before composite can be used for
descriptor management.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:03 +03:00
Sebastian Andrzej Siewior 66ec8ed295 usb: gadget: imx_udc: convert to new style start/stop
This patches converts the driver into the new style start/stop interface.
As a result the driver no longer uses the static global controller
variable in start/stop code. I kept the gloval controller variable because
it keeps init simple.
Compile tested only.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:02 +03:00
Sebastian Andrzej Siewior 504d14c465 usb: gadget: fsl_qe_udc: remove not implemented callbacks
All of this callbacks which I remove here are not implemented and return
an error code. The gadget code returns an error code if a callback is
missing so there is no need to implement this twice.

Cc: Li Yang <leoli@freescale.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:02 +03:00
Sebastian Andrzej Siewior d77c119866 usb: gadget: fsl_qe_udc: convert to new style start/stop
This patches converts the driver into the new style start/stop interface.
As a result the driver no longer uses the static global udc_conroller variable.
Compile tested only.

Cc: Li Yang <leoli@freescale.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:01 +03:00
Sebastian Andrzej Siewior d809f78f81 usb: gadget: atmel_usba_udc: convert to newstyle start/stop interface
This patches converts the driver into the new style start/stop interface.
As a result the driver no longer uses the static global the_udc
variable in start/stop functions. I kept the the_udc variable since it
makes the init code a little simpler.
Someone with hardware might want to look if it possible to move the vbus
irq/toggle_bias code into ->pullup().

Compile tested only.

Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:01 +03:00
Sebastian Andrzej Siewior f3d8bf34c2 usb: gadget: at91_udc: convert to new style start/stop interface
This patches converts the driver into the new style start/stop interface.
As a result the driver no longer uses the static global controller
variable in start/stop functions. I kept the controller variable since it
makes the init code a little simpler.
Compile tested only.

Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:00 +03:00
Ido Shayevitz 955846a60a usb: gadget: Update s3c-hsudc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:00 +03:00
Ido Shayevitz 0ff21e0e9c usb: gadget: Update pch_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:59 +03:00
Ido Shayevitz fa42e52ba4 usb: gadget: Update s3c2410_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:59 +03:00
Ido Shayevitz 9e658f2600 usb: gadget: Update r8a66597-udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:58 +03:00
Ido Shayevitz c18800d8f9 usb: gadget: Update pxa25x_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:58 +03:00
Ido Shayevitz f8bdae0614 usb: gadget: Update omap_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:57 +03:00
Ido Shayevitz b1371d1611 usb: gadget: Update mv_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:57 +03:00
Ido Shayevitz 2eb2cff56a usb: gadget: Update m66592-udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:56 +03:00
Ido Shayevitz a1976f750b usb: gadget: Update langwell_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:56 +03:00
Ido Shayevitz db79d9811b usb: gadget: Update goku_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:55 +03:00
Ido Shayevitz fab1137f63 usb: gadget: Update fusb300_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:55 +03:00
Ido Shayevitz 79149b8bd0 usb: gadget: Update fsl_udc_core to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:54 +03:00
Ido Shayevitz ec39e2aeef usb: gadget: Update fsl_qe_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:54 +03:00
Ido Shayevitz 978def1c4e usb: gadget: Update atmel_usba_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:53 +03:00
Ido Shayevitz 5a6506f00e usb: gadget: Update at91_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:53 +03:00
Ido Shayevitz ef20a72b73 usb: gadget: Update amd5536udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:52 +03:00
Ido Shayevitz 16e78db720 usb: dwc3: Update dwc3 udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:52 +03:00
Ido Shayevitz 31fb601416 usb: gadget: Update ci13xxx_udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:51 +03:00
Axel Lin 3cdb772160 usb: gadget: use module_pci_driver
This patch converts the drivers in drivers/usb/gadget/* to use
module_pci_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de>
Cc: Xiaochen Shen <xiaochen.shen@intel.com>
Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:52:50 +03:00
Ajay Kumar Gupta fa29652883 usb: musb: enable support for am335x
Enabled the flag so that musb_dsps glue file can be used for am335x

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 13:59:35 +03:00
Ajay Kumar Gupta 9ecb887522 usb: musb: Add support for ti81xx platform
TI81XX platform has two musb interfaces and uses CPPI4.1 DMA engine.
It has builtin USB PHYs as AM35x. The current set of patches adds support
for one instance and only in PIO mode.

[ balbi@ti.com : make it compile and solve a "may be used
	uninitialized" warning ]

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 13:59:34 +03:00
Felipe Balbi 3ef35fafdc usb: dwc3: define DWC3_EP0_BOUNCE_SIZE
to avoid sprinkling magic constants on the driver
we define a constant to be used when allocating
setup_buffer and ep0_bounce buffer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 12:58:14 +03:00
Greg Kroah-Hartman 4db02fecb4 USB: whiteheat.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Support Department <support@connecttech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:45:01 -07:00
Greg Kroah-Hartman d2bad7818c USB: usb_wwan.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:45:00 -07:00
Greg Kroah-Hartman 4a7ce90c0a USB: ti_usb_3410_5052.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
CC: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:58 -07:00
Greg Kroah-Hartman b6b6df8a56 USB: symbolserial.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:55 -07:00
Greg Kroah-Hartman bb7a9c4a42 USB: ssu100.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:53 -07:00
Greg Kroah-Hartman 76533636aa USB: spcp8x5.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:51 -07:00
Greg Kroah-Hartman 64318a5295 USB: sierra.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Alan Stern <stern@rowland.harvard.edu>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Anton Samokhvalov <pg83@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:48 -07:00
Greg Kroah-Hartman 3a3eec0c1f USB: qcserial.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Thomas Tuttle <ttuttle@chromium.org>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Rigbert Hamisch <rigbert@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:46 -07:00
Greg Kroah-Hartman 77b3b30d18 USB: oti6858.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:43 -07:00
Greg Kroah-Hartman e79a8a4be4 USB: option.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:41 -07:00
Greg Kroah-Hartman 815fd56974 USB: opticon.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:40 -07:00
Greg Kroah-Hartman 69d1d34a9b USB: omninet.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:38 -07:00
Greg Kroah-Hartman 8cf38740e6 USB: navman.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:35 -07:00
Greg Kroah-Hartman 3363155b66 USB: mos7840.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Donald Lee <donald@asix.com.tw>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:33 -07:00
Greg Kroah-Hartman ca09907d96 USB: mos7720.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:31 -07:00
Greg Kroah-Hartman b69919ca24 USB: mct_u232.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:28 -07:00
Greg Kroah-Hartman f65ee14fa8 USB: kobil_sct.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:26 -07:00
Greg Kroah-Hartman b20430bcc0 USB: kl5kusb105.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:23 -07:00
Greg Kroah-Hartman 5542cf791c USB: keyspan_pda.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:23 -07:00
Greg Kroah-Hartman 41ea84d80c USB: keyspan.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:22 -07:00
Greg Kroah-Hartman 042df23a64 USB: iuu_phoenix.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:22 -07:00
Greg Kroah-Hartman b97835556f USB: ir-usb.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:20 -07:00
Greg Kroah-Hartman 1ae4c01ed5 USB: ipw.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Oliver Neukum <oneukum@suse.de>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:17 -07:00
Greg Kroah-Hartman ef2b895b75 USB: ipaq.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:15 -07:00
Greg Kroah-Hartman de5789e22b USB: generic.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:12 -07:00
Greg Kroah-Hartman c0a56a2a4a USB: garmin_gps.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:12 -07:00
Greg Kroah-Hartman a09aa7dda4 USB: ftdi_sio.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
CC: Simon Arlott <simon@fire.lp0.eu>
CC: Andrew Worsley <amworsley@gmail.com>
CC: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:10 -07:00
Greg Kroah-Hartman b6ea163b6d USB: f81232.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:07 -07:00
Greg Kroah-Hartman 005331f4c4 USB: ezusb.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:44:02 -07:00
Greg Kroah-Hartman 4e512ab935 USB: empeg.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Gary Brubaker <xavyer@ix.netcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:59 -07:00
Greg Kroah-Hartman a1bd886975 USB: digi_acceleport.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Peter Berger <pberger@brimson.com>
CC: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:59 -07:00
Greg Kroah-Hartman 108feb66ac USB: cypress_m8.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Lonnie Mendez <dignome@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:58 -07:00
Greg Kroah-Hartman b627488c19 USB: cyberjack.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:58 -07:00
Greg Kroah-Hartman b978a5a11b USB: cp210x.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Preston Fick <preston.fick@silabs.com>
CC: Yuri Matylitski <ym@tekinsoft.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:57 -07:00
Greg Kroah-Hartman 2ec7d459c0 USB: ch341.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:55 -07:00
Greg Kroah-Hartman d17a44db94 USB: belkin_sa.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: William Greathouse <wgreathouse@smva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:52 -07:00
Greg Kroah-Hartman 4d9b4001e0 USB: serial: visor: convert dbg() to dev_dbg()
This removes most of the dbg() calls, as they were just tracing calls,
and converts the remaining ones to dev_dbg().

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:40:45 -07:00
Greg Kroah-Hartman d8789b2b90 USB: serial: pl2303: convert dbg() calls to dev_dbg()
This converts the usage of dbg() to dev_dbg() where needed, and removed
a bunch of these calls where they were just "tracing" calls, which are
no longer needed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:39:27 -07:00
Sarah Sharp 1c12443ab8 xhci: Add Lynx Point to list of Intel switchable hosts.
The upcoming Intel Lynx Point chipset includes an xHCI host controller
that can have ports switched from the EHCI host controller, just like
the Intel Panther Point xHCI host.  This time, ports from both EHCI
hosts can be switched to the xHCI host controller.  The PCI config
registers to do the port switching are in the exact same place in the
xHCI PCI configuration registers, with the same semantics.

Hooray for shipping patches for next-gen hardware before the current gen
hardware is even available for purchase!

This patch should be backported to stable kernels as old as 3.0,
that contain commit 69e848c209
"Intel xhci: Support EHCI/xHCI port switching."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-05-03 13:18:40 -07:00
Sarah Sharp 51c9e6c773 xhci: Avoid dead ports when CONFIG_USB_XHCI_HCD=n
If the user chooses to say "no" to CONFIG_USB_XHCI_HCD on a system
with an Intel Panther Point chipset, the PCI quirks code or the EHCI
driver will switch the ports over to the xHCI host, but the xHCI driver
will never load.  The ports will be powered off and seem "dead" to the
user.

Fix this by only switching the ports over if CONFIG_USB_XHCI_HCD is
either compiled in, or compiled as a module.

This patch should be backported to stable kernels as old as 3.0,
that contain commit 69e848c209
"Intel xhci: Support EHCI/xHCI port switching."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Eric Anholt <eric.anholt@intel.com>
Reported-by: David Bein <d.bein@f5.com>
Cc: stable@vger.kernel.org
2012-05-03 13:16:32 -07:00
Hans de Goede 9c745995ae usb-xhci: Handle COMP_TX_ERR for isoc tds
While testing unplugging an UVC HD webcam with usb-redirection (so through
usbdevfs), my userspace usb-redir code was getting a value of -1 in
iso_frame_desc[n].status, which according to Documentation/usb/error-codes.txt
is not a valid value.

The source of this -1 is the default case in xhci-ring.c:process_isoc_td()
adding a kprintf there showed the value of trb_comp_code to be COMP_TX_ERR
in this case, so this patch adds handling for that completion code to
process_isoc_td().

This was observed and tested with the following xhci controller:
1033:0194 NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

Note: I also wonder if setting frame->status to -1 (-EPERM) is the best we can
do, but since I cannot come up with anything better I've left that as is.

This patch should be backported to kernels as old as 2.6.36, which contain the
commit 04e51901dd "USB: xHCI: Isochronous
transfer implementation".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-05-03 13:11:12 -07:00
Andiry Xu f370b9968a xHCI: keep track of ports being resumed and indicate in hub_status_data
This commit adds a bit-array to xhci bus_state for keeping track of
which ports are undergoing a resume transition. If any of the bits
are set when xhci_hub_status_data() is called, the routine will return
a non-zero value even if no ports have any status changes pending.
This will allow usbcore to handle races between root-hub suspend and
port wakeup.

This patch should be backported to kernels as old as 3.4, that contain
the commit 879d38e6bc "USB: fix race
between root-hub suspend and remote wakeup".

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
2012-05-03 13:10:17 -07:00
Preston Fick 32445605fc usb: cp210x: Corrected USB request type definitions
The original request types in the cp210x driver are labled as "DEVICE_TO_HOST" and
"HOST_TO_DEVICE" but the actual bit definition corresponds to a request to the
interface. This has been corrected, and the actual definition for the device
requests have been added.

Signed-off-by: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02 13:42:43 -07:00
Paul Zimmerman f898ae09a0 usb: dwc3: gadget: issue Update Transfer command after queuing isoc request
Issue an Update Transfer command after queuing a request to an isoc
EP with an active transfer. This is required according to the dwc3
databook. Pratyush Anand reports that this fixes a problem he was
having with Isoc IN transfers.

Tested-by: Pratyush Anand<pratyush.anand@st.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-02 09:54:25 +03:00
Felipe Balbi c12a0d862a usb: dwc3: ep0: implement support for Set Isoch Delay request
This is basically a noop for DWC3. We don't have
to do anything. Basically we test if the request
parameters are correct, cache the Isochronous
Delay and return success.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-02 09:43:09 +03:00
Felipe Balbi 7ed6d227c3 usb: dwc3: gadget: increase setup buffer size
We want to re-use that buffer for other USB
requests, so let's increase it to biggest
wMaxPacketSize for ep0 so it works for everything
we have in mind.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-02 09:43:08 +03:00
Felipe Balbi 865e09e716 usb: dwc3: ep0: implement Set SEL support
This patch implements Set SEL Standard Request
support for dwc3 driver. It needs to issue a command
to the controller passing the timing we received on
the data phase of the Set SEL request.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-02 09:43:08 +03:00
Felipe Balbi b09bb64239 usb: dwc3: gadget: implement Global Command support
This will be used by the ep0 layer for implementing
Set SEL Standard Request.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-02 09:42:56 +03:00
Greg Kroah-Hartman aadd6472d9 USB: yurex.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:34:11 -07:00
Greg Kroah-Hartman 7a2d281060 USB: uss720.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:34:07 -07:00
Greg Kroah-Hartman d8ec7a7c1c USB: usblcd.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Zack Parsons <k3bacon@gmail.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
CC: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:34:03 -07:00
Greg Kroah-Hartman e1a344d3de USB: rio500.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Cesar Miquel <miquel@df.uba.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:59 -07:00
Greg Kroah-Hartman a341c6b295 USB: idmouse.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
CC: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:58 -07:00
Greg Kroah-Hartman 0a3fd536e6 USB: appledisplay.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Andrew Morton <akpm@linux-foundation.org>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:54 -07:00
Greg Kroah-Hartman 1b6d823258 USB: mdc800.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:50 -07:00
Greg Kroah-Hartman 167e4925e9 USB: r8a66597-hcd.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Tobias Klauser <tklauser@distanz.ch>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:46 -07:00
Greg Kroah-Hartman b5f5bfe056 USB: oxu210hp-hcd.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: David Howells <dhowells@redhat.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:43 -07:00
Greg Kroah-Hartman 3879e3049f USB: ohci-sa1111.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:39 -07:00
Greg Kroah-Hartman 1f550c1a2f USB: ohci-ep93xx.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Alan Stern <stern@rowland.harvard.edu>
CC: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:38 -07:00
Greg Kroah-Hartman b8a6f71d7e USB: ohci-dbg.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:37 -07:00
Greg Kroah-Hartman 2d0fe1bbab USB: ehci-sched.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:36 -07:00
Greg Kroah-Hartman 82491c2a20 USB: ehci-q.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:35 -07:00
Greg Kroah-Hartman 079d440e10 USB: file.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:35 -07:00
Greg Kroah-Hartman 4f306309fc USB: usblp.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:31 -07:00