pandora-kernel.git
10 years agousb: renesas_usbhs: tidyup original usbhsx_for_each_xxx macro
Kuninori Morimoto [Fri, 12 Jul 2013 05:32:31 +0000 (22:32 -0700)]
usb: renesas_usbhs: tidyup original usbhsx_for_each_xxx macro

Current usbhsx_for_each_xxx macro will read out-of-array's
memory after last loop operation.
It was not good C language operation, and the binary which was
compiled by (at least) gcc 4.8.1 is broken
This patch tidyup these issues

Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Reviewed-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: omap-usb3: Improve DPLL parameter lookup code
Roger Quadros [Tue, 9 Jul 2013 11:38:31 +0000 (14:38 +0300)]
usb: phy: omap-usb3: Improve DPLL parameter lookup code

Use a mapping table (dpll_map) to match the possible system clock rates
to the appropriate DPLL parameters.

Introduce a function "omap_usb3_get_dpll_params()" that will
return the matching DPLL parameters for the given clock rate.

Also, bail out on phy init if DPLL locking fails.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: ehci-omap: select NOP_USB_XCEIV PHY driver
Roger Quadros [Fri, 14 Jun 2013 09:51:42 +0000 (12:51 +0300)]
usb: ehci-omap: select NOP_USB_XCEIV PHY driver

ehci-omap needs NOP_USB_XCEIV PHY driver to function
properly, so select it. As the USB PHY drivers no longer
depend on USB_PHY, it is safe to select the PHY drivers.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: make PHY driver selection possible by controller drivers
Roger Quadros [Fri, 14 Jun 2013 09:51:41 +0000 (12:51 +0300)]
usb: phy: make PHY driver selection possible by controller drivers

Convert PHY Drivers from menuconfig to menu so that the PHY drivers
can be explicitely selected by the controller drivers.

USB_PHY is no longer a user visible option. It is upto to the PHY
drivers to select it if needed. This patch does so for the existing
PHY drivers that use the USB_PHY library.

Doing so moves the USB_PHY and PHY driver selection problem from the
end user to the PHY and controller driver developer.

e.g.

Earlier, a controller driver (e.g. EHCI_OMAP) that needs to select
a PHY driver (e.g. NOP_PHY) couldn't do so because the PHY driver
depended on USB_PHY. Making the controller driver depend on USB_PHY
has a negative effect i.e. it becomes invisible to the user till
USB_PHY is enabled. Most end users will not familiar with this.

With this patch, the end user just needs to select the controller driver
needed for his/her platform without worrying about which PHY driver to
select.

Also update USB_EHCI_MSM, USB_LPC32XX and USB_OMAP to not depend
on USB_PHY any more. They can safely select the necessary PHY drivers.

[ balbi@ti.com : refreshed on top of my next branch. Changed bool
followed by default n into def_bool n ]

CC: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: ep0: don't change to configured state too early
Felipe Balbi [Mon, 22 Jul 2013 09:41:47 +0000 (12:41 +0300)]
usb: dwc3: ep0: don't change to configured state too early

before changing to configured state, we need
to wait until gadget driver has had a chance
to process the request.

In case of USB_GADGET_DELAYED_STATUS, that means
we need to defer usb_gadget_set_state() until
the upcoming usb_ep_queue().

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: ep0: only change to ADDRESS if set_config() succeeds
Felipe Balbi [Mon, 22 Jul 2013 09:31:31 +0000 (12:31 +0300)]
usb: dwc3: ep0: only change to ADDRESS if set_config() succeeds

In case we're switching back to USB_STATE_ADDRESS
from USB_STATE_CONFIGURED (if host sends
a set configuration command for configuration
zero), we should only switch if the request
is successfully processed by the gadget driver.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: udc-core: move sysfs_notify() to a workqueue
Felipe Balbi [Wed, 17 Jul 2013 08:09:49 +0000 (11:09 +0300)]
usb: gadget: udc-core: move sysfs_notify() to a workqueue

usb_gadget_set_state() will call sysfs_notify()
which might sleep. Some users might want to call
usb_gadget_set_state() from the very IRQ handler
which actually changes the gadget state.

Instead of having every UDC driver add their own
workqueue for such a simple notification, we're
adding it generically to our struct usb_gadget,
so the details are hidden from all UDC drivers.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: fix typo in comment of dwc3_ep
Huang Rui [Wed, 12 Jun 2013 15:43:11 +0000 (23:43 +0800)]
usb: dwc3: fix typo in comment of dwc3_ep

Change intervall into interval.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: introduce dwc3_process_event_buf
Felipe Balbi [Wed, 12 Jun 2013 18:25:08 +0000 (21:25 +0300)]
usb: dwc3: gadget: introduce dwc3_process_event_buf

in order to make our IRQ handler thread easier
to read, we re-factor the inner loop to a separate
function.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: rename dwc3_process_event_buf
Felipe Balbi [Wed, 12 Jun 2013 18:16:11 +0000 (21:16 +0300)]
usb: dwc3: gadget: rename dwc3_process_event_buf

that function isn't really processing any event
buffer, rather just checking whether it contains
events to be processed.

Due to that reason, we're reaning it to dwc3_check_event_buf()
instead.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: get rid of IRQF_ONESHOT
Felipe Balbi [Wed, 12 Jun 2013 18:11:14 +0000 (21:11 +0300)]
usb: dwc3: gadget: get rid of IRQF_ONESHOT

We can make use of bit 31 of the GEVNTSIZ(n)
registers to mask/unmask interrupts from that
particular interrupter.

With that feature, we can easily drop IRQF_ONESHOT
from our driver which makes it possible to
properly change IRQ priorities when using RT
patchset *and* it allows us to make use of the
scheduler to choose the proper time to handle
this IRQ thread.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: core: introduce and use macros for Event Size register
Felipe Balbi [Wed, 12 Jun 2013 18:09:26 +0000 (21:09 +0300)]
usb: dwc3: core: introduce and use macros for Event Size register

That register has more than just the event buffer
size; we can also mask and unmask that particular
interrupter on bit 31 of that register.

In this patch we introduce the necessary macros
and make sure to use the new macros while also
making sure we mask interrupts during driver
removal.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: don't enable LPM early
Felipe Balbi [Mon, 15 Jul 2013 08:31:27 +0000 (11:31 +0300)]
usb: dwc3: gadget: don't enable LPM early

LPM is enabled in Connection Done interrupt,
there's no need to enable it early.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: core: don't redefine DWC3_DCFG_LPM_CAP
Felipe Balbi [Mon, 15 Jul 2013 08:30:45 +0000 (11:30 +0300)]
usb: dwc3: core: don't redefine DWC3_DCFG_LPM_CAP

the macro DWC3_DCFG_LPM_CAP was defined twice.

This patch just removes one of the definitions,
no functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: add a debugging print when initializing endpoints
Felipe Balbi [Fri, 12 Jul 2013 16:11:57 +0000 (19:11 +0300)]
usb: dwc3: gadget: add a debugging print when initializing endpoints

that way we get debugging information when
enabling verbose debug of the driver.

It will be no-op otherwise.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: move direction setting up
Felipe Balbi [Fri, 12 Jul 2013 16:10:59 +0000 (19:10 +0300)]
usb: dwc3: gadget: move direction setting up

no functional changes, just grouping dep
initialization.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: move debugging print around
Felipe Balbi [Fri, 12 Jul 2013 16:09:39 +0000 (19:09 +0300)]
usb: dwc3: gadget: move debugging print around

by moving that dev_vdbg() to the internal
__dwc3_gadget_ep_enable() we get the print
even when enable ep0, which calls the internal
function directly.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: core: switch over to devm_ioremap_resource()
Felipe Balbi [Fri, 12 Jul 2013 12:34:12 +0000 (15:34 +0300)]
usb: dwc3: core: switch over to devm_ioremap_resource()

use the new devm_ioremap_resource() on core.c

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: omap: switch over to devm_ioremap_resource()
Felipe Balbi [Fri, 12 Jul 2013 12:33:35 +0000 (15:33 +0300)]
usb: dwc3: omap: switch over to devm_ioremap_resource()

use the new devm_ioremap_resource on dwc3-omap.c

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: drop dwc3 manual phy control
Felipe Balbi [Fri, 12 Jul 2013 10:19:52 +0000 (13:19 +0300)]
usb: dwc3: gadget: drop dwc3 manual phy control

Recent versions of the core, can suspend and resume
the PHYs automatically, so we don't need to fiddle
with dwc3's Global PHY registers at all.

On versions prior to 1.94a this patch will mean
that we will never ask dwc3 to suspend the PHY.

This is an acceptable behavior or such old versions
of the core, specially considering that the only
chip known to have a version prior to 1.94a was
OMAP5 ES1.0 and that's not supported in mainline
kernel, because it was just a test spin of OMAP5.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: adapt to use dr_mode device tree helper
Ruchika Kharwar [Sat, 6 Jul 2013 12:52:49 +0000 (07:52 -0500)]
usb: dwc3: adapt to use dr_mode device tree helper

This patch adapts the dwc3 to use the device tree helper
"of_usb_get_dr_mode" for the mode of operation of the dwc3 instance
being probed.

[ balbi@ti.com : make of_usb_get_dr_mode() conditional on
dev->of_node and let pdata pass dr_mode too ]

Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: phy-mxs-usb: Check the return value from stmp_reset_block()
Fabio Estevam [Wed, 3 Jul 2013 19:34:13 +0000 (16:34 -0300)]
usb: phy: phy-mxs-usb: Check the return value from stmp_reset_block()

stmp_reset_block() may fail, so let's check its return value and propagate it
in the case of error.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: get rid of unused proc_dir_entry
Greg Kroah-Hartman [Tue, 2 Jul 2013 04:34:58 +0000 (21:34 -0700)]
usb: musb: get rid of unused proc_dir_entry

The musb driver no longer uses procfs, so get rid of the proc_dir_entry
variable in struct musb.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: s3c-hsotg: Allow driver instantiation using device tree
Tomasz Figa [Tue, 25 Jun 2013 15:38:23 +0000 (17:38 +0200)]
usb: gadget: s3c-hsotg: Allow driver instantiation using device tree

This patch adds OF match table to the driver to allow instantiating it
using device tree.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: core: switch to snps,dwc3
Felipe Balbi [Tue, 2 Jul 2013 18:20:24 +0000 (21:20 +0300)]
usb: dwc3: core: switch to snps,dwc3

all other drivers using Synopsys IPs with DT
have a compatible of snps,$driver, in order
to add consistency, we are switching over to
snps,dwc3 but keeping synopsys,dwc3 in the core
driver to maintain backwards compatibility.

New DTS bindings should NOT use synopsys,dwc3.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: make maximum-speed a per-instance attribute
Felipe Balbi [Sun, 30 Jun 2013 11:29:51 +0000 (14:29 +0300)]
usb: dwc3: make maximum-speed a per-instance attribute

in order to allow different instances of the
core work in different maximum speeds, we will
move the maximum_speed module_parameter to
both DeviceTree (making use the new maximum-speed
DT property) and platform_data.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: let non-DT platforms pass tx-fifo-resize flag;
Felipe Balbi [Sun, 30 Jun 2013 11:19:33 +0000 (14:19 +0300)]
usb: dwc3: let non-DT platforms pass tx-fifo-resize flag;

in case we're not in a DT boot, we should
still be able to tell the driver how to behave.

In order to be able to pass flags to the driver,
we introduce platform_data structure which the
core driver should use.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: common: introduce of_usb_get_maximum_speed()
Felipe Balbi [Sun, 30 Jun 2013 10:56:45 +0000 (13:56 +0300)]
usb: common: introduce of_usb_get_maximum_speed()

this helper will be used for controllers which
want to work at a lower speed even though they
support higher USB transfer rates.

One such case is Texas Instruments' AM437x
SoC where it uses a USB3 controller without
a USB3 PHY, rendering the controller USB2-only.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: protect against NULL phy pointers
Felipe Balbi [Sun, 30 Jun 2013 12:27:26 +0000 (15:27 +0300)]
usb: phy: protect against NULL phy pointers

In order to decrease the amount of work done
by PHY users, allow NULL phy pointers to be
passed.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: switch to GPL v2 only
Felipe Balbi [Sun, 30 Jun 2013 11:15:11 +0000 (14:15 +0300)]
usb: dwc3: switch to GPL v2 only

This is a Linux-only driver which makes use
of GPL-only symbols. It makes no sense to
maintain Dual BSD/GPL licensing for this driver.

Considering that the amount of work to use this
driver in any different operating system would likely
be as large as developing the driver from scratch and
considering that we depend on GPL-only symbols, we
will switch over to a GPL v2-only license.

Cc: Anton Tikhomirov <av.tikhomirov@samsung.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: clean up redundant parameter comment
Huang Rui [Wed, 26 Jun 2013 17:08:10 +0000 (01:08 +0800)]
usb: dwc3: clean up redundant parameter comment

@list is not as a parameter of dwc3_event_buffer, so remove it in
comments.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: don't request IRQs in atomic
Felipe Balbi [Thu, 27 Jun 2013 07:00:18 +0000 (10:00 +0300)]
usb: dwc3: gadget: don't request IRQs in atomic

We cannot request an IRQ with spinlocks held
as that would trigger a sleeping inside
spinlock warning.

Cc: <stable@vger.kernel.org> # v3.10
Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: remove imx_udc
Felipe Balbi [Thu, 27 Jun 2013 07:20:44 +0000 (10:20 +0300)]
usb: gadget: remove imx_udc

That driver hasn't been really maintained for
a long time. It doesn't compile in any way, it
includes non-existent headers, has no users,
and is just plain broken.

The person who used to work with that driver
has publicly stated that he has no plans to
touch that driver again and is ok with removal[1].

Due to these factors, imx_udc is now removed from
the tree, if someone really believe it needs to
be kept, please fix the bugs in that driver.

[1] http://marc.info/?l=linux-usb&m=136197620417636&w=2

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: make glue layers selectable
Felipe Balbi [Wed, 26 Jun 2013 12:14:06 +0000 (15:14 +0300)]
usb: dwc3: make glue layers selectable

Glue layers are starting to have separate
requirements. For example, OMAP's glue layer
is starting to use extcon framework which
no one else needs.

In order to make it clear the proper dependencies,
we are now allowing glue layers to be selectable
so that each glue layer can list their own dependencies
without messing with the core IP driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: unmap reqs in musb_gadget_queue()'s error case
Sebastian Andrzej Siewior [Wed, 19 Jun 2013 15:38:15 +0000 (17:38 +0200)]
usb: musb: unmap reqs in musb_gadget_queue()'s error case

If the descriptor is missing the reqeust is never unmapped. This patch
changes this and renames the cleanup label to unlock since there is no
cleanup done. The cleanup would revert the allocation of ressource (i.e.
this dma mapping) but it does not, it simply unlocks and returns.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: core: call dma_controller_destroy() in the err path
Sebastian Andrzej Siewior [Wed, 19 Jun 2013 15:38:14 +0000 (17:38 +0200)]
usb: musb: core: call dma_controller_destroy() in the err path

The cleanup in the error is missing the dma controller. The structure is
allocated at runtime and ux500 allocates even a little more than just
this struct. So cleanup!

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: remove a few is_dma_capable() in init/exit code
Sebastian Andrzej Siewior [Wed, 19 Jun 2013 15:38:13 +0000 (17:38 +0200)]
usb: musb: remove a few is_dma_capable() in init/exit code

This patch removes is_dma_capable() and an ifdef in the init/exit path
around init/de-init of the dma_controller. Since we have the empty stubs
in the PIO code we can call it without gcc trouble. Earlier we had an
ifdef and the is_dma_capable() macro where gcc ignored the if (0) path
even that the function was not around :)

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: provide empty dma_controller_create() in PIO mode
Sebastian Andrzej Siewior [Wed, 19 Jun 2013 15:38:12 +0000 (17:38 +0200)]
usb: musb: provide empty dma_controller_create() in PIO mode

Add a dma_controller_create() returning NULL so a few ifdefs can
dropped.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: dma: merge ->start/stop into create/destroy
Sebastian Andrzej Siewior [Wed, 19 Jun 2013 15:38:11 +0000 (17:38 +0200)]
usb: musb: dma: merge ->start/stop into create/destroy

The core code creates a controller and immediately after that it calls
the ->start() callback. This one might drop an error but nobody cares.
The same thing happens in the destroy corner: First ->stop() called
followed by destroy callback. So why not merge those two into the same
function since there is no difference.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: musbhsdma: drop the controller check in dma_controller_destroy()
Sebastian Andrzej Siewior [Wed, 19 Jun 2013 15:38:10 +0000 (17:38 +0200)]
usb: musb: musbhsdma: drop the controller check in dma_controller_destroy()

This check is hardly required and alas is wrong. 'c' might be NULL but
the chances are low that 'controller' after the container_of() becomes
NULL.

Since no other DMA implementation is doing that and musb-core does not
call it with a NULL pointer it can dropped.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: replace ifndef with ifdef for CONFIG_MUSB_PIO_ONLY
Sebastian Andrzej Siewior [Wed, 19 Jun 2013 15:38:09 +0000 (17:38 +0200)]
usb: musb: replace ifndef with ifdef for CONFIG_MUSB_PIO_ONLY

The ifdef reads somehow better than an ifndef

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agoLinux 3.11-rc3 v3.11-rc3
Linus Torvalds [Mon, 29 Jul 2013 03:53:33 +0000 (20:53 -0700)]
Linux 3.11-rc3

10 years agoMerge tag 'pinctrl-for-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 29 Jul 2013 01:19:27 +0000 (18:19 -0700)]
Merge tag 'pinctrl-for-v3.11-2' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 - Driver fixes for AM33xx, SIRF and PFC pin controllers
 - Fix a compile warning from the pinctrl single-register driver
 - Fix a little nasty memory leak

* tag 'pinctrl-for-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: fix a memleak when freeing maps
  pinctrl: pinctrl-single: fix compile warning when no CONFIG_PM
  pinctrl: sh-pfc: fix SDHI0 VccQ regulator on sh73a0 with DT
  arm/dts: sirf: fix the pingroup name mismatch between drivers and dts
  pinctrl: sirf: add usp0_uart_nostreamctrl pin group for usp-uart without flowctrl
  pinctrl: sirf: fix the pin number and mux bit for usp0
  pinctrl: am33xx dt binding: correct include path

10 years agoMerge tag 'trace-fixes-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 29 Jul 2013 01:10:39 +0000 (18:10 -0700)]
Merge tag 'trace-fixes-3.11-rc2' of git://git./linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
 "Oleg is working on fixing a very tight race between opening a event
  file and deleting that event at the same time (both must be done as
  root).

  I also found a bug while testing Oleg's patches which has to do with a
  race with kprobes using the function tracer.

  There's also a deadlock fix that was introduced with the previous
  fixes"

* tag 'trace-fixes-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Remove locking trace_types_lock from tracing_reset_all_online_cpus()
  ftrace: Add check for NULL regs if ops has SAVE_REGS set
  tracing: Kill trace_cpu struct/members
  tracing: Change tracing_fops/snapshot_fops to rely on tracing_get_cpu()
  tracing: Change tracing_entries_fops to rely on tracing_get_cpu()
  tracing: Change tracing_stats_fops to rely on tracing_get_cpu()
  tracing: Change tracing_buffers_fops to rely on tracing_get_cpu()
  tracing: Change tracing_pipe_fops() to rely on tracing_get_cpu()
  tracing: Introduce trace_create_cpu_file() and tracing_get_cpu()

10 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Mon, 29 Jul 2013 01:09:34 +0000 (18:09 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is five bug fixes, two of which fix long standing problems
  causing crashes (sd and mvsas).  The remaining three are hung (isci
  race) or lost (qla2xxx, isci) devices"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] isci: fix breakage caused by >16byte CDB patch
  [SCSI] mvsas: Fix kernel panic on tile due to unaligned data access
  [SCSI] sd: fix crash when UA received on DIF enabled device
  [SCSI] qla2xxx: Properly set the tagging for commands.
  [SCSI] isci: Fix a race condition in the SSP task management path

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 26 Jul 2013 21:40:10 +0000 (14:40 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "This is just a regular fixes pull apart from the qxl one, it has
  radeon and intel bits in it,

  The intel fixes are for a regression with the RC6 fix and a 3.10 hdmi
  regression, whereas radeon is more DPM fixes, a few lockup fixes and
  some rn50/r100 DAC fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/dpm: fix r600_enable_sclk_control()
  drm/radeon/dpm: implement force performance levels for rv6xx
  drm/radeon/dpm: fix displaygap programming on rv6xx
  drm/radeon/dpm: fix a typo in the rv6xx mclk setup
  drm/i915: initialize gt_lock early with other spin locks
  drm/i915: fix hdmi portclock limits
  drm/radeon: fix combios tables on older cards
  drm/radeon: improve dac adjust heuristics for legacy pdac
  drm/radeon: Another card with wrong primary dac adj
  drm/radeon: fix endian issues with DP handling (v3)
  drm/radeon/vm: only align the pt base to 32k
  drm/radeon: wait for 3D idle before using CP DMA

10 years agoMerge branch 'qxl-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 26 Jul 2013 21:38:50 +0000 (14:38 -0700)]
Merge branch 'qxl-fixes' of git://people.freedesktop.org/~airlied/linux

Pull qxl drm fixes from Dave Airlie:
 "Okay as I warned, the qxl driver was running a bit free and loose with
  its ttm object reservations and the new lockdep enabled reservation
  tracking shone a bright light into it, it also with the new
  reservations mutexes hits a possible deadlock during boot.

  The first patch is a real fix to render the console correctly as the
  driver used to just drop irq renderering as too hard, this also fixes
  a sleeping while atomic warning.

  The other two patches are the big ugly ones that redo how the driver
  allocates objects and reserves them and makes things all work
  properly, I've tested this in a VM, and compared to the current code
  which hits a lockdep warning and the sleep while atomic warning before
  failing.

  So sorry this is coming in late, I should have tested qxl before
  merging the mutex code, but I'd rather just fix qxl with this than
  revert the reservations code at this point"

* 'qxl-fixes' of git://people.freedesktop.org/~airlied/linux:
  qxl: convert qxl driver to proper use for reservations
  qxl: allow creation of pre-pinned objects and use for releases.
  drm/qxl: add delayed fb operations

10 years agoMerge tag 'pm+acpi-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 26 Jul 2013 21:37:18 +0000 (14:37 -0700)]
Merge tag 'pm+acpi-3.11-rc3' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:
 "These are just two fixes, a revert of the would-be backlight fix that
  didn't work and an intel_pstate fix for two problems related to
  maximum P-state selection.

  Specifics:

   - Revert of the ACPI video commit that I hoped would help fix
     backlight problems related to Windows 8 compatibility on some
     systems.  Unfortunately, it turned out to cause problems to happen
     too.

   - Fix for two problems in intel_pstate, a possible failure to respond
     to a load change on a quiet system and a possible failure to select
     the highest available P-state on some systems.  From Dirk
     Brandewie"

* tag 'pm+acpi-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  Revert "ACPI / video / i915: No ACPI backlight if firmware expects Windows 8"
  cpufreq / intel_pstate: Change to scale off of max P-state

10 years agoMerge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas...
Linus Torvalds [Fri, 26 Jul 2013 19:43:59 +0000 (12:43 -0700)]
Merge tag 'arm64-stable' of git://git./linux/kernel/git/cmarinas/linux-aarch64

Pull arm64 fixes from Catalin Marinas:
 - Stack size increased to 16K (similar to other 64-bit architectures)
 - Additional cache flushing for secondary CPUs boot mode

* tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  arm64: Change kernel stack size to 16K
  arm64: Fix definition of arm_pm_restart to match the declaration
  arm64: virt: ensure visibility of __boot_cpu_mode

10 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Fri, 26 Jul 2013 19:42:40 +0000 (12:42 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "This is a largeish batch of fixes, mostly because I missed -rc2 due to
  travel/vacation.  So in number these are a bit more than ideal unless
  you amortize them over two -rcs.

  Quick breakdown:
   - Defconfig updates
     - Making multi_v7_defconfig useful on more hardware to encourage
       single-image usage
     - Davinci and nomadik updates due to new code merged this merge
       window
   - Fixes for UART on Samsung platforms, both PM and clock-related
   - A handful of warning fixes from defconfig builds, including for
     max8925 backlight and pxamci (both with appropriate acks)
   - Exynos5440 fixes for LPAE configuration, PM
   - ...plus a bunch of other smaller changes all over the place

  I expect to switch to regressions-or-severe-bugs-only fixes from here
  on out"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
  mfd: max8925: fix dt code for backlight
  ARM: omap5: Only select errata 798181 if SMP
  ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos
  ARM: EXYNOS: Fix low level debug support
  ARM: SAMSUNG: Save/restore only selected uart's registers
  ARM: SAMSUNG: Add SAMSUNG_PM config option to select pm
  ARM: S3C24XX: Add missing clkdev entries for s3c2440 UART
  ARM: multi_v7_defconfig: Select USB chipidea driver
  ARM: pxa: propagate errors from regulator_enable() to pxamci
  ARM: zynq: fix compilation warning
  ARM: keystone: fix compilation warning
  ARM: highbank: Only touch common coherency control register fields
  ARM: footbridge: fix overlapping PCI mappings
  dmaengine: shdma: fix a build failure on platforms with no DMA support
  ARM: STi: Set correct ARM ERRATAs.
  ARM: dts: STi: Fix pinconf setup for STiH416 serial2
  ARM: nomadik: configure for NO_HZ and HRTIMERS
  ARM: nomadik: update defconfig base
  ARM: nomadik: Update MMC defconfigs
  ARM: davinci: defconfig: enable EDMA driver
  ...

10 years agoMerge tag 'usb-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Fri, 26 Jul 2013 18:38:13 +0000 (11:38 -0700)]
Merge tag 'usb-3.11-rc3' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are a number of USB fixes for 3.11-rc3.

  Lots of little things, nothing major.  A number of new device ids,
  build fixes for DMA, and a bunch of other minor things.  All of these
  have been in the linux-next tree"

* tag 'usb-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (40 commits)
  usb: Clear both buffers when clearing a control transfer TT buffer.
  usb/gadget: free opts struct on error recovery
  USB: mos7840: fix memory leak in open
  usb: serial: option.c: remove ONDA MT825UP product ID fromdriver
  usb: serial: option: add Olivetti Olicard 200
  usb: serial: option: blacklist ONDA MT689DC QMI interface
  xhci: fix null pointer dereference on ring_doorbell_for_active_rings
  usb: host: xhci: Enable XHCI_SPURIOUS_SUCCESS for all controllers with xhci 1.0
  usb: fix build warning in pci-quirks.h when CONFIG_PCI is not enabled
  usb: xhci: Mark two functions __maybe_unused
  xhci: Avoid NULL pointer deref when host dies.
  usb: serial: option: Add ONYX 3G device support
  USB: ti_usb_3410_5052: fix dynamic-id matching
  usb: option: add TP-LINK MA260
  USB: option: add D-Link DWM-152/C1 and DWM-156/C1
  USB: EHCI: Fix resume signalling on remote wakeup
  USB: cp210x: add MMB and PI ZigBee USB Device Support
  usb: cp210x support SEL C662 Vendor/Device
  USB: option: append Petatel NP10T device to GSM modems list
  USB: misc: Add Manhattan Hi-Speed USB DVI Converter to sisusbvga
  ...

10 years agoMerge tag 'tty-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Fri, 26 Jul 2013 18:37:41 +0000 (11:37 -0700)]
Merge tag 'tty-3.11-rc3' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are 3 fixes for TTY and serial issues that have been reported.
  Nothing huge, but nice to get fixed"

* tag 'tty-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: tegra: correct help message in Kconfig from 'ttyHS' to 'ttyTHS'
  tty/8250_early: Don't truncate last character of options
  TTY: snyclinkmp: calculating wrong addresses

10 years agoMerge tag 'staging-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Fri, 26 Jul 2013 18:36:51 +0000 (11:36 -0700)]
Merge tag 'staging-3.11-rc3' of git://git./linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
 "Here are some tiny drivers/staging/ fixes for 3.11-rc3

  A number of bugfixes, all pretty tiny, but resolve issues that have
  been reported (the kstrtos32 change fixes a data corruption problem
  that Dan found).  And a MAINTAINERS file update for the comedi
  drivers"

* tag 'staging-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  MAINTAINERS: Update the list of maintainers for staging/comedi driver.
  staging: tidspbridge: replace strict_strtol() with kstrtos32()
  staging: android: logger: Correct write offset reset on error
  staging: zram: protect zram_reset_device() call
  staging: gdm72xx: potential use after free in send_qos_list()
  staging: drm/imx: drop "select OF_VIDEOMODE"
  staging: frontier: use after free in disconnect()
  staging: comedi: fix a race between do_cmd_ioctl() and read/write
  staging: comedi: COMEDI_CANCEL ioctl should wake up read/write

10 years agoMerge tag 'char-misc-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Fri, 26 Jul 2013 18:36:12 +0000 (11:36 -0700)]
Merge tag 'char-misc-3.11-rc3' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc patches from Greg KH:
 "Here are some char/misc patches for 3.11-rc3.  It's pretty much just:
   - mei fixes
   - hyperv fixes
   - new ja_JP translation update
  all tiny stuff, but fixes for issues people have reported."

* tag 'char-misc-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  HOWTO ja_JP sync
  mei: me: fix waiting for hw ready
  mei: don't have to clean the state on power up
  mei: me: fix reset state machine
  mei: hbm: fix typo in error message
  Tools: hv: KVP: Fix a bug in IPV6 subnet enumeration
  Drivers: hv: balloon: Do not post pressure status if interrupted
  Drivers: hv: balloon: Fix a bug in the hot-add code
  Drivers: hv: vmbus: incorrect device name is printed when child device is unregistered

10 years agoMerge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 26 Jul 2013 18:25:25 +0000 (11:25 -0700)]
Merge tag 'sound-3.11' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Just a handful of regression and small fixes in ASoC, HD-audio and
  USB-audio drivers.

   - Sigmetal HD-audio codec regression fixes
   - A copule of XRUN indication fixes for usb-audio devices
   - ASoC: ep93xx build fix, sgtl5000 fix for probe order changes,
     max98088 register access fix, etc"

* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hiface: return correct XRUN indication
  ASoC: tegra: correct playback_dma_data setup
  ASoC: core: double free in snd_soc_add_platform()
  ALSA: usb-audio: 6fire: return correct XRUN indication
  ASoC: ep93xx: fix build of ep93xx-ac97.c
  ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop
  ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs
  ASoC: atmel-ssc: remove clk_disable_unprepare call from critical section
  ASoC: sgtl5000: defer the probe if clock is not found
  ASoC: max98088 - fix element type of the register cache.

10 years agoMerge tag 'for-linus-v3.11-rc3' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 26 Jul 2013 18:22:54 +0000 (11:22 -0700)]
Merge tag 'for-linus-v3.11-rc3' of git://oss.sgi.com/xfs/xfs

Pull xfs fix from Ben Myers:
 "Fix for regression in commit cca9f93a52d2 ("xfs: don't do IO when
  creating an new inode"), recovery causing filesystem corruption after
  a crash"

* tag 'for-linus-v3.11-rc3' of git://oss.sgi.com/xfs/xfs:
  xfs: di_flushiter considered harmful

10 years agoMerge branch 'for-3.11' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Fri, 26 Jul 2013 18:21:43 +0000 (11:21 -0700)]
Merge branch 'for-3.11' of git://linux-nfs.org/~bfields/linux

Pull nfsd fix from Bruce Fields:
 "One more nfsd bugfix for 3.11"

* 'for-3.11' of git://linux-nfs.org/~bfields/linux:
  nfsd: nfsd_open: when dentry_open returns an error do not propagate as struct file

10 years agoMerge tag 'md/3.11-fixes' of git://neil.brown.name/md
Linus Torvalds [Fri, 26 Jul 2013 18:20:10 +0000 (11:20 -0700)]
Merge tag 'md/3.11-fixes' of git://neil.brown.name/md

Pull md fixes from Neil Brown:
 "Two more bugfixes for md in 3.11

  Both marked for -stable, both since 3.3.  I guess I should spend more
  time testing..."

* tag 'md/3.11-fixes' of git://neil.brown.name/md:
  md/raid5: fix interaction of 'replace' and 'recovery'.
  md/raid10: remove use-after-free bug.

10 years agoMerge branch 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Fri, 26 Jul 2013 18:17:46 +0000 (11:17 -0700)]
Merge branch 'for-3.11-fixes' of git://git./linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "Assorted libata updates.

  The most critical one is a fix for ahci oops during boot.  Also, a new
  smallish platform ahci driver is added and sata_inic162x is marked
  clearly as experimental (it whines during boot too) as data corruption
  seems rather common on the device and it's unlikely to get any love in
  the foreseeable future.  If the whining doesn't draw any attention, I
  think we'd probably be better of making the driver depend on BROKEN in
  a couple releases"

This is v2 of this pull request with fixed dependencies for ahci_imx.

* 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ahci_imx: depend on CONFIG_MFD_SYSCON
  ahci_imx: add ahci sata support on imx platforms
  ARM: imx6q: update the sata bits definitions of gpr13
  ahci: fix Null pointer dereference in achi_host_active()
  libata: make it clear that sata_inic162x is experimental
  libata: replace strict_strtol() with kstrtol()
  ata: Fix DVD not dectected at some platform with Wellsburg PCH

10 years agoRevert "ACPI / video / i915: No ACPI backlight if firmware expects Windows 8"
Rafael J. Wysocki [Thu, 25 Jul 2013 19:43:39 +0000 (21:43 +0200)]
Revert "ACPI / video / i915: No ACPI backlight if firmware expects Windows 8"

We attempted to address a regression introduced by commit a57f7f9
(ACPICA: Add Windows8/Server2012 string for _OSI method.) after which
ACPI video backlight support doesn't work on a number of systems,
because the relevant AML methods in the ACPI tables in their BIOSes
become useless after the BIOS has been told that the OS is compatible
with Windows 8.  That problem is tracked by the bug entry at:

https://bugzilla.kernel.org/show_bug.cgi?id=51231

Commit 8c5bd7a (ACPI / video / i915: No ACPI backlight if firmware
expects Windows 8) introduced for this purpose essentially prevented
the ACPI backlight support from being used if the BIOS had been told
that the OS was compatible with Windows 8 and the i915 driver was
loaded, in which case the backlight would always be handled by i915.
Unfortunately, however, that turned out to cause problems with
backlight to appear on multiple systems with symptoms indicating that
i915 was unable to control the backlight on those systems as
expected.

For this reason, revert commit 8c5bd7a, but leave the function
acpi_video_backlight_quirks() introduced by it, because another
commit on top of it uses that function.

References: https://lkml.org/lkml/2013/7/21/119
References: https://lkml.org/lkml/2013/7/22/261
References: https://lkml.org/lkml/2013/7/23/429
References: https://lkml.org/lkml/2013/7/23/459
References: https://lkml.org/lkml/2013/7/23/81
References: https://lkml.org/lkml/2013/7/24/27
Reported-and-tested-by: James Hogan <james@albanarts.com>
Reported-and-tested-by: Kamal Mostafa <kamal@canonical.com>
Reported-and-tested-by: Jörg Otte <jrg.otte@gmail.com>
Reported-and-tested-by: Steven Newbury <steve@snewbury.org.uk>
Reported-by: Martin Steigerwald <Martin@lichtvoll.de>
Reported-by: Kalle Valo <kvalo@adurom.com>
Tested-by: Joerg Platte <jplatte@naasa.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoahci_imx: depend on CONFIG_MFD_SYSCON
Tejun Heo [Fri, 26 Jul 2013 12:57:56 +0000 (08:57 -0400)]
ahci_imx: depend on CONFIG_MFD_SYSCON

ahci_imx makes use of regmap but the dependency wasn't specified in
Kconfig leading build failures if CONFIG_AHCI_IMX is enabled but
CONFIG_MFD_SYSCON is not.  Add the Kconfig dependency.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
10 years agotracing: Remove locking trace_types_lock from tracing_reset_all_online_cpus()
Steven Rostedt (Red Hat) [Wed, 24 Jul 2013 02:21:59 +0000 (22:21 -0400)]
tracing: Remove locking trace_types_lock from tracing_reset_all_online_cpus()

Commit a82274151af "tracing: Protect ftrace_trace_arrays list in trace_events.c"
added taking the trace_types_lock mutex in trace_events.c as there were
several locations that needed it for protection. Unfortunately, it also
encapsulated a call to tracing_reset_all_online_cpus() which also takes
the trace_types_lock, causing a deadlock.

This happens when a module has tracepoints and has been traced. When the
module is removed, the trace events module notifier will grab the
trace_types_lock, do a bunch of clean ups, and also clears the buffer
by calling tracing_reset_all_online_cpus. This doesn't happen often
which explains why it wasn't caught right away.

Commit a82274151af was marked for stable, which means this must be
sent to stable too.

Link: http://lkml.kernel.org/r/51EEC646.7070306@broadcom.com
Reported-by: Arend van Spril <arend@broadcom.com>
Tested-by: Arend van Spriel <arend@broadcom.com>
Cc: Alexander Z Lam <azl@google.com>
Cc: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: David Sharp <dhsharp@google.com>
Cc: stable@vger.kernel.org # 3.10
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
10 years agoarm64: Change kernel stack size to 16K
Feng Kan [Tue, 23 Jul 2013 17:52:31 +0000 (18:52 +0100)]
arm64: Change kernel stack size to 16K

Written by Catalin Marinas, tested by APM on storm platform. This is needed
because of the failures encountered when running SpecWeb benchmark test.

Signed-off-by: Feng Kan <fkan@apm.com>
Acked-by: Kumar Sankaran <ksankaran@apm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
10 years agoMerge tag 'drm-intel-fixes-2013-07-25' of git://people.freedesktop.org/~danvet/drm...
Dave Airlie [Fri, 26 Jul 2013 10:38:14 +0000 (20:38 +1000)]
Merge tag 'drm-intel-fixes-2013-07-25' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes

Brown-paper-bag pull request here. The snb rc6 fix from the last pull
broke forcewake BIOS dirt cleanup, which with fixed. But that fix broke
the spinlock init sequence, which results in an ugly BUG when spinlock
debugging is enabled :( So I get to throw another patch at cc: stable to
fix up the mess ...

* tag 'drm-intel-fixes-2013-07-25' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: initialize gt_lock early with other spin locks
  drm/i915: fix hdmi portclock limits

10 years agoMerge branch 'drm-fixes-3.11' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 26 Jul 2013 10:37:15 +0000 (20:37 +1000)]
Merge branch 'drm-fixes-3.11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

r600 dpm fixes, old school card dac fixes, lockup fixes
endian fixes
* 'drm-fixes-3.11' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon/dpm: fix r600_enable_sclk_control()
  drm/radeon/dpm: implement force performance levels for rv6xx
  drm/radeon/dpm: fix displaygap programming on rv6xx
  drm/radeon/dpm: fix a typo in the rv6xx mclk setup
  drm/radeon: fix combios tables on older cards
  drm/radeon: improve dac adjust heuristics for legacy pdac
  drm/radeon: Another card with wrong primary dac adj
  drm/radeon: fix endian issues with DP handling (v3)
  drm/radeon/vm: only align the pt base to 32k
  drm/radeon: wait for 3D idle before using CP DMA

10 years agodrm/radeon/dpm: fix r600_enable_sclk_control()
Alex Deucher [Fri, 26 Jul 2013 01:46:21 +0000 (21:46 -0400)]
drm/radeon/dpm: fix r600_enable_sclk_control()

Actually program the correct register to enable
engine clock scaling control.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agodrm/radeon/dpm: implement force performance levels for rv6xx
Alex Deucher [Fri, 26 Jul 2013 00:07:25 +0000 (20:07 -0400)]
drm/radeon/dpm: implement force performance levels for rv6xx

Allows you to limit the selected power levels via sysfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agomfd: max8925: fix dt code for backlight
Olof Johansson [Wed, 24 Jul 2013 15:42:27 +0000 (08:42 -0700)]
mfd: max8925: fix dt code for backlight

The device-tree enablement for max8925 has several problems, but besides
the bindings being wrong (and not having seen review) there's also some
bad coding practices on how to fill in the platform_data from device tree.

I came across this since it causes a warning when compiling
mmp2_defconfig, and instead of doing the minimal fix to silence the
warning, I restructured the code a bit.

This silences the warning:
drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_probe':
drivers/video/backlight/max8925_bl.c:177:3: warning: statement with no effect [-Wunused-value]

Note that the bindings themselves need to be revisited too, but that will
affect more than just the backlight driver and is best done separately;
this just fixes the bad code for the backlight driver.

Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agodrm/radeon/dpm: fix displaygap programming on rv6xx
Alex Deucher [Thu, 25 Jul 2013 22:29:14 +0000 (18:29 -0400)]
drm/radeon/dpm: fix displaygap programming on rv6xx

Need to use the driver state rather than the register
state since the displays may not be enabled when the
power state is programmed.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agodrm/radeon/dpm: fix a typo in the rv6xx mclk setup
Alex Deucher [Thu, 25 Jul 2013 22:27:45 +0000 (18:27 -0400)]
drm/radeon/dpm: fix a typo in the rv6xx mclk setup

Need to set high for the last two entries.  Looks
like a copy and paste typo.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agousb: Clear both buffers when clearing a control transfer TT buffer.
William Gulland [Thu, 27 Jun 2013 23:10:20 +0000 (16:10 -0700)]
usb: Clear both buffers when clearing a control transfer TT buffer.

Control transfers have both IN and OUT (or SETUP) packets, so when
clearing TT buffers for a control transfer it's necessary to send
two HUB_CLEAR_TT_BUFFER requests to the hub.

Signed-off-by: William Gulland <wgulland@google.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb/gadget: free opts struct on error recovery
Andrzej Pietrasiewicz [Thu, 25 Jul 2013 07:13:18 +0000 (09:13 +0200)]
usb/gadget: free opts struct on error recovery

Fix memory leaks introduced in commits:

40d133d7f542616cf9538508a372306e626a16e9
usb: gadget: f_ncm: convert to new function interface with backward compatibility

fee562a6450b7806f1fbbe1469a67b5395b5c10a
usb: gadget: f_ecm: convert to new function interface with backward compatibility

fcbdf12ebef73a6069e2a1aada1e546fb578a4aa
usb: gadget: f_phonet: convert to new function interface with backward compatibility

b29002a157940752dfed2c488b2011f63f007d71
usb: gadget: f_eem: convert to new function interface with backward compatibility

8cedba7c73af1369599b1111639cfeb66fe13aaa
usb: gadget: f_subset: convert to new function interface with backward compatibility

f466c6353819326873fa48a02c6f2d7c903240d6
usb: gadget: f_rndis: convert to new function interface with backward compatibility

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>
10 years agoUSB: mos7840: fix memory leak in open
Johan Hovold [Mon, 1 Jul 2013 12:03:33 +0000 (14:03 +0200)]
USB: mos7840: fix memory leak in open

Allocated urbs and buffers were never freed on errors in open.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: serial: option.c: remove ONDA MT825UP product ID fromdriver
Enrico Mioso [Sat, 13 Jul 2013 16:54:14 +0000 (18:54 +0200)]
usb: serial: option.c: remove ONDA MT825UP product ID fromdriver

Some (very few) early devices like mine, where not exposting a proper CDC
descriptor. This was fixed with an immediate firmware update from the vendor,
and pre-installed on newer devices.
So actual devices can be driven by cdc_acm.c + cdc_ether.c.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: serial: option: add Olivetti Olicard 200
Dan Williams [Wed, 10 Jul 2013 17:25:02 +0000 (12:25 -0500)]
usb: serial: option: add Olivetti Olicard 200

Speaks AT on interfaces 5 (command & PPP) and 3 (secondary), other
interface protocols are unknown.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: serial: option: blacklist ONDA MT689DC QMI interface
Enrico Mioso [Sat, 29 Jun 2013 13:33:35 +0000 (15:33 +0200)]
usb: serial: option: blacklist ONDA MT689DC QMI interface

Prevent the option driver from binding itself to the QMI/WWAN interface, making
it unusable by the proper driver.

Signed-off-by: enrico Mioso <mrkiko.rs@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge tag 'for-usb-linus-2013-07-25' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Thu, 25 Jul 2013 17:02:24 +0000 (10:02 -0700)]
Merge tag 'for-usb-linus-2013-07-25' of git://git./linux/kernel/git/sarah/xhci into usb-linus

Sarah writes:

xhci: Bug fixes, now with more tags!

Hi Greg,

Here's five bug fixes for 3.12.

The three patches are marked for stable.  Two fix NULL pointer dereferences.
The third marked for stable suppresses some serious log spam from unnecessary
xHCI driver warnings, whenever an isochronous short packet happens on an xHCI
1.0 host.

The other two patches fix build warnings.

Sarah Sharp

10 years agoxfs: di_flushiter considered harmful
Dave Chinner [Wed, 24 Jul 2013 05:47:30 +0000 (15:47 +1000)]
xfs: di_flushiter considered harmful

When we made all inode updates transactional, we no longer needed
the log recovery detection for inodes being newer on disk than the
transaction being replayed - it was redundant as replay of the log
would always result in the latest version of the inode would be on
disk. It was redundant, but left in place because it wasn't
considered to be a problem.

However, with the new "don't read inodes on create" optimisation,
flushiter has come back to bite us. Essentially, the optimisation
made always initialises flushiter to zero in the create transaction,
and so if we then crash and run recovery and the inode already on
disk has a non-zero flushiter it will skip recovery of that inode.
As a result, log recovery does the wrong thing and we end up with a
corrupt filesystem.

Because we have to support old kernel to new kernel upgrades, we
can't just get rid of the flushiter support in log recovery as we
might be upgrading from a kernel that doesn't have fully transactional
inode updates.  Unfortunately, for v4 superblocks there is no way to
guarantee that log recovery knows about this fact.

We cannot add a new inode format flag to say it's a "special inode
create" because it won't be understood by older kernels and so
recovery could do the wrong thing on downgrade. We cannot specially
detect the combination of zero mode/non-zero flushiter on disk to
non-zero mode, zero flushiter in the log item during recovery
because wrapping of the flushiter can result in false detection.

Hence that makes this "don't use flushiter" optimisation limited to
a disk format that guarantees that we don't need it. And that means
the only fix here is to limit the "no read IO on create"
optimisation to version 5 superblocks....

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit e60896d8f2b81412421953e14d3feb14177edb56)

10 years agopinctrl: fix a memleak when freeing maps
Linus Walleij [Mon, 22 Jul 2013 23:43:20 +0000 (01:43 +0200)]
pinctrl: fix a memleak when freeing maps

We forgot to free the node itself when free:ing a map.

Reported-by: xulinuxkernel <xulinuxkernel@gmail.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoxhci: fix null pointer dereference on ring_doorbell_for_active_rings
Oleksij Rempel [Sun, 21 Jul 2013 13:36:19 +0000 (15:36 +0200)]
xhci: fix null pointer dereference on ring_doorbell_for_active_rings

in some cases where device is attched to xhci port and do not responding,
for example ath9k_htc with stalled firmware, kernel will
crash on ring_doorbell_for_active_rings.
This patch check if pointer exist before it is used.

This patch should be backported to kernels as old as 2.6.35, that
contain the commit e9df17eb1408cfafa3d1844bfc7f22c7237b31b8 "USB: xhci:
Correct assumptions about number of rings per endpoint"

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
10 years agousb: host: xhci: Enable XHCI_SPURIOUS_SUCCESS for all controllers with xhci 1.0
George Cherian [Mon, 1 Jul 2013 05:29:12 +0000 (10:59 +0530)]
usb: host: xhci: Enable XHCI_SPURIOUS_SUCCESS for all controllers with xhci 1.0

Xhci controllers with hci_version > 0.96 gives spurious success
events on short packet completion. During webcam capture the
"ERROR Transfer event TRB DMA ptr not part of current TD" was observed.
The same application works fine with synopsis controllers hci_version 0.96.
The same issue is seen with Intel Pantherpoint xhci controller. So enabling
this quirk in xhci_gen_setup if controller verion is greater than 0.96.
For xhci-pci move the quirk to much generic place xhci_gen_setup.

Note from Sarah:

The xHCI 1.0 spec changed how hardware handles short packets.  The HW
will notify SW of the TRB where the short packet occurred, and it will
also give a successful status for the last TRB in a TD (the one with the
IOC flag set).  On the second successful status, that warning will be
triggered in the driver.

Software is now supposed to not assume the TD is not completed until it
gets that last successful status.  That means we have a slight race
condition, although it should have little practical impact.  This patch
papers over that issue.

It's on my long-term to-do list to fix this race condition, but it is a
much more involved patch that will probably be too big for stable.  This
patch is needed for stable to avoid serious log spam.

This patch should be backported to kernels as old as 3.0, that
contain the commit ad808333d8201d53075a11bc8dd83b81f3d68f0b "Intel xhci:
Ignore spurious successful event."

The patch will have to be modified for kernels older than 3.2, since
that kernel added the xhci_gen_setup function for xhci platform devices.
The correct conflict resolution for kernels older than 3.2 is to set
XHCI_SPURIOUS_SUCCESS in xhci_pci_quirks for all xHCI 1.0 hosts.

Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
10 years agousb: fix build warning in pci-quirks.h when CONFIG_PCI is not enabled
Randy Dunlap [Tue, 23 Jul 2013 22:22:59 +0000 (15:22 -0700)]
usb: fix build warning in pci-quirks.h when CONFIG_PCI is not enabled

Fix warning when CONFIG_PCI is not enabled
(from commit 296365781903226a3fb8758901eaeec09d2798e4).

drivers/usb/host/pci-quirks.h: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
10 years agousb: xhci: Mark two functions __maybe_unused
Olof Johansson [Tue, 23 Jul 2013 18:58:20 +0000 (11:58 -0700)]
usb: xhci: Mark two functions __maybe_unused

Resolves the following build warnings:
drivers/usb/host/xhci.c:332:13: warning: 'xhci_msix_sync_irqs' defined but not used [-Wunused-function]
drivers/usb/host/xhci.c:3901:12: warning: 'xhci_change_max_exit_latency' defined but not used [-Wunused-function]

These functions are not always used, and since they're marked static
they will produce build warnings:
- xhci_msix_sync_irqs is only used with CONFIG_PCI.
- xhci_change_max_exit_latency is a little more complicated with
  dependencies on CONFIG_PM and CONFIG_PM_RUNTIME.

Instead of building a bigger maze of ifdefs in this code, I've just
marked both with __maybe_unused.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
10 years agoxhci: Avoid NULL pointer deref when host dies.
Sarah Sharp [Wed, 24 Jul 2013 17:27:13 +0000 (10:27 -0700)]
xhci: Avoid NULL pointer deref when host dies.

When the host controller fails to respond to an Enable Slot command, and
the host fails to respond to the register write to abort the command
ring, the xHCI driver will assume the host is dead, and call
usb_hc_died().

The USB device's slot_id is still set to zero, and the pointer stored at
xhci->devs[0] will always be NULL.  The call to xhci_check_args in
xhci_free_dev should have caught the NULL virt_dev pointer.

However, xhci_free_dev is designed to free the xhci_virt_device
structures, even if the host is dead, so that we don't leak kernel
memory.  xhci_free_dev checks the return value from the generic
xhci_check_args function.  If the return value is -ENODEV, it carries on
trying to free the virtual device.

The issue is that xhci_check_args looks at the host controller state
before it looks at the xhci_virt_device pointer.  It will return -ENIVAL
because the host is dead, and xhci_free_dev will ignore the return
value, and happily dereference the NULL xhci_virt_device pointer.

The fix is to make sure that xhci_check_args checks the xhci_virt_device
pointer before it checks the host state.

See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1203453 for
further details.  This patch doesn't solve the underlying issue, but
will ensure we don't see any more NULL pointer dereferences because of
the issue.

This patch should be backported to kernels as old as 3.1, that
contain the commit 7bd89b4017f46a9b92853940fd9771319acb578a "xhci: Don't
submit commands or URBs to halted hosts."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Vincent Thiele <vincentthiele@gmail.com>
Cc: stable@vger.kernel.org
10 years agodrm/i915: initialize gt_lock early with other spin locks
Jani Nikula [Thu, 25 Jul 2013 09:44:34 +0000 (12:44 +0300)]
drm/i915: initialize gt_lock early with other spin locks

commit 181d1b9e31c668259d3798c521672afb8edd355c
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sun Jul 21 13:16:24 2013 +0200

    drm/i915: fix up gt init sequence fallout

moved dev_priv->gt_lock initialization after use. Do the initialization
much earlier with other spin lock initializations.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: stable@vger.kernel.org (since the regressing patch is also cc: stable)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agomd/raid5: fix interaction of 'replace' and 'recovery'.
NeilBrown [Mon, 22 Jul 2013 02:57:21 +0000 (12:57 +1000)]
md/raid5: fix interaction of 'replace' and 'recovery'.

If a device in a RAID4/5/6 is being replaced while another is being
recovered, then the writes to the replacement device currently don't
happen, resulting in corruption when the replacement completes and the
new drive takes over.

This is because the replacement writes are only triggered when
's.replacing' is set and not when the similar 's.sync' is set (which
is the case during resync and recovery - it means all devices need to
be read).

So schedule those writes when s.replacing is set as well.

In this case we cannot use "STRIPE_INSYNC" to record that the
replacement has happened as that is needed for recording that any
parity calculation is complete.  So introduce STRIPE_REPLACED to
record if the replacement has happened.

For safety we should also check that STRIPE_COMPUTE_RUN is not set.
This has a similar effect to the "s.locked == 0" test.  The latter
ensure that now IO has been flagged but not started.  The former
checks if any parity calculation has been flagged by not started.
We must wait for both of these to complete before triggering the
'replace'.

Add a similar test to the subsequent check for "are we finished yet".
This possibly isn't needed (is subsumed in the STRIPE_INSYNC test),
but it makes it more obvious that the REPLACE will happen before we
think we are finished.

Finally if a NeedReplace device is not UPTODATE then that is an
error.  We really must trigger a warning.

This bug was introduced in commit 9a3e1101b827a59ac9036a672f5fa8d5279d0fe2
(md/raid5:  detect and handle replacements during recovery.)
which introduced replacement for raid5.
That was in 3.3-rc3, so any stable kernel since then would benefit
from this fix.

Cc: stable@vger.kernel.org (3.3+)
Reported-by: qindehua <13691222965@163.com>
Tested-by: qindehua <qindehua@163.com>
Signed-off-by: NeilBrown <neilb@suse.de>
10 years agomd/raid10: remove use-after-free bug.
NeilBrown [Wed, 24 Jul 2013 05:37:42 +0000 (15:37 +1000)]
md/raid10: remove use-after-free bug.

We always need to be careful when calling generic_make_request, as it
can start a chain of events which might free something that we are
using.

Here is one place I wasn't careful enough.  If the wbio2 is not in
use, then it might get freed at the first generic_make_request call.
So perform all necessary tests first.

This bug was introduced in 3.3-rc3 (24afd80d99) and can cause an
oops, so fix is suitable for any -stable since then.

Cc: stable@vger.kernel.org (3.3+)
Signed-off-by: NeilBrown <neilb@suse.de>
10 years agoHOWTO ja_JP sync
Tsugikazu Shibata [Thu, 25 Jul 2013 00:17:23 +0000 (09:17 +0900)]
HOWTO ja_JP sync

Attached is Documentation/ja_JP/HOWTO sync patch for 3.10.
This patch was reviewed by Japanese translation community called JF.

Signed-off-by: Tsugikazu Shibata <tshibata@ab.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: serial: option: Add ONYX 3G device support
Enrico Mioso [Thu, 25 Jul 2013 00:01:39 +0000 (02:01 +0200)]
usb: serial: option: Add ONYX 3G device support

This patch adds support for the ONYX 3G device (version 1) from ALFA
NETWORK.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
Olof Johansson [Thu, 25 Jul 2013 00:06:47 +0000 (17:06 -0700)]
Merge tag 'samsung-fixes-1' of git://git./linux/kernel/git/kgene/linux-samsung into fixes

From Kukjin Kim:
Samsung fixes for v3.11
- fix kernel booting on exynos5440
  skip pm which is not supported
  update regarding LPAE features
- fix s3c2440 uart with adding clkdev entries
- fix compilatioin for Samsung SoCs with selecting pm
- update ARCH_NR_GPIO to support exynos4412 has more gpios

* tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos
  ARM: EXYNOS: Fix low level debug support
  ARM: SAMSUNG: Save/restore only selected uart's registers
  ARM: SAMSUNG: Add SAMSUNG_PM config option to select pm
  ARM: S3C24XX: Add missing clkdev entries for s3c2440 UART
  ARM: EXYNOS: Enable 64-bit DMA for EXYNOS5440 if LPAE is enabled
  ARM: EXYNOS: change the PHYSMEM_BITS and SECTION_SIZE
  ARM: EXYNOS: skip pm support on exynos5440

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: omap5: Only select errata 798181 if SMP
Olof Johansson [Wed, 24 Jul 2013 23:55:23 +0000 (16:55 -0700)]
ARM: omap5: Only select errata 798181 if SMP

Avoids the following warning when SMP is off:

warning: (ARCH_KEYSTONE && SOC_OMAP5) selects ARM_ERRATA_798181 which
has unmet direct dependencies (CPU_V7 && SMP)

Reported-by: Emilio López <emilio@elopez.com.ar>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoUSB: ti_usb_3410_5052: fix dynamic-id matching
Johan Hovold [Fri, 28 Jun 2013 10:24:26 +0000 (12:24 +0200)]
USB: ti_usb_3410_5052: fix dynamic-id matching

The driver failed to take the dynamic ids into account when determining
the device type and therefore all devices were detected as 2-port
devices when using the dynamic-id interface.

Match on the usb-serial-driver field instead of doing redundant id-table
searches.

Reported-by: Anders Hammarquist <iko@iko.pp.se>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoserial: tegra: correct help message in Kconfig from 'ttyHS' to 'ttyTHS'
Richard Zhao [Sun, 21 Jul 2013 02:43:26 +0000 (10:43 +0800)]
serial: tegra: correct help message in Kconfig from 'ttyHS' to 'ttyTHS'

ttyTHS is consistent with the name used in driver.

Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agotty/8250_early: Don't truncate last character of options
Henrik Nordström [Tue, 23 Jul 2013 19:06:07 +0000 (21:06 +0200)]
tty/8250_early: Don't truncate last character of options

The earlier change to use strlcpy uncovered a bug in the options
argument length calculation causing last character to be truncated.
This makes the actual console to be configured with incorrect
baudrate when specifying the console using console=uart,... syntax.

Bug symptom seen in kernel log output:

Kernel command line: console=uart,mmio,0x90000000,115200
Early serial console at MMIO 0x90000000 (options '11520')

which then results in a invalid baud rate 11520 instead of the
expected 115200 when the console is switched to ttyS0 later
in the boot process.

Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoTTY: snyclinkmp: calculating wrong addresses
Dan Carpenter [Fri, 19 Jul 2013 05:53:13 +0000 (08:53 +0300)]
TTY: snyclinkmp: calculating wrong addresses

This is a static checker fix and I don't have a way to test it.  But
from the context it looks like this is a typo where SCABUFSIZE was
intended instead of sizeof(SCABUFSIZE).  SCABUFSIZE is 1024 and
sizeof(int) is 4.  I would suspect this is a bad bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years ago[SCSI] isci: fix breakage caused by >16byte CDB patch
James Bottomley [Wed, 24 Jul 2013 19:43:18 +0000 (12:43 -0700)]
[SCSI] isci: fix breakage caused by >16byte CDB patch

Oops, apparently no-one I cc'd at intel actually bothered to check this
patch for the isci driver:

commit e73823f7a2c921dcf068d34ea03bd682498d9e42
Author: James Bottomley <JBottomley@Parallels.com>
Date:   Tue May 7 15:38:18 2013 -0700

    [SCSI] libsas: implement > 16 byte CDB support

sci_swab32_cpy needs multiples of four, so for commands that aren't that, it's
rounding the wrong way.  fix by doing (len+3)/4 instead of len/4.

Reported-by: Tony Luck <tony.luck@intel.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Wed, 24 Jul 2013 18:07:18 +0000 (11:07 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Pull powerpc fixes from Ben Herrenschmidt:
 "Here is a series of powerpc fixes.  It's a bit big, mostly because of
  the series of 11 "EEH" patches from Gavin.  The EEH (Our IBM specific
  PCI/PCIe Enhanced Error Handling) code had been rotting for a while
  and this merge window saw a significant rework & fixing of it by Gavin
  Shan.

  However, that wasn't complete and left some open issues.  There were
  still a few corner cases that didn't work properly, for example in
  relation to hotplug and devices without explicit error handlers.  We
  had some patches but they weren't quite good enough yet so I left them
  off the 3.11 merge window.

  Gavin since then fixed it all up, we ran quite a few rounds of testing
  and it seems fairly solid (at least probably more than it has ever
  been).  This should probably have made -rc1 but both Gavin and I took
  some vacation so it had to wait for -rc2.

  The rest is more bug fixes, mostly to new features recently added, for
  example, we missed the cpu table entry for one of the two models of P8
  (we didn't realize they had different PVR [Processor Version Register]
  values), some module CRC issues, etc..."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (23 commits)
  powerpc/perf: BHRB filter configuration should follow the task
  powerpc/perf: Ignore separate BHRB privilege state filter request
  powerpc/powernv: Mark pnv_pci_init_ioda2_phb() as __init
  powerpc/mm: Use the correct SLB(LLP) encoding in tlbie instruction
  powerpc/mm: Fix fallthrough bug in hpte_decode
  powerpc/pseries: Fix a typo in pSeries_lpar_hpte_insert()
  powerpc/eeh: Introdce flag to protect sysfs
  powerpc/eeh: Fix unbalanced enable for IRQ
  powerpc/eeh: Don't use pci_dev during BAR restore
  powerpc/eeh: Use partial hotplug for EEH unaware drivers
  powerpc/pci: Partial tree hotplug support
  powerpc/eeh: Use safe list traversal when walking EEH devices
  powerpc/eeh: Keep PE during hotplug
  powerpc/pci/hotplug: Don't need to remove from EEH cache twice
  powerpc/pci: Override pcibios_release_device()
  powerpc/eeh: Export functions for hotplug
  powerpc/eeh: Remove reference to PCI device
  powerpc: Fix the corrupt r3 error during MCE handling.
  powerpc/perf: Set PPC_FEATURE2_EBB when we register the power8 PMU
  powerpc/pseries: Drop "select HOTPLUG"
  ...

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Wed, 24 Jul 2013 18:05:18 +0000 (11:05 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "This push fixes a memory corruption issue in caam, as well as
  reverting the new optimised crct10dif implementation as it breaks boot
  on initrd systems.

  Hopefully crct10dif will be reinstated once the supporting code is
  added so that it doesn't break boot"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  Revert "crypto: crct10dif - Wrap crc_t10dif function all to use crypto transform framework"
  crypto: caam - Fixed the memory out of bound overwrite issue

10 years agoMAINTAINERS: Update the list of maintainers for staging/comedi driver.
Lidza Louina [Wed, 24 Jul 2013 15:29:33 +0000 (11:29 -0400)]
MAINTAINERS: Update the list of maintainers for staging/comedi driver.

This patch updates the list of maintainers for the staging/comedi
driver.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: tidspbridge: replace strict_strtol() with kstrtos32()
Jingoo Han [Wed, 24 Jul 2013 05:34:08 +0000 (14:34 +0900)]
staging: tidspbridge: replace strict_strtol() with kstrtos32()

The usage of strict_strtol() is not preferred, because
strict_strtol() is obsolete. Thus, kstrtos32() should be
used in order to convert a string to s32. Also, error handling
is added to get rid of a __must_check warning.

This fixes a memory corruption bug as well.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>