pandora-kernel.git
10 years agousb: gadget: f_fs: add aio support
Robert Baldyga [Mon, 10 Feb 2014 09:42:44 +0000 (10:42 +0100)]
usb: gadget: f_fs: add aio support

This patch adds asynchronous I/O support for FunctionFS endpoint files.
It adds ffs_epfile_aio_write() and ffs_epfile_aio_read() functions responsible
for preparing AIO operations.

It also modifies ffs_epfile_io() function, adding aio handling code. Instead
of extending list of parameters of this function, there is new struct
ffs_io_data which contains all information needed to perform I/O operation.
Pointer to this struct replaces "buf" and "len" parameters of ffs_epfile_io()
function. Allocated buffer is freed immediately only after sync operation,
because in async IO it's freed in complete funcion. For each async operation
an USB request is allocated, because it allows to have more than one request
queued on single endpoint.

According to changes in ffs_epfile_io() function, functions ffs_epfile_write()
and ffs_epfile_read() are updated to use new API.

For asynchronous I/O operations there is new request complete function named
ffs_epfile_async_io_complete(), which completes AIO operation, and frees
used memory.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: f_fs: add poll for endpoint 0
Robert Baldyga [Mon, 10 Feb 2014 09:42:43 +0000 (10:42 +0100)]
usb: gadget: f_fs: add poll for endpoint 0

This patch adds poll function for file representing ep0.

Ability of read from or write to ep0 file is related with actual state of ffs:
- When desctiptors or strings are not written yet, POLLOUT flag is set.
- If there is any event to read, POLLIN flag is set.
- If setup request was read, POLLIN and POLLOUT flag is set, to allow
  send response (by performing I/O operation consistent with setup request
  direction) or set stall (by performing I/O operation opposite  setup
  request direction).

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: f_fs: fix setup request handling
Robert Baldyga [Mon, 10 Feb 2014 09:42:42 +0000 (10:42 +0100)]
usb: gadget: f_fs: fix setup request handling

This patch fixes __ffs_ep0_queue_wait() function, which now returns number of
bytes transferred in USB request or error code in case of failure. This is
needed by ffs_ep0_read() function, when read data is copied to userspace.

It also cleans up code by removing usused variable ep0req_status.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: functionfs: replace FFS_SETUP_STATUS with an inline function
Michal Nazarewicz [Mon, 10 Feb 2014 09:42:41 +0000 (10:42 +0100)]
usb: gadget: functionfs: replace FFS_SETUP_STATUS with an inline function

The FFS_SETUP_STATUS macro could be trivialy replaced with an static
inline function but more importantly its name was tad confusing.
The name suggested it was a simple accessor macro but it actually
did change the state of the ffs_data structure perfomring
a FFS_SETUP_CANCELLED -> FFS_NO_SETUP transition.  The name of the
function -- ffs_setup_state_clear_cancelled -- should better
describe what the function actually does.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: functionfs: fix typo in the enum variable
Michal Nazarewicz [Mon, 10 Feb 2014 09:42:40 +0000 (10:42 +0100)]
usb: gadget: functionfs: fix typo in the enum variable

Since “cancelled” is spelled with two “l”s, rename FFS_SETUP_CANCELED
to FFS_SETUP_CANCELLED.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: FunctionFS: use consistent naming with regard to ffs_lock
Andrzej Pietrasiewicz [Mon, 13 Jan 2014 15:49:38 +0000 (16:49 +0100)]
usb: gadget: FunctionFS: use consistent naming with regard to ffs_lock

Consistently prefix function name with underscore if the function has to
be called with ffs_lock taken.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: FunctionFS: staticize functions used only in f_fs.c
Andrzej Pietrasiewicz [Mon, 13 Jan 2014 15:49:37 +0000 (16:49 +0100)]
usb: gadget: FunctionFS: staticize functions used only in f_fs.c

ffs_alloc_dev and ffs_free_dev are used only in f_fs.c,
so make them static.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: code cleanup
Andrzej Pietrasiewicz [Mon, 13 Jan 2014 15:49:36 +0000 (16:49 +0100)]
usb: gadget: code cleanup

Remove trailing whitespace

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: FunctionFS: dereference ffs_dev conditionally
Andrzej Pietrasiewicz [Mon, 13 Jan 2014 15:49:35 +0000 (16:49 +0100)]
usb: gadget: FunctionFS: dereference ffs_dev conditionally

ffs_dev->ffs_release_dev_callback should be accessed only if ffs_dev
is not NULL.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: dsps, use devm_kzalloc
Markus Pargmann [Fri, 17 Jan 2014 09:22:36 +0000 (10:22 +0100)]
usb: musb: dsps, use devm_kzalloc

Replace kzalloc by devm_kzalloc and remove the kfree() calls.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: omap: don't check resource with devm_ioremap_resource
Wolfram Sang [Tue, 14 Jan 2014 11:58:56 +0000 (12:58 +0100)]
usb: dwc3: omap: don't check resource with devm_ioremap_resource

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: s3c-hsotg: stall ep0 in set_halt function
Robert Baldyga [Tue, 14 Jan 2014 07:36:00 +0000 (08:36 +0100)]
usb: gadget: s3c-hsotg: stall ep0 in set_halt function

When s3c_hsotg_ep_sethalt() function is called for ep0 it should be stalled
in the same way that it is in s3c_hsotg_process_control() function, because
SET_HALT for ep0 is delayed response for setup request. Endpoint 0, if
halted, it doesn't need CLEAR_HALT because it clears "stalled" state
automatically when next setup request is received.

For this reason this patch moves code setting ep0 to "stalled" state to new
function named s3c_hsotg_stall_ep0() which is called in
s3c_hsotg_process_control() function as an immediate response for setup
request, and in s3c_hsotg_ep_sethalt() function as a delayed response for
setup request.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: printer: fix memory leak
wenlin.kang [Wed, 8 Jan 2014 06:22:12 +0000 (14:22 +0800)]
usb: gadget: printer: fix memory leak

When read data from g_printer, we see a Segmentation fault. eg:

Unable to handle kernel paging request at virtual address bf048000 pgd
cf038000 [bf048000] *pgd=8e8cf811, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1] PREEMPT ARM Modules linked in: bluetooth
rfcomm g_printer
CPU: 0    Not tainted  (3.4.43-WR5.0.1.9_standard #1)
PC is at __copy_to_user_std+0x310/0x3a8 LR is at 0x4c808010
pc : [<c036e990>]    lr : [<4c808010>]    psr: 20000013
sp : cf883ea8  ip : 80801018  fp : cf883f24
r10: bf04706c  r9 : 18a21205  r8 : 21953888
r7 : 201588aa  r6 : 5109aa16  r5 : 0705aaa2  r4 : 5140aa8a
r3 : 0000004c  r2 : 00000fdc  r1 : bf048000  r0 : bef5fc3c
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 8f038019  DAC: 00000015 Process
g_printer_test. (pid: 661, stack limit = 0xcf8822e8)
Stack: (0xcf883ea8 to 0xcf884000)
3ea0:                   bf047068 00001fff bef5ecb9 cf882000 00001fff bef5ecb9
3ec0: 00001fff 00000000 cf2e8724 bf044d3c 80000013 80000013 00000001
bf04706c
3ee0: cf883f24 cf883ef0 c012e5ac c0324388 c007c8ac c0046298 00008180
cf29b900
3f00: 00002000 bef5ecb8 cf883f68 00000003 cf882000 cf29b900 cf883f54
cf883f28
3f20: c012ea08 bf044b0c c000eb88 00000000 cf883f7c 00000000 00000000
00002000
3f40: bef5ecb8 00000003 cf883fa4 cf883f58 c012eae8 c012e960 00000001
bef60cb8
3f60: 000000a8 c000eb88 00000000 00000000 cf883fa4 00000000 c014329c
00000000
3f80: 000000d4 41af63f0 00000003 c000eb88 cf882000 00000000 00000000
cf883fa8
3fa0: c000e920 c012eaa4 00000000 000000d4 00000003 bef5ecb8 00002000
bef5ecb8
3fc0: 00000000 000000d4 41af63f0 00000003 b6f534c0 00000000 419f9000
00000000
3fe0: 00000000 bef5ecac 000086d9 41a986bc 60000010 00000003 0109608a
0088828a
Code: f5d1f07c e8b100f0 e1a03c2e e2522020 (e8b15300) ---[ end trace
97e2618e250e3377 ]--- Segmentation fault

The root cause is the dev->rx_buffers list has been broken.
When we call printer_read(), the following call tree is triggered:

printer_read()
|
+---setup_rx_reqs(req)
| |
| +---usb_ep_queue(req)
| | |
| | +---...
| | |
| | +---rx_complete(req).
| |
| +---add the req to dev->rx_reqs_active
|
+---while(!list_empty(&dev->rx_buffers)))

The route happens when we don't use DMA or fail to start DMA in USB
driver. We can see: in the case, in rx_complete() it will add the req
to dev->rx_buffers. meanwhile we see that we will also add the req to
dev->rx_reqs_active after usb_ep_queue() return, so this adding will
break the dev->rx_buffers out.

After, when we call list_empty() to check dev->rx_buffers in while(),
due to can't check correctly dev->rx_buffers, so the Segmentation fault
occurs when copy_to_user() is called.

Signed-off-by: wenlin.kang <wenlin.kang@windriver.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: printer: fix possible deadlock
wenlin.kang [Wed, 8 Jan 2014 06:22:11 +0000 (14:22 +0800)]
usb: gadget: printer: fix possible deadlock

The problem occurs in follow path.

printer_read()
|
+---setup_rx_reqs()
|
+---usb_ep_queue()
|
+---...
|
+---rx_complete()

Although it is clear from code, we can't get it normally.
only when we enable some spin_lock debug config option, we can find it.
eg:
BUG: spinlock lockup on CPU#0, g_printer_test_/584
 lock: bf05e158, .magic: dead4ead, .owner: g_printer_test_/584, .owner_cpu: 0
[<c0016e1c>] (unwind_backtrace+0x0/0x104) from [<c067aef8>] (dump_stack+0x20/0x24)
[<c067aef8>] (dump_stack+0x20/0x24) from [<c0680bec>] (spin_dump+0x8c/0x94)
[<c0680bec>] (spin_dump+0x8c/0x94) from [<c039071c>] (do_raw_spin_lock+0x128/0x154)
[<c039071c>] (do_raw_spin_lock+0x128/0x154) from [<c0685618>] (_raw_spin_lock_irqsave+0x64/0x70)
[<c0685618>] (_raw_spin_lock_irqsave+0x64/0x70) from [<bf05b4e8>] (rx_complete+0x54/0x10c [g_printer])
[<bf05b4e8>] (rx_complete+0x54/0x10c [g_printer]) from [<c0480478>] (musb_g_giveback+0x78/0x88)
[<c0480478>] (musb_g_giveback+0x78/0x88) from [<c048060c>] (rxstate+0xa0/0x10c)
[<c048060c>] (rxstate+0xa0/0x10c) from [<c0480d50>] (musb_ep_restart+0x44/0x70)
[<c0480d50>] (musb_ep_restart+0x44/0x70) from [<c0480fe4>] (musb_gadget_queue+0xe8/0xf8)
[<c0480fe4>] (musb_gadget_queue+0xe8/0xf8) from [<bf05b2b0>] (setup_rx_reqs+0xa4/0x178 [g_printer])
[<bf05b2b0>] (setup_rx_reqs+0xa4/0x178 [g_printer]) from [<bf05bb58>] (printer_read+0x9c/0x3f4 [g_printer])
[<bf05bb58>] (printer_read+0x9c/0x3f4 [g_printer]) from [<c01387f0>] (vfs_read+0xb4/0x144)
[<c01387f0>] (vfs_read+0xb4/0x144) from [<c01388d0>] (sys_read+0x50/0x124)
[<c01388d0>] (sys_read+0x50/0x124) from [<c000e900>] (ret_fast_syscall+0x0/0x3c)

The root cause is that we use the same lock two time in a path, so to avoid
the deadlock, we need to unlock in setup_rx_reqs(), and only unlock.

Signed-off-by: wenlin.kang <wenlin.kang@windriver.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: s3c-hsudc: remove unused label
Sachin Kamat [Fri, 3 Jan 2014 05:29:00 +0000 (10:59 +0530)]
usb: gadget: s3c-hsudc: remove unused label

Fixes the following compilation warning:
drivers/usb/gadget/s3c-hsudc.c: In function ‘s3c_hsudc_probe’:
drivers/usb/gadget/s3c-hsudc.c:1347:1: warning: label ‘err_add_device’
defined but not used [-Wunused-label]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: s3c2410_udc: Fix build error
Sachin Kamat [Fri, 3 Jan 2014 05:28:59 +0000 (10:58 +0530)]
usb: gadget: s3c2410_udc: Fix build error

Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'.
Fixes the following compilation error introduced by commit e117e742d310
("usb: gadget: add "maxpacket_limit" field to struct usb_ep"):

drivers/usb/gadget/s3c2410_udc.c: In function ‘s3c2410_udc_reinit’:
drivers/usb/gadget/s3c2410_udc.c:1632:3: error:
cannot take address of bit-field ‘maxpacket’
   usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: fix error return code
Julia Lawall [Sun, 29 Dec 2013 22:47:25 +0000 (23:47 +0100)]
usb: gadget: fix error return code

Set the return variable to an error code as done elsewhere in the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: s3c-hsotg: use %pad for dma_addr_t
Jingoo Han [Tue, 4 Feb 2014 05:25:29 +0000 (14:25 +0900)]
usb: gadget: s3c-hsotg: use %pad for dma_addr_t

Use %pad for dma_addr_t to avoid the following build warnings
in printks.

drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_start_req'
drivers/usb/gadget/s3c-hsotg.c:722:3: warning: format '%x' expects argument of type 'unsigned int' but argument 6 has type
'dma_addr_t' [-Wformat]
drivers/usb/gadget/s3c-hsotg.c:792:3: warning: format '%x' expects argument of type 'unsigned int' but argument 5 has type
'dma_addr_t' [-Wformat]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: s3c-hsotg: fix build on x86 and other architectures
Matt Porter [Mon, 3 Feb 2014 15:29:09 +0000 (10:29 -0500)]
usb: gadget: s3c-hsotg: fix build on x86 and other architectures

The readsl and writesl I/O accessors are only defined on some
architectures. The driver currently depends on CONFIG_ARM because
the build breaks on x86, in particular. Switch to use of ioread32_rep
and iowrite32_rep to fix build on all architectures and remove the
CONFIG_ARM dependency.

Also update printk formatting to handle a long long dma_addr_t to avoid
warnings on !32-bit architectures.

Signed-off-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: musb_cppi41: Handle ISOCH differently and not use the hrtimer.
George Cherian [Mon, 27 Jan 2014 09:37:26 +0000 (15:07 +0530)]
usb: musb: musb_cppi41: Handle ISOCH differently and not use the hrtimer.

In case of ISOCH transfers the hrtimer workaround for the hardware issue
is not very reliable. Instead of checking musb_is_tx_fifo_empty() in hrtimer
routine, schedule a completion work and check the same in completion work.

Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: musb_cppi41: Make CPPI aware of high bandwidth transfers
George Cherian [Mon, 27 Jan 2014 09:37:25 +0000 (15:07 +0530)]
usb: musb: musb_cppi41: Make CPPI aware of high bandwidth transfers

Enable CPPI to handle high bandwidth transfers, especially to support
webcam captures. Use a single bd to get the whole of the data in case of
high bandwidth transfers.

Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: musb_host: Enable ISOCH IN handling for AM335x host
George Cherian [Mon, 27 Jan 2014 09:37:24 +0000 (15:07 +0530)]
usb: musb: musb_host: Enable ISOCH IN handling for AM335x host

Enable the isochrounous IN handling for AM335x HOST.
Reprogram CPPI to receive consecutive ISOCH frames in the same URB.

Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agophy-core: Don't allow building phy-core as a module
Hans de Goede [Tue, 11 Feb 2014 16:03:51 +0000 (17:03 +0100)]
phy-core: Don't allow building phy-core as a module

include/phy/phy.h has stub code in there for when building without the
phy-core enabled. This is useful for generic drivers such as ahci-platform,
ehci-platoform and ohci-platform which have support for driving an optional
phy passed to them through the devicetree.

Since on some boards this phy functionality is not needed, being able to
disable the phy subsystem without needing a lot of #ifdef magic in the
driver using it is quite useful.

However this breaks when the module using the phy subsystem is build-in and
the phy-core is not, which leads to the build failing with missing symbol
errors in the linking stage of the zImage.

Which leads to gems such as this being added to the Kconfig for achi_platform:

depends on GENERIC_PHY || !GENERIC_PHY

Rather then duplicating this code in a lot of places using the phy-core,
I believe it is better to simply not allow the phy-core to be built as a
module. The phy core is quite small and has no external dependencies, so
always building it in when enabling it should not be an issue.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousbhid/quirks: Ignore Riso Kagaku Webmail Notifier
Christian Vogel [Wed, 12 Feb 2014 19:56:00 +0000 (20:56 +0100)]
usbhid/quirks: Ignore Riso Kagaku Webmail Notifier

The "Webmail Notifier" is a USB controlled LED that appears as a HID
device. When trying to change the LED via hidraw it returns malformed
reports. As "usbled" supports it, we blacklist it in usbhid.

Signed-off-by: Christian Vogel <vogelchr@vogel.cx>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: dwc2: fix dereference before NULL check
Paul Zimmerman [Thu, 13 Feb 2014 01:44:35 +0000 (17:44 -0800)]
usb: dwc2: fix dereference before NULL check

In a couple of places, we were checking qtd->urb for NULL after
we had already dereferenced it. Fix this by moving the check to
before the dereference.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoxhci-platform: Change compatible string from xhci-platform to generic-xhci
Hans de Goede [Tue, 11 Feb 2014 16:54:46 +0000 (17:54 +0100)]
xhci-platform: Change compatible string from xhci-platform to generic-xhci

This brings the xhci-platform bindings in sync with what we've done for
the ohci- and ehci-platform drivers. As discussed there using platform as a
postfix is a bit weird as the platform bus is a Linux specific thing and
the bindings are supposed to be OS agnostic.

Note that the old xhci-platform compatible string is kept around for, well,
compatibility reasons.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agouhci-platform: Change compatible string from platform-uhci to generic-uhci
Hans de Goede [Tue, 11 Feb 2014 16:54:45 +0000 (17:54 +0100)]
uhci-platform: Change compatible string from platform-uhci to generic-uhci

This brings the uhci-platform bindings in sync with what we've done for
the ohci- and ehci-platform drivers. As discussed there using platform as a
prefix is a bit weird as the platform bus is a Linux specific thing and
the bindings are supposed to be OS agnostic.

Note that the old platform-uhci compatible string is kept around for, well,
compatibility reasons.

While at it rename the bindings txt file to match the name of all the
other ?hci-platform bindings docs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb/misc/usbled: Add Riso Kagaku Webmail Notifier
Christian Vogel [Mon, 10 Feb 2014 17:49:43 +0000 (18:49 +0100)]
usb/misc/usbled: Add Riso Kagaku Webmail Notifier

Add support for the "Webmail Notifier" (USB powered LED for signaling
new emails) made by Riso Kagaku Corp. which displays 7 distinct colors.

USB Protocol initially reverse engineered by
https://code.google.com/p/usbmailnotifier/.

Signed-off-by: Christian Vogel <vogelchr@vogel.cx>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: ELAN: Remove useless "default M" lines
Paul Bolle [Tue, 11 Feb 2014 12:23:07 +0000 (13:23 +0100)]
USB: ELAN: Remove useless "default M" lines

The Kconfig entries for USB_U132_HCD and USB_FTDI_ELAN default to
(uppercase) "M". But in Kconfig (lowercase) "m" is a magic symbol. "M"
is an ordinary symbol. As "M" is never set these Kconfig symbols will
also not be set by default.

Since I'm not aware of a reason why these driver should be set by
default, let's just drop these lines (that basically do nothing).

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoRemove MACH_OMAP_H4_OTG
Richard Weinberger [Sun, 9 Feb 2014 18:48:01 +0000 (19:48 +0100)]
Remove MACH_OMAP_H4_OTG

The symbol is an orphan, get rid of it.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: ohci-platform: check for platform data misconfiguration
Alan Stern [Tue, 11 Feb 2014 16:26:00 +0000 (11:26 -0500)]
USB: ohci-platform: check for platform data misconfiguration

The ohci-platform driver checks for misconfigurations in cases where
the Device Tree data specifies big-endian registers or descriptors but
the corresponding driver config settings have not been enabled.  As
Jonas Gorski suggested, we may as well apply the same check to general
platform data too.

This requires moving the code that sets the big-endian quirk flags
from the ohci_platform_reset() routine into ohci_platform_probe(), and
moving the checks out of the DT-specific "if" statement clause.

The patch also changes the text of the error messages in an attempt to
make the nature of the error more clear.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: ehci-platform: check for platform data misconfiguration
Alan Stern [Tue, 11 Feb 2014 16:26:10 +0000 (11:26 -0500)]
USB: ehci-platform: check for platform data misconfiguration

The ehci-platform driver checks for misconfigurations in cases where
the Device Tree data specifies big-endian registers or descriptors but
the corresponding driver config settings have not been enabled.  As
Jonas Gorski suggested, we may as well apply the same check to general
platform data too.

This requires moving the code that sets the big-endian quirk flags
from the ehci_platform_reset() routine into ehci_platform_probe(), and
moving the checks out of the DT-specific "if" statement clause.

The patch also changes the text of the error messages in an attempt to
make the nature of the error more clear.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoehci-platform: Change compatible string from usb-ehci to generic-ehci
Hans de Goede [Tue, 11 Feb 2014 16:35:29 +0000 (17:35 +0100)]
ehci-platform: Change compatible string from usb-ehci to generic-ehci

The initial versions of the devicetree enablement patches for ehci-platform
used "ehci-platform" as compatible string. However this was disliked by various
reviewers because the platform bus is a Linux invention and devicetree is
supposed to be OS agnostic. After much discussion I gave up, added a:
"depends on !PPC_OF" to Kconfig to avoid a known conflict with PPC-OF platforms
and went with the generic usb-ehci as requested.

In retro-spect I should have chosen something different, the dts files for many
existing boards already claim to be compatible with "usb-ehci", ie they have:

compatible = "ti,ehci-omap", "usb-ehci";

In theory this should not be a problem since the "ti,ehci-omap" entry takes
presedence, but in practice using a conflicting compatible string is an issue,
because it makes which driver gets used depend on driver registration order.

This patch changes the compatible string claimed by ehci-platform to
"generic-ehci", avoiding the driver registration / module loading ordering
problems, and removes the "depends on !PPC_OF" workaround.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoohci-platform: Change compatible string from usb-ohci to generic-ohci
Hans de Goede [Tue, 11 Feb 2014 16:35:28 +0000 (17:35 +0100)]
ohci-platform: Change compatible string from usb-ohci to generic-ohci

The initial versions of the devicetree enablement patches for ohci-platform
used "ohci-platform" as compatible string. However this was disliked by various
reviewers because the platform bus is a Linux invention and devicetree is
supposed to be OS agnostic. After much discussion I gave up and went with
the generic usb-ohci as requested.

In retro-spect I should have chosen something different, the dts files for many
existing boards already claim to be compatible with "usb-ohci", ie they have:

compatible = "ti,ohci-omap3", "usb-ohci";

In theory this should not be a problem since the "ti,ohci-omap3" entry takes
presedence, but in practice using a conflicting compatible string is an issue,
because it makes which driver gets used depend on driver registration order.

This patch changes the compatible string claimed by ohci-platform to
"generic-ohci", avoiding the driver registration / module loading ordering
problems.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: move hub init and LED blink work to power efficient workqueue
Shaibal Dutta [Sun, 2 Feb 2014 03:16:46 +0000 (19:16 -0800)]
usb: move hub init and LED blink work to power efficient workqueue

Allow the scheduler to select the best CPU to handle hub initalization
and LED blinking work. This extends idle residency times on idle CPUs
and conserves power.

This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected.

[zoran.markovic@linaro.org: Rebased to latest kernel. Added commit message.
Changed reference from system to power efficient workqueue for LEDs in
check_highspeed() and hub_port_connect_change().]

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Xenia Ragiadakou <burzalodowa@gmail.com>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: Matthias Beyer <mail@beyermatthias.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Shaibal Dutta <shaibal.dutta@broadcom.com>
Signed-off-by: Zoran Markovic <zoran.markovic@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: phy: msm: tiny leak on error in probe()
Dan Carpenter [Tue, 21 Jan 2014 06:50:51 +0000 (09:50 +0300)]
usb: phy: msm: tiny leak on error in probe()

Free "motog" on error.  This is more to appease the static checkers than
a real worry.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: dwc2: handle the Host Port Interrupt when it occurs in device mode
Dinh Nguyen [Tue, 4 Feb 2014 23:19:40 +0000 (15:19 -0800)]
usb: dwc2: handle the Host Port Interrupt when it occurs in device mode

According to the spec for the DWC2 controller, when the PRTINT interrupt fires,
the application must clear the appropriate status bit in the Host Port Control
and Status register to clear this bit.

When disconnecting an A-cable when the dwc2 host driver, the PRTINT fires, but
only the GINTSTS_PRTINT status is cleared, no action is done with the HPRT0
register. The HPRT0_ENACHG bit in the HPRT0 must also be poked to correctly
clear the GINTSTS_PRTINT interrupt.

I am seeing this behavoir on v2.93 of the DWC2 IP. When I disconnect an OTG
A-cable adapter, the PRTINT interrupt fires when the DWC2 is in device mode
and is never cleared.

This patch adds the function to read the HPRT0 register when the PRTINT fires
and the dwc2 IP has already transitioned to device mode. This function is only
clearing the HPRT0_ENACHG bit for now, but can be modified to handle more.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
[ paulz: modified patch to preserve HPRT0_ENA bit ]
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoehci-platform: Add support for controllers with big-endian regs / descriptors
Hans de Goede [Fri, 7 Feb 2014 15:36:43 +0000 (16:36 +0100)]
ehci-platform: Add support for controllers with big-endian regs / descriptors

This uses the already documented devicetree booleans for this, see:
Documentation/devicetree/bindings/usb/usb-ehci.txt

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoohci-platform: Add support for controllers with big-endian regs / descriptors
Hans de Goede [Fri, 7 Feb 2014 15:36:42 +0000 (16:36 +0100)]
ohci-platform: Add support for controllers with big-endian regs / descriptors

Note this commit uses the same devicetree booleans for this as the ones
already existing in the usb-ehci bindings, see:
Documentation/devicetree/bindings/usb/usb-ehci.txt

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoehci-platform: Add support for clks and phy passed through devicetree
Hans de Goede [Fri, 7 Feb 2014 15:36:41 +0000 (16:36 +0100)]
ehci-platform: Add support for clks and phy passed through devicetree

Currently ehci-platform is only used in combination with devicetree when used
with some Via socs. By extending it to (optionally) get clks and a phy from
devicetree, and enabling / disabling those on power_on / off, it can be used
more generically. Specifically after this commit it can be used for the
ehci controller on Allwinner sunxi SoCs.

Since ehci-platform is intended to handle any generic enough non pci ehci
device, add a "usb-ehci" compatibility string.

There already is a usb-ehci device-tree bindings document, update this
with clks and phy bindings info.

Although actually quite generic so far the via,vt8500 compatibilty string
had its own bindings document. Somehow we even ended up with 2 of them. Since
these provide no extra information over the generic usb-ehci documentation,
this patch removes them.

The ehci-ppc-of.c driver also claims the usb-ehci compatibility string,
even though it mostly is ibm,usb-ehci-440epx specific. ehci-platform.c is
not needed on ppc platforms, so add a !PPC_OF dependency to it to avoid
2 drivers claiming the same compatibility string getting build on ppc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoohci-platform: Add support for devicetree instantiation
Hans de Goede [Fri, 7 Feb 2014 15:36:40 +0000 (16:36 +0100)]
ohci-platform: Add support for devicetree instantiation

Add support for ohci-platform instantiation from devicetree, including
optionally getting clks and a phy from devicetree, and enabling / disabling
those on power_on / off.

This should allow using ohci-platform from devicetree in various cases.
Specifically after this commit it can be used for the ohci controller found
on Allwinner sunxi SoCs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: core: let dynamic ids override static ids
Bjørn Mork [Sat, 11 Jan 2014 01:04:00 +0000 (02:04 +0100)]
usb: core: let dynamic ids override static ids

This modifies the probing order so that any matching
dynamic entry always will be used, even if the driver
has a matching static entry.

It is sometimes useful to dynamically update existing
device entries. With the new ability to set the dynamic
entry driver_info field, this can be used to test new
additions to class driver exception lists or proposed
changes to existing static per-device driver_info
entries.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb-storage: enable multi-LUN scanning when needed
Alan Stern [Thu, 30 Jan 2014 15:43:22 +0000 (10:43 -0500)]
usb-storage: enable multi-LUN scanning when needed

People sometimes create their own custom-configured kernels and forget
to enable CONFIG_SCSI_MULTI_LUN.  This causes problems when they plug
in a USB storage device (such as a card reader) with more than one
LUN.

Fortunately, we can tell fairly easily when a storage device claims to
have more than one LUN.  When that happens, this patch asks the SCSI
layer to probe all the LUNs automatically, regardless of the config
setting.

The patch also updates the Kconfig help text for usb-storage,
explaining that CONFIG_SCSI_MULTI_LUN may be necessary.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Thomas Raschbacher <lordvan@lordvan.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
CC: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: simple: add Dynastream ANT USB-m Stick device support
Kristóf Ralovich [Fri, 24 Jan 2014 11:18:35 +0000 (12:18 +0100)]
USB: simple: add Dynastream ANT USB-m Stick device support

Add support for ANT USB-m Stick from Dynastream Innovations, by listing
USB pid

[34366.944805] usb 6-1: New USB device found, idVendor=0fcf, idProduct=1009
[34366.944817] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[34366.944824] usb 6-1: Product: ANT USB-m Stick
[34366.944831] usb 6-1: Manufacturer: Dynastream Innovations

Device reported (https://code.google.com/p/antpm/issues/detail?id=5) to
work through:
$ modprobe usbserial vendor=0x0fcf product=0x1009

Signed-off-by: Kristóf Ralovich <kristof.ralovich@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb-storage: add unusual-devs entry for BlackBerry 9000
Alan Stern [Tue, 21 Jan 2014 15:38:45 +0000 (10:38 -0500)]
usb-storage: add unusual-devs entry for BlackBerry 9000

This patch adds an unusual-devs entry for the BlackBerry 9000.  This
fixes Bugzilla #22442.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Moritz Moeller-Herrmann <moritz-kernel@moeller-herrmann.de>
Tested-by: Moritz Moeller-Herrmann <moritz-kernel@moeller-herrmann.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb-storage: restrict bcdDevice range for Super Top in Cypress ATACB
Alan Stern [Thu, 30 Jan 2014 15:20:29 +0000 (10:20 -0500)]
usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB

The Cypress ATACB unusual-devs entry for the Super Top SATA bridge
causes problems.  Although it was originally reported only for
bcdDevice = 0x160, its range was much larger.  This resulted in a bug
report for bcdDevice 0x220, so the range was capped at 0x219.  Now
Milan reports errors with bcdDevice 0x150.

Therefore this patch restricts the range to just 0x160.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Milan Svoboda <milan.svoboda@centrum.cz>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: phy: move some error messages to debug
Josh Boyer [Tue, 28 Jan 2014 14:53:50 +0000 (09:53 -0500)]
usb: phy: move some error messages to debug

the PHY layer is supposed to be optional,
considering some PHY have no control bus
for SW to poke around.

After commit 1ae5799 (usb: hcd: Initialize
USB phy if needed) any HCD which didn't provide
a PHY driver would emit annoying error messages.

In this patch we're decreasing those messages
to debugging only and we also add a PHY prefix
or use dev_dbg so we know where they're coming from.

Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: ftdi_sio: add Mindstorms EV3 console adapter
Bjørn Mork [Tue, 14 Jan 2014 17:56:54 +0000 (18:56 +0100)]
usb: ftdi_sio: add Mindstorms EV3 console adapter

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: dwc2: fix memory corruption in dwc2 driver
Paul Zimmerman [Tue, 4 Feb 2014 19:21:24 +0000 (11:21 -0800)]
usb: dwc2: fix memory corruption in dwc2 driver

The move from the staging tree to the main tree exposed a
longstanding memory corruption bug in the dwc2 driver. The
reordering of the driver initialization caused the dwc2 driver
to corrupt the initialization data of the sdhci driver on the
Raspberry Pi platform, which made the bug show up.

The error is in calling to_usb_device(hsotg->dev), since ->dev
is not a member of struct usb_device. The easiest fix is to
just remove the offending code, since it is not really needed.

Thanks to Stephen Warren for tracking down the cause of this.

Reported-by: Andre Heider <a.heider@gmail.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: dwc2: fix role switch breakage
Paul Zimmerman [Tue, 4 Feb 2014 19:42:15 +0000 (11:42 -0800)]
usb: dwc2: fix role switch breakage

Commit beb7e592bc "staging: dwc2: add check on dwc2_core_reset
return" broke the B -> A role switching on OTG-enabled platforms.
This commit fixes it.

Reported-by: Dinh Nguyen <dinguyen@altera.com>
Tested-by: Dinh Nguyen <dinguyen@altera.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: dwc2: bail out early when booting with "nousb"
Andre Heider [Tue, 4 Feb 2014 20:27:44 +0000 (21:27 +0100)]
usb: dwc2: bail out early when booting with "nousb"

Add usb_disabled() check to prevent kernel oops when booting with "nousb"
in the cmdline:

Unable to handle kernel NULL pointer dereference at virtual address 00000030
...
PC is at bus_add_device+0xe0/0x18c
LR is at device_add_groups+0x1c/0x20
...
[<c02191c0>] (bus_add_device) from [<c0217130>] (device_add+0x41c/0x538)
[<c0217130>] (device_add) from [<c023b1d4>] (usb_new_device+0x270/0x35c)
[<c023b1d4>] (usb_new_device) from [<c0241174>] (usb_add_hcd+0x4fc/0x760)
[<c0241174>] (usb_add_hcd) from [<c0254ce0>] (dwc2_hcd_init+0x434/0x510)
[<c0254ce0>] (dwc2_hcd_init) from [<c02594f4>] (dwc2_driver_probe+0x130/0x170)
[<c02594f4>] (dwc2_driver_probe) from [<c021bbd0>] (platform_drv_probe+0x28/0x58)

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge tag 'for-usb-linus-2014-02-04' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Tue, 4 Feb 2014 20:46:33 +0000 (12:46 -0800)]
Merge tag 'for-usb-linus-2014-02-04' of git://git./linux/kernel/git/sarah/xhci into usb-linus

Sarah writes:

xhci: Fix some regressions introduced in 3.14.

Hi Greg,

Here's four patches for 3.14.

One of them adds an xHCI host quirk, and the other three of them fix
regressions introduced in 3.14.  One regression causes USB 3.0 Link PM to
be enabled on all xHCI hosts (even those that may not support it), which
causes some USB 3.0 devices to not enumerate.  A second regression causes
some xHCI hosts that don't support 64-bit addressing to stop responding to
commands and die.

Note, these patches don't fix the recent usbfs regression that was caused
by commit 35773dac5f862cb1c82ea151eba3e2f6de51ec3e "usb: xhci: Link TRB
must not occur within a USB payload burst".  I'm waiting for those patches
to be tested.

Please pull usb-linus into usb-next, as I have feature patches that rely on
140e3026a57a Revert "usbcore: set lpm_capable field for LPM capable root
hubs"

Sarah Sharp

10 years agoLinus 3.14-rc1 v3.14-rc1
Linus Torvalds [Mon, 3 Feb 2014 00:42:13 +0000 (16:42 -0800)]
Linus 3.14-rc1

10 years agoMerge branch 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Mon, 3 Feb 2014 00:32:53 +0000 (16:32 -0800)]
Merge branch 'parisc-3.14' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:
 "The three major changes in this patchset is a implementation for
  flexible userspace memory maps, cache-flushing fixes (again), and a
  long-discussed ABI change to make EWOULDBLOCK the same value as
  EAGAIN.

  parisc has been the only platform where we had EWOULDBLOCK != EAGAIN
  to keep HP-UX compatibility.  Since we will probably never implement
  full HP-UX support, we prefer to drop this compatibility to make it
  easier for us with Linux userspace programs which mostly never checked
  for both values.  We don't expect major fall-outs because of this
  change, and if we face some, we will simply rebuild the necessary
  applications in the debian archives"

* 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: add flexible mmap memory layout support
  parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc
  parisc: convert uapi/asm/stat.h to use native types only
  parisc: wire up sched_setattr and sched_getattr
  parisc: fix cache-flushing
  parisc/sti_console: prefer Linux fonts over built-in ROM fonts

10 years agohpfs: optimize quad buffer loading
Mikulas Patocka [Tue, 28 Jan 2014 23:11:33 +0000 (00:11 +0100)]
hpfs: optimize quad buffer loading

HPFS needs to load 4 consecutive 512-byte sectors when accessing the
directory nodes or bitmaps.  We can't switch to 2048-byte block size
because files are allocated in the units of 512-byte sectors.

Previously, the driver would allocate a 2048-byte area using kmalloc,
copy the data from four buffers to this area and eventually copy them
back if they were modified.

In the current implementation of the buffer cache, buffers are allocated
in the pagecache.  That means that 4 consecutive 512-byte buffers are
stored in consecutive areas in the kernel address space.  So, we don't
need to allocate extra memory and copy the content of the buffers there.

This patch optimizes the code to avoid copying the buffers.  It checks
if the four buffers are stored in contiguous memory - if they are not,
it falls back to allocating a 2048-byte area and copying data there.

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agohpfs: remember free space
Mikulas Patocka [Tue, 28 Jan 2014 23:10:44 +0000 (00:10 +0100)]
hpfs: remember free space

Previously, hpfs scanned all bitmaps each time the user asked for free
space using statfs.  This patch changes it so that hpfs scans the
bitmaps only once, remembes the free space and on next invocation of
statfs it returns the value instantly.

New versions of wine are hammering on the statfs syscall very heavily,
making some games unplayable when they're stored on hpfs, with load
times in minutes.

This should be backported to the stable kernels because it fixes
user-visible problem (excessive level load times in wine).

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoparisc: add flexible mmap memory layout support
Helge Deller [Fri, 31 Jan 2014 21:19:52 +0000 (22:19 +0100)]
parisc: add flexible mmap memory layout support

Add support for the flexible mmap memory layout (as described in
http://lwn.net/Articles/91829). This is especially very interesting on
parisc since we currently only support 32bit userspace (even with a
64bit Linux kernel).

Signed-off-by: Helge Deller <deller@gmx.de>
10 years agoparisc: Make EWOULDBLOCK be equal to EAGAIN on parisc
Guy Martin [Thu, 16 Jan 2014 16:17:53 +0000 (17:17 +0100)]
parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc

On Linux, only parisc uses a different value for EWOULDBLOCK which
causes a lot of troubles for applications not checking for both values.
Since the hpux compat is long dead, make EWOULDBLOCK behave the same as
all other architectures.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: Helge Deller <deller@gmx.de>
10 years agoparisc: convert uapi/asm/stat.h to use native types only
Helge Deller [Fri, 31 Jan 2014 22:00:38 +0000 (23:00 +0100)]
parisc: convert uapi/asm/stat.h to use native types only

The stat.h header file is exported to userspace. Some userspace
applications failed to compile due to missing/unknown types, so we
better convert it to use native types only (like it's done on other
architectures too).

Signed-off-by: Helge Deller <deller@gmx.de>
10 years agoparisc: wire up sched_setattr and sched_getattr
Helge Deller [Fri, 31 Jan 2014 21:29:17 +0000 (22:29 +0100)]
parisc: wire up sched_setattr and sched_getattr

Signed-off-by: Helge Deller <deller@gmx.de>
10 years agoparisc: fix cache-flushing
Helge Deller [Fri, 31 Jan 2014 20:33:17 +0000 (21:33 +0100)]
parisc: fix cache-flushing

This commit:
f8dae00684d678afa13041ef170cecfd1297ed40: parisc: Ensure full cache coherency for kmap/kunmap
caused negative caching side-effects, e.g. hanging processes with expect and
too many inequivalent alias messages from flush_dcache_page() on Debian 5 systems.

This patch now partly reverts it and has been in production use on our debian buildd
makeservers since a week without any major problems.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: stable@vger.kernel.org # v3.9+
Signed-off-by: Helge Deller <deller@gmx.de>
10 years agoparisc/sti_console: prefer Linux fonts over built-in ROM fonts
Helge Deller [Fri, 31 Jan 2014 14:39:40 +0000 (15:39 +0100)]
parisc/sti_console: prefer Linux fonts over built-in ROM fonts

The built-in ROM fonts lack many necessary ASCII characters, which is
why it makes sens to prefer the Linux fonts instead if they are
available.  This makes consoles on STI graphics cards which are not
supported by the stifb driver (e.g. Visualize FXe) looks much nicer.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v3.13
10 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Sun, 2 Feb 2014 19:30:57 +0000 (11:30 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

Pull hwmon kconfig fixes from Jean Delvare.

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: Fix SENSORS_TMP102 dependencies to eliminate build errors
  hwmon: Fix SENSORS_LM75 dependencies to eliminate build errors

10 years agoMerge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Sun, 2 Feb 2014 19:30:08 +0000 (11:30 -0800)]
Merge branch 'slab/next' of git://git./linux/kernel/git/penberg/linux

Pull SLAB changes from Pekka Enberg:
 "Random bug fixes that have accumulated in my inbox over the past few
  months"

* 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  mm: Fix warning on make htmldocs caused by slab.c
  mm: slub: work around unneeded lockdep warning
  mm: sl[uo]b: fix misleading comments
  slub: Fix possible format string bug.
  slub: use lockdep_assert_held
  slub: Fix calculation of cpu slabs
  slab.h: remove duplicate kmalloc declaration and fix kernel-doc warnings

10 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Linus Torvalds [Sun, 2 Feb 2014 19:28:48 +0000 (11:28 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux

Pull turbostat updates from Len Brown.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power turbostat: introduce -s to dump counters
  tools/power turbostat: remove unused command line option
  turbostat: Add option to report joules consumed per sample
  turbostat: run on HSX
  turbostat: Add a .gitignore to ignore the compiled turbostat binary
  turbostat: Clean up error handling; disambiguate error messages; use err and errx
  turbostat: Factor out common function to open file and exit on failure
  turbostat: Add a helper to parse a single int out of a file
  turbostat: Check return value of fscanf
  turbostat: Use GCC's CPUID functions to support PIC
  turbostat: Don't attempt to printf an off_t with %zx
  turbostat: Don't put unprocessed uapi headers in the include path

10 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sun, 2 Feb 2014 19:11:06 +0000 (11:11 -0800)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Here's a set of patches for (hopefully) -rc1.  Some of them are fixes,
  but a good number of them also do things such as enable new drivers in
  the defconfigs for platforms that have such devices, increases
  coverage of the multiplatform defconfig and some DTS changes that
  plumbs up some of the devices that now have bindings and driver
  support.

  The commit dates are recent; we've mostly collected these fixes in the
  last few days but I also had to rebuild the branch yesterday to sort
  out some internal conflicts which reset the timestamps.  The changes
  should have been tested by each platform maintainer already (and few
  of them have cross-platform impact) so I'm personally not too
  concerned by it at this time"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
  ARM: multi_v7_defconfig: remove redundant entries and re-enable TI_EDMA
  ARM: multi_v7_defconfig: add mvebu drivers
  clocksource: kona: Add basic use of external clock
  drivers: bus: fix CCI driver kcalloc call parameters swap
  ARM: dts: bcm28155-ap: Fix Card Detection GPIO
  ARM: multi_v7_defconfig: Select CONFIG_AT803X_PHY
  ARM: keystone: config: fix build warning when CONFIG_DMADEVICES is not set
  MAINTAINERS: ARM: SiRF: use regex patterns to involve all SiRF drivers
  ARM: dts: zynq: Add SDHCI nodes
  ARM: hisi: don't select SMP
  ARM: tegra: rebuild tegra_defconfig to add DEBUG_FS
  ARM: multi_v7: copy most options from tegra_defconfig
  ARM: iop32x: fix power off handling for the EM7210 board
  ARM: integrator: restore static map on the CP
  ARM: msm_defconfig: Enable MSM clock drivers
  ARM: dts: msm: Add clock controller nodes and hook into uart
  ARM: OMAP4+: move errata initialization to omap4_pm_init_early
  ARM: OMAP4460: cpuidle: Extend PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD on cpuidle
  ARM: mvebu: fix compilation warning on Armada 370 (i.e. non-SMP)
  ARM: shmobile: r8a7790.dtsi: ficx i2c[0-3] clock reference
  ...

10 years agohwmon: Fix SENSORS_TMP102 dependencies to eliminate build errors
Jean Delvare [Sun, 2 Feb 2014 16:59:07 +0000 (17:59 +0100)]
hwmon: Fix SENSORS_TMP102 dependencies to eliminate build errors

Similar to what was done for the lm75 driver.

Add depends on THERMAL since that is what provides the
register/unregister functions above, but only if THERMAL_OF was
selected as this is an optional feature of the driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
10 years agohwmon: Fix SENSORS_LM75 dependencies to eliminate build errors
Jean Delvare [Sun, 2 Feb 2014 16:59:07 +0000 (17:59 +0100)]
hwmon: Fix SENSORS_LM75 dependencies to eliminate build errors

Based on an earlier attempt by Randy Dunlap.

Fix SENSORS_LM75 dependencies to eliminate build errors:

drivers/built-in.o: In function `lm75_remove':
lm75.c:(.text+0x12bd8c): undefined reference to `thermal_zone_of_sensor_unregister'
drivers/built-in.o: In function `lm75_probe':
lm75.c:(.text+0x12c123): undefined reference to `thermal_zone_of_sensor_register'

Add depends on THERMAL since that is what provides the
register/unregister functions above, but only if THERMAL_OF was
selected as this is an optional feature of the driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
10 years agotools/power turbostat: introduce -s to dump counters
Andy Shevchenko [Thu, 23 Jan 2014 15:13:15 +0000 (17:13 +0200)]
tools/power turbostat: introduce -s to dump counters

The new option allows just run turbostat and get dump of counter values. It's
useful when we have something more than one program to test.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
10 years agotools/power turbostat: remove unused command line option
Andy Shevchenko [Thu, 23 Jan 2014 15:13:14 +0000 (17:13 +0200)]
tools/power turbostat: remove unused command line option

The -s is not used, let's remove it, and update quick help accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
10 years agoMerge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Sat, 1 Feb 2014 19:03:16 +0000 (11:03 -0800)]
Merge branch 'misc' of git://git./linux/kernel/git/mmarek/kbuild

Pull misc kbuild changes from Michal Marek:
 "The non-critical part of kbuild is small this time:
   - Three fixes for make deb-pkg
   - A new coccinelle check

  One of the deb-pkg fixes is a leftover from the last merge window,
  hence the merge commit"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  deb-pkg: Fix building for MIPS big-endian or ARM OABI
  deb-pkg: Fix cross-building linux-headers package
  scripts: Coccinelle script for pm_runtime_* return checks with IS_ERR_VALUE
  deb-pkg: Inhibit initramfs builders if CONFIG_BLK_DEV_INITRD is not set

10 years agoafs: proc cells and rootcell are writeable
Pali Rohár [Tue, 28 Jan 2014 20:26:44 +0000 (20:26 +0000)]
afs: proc cells and rootcell are writeable

Both proc files are writeable and used for configuring cells. But
there is missing correct mode flag for writeable files. Without
this patch both proc files are read only.

[ It turns out they aren't really read-only, since root can write to
  them even if the write bit isn't set due to CAP_DAC_OVERRIDE ]

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agotile: remove compat_sys_lookup_dcookie declaration to fix compile error
Heiko Carstens [Fri, 31 Jan 2014 06:50:36 +0000 (07:50 +0100)]
tile: remove compat_sys_lookup_dcookie declaration to fix compile error

With commit d8d14bd09cdd ("fs/compat: fix lookup_dcookie() parameter
handling") I changed the type of the len parameter of the
lookup_dcookie() syscall.

However I missed that there was still a stale declaration in
arch/tile/..  which now causes a compile error on tile:

  In file included from fs/dcookies.c:28:0:
  include/linux/compat.h:425:17: error: conflicting types for 'compat_sys_lookup_dcookie'
  fs/dcookies.c:207:1: error: conflicting types for 'compat_sys_lookup_dcookie'

Simply remove the declaration in the tile architecture, which is only a
leftover from before the different compat lookup_dcookie() versions have
been merged.  The correct declaration is now in include/linux/compat.h

The build error was reported by Fenguang's build bot.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 1 Feb 2014 18:52:45 +0000 (10:52 -0800)]
Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "A set of cifs fixes (mostly for symlinks, and SMB2 xattrs) and
  cleanups"

* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Fix check for regular file in couldbe_mf_symlink()
  [CIFS] Fix SMB2 mounts so they don't try to set or get xattrs via cifs
  CIFS: Cleanup cifs open codepath
  CIFS: Remove extra indentation in cifs_sfu_type
  CIFS: Cleanup cifs_mknod
  CIFS: Cleanup CIFSSMBOpen
  cifs: Add support for follow_link on dfs shares under posix extensions
  cifs: move unix extension call to cifs_query_symlink()
  cifs: Re-order M-F Symlink code
  cifs: Add create MFSymlinks to protocol ops struct
  cifs: use protocol specific call for query_mf_symlink()
  cifs: Rename MF symlink function names
  cifs: Rename and cleanup open_query_close_cifs_symlink()
  cifs: Fix memory leak in cifs_hardlink()

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

Pull vfs fixes from Al Viro:
 "Several obvious fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  Fix mountpoint reference leakage in linkat
  hfsplus: use xattr handlers for removexattr
  Typo in compat_sys_lseek() declaration
  fs/super.c: sync ro remount after blocking writers
  vfs: unexport the getname() symbol

10 years agoMerge tag 'staging-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 1 Feb 2014 18:29:59 +0000 (10:29 -0800)]
Merge tag 'staging-3.14-rc1' of git://git./linux/kernel/git/gregkh/staging

Pull rtl8812ae staging wireless driver from Greg KH:
 "Here's a single staging driver for a wireless chipset that has shown
  up in the SteamBox hardware.  It is merged separately from the "main"
  staging pull request to sync up with the wireless api changes that
  came in from the networking tree.

  It's self-contained and works for me and others.  Larry will be
  replacing it with a "real" driver for 3.15, but for now this one is
  needed"

* tag 'staging-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: r8821ae: Enable build by reverting BROKEN marking
  staging: r8821ae: Fix build problems
  Staging: rtl8812ae: disable due to build errors
  Staging: rtl8821ae: add TODO file
  Staging: rtl8821ae: removed unused functions and variables
  Staging: rtl8821ae: rc.c: fix up function prototypes
  Staging: rtl8812ae: Add Realtek 8821 PCI WIFI driver

10 years agoRevert "PCI: Remove from bus_list and release resources in pci_release_dev()"
Rafael J. Wysocki [Sat, 1 Feb 2014 14:38:29 +0000 (15:38 +0100)]
Revert "PCI: Remove from bus_list and release resources in pci_release_dev()"

Revert commit ef83b0781a73 "PCI: Remove from bus_list and release
resources in pci_release_dev()" that made some nasty race conditions
become possible.  For example, if a Thunderbolt link is unplugged
and then replugged immediately, the pci_release_dev() resulting from
the hot-remove code path may be racing with the hot-add code path
which after that commit causes various kinds of breakage to happen
(up to and including a hard crash of the whole system).

Moreover, the problem that commit ef83b0781a73 attempted to address
cannot happen any more after commit 8a4c5c329de7 "PCI: Check parent
kobject in pci_destroy_dev()", because pci_destroy_dev() will now
return immediately if it has already been executed for the given
device.

Note, however, that the invocation of msi_remove_pci_irq_vectors()
removed by commit ef83b0781a73 from pci_free_resources() along with
the other changes made by it is not added back because of subsequent
code changes depending on that modification.

Fixes: ef83b0781a73 (PCI: Remove from bus_list and release resources in pci_release_dev())
Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoARM: multi_v7_defconfig: remove redundant entries and re-enable TI_EDMA
Olof Johansson [Fri, 31 Jan 2014 23:21:08 +0000 (15:21 -0800)]
ARM: multi_v7_defconfig: remove redundant entries and re-enable TI_EDMA

TI_EDMA fell out of automatically selected options in the multi_v7
defconfig due to a select being removed from the davinci Kconfig entry. So
we need to re-enable explicitly to not regress some platforms.

The rest is just the result of running 'make multi_v7_defconfig + make
savedefconfig' to remove entries that are no longer needed due to changed
dependencies/selects or defaults.

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: multi_v7_defconfig: add mvebu drivers
Olof Johansson [Fri, 31 Jan 2014 23:20:07 +0000 (15:20 -0800)]
ARM: multi_v7_defconfig: add mvebu drivers

Recent boot farm testing has highlighted some issues with mvebu and
multiplatform kernels.  Increase the test coverage so we can discover
these issues earlier.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoclocksource: kona: Add basic use of external clock
Tim Kryger [Thu, 5 Dec 2013 19:20:43 +0000 (11:20 -0800)]
clocksource: kona: Add basic use of external clock

When an clock is specified in the device tree, enable it and use it to
determine the external clock frequency.

Signed-off-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Reviewed-by: Christian Daudt <bcm@fixthebug.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Fri, 31 Jan 2014 23:39:07 +0000 (15:39 -0800)]
Merge tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 "Highlights:

   - Fix several races in nfs_revalidate_mapping
   - NFSv4.1 slot leakage in the pNFS files driver
   - Stable fix for a slot leak in nfs40_sequence_done
   - Don't reject NFSv4 servers that support ACLs with only ALLOW aces"

* tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  nfs: initialize the ACL support bits to zero.
  NFSv4.1: Cleanup
  NFSv4.1: Clean up nfs41_sequence_done
  NFSv4: Fix a slot leak in nfs40_sequence_done
  NFSv4.1 free slot before resending I/O to MDS
  nfs: add memory barriers around NFS_INO_INVALID_DATA and NFS_INO_INVALIDATING
  NFS: Fix races in nfs_revalidate_mapping
  sunrpc: turn warn_gssd() log message into a dprintk()
  NFS: fix the handling of NFS_INO_INVALID_DATA flag in nfs_revalidate_mapping
  nfs: handle servers that support only ALLOW ACE type.

10 years agoMerge tag 'sound-fix-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 31 Jan 2014 23:38:09 +0000 (15:38 -0800)]
Merge tag 'sound-fix-3.14-rc1' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "The big chunks here are the updates for oxygen driver for Xonar DG
  devices, which were slipped from the previous pull request.  They are
  device-specific and thus not too dangerous.

  Other than that, all patches are small bug fixes, mainly for Samsung
  build fixes, a few HD-audio enhancements, and other misc ASoC fixes.
  (And this time ASoC merge is less than Octopus, lucky seven :)"

* tag 'sound-fix-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (42 commits)
  ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled
  ALSA: hda - add headset mic detect quirks for another Dell laptop
  ALSA: oxygen: Xonar DG(X): cleanup and minor changes
  ALSA: oxygen: Xonar DG(X): modify high-pass filter control
  ALSA: oxygen: Xonar DG(X): modify input select functions
  ALSA: oxygen: Xonar DG(X): modify capture volume functions
  ALSA: oxygen: Xonar DG(X): use headphone volume control
  ALSA: oxygen: Xonar DG(X): modify playback output select
  ALSA: oxygen: Xonar DG(X): capture from I2S channel 1, not 2
  ALSA: oxygen: Xonar DG(X): move the mixer code into another file
  ALSA: oxygen: modify CS4245 register dumping function
  ALSA: oxygen: modify adjust_dg_dac_routing function
  ALSA: oxygen: Xonar DG(X): modify DAC/ADC parameters function
  ALSA: oxygen: Xonar DG(X): modify initialization functions
  ALSA: oxygen: Xonar DG(X): add new CS4245 SPI functions
  ALSA: oxygen: additional definitions for the Xonar DG/DGX card
  ALSA: oxygen: change description of the xonar_dg.c file
  ALSA: oxygen: export oxygen_update_dac_routing symbol
  ALSA: oxygen: add mute mask for the OXYGEN_PLAY_ROUTING register
  ALSA: oxygen: modify the SPI writing function
  ...

10 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
Linus Torvalds [Fri, 31 Jan 2014 23:31:23 +0000 (15:31 -0800)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending

Pull SCSI target updates from Nicholas Bellinger:
 "The highlights this round include:

  - add support for SCSI Referrals (Hannes)
  - add support for T10 DIF into target core (nab + mkp)
  - add support for T10 DIF emulation in FILEIO + RAMDISK backends (Sagi + nab)
  - add support for T10 DIF -> bio_integrity passthrough in IBLOCK backend (nab)
  - prep changes to iser-target for >= v3.15 T10 DIF support (Sagi)
  - add support for qla2xxx N_Port ID Virtualization - NPIV (Saurav + Quinn)
  - allow percpu_ida_alloc() to receive task state bitmask (Kent)
  - fix >= v3.12 iscsi-target session reset hung task regression (nab)
  - fix >= v3.13 percpu_ref se_lun->lun_ref_active race (nab)
  - fix a long-standing network portal creation race (Andy)"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (51 commits)
  target: Fix percpu_ref_put race in transport_lun_remove_cmd
  target/iscsi: Fix network portal creation race
  target: Report bad sector in sense data for DIF errors
  iscsi-target: Convert gfp_t parameter to task state bitmask
  iscsi-target: Fix connection reset hang with percpu_ida_alloc
  percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask
  iscsi-target: Pre-allocate more tags to avoid ack starvation
  qla2xxx: Configure NPIV fc_vport via tcm_qla2xxx_npiv_make_lport
  qla2xxx: Enhancements to enable NPIV support for QLOGIC ISPs with TCM/LIO.
  qla2xxx: Fix scsi_host leak on qlt_lport_register callback failure
  IB/isert: pass scatterlist instead of cmd to fast_reg_mr routine
  IB/isert: Move fastreg descriptor creation to a function
  IB/isert: Avoid frwr notation, user fastreg
  IB/isert: seperate connection protection domains and dma MRs
  tcm_loop: Enable DIF/DIX modes in SCSI host LLD
  target/rd: Add DIF protection into rd_execute_rw
  target/rd: Add support for protection SGL setup + release
  target/rd: Refactor rd_build_device_space + rd_release_device_space
  target/file: Add DIF protection support to fd_execute_rw
  target/file: Add DIF protection init/format support
  ...

10 years agodrivers: bus: fix CCI driver kcalloc call parameters swap
Lorenzo Pieralisi [Mon, 27 Jan 2014 10:50:37 +0000 (10:50 +0000)]
drivers: bus: fix CCI driver kcalloc call parameters swap

This patch fixes a bug/typo in the CCI driver kcalloc usage
that inadvertently swapped the parameters order in the
kcalloc call and went unnoticed.

Reported-by: Xia Feng <xiafeng@allwinnertech.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: dts: bcm28155-ap: Fix Card Detection GPIO
Tim Kryger [Tue, 7 Jan 2014 18:53:41 +0000 (10:53 -0800)]
ARM: dts: bcm28155-ap: Fix Card Detection GPIO

The board schematic states that the "SD_CARD_DET_N gets pulled to GND
when card is inserted" so the polarity has been updated to active low.

Polarity is now specified with a GPIO define instead of a magic number.

Signed-off-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'renesas-dt-fixes2-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Fri, 31 Jan 2014 23:08:10 +0000 (15:08 -0800)]
Merge tag 'renesas-dt-fixes2-for-v3.14' of git://git./linux/kernel/git/horms/renesas into fixes

Second Round of Renesas ARM Based SoC DT Fixes for v3.14

Correct i2c clock references for r8a7790 (R-Car H2) SoC

The error was introduced in 72197ca7a1cb1cea5 ("ARM: shmobile: r8a7790:
Reference clocks") which is queued up for v3.14.

* tag 'renesas-dt-fixes2-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7790.dtsi: ficx i2c[0-3] clock reference

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: multi_v7_defconfig: Select CONFIG_AT803X_PHY
Fabio Estevam [Sat, 11 Jan 2014 16:16:16 +0000 (14:16 -0200)]
ARM: multi_v7_defconfig: Select CONFIG_AT803X_PHY

Select CONFIG_AT803X_PHY so that we can boot hummingboard via NFS.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: keystone: config: fix build warning when CONFIG_DMADEVICES is not set
Grygorii Strashko [Thu, 9 Jan 2014 14:37:06 +0000 (09:37 -0500)]
ARM: keystone: config: fix build warning when CONFIG_DMADEVICES is not set

Drop automatic selection of TI_EDMA from Keystone Kconfig file,
as it produces build warning in case if CONFIG_DMADEVICES is not set:

warning: (ARCH_KEYSTONE) selects TI_EDMA which has unmet direct dependencies (DMADEVICES && (ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE))

Instead enable TI EDMA support from defconfig.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMAINTAINERS: ARM: SiRF: use regex patterns to involve all SiRF drivers
Barry Song [Fri, 3 Jan 2014 03:24:13 +0000 (11:24 +0800)]
MAINTAINERS: ARM: SiRF: use regex patterns to involve all SiRF drivers

instead of listing drivers one by one, use regex patterns to involve all
SiRF drivers directly.
this also adds sirf UART and watchdog drivers automatically from:
drivers/tty/serial/sirfsoc_uart.*
drivers/watchdog/sirfsoc_wdt.c

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'mvebu-fixes-3.13-2' of git://git.infradead.org/linux-mvebu into fixes
Olof Johansson [Fri, 31 Jan 2014 22:59:28 +0000 (14:59 -0800)]
Merge tag 'mvebu-fixes-3.13-2' of git://git.infradead.org/linux-mvebu into fixes

mvebu fixes for v3.13 (incremental #2)

 - allow building and booting DT and non-DT plat-orion SoCs
 - catch proper return value for kirkwood_pm_init()
 - properly check return of of_iomap to solve boot hangs (mirabox, others)
 - remove a compile warning on Armada 370 with non-SMP.

* tag 'mvebu-fixes-3.13-2' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: fix compilation warning on Armada 370 (i.e. non-SMP)
  ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed
  ARM: kirkwood: kirkwood_pm_init() should return void
  ARM: orion: provide C-style interrupt handler for MULTI_IRQ_HANDLER

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: dts: zynq: Add SDHCI nodes
Soren Brinkmann [Mon, 2 Dec 2013 18:02:37 +0000 (10:02 -0800)]
ARM: dts: zynq: Add SDHCI nodes

Add nodes for the Arasan SDHCI controller to Zynq dts files.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: hisi: don't select SMP
Rob Herring [Fri, 31 Jan 2014 22:06:30 +0000 (16:06 -0600)]
ARM: hisi: don't select SMP

SMP is a user configurable option, not a hardware feature and should not
be selected.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: tegra: rebuild tegra_defconfig to add DEBUG_FS
Stephen Warren [Sat, 25 Jan 2014 03:13:28 +0000 (20:13 -0700)]
ARM: tegra: rebuild tegra_defconfig to add DEBUG_FS

DEBUG_FS used to be selected by COMMON_CLK_DEBUG, which was enabled
by tegra_defconfig. However, this config option no longer exists, so
no longer selects DEBUG_FS, and nothing else selects it either. So,
"make tegra_defconfig" no longer enables DEBUG_FS in .config.

Rebuild tegra_defconfig on top of next-20140424, while manually
re-enabling DEBUG_FS.

Reasons for removed entries are:
- I2C_MUX: selected by MEDIA_SUBDRV_AUTOSELECT
- DRM_PANEL: selected by DRM_TEGRA
- NEW_LEDS: selected by many things; at least VT
- LEDS_CLASS: selected by many things; at least VT
- LEDS_TRIGGERS: selected by many things; at least VT
- COMMON_CLK_DEBUG: no longer exists

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
10 years agoARM: multi_v7: copy most options from tegra_defconfig
Stephen Warren [Fri, 20 Dec 2013 20:41:32 +0000 (13:41 -0700)]
ARM: multi_v7: copy most options from tegra_defconfig

multi_v7_defconfig was missing a large number of options that were in
tegra_defconfig. This patch adds them. The changes fall into the
following categories:

* Enable more Tegra SoC options/drivers.
* Enable more drivers for Tegra boards.
* Enable more options that are useful for running distros.

The patch removes a few lines as well, simply because those options are
now selected by something else, and "make savedefconfig" removes them. I
verified that the options appear in .config after
"make multi_v7_defconfig".

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: iop32x: fix power off handling for the EM7210 board
Linus Walleij [Wed, 29 Jan 2014 14:20:15 +0000 (15:20 +0100)]
ARM: iop32x: fix power off handling for the EM7210 board

This board was missed when converting all the others to proper
abstracted GPIO handling. Fix it up the right way by requesting
and driving GPIO line 0 high through gpiolib to power off the
machine.

Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: integrator: restore static map on the CP
Linus Walleij [Fri, 24 Jan 2014 13:04:28 +0000 (14:04 +0100)]
ARM: integrator: restore static map on the CP

Commit 78d1632183454dba46ca8295484a5e7603acdc18 deleted the
static mappings of the core modules, but this static map is
still needed on the Integrator/CP (not the Integrator/AP).

Restore the static map on the Integrator/CP.

Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: msm_defconfig: Enable MSM clock drivers
Stephen Boyd [Fri, 17 Jan 2014 01:25:04 +0000 (17:25 -0800)]
ARM: msm_defconfig: Enable MSM clock drivers

This allows us to probe the clock controller devices and boot to a
serial console on all DT enabled MSM platforms.

Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: dts: msm: Add clock controller nodes and hook into uart
Stephen Boyd [Fri, 17 Jan 2014 01:25:03 +0000 (17:25 -0800)]
ARM: dts: msm: Add clock controller nodes and hook into uart

Add the necessary DT nodes to probe the clock controllers on MSM
devices as well as hook up the uart nodes to the clock
controllers. This should allow us to boot to a serial console on
all DT enabled MSM platforms.

Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: OMAP4+: move errata initialization to omap4_pm_init_early
Nishanth Menon [Mon, 20 Jan 2014 20:06:37 +0000 (14:06 -0600)]
ARM: OMAP4+: move errata initialization to omap4_pm_init_early

Move all OMAP4 PM errata initializations to centralized location in
omap4_pm_init_early. This allows for users to utilize the erratas
in various submodules as needed.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: OMAP4460: cpuidle: Extend PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD on cpuidle
Strashko, Grygorii [Tue, 22 Oct 2013 19:07:15 +0000 (22:07 +0300)]
ARM: OMAP4460: cpuidle: Extend PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD on cpuidle

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859
"ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..."
need to be applied not only when system is booting, but when MPUSS hits
OSWR state through CPUIdle too. Without this WA the same issue is
reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460
when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Cc: Kevin Hilman <khilman@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reported-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>