Paul Zimmerman [Thu, 19 Dec 2013 18:38:49 +0000 (12:38 -0600)]
usb: dwc3: gadget: add a 'restore' argument to set_ep_config
That argument will be used in later patches when we
have working hibernation support. For now, always
pass it as false.
The idea of this patch is to decrease to size of
following patches and slowly add hibernation building
blocks to the gadget side of dwc3 so that it becomes
very easy to review the actual hibernation code.
[ balbi@ti.com : rewrote patch on top of current
tree. Added commit log. ]
Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Tue, 25 Feb 2014 20:00:13 +0000 (14:00 -0600)]
usb: dwc3: workaround: clock gating issues
Revisions between 2.10a and 2.50a (included) have
a known issue which may cause xHCI compliance tests
to fail and/or quality issues with Isochronous
transactions.
Note that this issue only impacts certain configurations
of those revisions, namely the ones which have clock
gating enabled.
The suggested workaround is to disable clock gating in
known broken revisions, make sure HW LPM is disabled
and set GCTL.SOFITPSYNC to 1.
Robert Baldyga [Thu, 20 Feb 2014 08:26:25 +0000 (09:26 +0100)]
usb: gadget: at91_udc: fix ep maxpacket initialisation
This patch fixes problem with unnecessary usb_ep_set_maxpacket_limit() usage.
It should not be used in at91udc_probe() function, where maxpacket values are
set for field "maxpacket" of struct at91_ep, which is representation of
endpoint in driver internals. Function usb_ep_set_maxpacket_limit() is called
in udc_reinit() function, where struct usb_ep instances are initialised with
values set previously in struct at91_ep instances. So it's very important to
initialise it properly.
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: musb: USB_MUSB_DUAL_ROLE/USB_MUSB_GADGET should depend on HAS_DMA
If NO_DMA=y:
drivers/built-in.o: In function `txstate':
musb_gadget.c:(.text+0x35955a): undefined reference to `dma_unmap_single'
musb_gadget.c:(.text+0x35957e): undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `musb_g_giveback':
(.text+0x359672): undefined reference to `dma_mapping_error'
drivers/built-in.o: In function `musb_g_giveback':
(.text+0x3596ba): undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `musb_g_giveback':
(.text+0x3596e0): undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `rxstate':
musb_gadget.c:(.text+0x3599d0): undefined reference to `dma_unmap_single'
musb_gadget.c:(.text+0x3599f6): undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `musb_gadget_queue':
musb_gadget.c:(.text+0x35a8c0): undefined reference to `dma_map_single'
musb_gadget.c:(.text+0x35a8d0): undefined reference to `dma_mapping_error'
musb_gadget.c:(.text+0x35a906): undefined reference to `dma_sync_single_for_cpu'
musb_gadget.c:(.text+0x35a9a0): undefined reference to `dma_unmap_single'
musb_gadget.c:(.text+0x35a9c8): undefined reference to `dma_sync_single_for_cpu'
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Tue, 7 Jan 2014 09:45:50 +0000 (17:45 +0800)]
usb: dwc3: fix wrong bit mask in dwc3_event_devt
Around DWC USB3 2.30a release another bit has been added to the
Device-Specific Event (DEVT) Event Information (EvtInfo) bitfield.
Because of that, what used to be 8 bits long, has become 9 bits long.
Per dwc3 2.30a+ spec in the Device-Specific Event (DEVT), the field of
Event Information Bits(EvtInfo) uses [24:16] bits, and it has 9 bits
not 8 bits. And the following reserved field uses [31:25] bits not
[31:24] bits, and it has 7 bits.
So in dwc3_event_devt, the bit mask should be:
event_info [24:16] 9 bits
reserved31_25 [31:25] 7 bits
This patch makes sure that newer core releases will work fine with
Linux and that we will decode the event information properly on new
core releases.
[ balbi@ti.com : improve commit log a bit ]
Cc: <stable@vger.kernel.org> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Dan Carpenter [Fri, 17 Jan 2014 13:34:11 +0000 (16:34 +0300)]
usb: gadget: gr_udc: remove some unneeded error handling
Debugfs function return an ERR_PTR if they compiled out. We don't need
to test for that here because if the debugfs file are compiled out then
it is ok to pass an ERR_PTR to debugfs_create_file() since it will just
be a no-op stub.
Debugfs return NULLs on error, but we don't need to test for that either
because debugfs_create_file() will accept NULL pointers.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Bo Shen [Wed, 19 Feb 2014 02:07:44 +0000 (10:07 +0800)]
usb: gadget: at91: using USBA_NR_DMAS for DMA channels
The SoCs earlier than sama5d3, they have the same number endpoints
and DMA channels. In driver code, they use the same definition
USBA_NR_ENDPOINTS for both endpoints and dma channels. However,
in sama5d3, it has different number for endpoints and DMA channels.
So, define a new macro USBA_NR_DMAs for DMA channels. And the
USBA_NR_ENDPOINS is not used anymore, remove it at the same time.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Bo Shen [Wed, 19 Feb 2014 02:07:43 +0000 (10:07 +0800)]
usb: gadget: at91: fix the number of endpoint parameter
In sama5d3 SoC, there are 16 endpoints, which is different with
earlier SoCs (only have 7 endpoints). The USBA_NR_ENDPOINTS macro
is not suitable for sama5d3. So, get the endpoints number through
the udc->num_ep, which get from platform data for non-dt kernel,
or parse from dt node.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
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>
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>
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>
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>
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>
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>
Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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
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>
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>
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>
Merge tag 'for-usb-linus-2014-02-04' of git://git.kernel.org/pub/scm/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"
Linus Torvalds [Mon, 3 Feb 2014 00:32:53 +0000 (16:32 -0800)]
Merge branch 'parisc-3.14' of git://git.kernel.org/pub/scm/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
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.
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).
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).
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>
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).
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>
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.
Linus Torvalds [Sun, 2 Feb 2014 19:30:08 +0000 (11:30 -0800)]
Merge branch 'slab/next' of git://git.kernel.org/pub/scm/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
Linus Torvalds [Sun, 2 Feb 2014 19:28:48 +0000 (11:28 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/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
Linus Torvalds [Sun, 2 Feb 2014 19:11:06 +0000 (11:11 -0800)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/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
...
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>
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>
Linus Torvalds [Sat, 1 Feb 2014 19:03:16 +0000 (11:03 -0800)]
Merge branch 'misc' of git://git.kernel.org/pub/scm/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
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 ]
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.
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()
Linus Torvalds [Sat, 1 Feb 2014 18:43:45 +0000 (10:43 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/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
Linus Torvalds [Sat, 1 Feb 2014 18:29:59 +0000 (10:29 -0800)]
Merge tag 'staging-3.14-rc1' of git://git.kernel.org/pub/scm/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
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>
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.
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>
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>