openwrt/staging/blogic.git
10 years agousb: dwc2: gadget: move setting last reset time to s3c_hsotg_core_init
Marek Szyprowski [Mon, 20 Oct 2014 10:45:35 +0000 (12:45 +0200)]
usb: dwc2: gadget: move setting last reset time to s3c_hsotg_core_init

This patch removes duplicated code and sets last_rst variable in the
function which does the hardware reset.

Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: core: remove duplicate check on resource
Varka Bhadram [Wed, 29 Oct 2014 16:00:19 +0000 (21:30 +0530)]
usb: musb: core: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: dsps: remove duplicate check on resource
Varka Bhadram [Wed, 29 Oct 2014 16:00:18 +0000 (21:30 +0530)]
usb: musb: dsps: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: rcar-usb: remove duplicate check on resource
Varka Bhadram [Wed, 29 Oct 2014 16:00:17 +0000 (21:30 +0530)]
usb: phy: rcar-usb: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: renesas_usbhs: common: remove duplicate check on resource
Varka Bhadram [Wed, 29 Oct 2014 16:00:16 +0000 (21:30 +0530)]
usb: renesas_usbhs: common: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: keystone: remove duplicate check on resource
Varka Bhadram [Wed, 29 Oct 2014 16:00:15 +0000 (21:30 +0530)]
usb: dwc3: keystone: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: omap2430: use MUSB_DEVCTL_BDEVICE
Sergei Shtylyov [Thu, 23 Oct 2014 20:34:12 +0000 (00:34 +0400)]
usb: musb: omap2430: use MUSB_DEVCTL_BDEVICE

The OMAP2+ MUSB glue layer still uses a bare number for the DEVCTL.B-Device bit
in one place, while there's #define MUSB_DEVCTL_BDEVICE for that.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: pxa27x: do not call usb_gadget_unregister_driver()
Felipe Balbi [Sat, 18 Oct 2014 01:19:41 +0000 (20:19 -0500)]
usb: gadget: udc: pxa27x: do not call usb_gadget_unregister_driver()

that call is completely unnecessary because
usb_del_gadget_udc() already makes sure the
gadget driver is properly unregistered from
the UDC.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: net2272: do not call usb_gadget_unregister_driver()
Felipe Balbi [Sat, 18 Oct 2014 01:19:02 +0000 (20:19 -0500)]
usb: gadget: udc: net2272: do not call usb_gadget_unregister_driver()

that call is completely unnecessary because
usb_del_gadget_udc() already makes sure the
gadget driver is properly unregistered from
the UDC.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: dummy: do not call usb_gadget_unregister_driver()
Felipe Balbi [Sat, 18 Oct 2014 01:18:23 +0000 (20:18 -0500)]
usb: gadget: udc: dummy: do not call usb_gadget_unregister_driver()

that call is completely unnecessary because
usb_del_gadget_udc() already makes sure the
gadget driver is properly unregistered from
the UDC.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc2: gadget: do not call usb_gadget_unregister_driver()
Felipe Balbi [Sat, 18 Oct 2014 01:15:08 +0000 (20:15 -0500)]
usb: dwc2: gadget: do not call usb_gadget_unregister_driver()

that call is completely unnecessary because
usb_del_gadget_udc() already makes sure the
gadget driver is properly unregistered from
the UDC.

Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: pxa27x_udc: fix clock prepare and enable
Robert Jarzmik [Fri, 17 Oct 2014 20:43:06 +0000 (22:43 +0200)]
usb: gadget: pxa27x_udc: fix clock prepare and enable

As the udc clock controls both the output signals and the internal IP,
it must be enabled before any UDC register is touched.

The bug is revealed when the clock framework disables the clock for a
couple of milliseconds during the boot sequence, and the endpoint
configuration is lost. The bug is hidden when clock framework is not
used, because no "unused clocks disable" occurs.

This patch fixes the wrong behaviour by ensuring that :
 - whenever a UDC register is read or written, the clock is enabled
 - reworks the endpoints programming to have it done under running clock
 - reworks suspend/resume to ensure the same thing

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: pxa27x_udc: use devm_* helpers
Robert Jarzmik [Fri, 17 Oct 2014 20:43:05 +0000 (22:43 +0200)]
usb: gadget: pxa27x_udc: use devm_* helpers

Use devm_* helpers in the probe function to simplify the error path and
the remove path.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: pxa27x_udc device-tree documentation
Robert Jarzmik [Fri, 17 Oct 2014 20:43:04 +0000 (22:43 +0200)]
usb: gadget: pxa27x_udc device-tree documentation

Add documentation for device-tree binding of arm PXA 27x udc (usb
device) driver.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: devicetree@vger.kernel.org
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: core: prepend udc_attach_driver with usb_
Felipe Balbi [Fri, 17 Oct 2014 23:57:06 +0000 (18:57 -0500)]
usb: gadget: udc: core: prepend udc_attach_driver with usb_

No functional changes, just adding a prefix
which should have been there from the start.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: remove unnecessary 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 17:05:12 +0000 (12:05 -0500)]
usb: gadget: remove unnecessary 'driver' argument

now that no UDC driver relies on the extra
'driver' argument to ->udc_stop(), we can
safely remove it.

This commit is based on previous work by
Robert Baldyga <r.baldyga@samsung.com> which
can be found at [1]; however that patch turned
out to have a high probability of regressing
many UDC drivers because of a blind search & replace
s/driver/$udc->driver/ which caused the 'driver'
argument to stop_activity() to be a valid non-NULL
pointer when it should be NULL, thus causing UDCs
to mistakenly call gadget driver's ->disconnect()
callback.

[1] http://markmail.org/message/x5zneg4xea4zntab

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: core: fix unregistering message
Felipe Balbi [Fri, 17 Oct 2014 16:54:46 +0000 (11:54 -0500)]
usb: gadget: udc: core: fix unregistering message

Currently, we're printing gadget driver name when
registering and UDC name when unregistering. Standardize
on always printing gadget driver name.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: gadget: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:41:33 +0000 (11:41 -0500)]
usb: musb: gadget: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: s3c-hsudc: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:40:56 +0000 (11:40 -0500)]
usb: gadget: udc: s3c-hsudc: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: net2280: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:40:05 +0000 (11:40 -0500)]
usb: gadget: udc: net2280: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: net2272: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:39:29 +0000 (11:39 -0500)]
usb: gadget: udc: net2272: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: gr_udc: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:38:39 +0000 (11:38 -0500)]
usb: gadget: udc: gr_udc: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: fsl_qe: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:38:09 +0000 (11:38 -0500)]
usb: gadget: udc: fsl_qe: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: dummy: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:37:38 +0000 (11:37 -0500)]
usb: gadget: udc: dummy: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: atmel_usba: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:37:04 +0000 (11:37 -0500)]
usb: gadget: udc: atmel_usba: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: at91: remove bind/unbind messages
Felipe Balbi [Fri, 17 Oct 2014 16:35:52 +0000 (11:35 -0500)]
usb: gadget: udc: at91: remove bind/unbind messages

now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: pass a single argument to usb_gadget_udc_start/stop
Felipe Balbi [Fri, 17 Oct 2014 16:34:07 +0000 (11:34 -0500)]
usb: gadget: udc: pass a single argument to usb_gadget_udc_start/stop

We know that our udc points to our gadget and our
gadget_driver, simplify the interface by passing
a single argument.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: gadget: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:26:46 +0000 (11:26 -0500)]
usb: musb: gadget: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: s3c-hsudc: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:25:50 +0000 (11:25 -0500)]
usb: gadget: udc: s3c-hsudc: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: pxa27x: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:25:04 +0000 (11:25 -0500)]
usb: gadget: udc: pxa27x: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: pxa25x: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:24:37 +0000 (11:24 -0500)]
usb: gadget: udc: pxa25x: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: net2280: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:23:33 +0000 (11:23 -0500)]
usb: gadget: udc: net2280: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: net2272: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:22:52 +0000 (11:22 -0500)]
usb: gadget: udc: net2272: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: mv_udc: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:22:11 +0000 (11:22 -0500)]
usb: gadget: udc: mv_udc: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: mv_u3d: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:21:34 +0000 (11:21 -0500)]
usb: gadget: udc: mv_u3d: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: lpc32xx: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:21:03 +0000 (11:21 -0500)]
usb: gadget: udc: lpc32xx: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: fsl_qe: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:20:10 +0000 (11:20 -0500)]
usb: gadget: udc: fsl_qe: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: dummy: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:18:29 +0000 (11:18 -0500)]
usb: gadget: udc: dummy: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: at91: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:17:08 +0000 (11:17 -0500)]
usb: gadget: udc: at91: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: amd5536: do not rely on 'driver' argument
Felipe Balbi [Fri, 17 Oct 2014 16:16:04 +0000 (11:16 -0500)]
usb: gadget: udc: amd5536: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: ux500_dma: use dmaengine_xxx() APIs
Vinod Koul [Sat, 11 Oct 2014 15:40:38 +0000 (21:10 +0530)]
usb: musb: ux500_dma: use dmaengine_xxx() APIs

The drivers should use dmaengine_terminate_all() or dmaengine_slave_config()
API instead of accessing the device_control which will be deprecated soon

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: renesas_usbhs: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:19 +0000 (15:56 +0800)]
usb: renesas_usbhs: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-mv-usb: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:18 +0000 (15:56 +0800)]
usb: phy: phy-mv-usb: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-msm-usb: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:17 +0000 (15:56 +0800)]
usb: phy: phy-msm-usb: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-mxs-usb: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:16 +0000 (15:56 +0800)]
usb: phy: phy-mxs-usb: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-rcar-gen2-usb: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:15 +0000 (15:56 +0800)]
usb: phy: phy-rcar-gen2-usb: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-am335x-control: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:14 +0000 (15:56 +0800)]
usb: phy: phy-am335x-control: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-tegra-usb: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:13 +0000 (15:56 +0800)]
usb: phy: phy-tegra-usb: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-rcar-usb: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:12 +0000 (15:56 +0800)]
usb: phy: phy-rcar-usb: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: musb_dsps: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:11 +0000 (15:56 +0800)]
usb: musb: musb_dsps: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: tusb6010: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:10 +0000 (15:56 +0800)]
usb: musb: tusb6010: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: blackfin: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:09 +0000 (15:56 +0800)]
usb: musb: blackfin: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: omap2430: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:08 +0000 (15:56 +0800)]
usb: musb: omap2430: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: ux500: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:07 +0000 (15:56 +0800)]
usb: musb: ux500: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: davinci: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:06 +0000 (15:56 +0800)]
usb: musb: davinci: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: s3c-hsudc: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:56:00 +0000 (15:56 +0800)]
usb: gadget: s3c-hsudc: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: bcm63xx_udc: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:55:59 +0000 (15:55 +0800)]
usb: gadget: bcm63xx_udc: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: fsl_qe_udc: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:55:58 +0000 (15:55 +0800)]
usb: gadget: fsl_qe_udc: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: mv_udc_core: delete unnecessary 'out of memory' messages
Peter Chen [Tue, 14 Oct 2014 07:55:57 +0000 (15:55 +0800)]
usb: gadget: mv_udc_core: delete unnecessary 'out of memory' messages

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: WARN() on bogus usb_ep_queue()
Felipe Balbi [Mon, 13 Oct 2014 20:36:16 +0000 (15:36 -0500)]
usb: dwc3: gadget: WARN() on bogus usb_ep_queue()

Some gadget/function drivers might want to do
improper request recycling by allocating a single
request from one particular endpoint and queueing
it to another completely unrelated endpoint.

One such case was found with f_loopback.c.

To prevent such cases from happening again, let's
WARN() so we get a loud enough failure and persuade
users to report errors.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: set state to NOT_ATTACHED on disconnect_irq
Felipe Balbi [Fri, 10 Oct 2014 20:24:00 +0000 (15:24 -0500)]
usb: dwc3: gadget: set state to NOT_ATTACHED on disconnect_irq

whenever we get a Disconnect Interrupt, we should
make sure to update out udc state to NOT_ATTACHED,
otherwise sysfs will show wrong values.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc: document our sysfs ABI
Felipe Balbi [Fri, 10 Oct 2014 20:21:56 +0000 (15:21 -0500)]
usb: gadget: udc: document our sysfs ABI

I noticed that this has been missing for quite
some time so I decided it was about time to
document it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: configfs: add suspend/resume
Andrzej Pietrasiewicz [Wed, 8 Oct 2014 10:03:36 +0000 (12:03 +0200)]
usb: gadget: configfs: add suspend/resume

USB gadgets composed with configfs lack suspend and resume
methods. This patch uses composite_suspend()/composite_resume()
the same way e.g. composite_setup() or composite_disconnect()
are used in a configfs-based gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: f_uac1: remove an unneeded NULL check
Dan Carpenter [Wed, 8 Oct 2014 10:40:37 +0000 (13:40 +0300)]
usb: gadget: f_uac1: remove an unneeded NULL check

This NULL check sets off a static checker warning because we already
dereferenced "card" earlier in the function.  However, since "card" is
never NULL so we can just remove the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc-core: call ->disconnect() when soft disconnecting
Felipe Balbi [Thu, 9 Oct 2014 15:12:24 +0000 (10:12 -0500)]
usb: gadget: udc-core: call ->disconnect() when soft disconnecting

when disconnecting from host using our soft_connect
sysfs interface, also let the gadget driver know about
it by calling the gadget driver's ->disconnect()
method.

No problems have been found while not calling ->disconnect()
so far, it's just good convention.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: get rid of ->prepare()/->complete()
Felipe Balbi [Tue, 7 Oct 2014 15:19:23 +0000 (10:19 -0500)]
usb: dwc3: get rid of ->prepare()/->complete()

Using ->prepare()/->complete() to mask/unmask
IRQs is wrong at least for dwc3. We need to
make sure that by the end of ->resume(), IRQs
are working and ready to fire because a child
device may need working IRQs for its own ->resume()
method.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: dwc3-omap: get rid of ->prepare()/->complete()
George Cherian [Tue, 17 Dec 2013 13:17:54 +0000 (18:47 +0530)]
usb: dwc3: dwc3-omap: get rid of ->prepare()/->complete()

Enabling the core interrupts in complete is too late for
XHCI, and stops it from proper operation. The root of the
problem is due to a disagreement between dwc3-omap and XHCI
about when IRQs should be enabled.

As it turns out, ->resume's documentation states that:

"... generally the driver is expected to start working
again, responding to hardware events and software requests
(the device itself may be left in a low-power state, waiting
for a runtime resume to occur) ..."

From that we infer that IRQs must be unmasked by the end of
->resume().

Due to that, we will remove ->prepare() and ->complete() and
disable/enable interrupts in ->suspend()/->resume().

Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: pxa27x_udc: add devicetree support
Robert Jarzmik [Wed, 1 Oct 2014 20:06:16 +0000 (22:06 +0200)]
usb: gadget: pxa27x_udc: add devicetree support

Add support for device-tree device discovery. If devicetree is not
provided, fallback to legacy platform data "discovery".

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: devicetree@vger.kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: pxa27x_udc: transfer mach_info into pxa_udc
Robert Jarzmik [Wed, 1 Oct 2014 20:06:15 +0000 (22:06 +0200)]
usb: gadget: pxa27x_udc: transfer mach_info into pxa_udc

Convert the mach info, and store the udc_command in the pxa_udc control
structure.

It is to be noticed that the udc_is_connected() in mach info is not
transfered. This was not used, as mioa701 machine doesn't need it,
balloon3 doesn't really use it, and most importantly the current driver
never uses it.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: pxa27x_udc: prepare device-tree support
Robert Jarzmik [Wed, 1 Oct 2014 20:06:14 +0000 (22:06 +0200)]
usb: gadget: pxa27x_udc: prepare device-tree support

For this preparation, a preliminary cleanup is done :
  - convert the probing of pxa27x_udc to gpio_desc.
    The conversion is partial because :
     - the platform data still provides a gpio number, not a gpio desc

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: renesas_usbhs: add support for generic PHY
Yoshihiro Shimoda [Tue, 7 Oct 2014 03:43:06 +0000 (12:43 +0900)]
usb: renesas_usbhs: add support for generic PHY

This patch adds support for the generic PHY. The generic PHY will be
used in multiplatform environment.

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: renesas_usbhs: clean up rcar2.c to support a generic PHY
Yoshihiro Shimoda [Tue, 7 Oct 2014 03:43:05 +0000 (12:43 +0900)]
usb: renesas_usbhs: clean up rcar2.c to support a generic PHY

To support both usb PHY and generic PHY, this patch cleans up rcar2.c.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: renesas_usbhs: rename phy to usb_phy in usbhs_priv
Yoshihiro Shimoda [Tue, 7 Oct 2014 03:43:04 +0000 (12:43 +0900)]
usb: renesas_usbhs: rename phy to usb_phy in usbhs_priv

To support a generic phy driver in this driver later, this patch
renames "struct usb_phy *phy" to "struct usb_phy *usb_phy".

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: ep0: trace ep0 TRBs too
Felipe Balbi [Wed, 1 Oct 2014 17:20:29 +0000 (12:20 -0500)]
usb: dwc3: ep0: trace ep0 TRBs too

Add TRB tracepoints for ep0 TRBs as that
might help finding bugs with ep0 handling.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: composite: conditionally dequeue os_desc and setup requests
Felipe Balbi [Thu, 18 Sep 2014 15:01:55 +0000 (10:01 -0500)]
usb: gadget: composite: conditionally dequeue os_desc and setup requests

In case we unload a gadget driver while any of
os_desc_req or req are still pending, we need
to make sure to dequeue them.

By using our setup_pending and os_desc_pending
flags we achieve that in a way that doesn't
cause any regressions because we won't dequeue
a request which was already completed.

The original idea came from Li Jun's commit
f2267089ea17fa97b796b1b4247e3f8957655df3
(usb: gadget: composite: dequeue cdev->req
before free it in composite_dev_cleanup) which,
unfortunately, caused two regressions (kfree()
being called before usb_ep_dequeue() and calling
usb_ep_dequeue() when the request was already
completed). That commit also didn't take care
of os_desc_req which can fall into the same
situation so we must care for that one too.

Note that in order to make code slightly easier
to read, we introduce composite_ep_queue() which
hides details about how to fiddle with our pending
flags.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: composite: set our req->context to cdev
Felipe Balbi [Thu, 18 Sep 2014 14:54:54 +0000 (09:54 -0500)]
usb: gadget: composite: set our req->context to cdev

by doing that we will be able to match our
requests against req and os_desc_req and also
clear our pending flags from complete callback.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: composite: introduce setup and os_desc pending flags
Felipe Balbi [Thu, 18 Sep 2014 14:51:23 +0000 (09:51 -0500)]
usb: gadget: composite: introduce setup and os_desc pending flags

These flags we be set to true whenever their
matching request is queued. They will be cleared
to false when that request completes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: add ACPI support
Heikki Krogerus [Thu, 25 Sep 2014 07:57:02 +0000 (10:57 +0300)]
usb: dwc3: add ACPI support

Adding ACPI ID used on newer Intel SoCs.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: core: only setting the dma_mask when needed
Heikki Krogerus [Wed, 24 Sep 2014 08:00:38 +0000 (11:00 +0300)]
usb: dwc3: core: only setting the dma_mask when needed

If the probe drivers have already set the dma_mask, not
replacing the value.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: trace: remove unnecessary newline character
Felipe Balbi [Wed, 24 Sep 2014 16:22:23 +0000 (11:22 -0500)]
usb: dwc3: trace: remove unnecessary newline character

tracing infrastructure already adds those for us.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: core: write LINUX_VERSION_CODE to our GUID register
Felipe Balbi [Fri, 19 Sep 2014 20:51:11 +0000 (15:51 -0500)]
usb: dwc3: core: write LINUX_VERSION_CODE to our GUID register

DWC3's GUID register is supposed to be used to write
any sort of version we might want. It helps when getting
bug reports for platforms you don't have HW to know
which kernel version of the driver was running on the
platform.

Because we don't really track driver version, but we _do_
track the kernel version, let's write LINUX_VERSION_CODE to
that register and use it for debugging.

Reviewed-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agoLinux 3.18-rc3
Linus Torvalds [Sun, 2 Nov 2014 23:01:51 +0000 (15:01 -0800)]
Linux 3.18-rc3

10 years agoMerge tag 'for-linus-20141102' of git://git.infradead.org/linux-mtd
Linus Torvalds [Sun, 2 Nov 2014 22:45:52 +0000 (14:45 -0800)]
Merge tag 'for-linus-20141102' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:
 "Three main MTD fixes for 3.18:

   - A regression from 3.16 which was noticed in 3.17.  With the
     restructuring of the m25p80.c driver and the SPI NOR library
     framework, we omitted proper listing of the SPI device IDs.  This
     means m25p80.c wouldn't auto-load (modprobe) properly when built as
     a module.  For now, we duplicate the device IDs into both modules.

   - The OMAP / ELM modules were depending on an implicit link ordering.
     Use deferred probing so that the new link order (in 3.18-rc) can
     still allow for successful probing.

   - Fix suspend/resume support for LH28F640BF NOR flash"

* tag 'for-linus-20141102' of git://git.infradead.org/linux-mtd:
  mtd: cfi_cmdset_0001.c: fix resume for LH28F640BF chips
  mtd: omap: fix mtd devices not showing up
  mtd: m25p80,spi-nor: Fix module aliases for m25p80
  mtd: spi-nor: make spi_nor_scan() take a chip type name, not spi_device_id
  mtd: m25p80: get rid of spi_get_device_id

10 years agoMerge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb...
Linus Torvalds [Sun, 2 Nov 2014 22:39:35 +0000 (14:39 -0800)]
Merge tag 'scsi-for-linus' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of six patches consisting of:
   - two MAINTAINER updates
   - two scsi-mq fixs for the old parallel interface (not every request
     is tagged and we need to set the right flags to populate the SPI
     tag message)
   - a fix for a memory leak in scatterlist traversal caused by a
     preallocation update in 3.17
   - an ipv6 fix for cxgbi"

[ The scatterlist fix also came in separately through the block layer tree ]

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  MAINTAINERS: ufs - remove self
  MAINTAINERS: change hpsa and cciss maintainer
  libcxgbi : support ipv6 address host_param
  scsi: set REQ_QUEUE for the blk-mq case
  Revert "block: all blk-mq requests are tagged"
  lib/scatterlist: fix memory leak with scsi-mq

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sun, 2 Nov 2014 22:27:30 +0000 (14:27 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Nothing too astounding or major: radeon, i915, vmwgfx, armada and
  exynos.

  Biggest ones:
   - vmwgfx has one big locking regression fix
   - i915 has come displayport fixes
   - radeon has some stability and a memory alloc failure
   - armada and exynos have some vblank fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (24 commits)
  drm/exynos: correct connector->dpms field before resuming
  drm/exynos: enable vblank after DPMS on
  drm/exynos: init kms poll at the end of initialization
  drm/exynos: propagate plane initialization errors
  drm/exynos: vidi: fix build warning
  drm/exynos: remove explicit encoder/connector de-initialization
  drm/exynos: init vblank with real number of crtcs
  drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.
  drm/vmwgfx: Fix hash key computation
  drm/vmwgfx: fix lock breakage
  drm/i915/dp: only use training pattern 3 on platforms that support it
  drm/radeon: remove some buggy dead code
  drm/i915: Ignore VBT backlight check on Macbook 2, 1
  drm/radeon: remove invalid pci id
  drm/radeon: dpm fixes for asrock systems
  radeon: clean up coding style differences in radeon_get_bios()
  drm/radeon: Use drm_malloc_ab instead of kmalloc_array
  drm/radeon/dpm: disable ulv support on SI
  drm/i915: Fix GMBUSFREQ on vlv/chv
  drm/i915: Ignore long hpds on eDP ports
  ...

10 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 2 Nov 2014 20:56:20 +0000 (12:56 -0800)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 - add the new bpf syscall to ARM.
 - drop a redundant return statement in __iommu_alloc_remap()
 - fix a performance issue noticed by Thomas Petazzoni with
   kmap_atomic().
 - fix an issue with the L2 cache OF parsing code which caused it to
   incorrectly print warnings on each boot, and make the warning text
   more consistent with the rest of the code

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8180/1: mm: implement no-highmem fast path in kmap_atomic_pfn()
  ARM: 8183/1: l2c: Improve l2c310_of_parse() error message
  ARM: 8181/1: Drop extra return statement
  ARM: 8182/1: l2c: Make l2x0_cache_size_of_parse() return 'int'
  ARM: enable bpf syscall

10 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 2 Nov 2014 20:31:02 +0000 (12:31 -0800)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "A small set of x86 fixes.  The most serious is an SRCU lockdep fix.

  A bit late - needed some time to test the SRCU fix, which only came in
  on Friday"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: vmx: defer load of APIC access page address during reset
  KVM: nVMX: Disable preemption while reading from shadow VMCS
  KVM: x86: Fix far-jump to non-canonical check
  KVM: emulator: fix execution close to the segment limit
  KVM: emulator: fix error code for __linearize

10 years agoMerge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Dave Airlie [Sun, 2 Nov 2014 19:23:17 +0000 (05:23 +1000)]
Merge branch 'exynos-drm-fixes' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-fixes

This pull-request includes some bug fixes and code cleanups.
Especially, this fixes the bind failure issue occurred when it tries
to re-bind Exynos drm driver after unbound, and the modetest failure
issue incurred by not having a pair to vblank on and off requests.

* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: correct connector->dpms field before resuming
  drm/exynos: enable vblank after DPMS on
  drm/exynos: init kms poll at the end of initialization
  drm/exynos: propagate plane initialization errors
  drm/exynos: vidi: fix build warning
  drm/exynos: remove explicit encoder/connector de-initialization
  drm/exynos: init vblank with real number of crtcs

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 2 Nov 2014 18:28:43 +0000 (10:28 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull VFS fixes from Al Viro:
 "A bunch of assorted fixes, most of them followups to overlayfs merge"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  ovl: initialize ->is_cursor
  Return short read or 0 at end of a raw device, not EIO
  isofs: don't bother with ->d_op for normal case
  isofs_cmp(): we'll never see a dentry for . or ..
  overlayfs: fix lockdep misannotation
  ovl: fix check for cursor
  overlayfs: barriers for opening upper-layer directory
  rcu: Provide counterpart to rcu_dereference() for non-RCU situations
  staging: android: logger: Fix log corruption regression

10 years agoirda: stop calling sk_prot->disconnect() on connection failure
Linus Torvalds [Sun, 2 Nov 2014 18:20:26 +0000 (10:20 -0800)]
irda: stop calling sk_prot->disconnect() on connection failure

The sk_prot is irda's own set of protocol handlers, so irda should
statically know what that function is anyway, without using an indirect
pointer.  And as it happens, we know *exactly* what that pointer is
statically: it's NULL, because irda doesn't define a disconnect
operation.

So calling that function is doubly wrong, and will just cause an oops.

Reported-by: Martin Lang <mlg.hessigheim@gmail.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrm/exynos: correct connector->dpms field before resuming
Andrzej Hajda [Fri, 10 Oct 2014 12:31:56 +0000 (14:31 +0200)]
drm/exynos: correct connector->dpms field before resuming

During system suspend after connector switch off its dpms field
is set to connector previous dpms state. To properly resume dpms field
should be set to its actual state (off) before resuming to previous dpms state.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: enable vblank after DPMS on
Andrzej Hajda [Fri, 10 Oct 2014 12:31:55 +0000 (14:31 +0200)]
drm/exynos: enable vblank after DPMS on

Before DPMS off driver disables vblank.
It should be balanced by vblank enable after DPMS on.
The patch fixes issue with page_flip ioctl not being able
to acquire vblank counter introduced by patch:
drm: Always reject drm_vblank_get() after drm_vblank_off()

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: init kms poll at the end of initialization
Andrzej Hajda [Fri, 10 Oct 2014 12:31:54 +0000 (14:31 +0200)]
drm/exynos: init kms poll at the end of initialization

HPD events can be generated by components even if drm_dev is not fully
initialized, to skip such events kms poll initialization should
be performed at the end of load callback followed directly by forced
connection detection.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: propagate plane initialization errors
Andrzej Hajda [Fri, 10 Oct 2014 12:31:53 +0000 (14:31 +0200)]
drm/exynos: propagate plane initialization errors

In case of error during plane initialization load callback
incorrectly return success, this patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: vidi: fix build warning
Inki Dae [Tue, 7 Oct 2014 15:16:34 +0000 (00:16 +0900)]
drm/exynos: vidi: fix build warning

encoder object isn't used anymore so remove it.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: remove explicit encoder/connector de-initialization
Andrzej Hajda [Mon, 22 Sep 2014 09:30:48 +0000 (11:30 +0200)]
drm/exynos: remove explicit encoder/connector de-initialization

All KMS objects are destroyed by drm_mode_config_cleanup in proper order
so component drivers should not care about it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: init vblank with real number of crtcs
Andrzej Hajda [Tue, 7 Oct 2014 13:09:14 +0000 (22:09 +0900)]
drm/exynos: init vblank with real number of crtcs

Initialization of vblank with MAX_CRTC caused attempts
to disabling vblanks for non-existing crtcs in case
drm used fewer crtcs. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoKVM: vmx: defer load of APIC access page address during reset
Paolo Bonzini [Sun, 2 Nov 2014 06:54:30 +0000 (07:54 +0100)]
KVM: vmx: defer load of APIC access page address during reset

Most call paths to vmx_vcpu_reset do not hold the SRCU lock.  Defer loading
the APIC access page to the next vmentry.

This avoids the following lockdep splat:

[ INFO: suspicious RCU usage. ]
3.18.0-rc2-test2+ #70 Not tainted
-------------------------------
include/linux/kvm_host.h:474 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
1 lock held by qemu-system-x86/2371:
 #0:  (&vcpu->mutex){+.+...}, at: [<ffffffffa037d800>] vcpu_load+0x20/0xd0 [kvm]

stack backtrace:
CPU: 4 PID: 2371 Comm: qemu-system-x86 Not tainted 3.18.0-rc2-test2+ #70
Hardware name: Dell Inc. OptiPlex 9010/0M9KCM, BIOS A12 01/10/2013
 0000000000000001 ffff880209983ca8 ffffffff816f514f 0000000000000000
 ffff8802099b8990 ffff880209983cd8 ffffffff810bd687 00000000000fee00
 ffff880208a2c000 ffff880208a10000 ffff88020ef50040 ffff880209983d08
Call Trace:
 [<ffffffff816f514f>] dump_stack+0x4e/0x71
 [<ffffffff810bd687>] lockdep_rcu_suspicious+0xe7/0x120
 [<ffffffffa037d055>] gfn_to_memslot+0xd5/0xe0 [kvm]
 [<ffffffffa03807d3>] __gfn_to_pfn+0x33/0x60 [kvm]
 [<ffffffffa0380885>] gfn_to_page+0x25/0x90 [kvm]
 [<ffffffffa038aeec>] kvm_vcpu_reload_apic_access_page+0x3c/0x80 [kvm]
 [<ffffffffa08f0a9c>] vmx_vcpu_reset+0x20c/0x460 [kvm_intel]
 [<ffffffffa039ab8e>] kvm_vcpu_reset+0x15e/0x1b0 [kvm]
 [<ffffffffa039ac0c>] kvm_arch_vcpu_setup+0x2c/0x50 [kvm]
 [<ffffffffa037f7e0>] kvm_vm_ioctl+0x1d0/0x780 [kvm]
 [<ffffffff810bc664>] ? __lock_is_held+0x54/0x80
 [<ffffffff812231f0>] do_vfs_ioctl+0x300/0x520
 [<ffffffff8122ee45>] ? __fget+0x5/0x250
 [<ffffffff8122f0fa>] ? __fget_light+0x2a/0xe0
 [<ffffffff81223491>] SyS_ioctl+0x81/0xa0
 [<ffffffff816fed6d>] system_call_fastpath+0x16/0x1b

Reported-by: Takashi Iwai <tiwai@suse.de>
Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Reviewed-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Tested-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Fixes: 38b9917350cb2946e368ba684cfc33d1672f104e
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 years agoKVM: nVMX: Disable preemption while reading from shadow VMCS
Jan Kiszka [Wed, 8 Oct 2014 16:05:39 +0000 (18:05 +0200)]
KVM: nVMX: Disable preemption while reading from shadow VMCS

In order to access the shadow VMCS, we need to load it. At this point,
vmx->loaded_vmcs->vmcs and the actually loaded one start to differ. If
we now get preempted by Linux, vmx_vcpu_put and, on return, the
vmx_vcpu_load will work against the wrong vmcs. That can cause
copy_shadow_to_vmcs12 to corrupt the vmcs12 state.

Fix the issue by disabling preemption during the copy operation.
copy_vmcs12_to_shadow is safe from this issue as it is executed by
vmx_vcpu_run when preemption is already disabled before vmentry.

This bug is exposed by running Jailhouse within KVM on CPUs with
shadow VMCS support.  Jailhouse never expects an interrupt pending
vmexit, but the bug can cause it if, after copy_shadow_to_vmcs12
is preempted, the active VMCS happens to have the virtual interrupt
pending flag set in the CPU-based execution controls.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 years agoKVM: x86: Fix far-jump to non-canonical check
Nadav Amit [Mon, 27 Oct 2014 22:03:43 +0000 (00:03 +0200)]
KVM: x86: Fix far-jump to non-canonical check

Commit d1442d85cc30 ("KVM: x86: Handle errors when RIP is set during far
jumps") introduced a bug that caused the fix to be incomplete.  Due to
incorrect evaluation, far jump to segment with L bit cleared (i.e., 32-bit
segment) and RIP with any of the high bits set (i.e, RIP[63:32] != 0) set may
not trigger #GP.  As we know, this imposes a security problem.

In addition, the condition for two warnings was incorrect.

Fixes: d1442d85cc30ea75f7d399474ca738e0bc96f715
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
[Add #ifdef CONFIG_X86_64 to avoid complaints of undefined behavior. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>