Adds HNP polling timer when transits to host state, the OTG status
request will be sent to peripheral after timeout, if host request flag
is set, it will switch to peripheral state, otherwise it will repeat HNP
polling every 1.5s and maintain the current session.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Since commit 855ed04a37 ("usb: gadget:
udc-core: independent registration of gadgets and gadget drivers") gadget
drivers can not assume that UDC drivers are already available on their
initialization. This broke the HACK, which was used in gadgetfs driver,
to get UDC controller name. This patch removes this hack and replaces it
by additional function in the UDC core (which is usefully only for legacy
drivers, please don't use it in the new code).
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
For every in_substream, there must be a corresponding gmidi_in_port
structure so it is perfectly viable and some might argue sensible to
stash pointer to the input substream in the gmidi_in_port structure.
This has an added benefit that if in_ports < MAX_PORTS, the whole
f_midi structure takes up less space because only in_ports number of
pointers for in_substream are allocated instead of MAX_PORTS lots of
them.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
We added a new error path to this function and we forgot to drop the
lock.
Fixes: e1e3d7ec5d ('usb: gadget: f_midi: pre-allocate IN requests')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[mina86@mina86.com: rebased on top of refactoring commit]
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Reduce number of allocations, simplify memory management and reduce
memory usage by stacking the gmidi_in_port elements at the end of the
f_midi structure using a flexible array.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
In general case, all of midi->in_port pointers may be non-NULL which
implies that the ‘if (\!port)’ condition will never execute thus never
zeroing midi->in_last_port. Fix by rewriting the loop such that the
field is set to zero if \!port or end of loop has been reached.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Move some of the f_midi_transmit to a separate f_midi_do_transmit
function so the massive indention levels are not so jarring. This
introduces no changes in behaviour.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
remove a field which is unnecessary. No functional changes.
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
ffs_epfile_io and ffs_epfile_io_complete runs in different context, but
there is no synchronization between them.
consider the following scenario:
1) ffs_epfile_io interrupted by sigal while
wait_for_completion_interruptible
2) then ffs_epfile_io set ret to -EINTR
3) just before or during usb_ep_dequeue, the request completed
4) ffs_epfile_io return with -EINTR
In this case, ffs_epfile_io tell caller no transfer success but actually
it may has been done. This break the caller's pipe.
Below script can help test it (adbd is the process which lies on f_fs).
while true
do
pkill -19 adbd #SIGSTOP
pkill -18 adbd #SIGCONT
sleep 0.1
done
To avoid this, just dequeue the request first. After usb_ep_dequeue, the
request must be done or canceled.
With this change, we can ensure no race condition in f_fs driver. But
actually I found some of the udc driver has analogical issue in its
dequeue implementation. For example,
1) the dequeue function hold the controller's lock.
2) before driver request controller to stop transfer, a request
completed.
3) the controller trigger a interrupt, but its irq handler need wait
dequeue function to release the lock.
4) dequeue function give back the request with negative status, and
release lock.
5) irq handler get lock but the request has already been given back.
So, the dequeue implementation should take care of this case. IMO, it
can be done as below steps to dequeue a already started request,
1) request controller to stop transfer on the given ep. HW know the
actual transfer status.
2) after hw stop transfer, driver scan if there are any completed one.
3) if found, process it with real status. if no, the request can
canceled.
Signed-off-by: "Du, Changbin" <changbin.du@intel.com>
[mina86@mina86.com: rebased on top of refactoring commits]
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Eliminate one of the return paths by using a ‘goto error_mutex’ and
rearrange some if-bodies which results in reduction of the indention level
and thus hopefully makes the function easier to read and reason about.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
In ffs_epfile_io error label points to a return path which includes
a kfree(data) call. However, at the beginning of the function data is
always NULL so some of the early ‘goto error’ can safely be replaced
with a trivial return statement.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
In the AIO path, if allocating of a request failse, the function simply
goes to the error_lock path whose end result is returning value of ret.
However, at this point ret’s value is zero (assigned as return value from
ffs_mutex_lock).
Fix by adding ‘ret = -ENOMEM’ statement.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
In the ffs_epfile_io function, data buffer is allocated for non-halt
requests. Later, after grabing a mutex, the function checks that
epfile->ep is still ep and if it’s not, it set ret to -ESHUTDOWN and
follow a path including spin_unlock_irq (just after ‘ret = -ESHUTDOWN’),
mutex_unlock (after if-else-if-else chain) and returns ret. Noticeably,
this does not include freeing of the data buffer.
Fix by introducing a goto which moves control flow to the the end of the
function where spin_unlock_irq, mutex_unlock and kfree are all called.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
phy-am335x.c doesn't use any interfaces from linux/regulator/consumer.h, so
stop including it.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
When I wrote the cleanup patch series, it was not clear how
exactly big-endian mode works on ixp4xx, and whether the driver
was doing this correctly. After discussing with Krzysztof Hałasa,
this has been clarified, so I can update the comment let pxa25x
big-endian (which we don't support) work the same way as ixp4xx.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
When dma_addr_t is 64-bit, we get a warning about an invalid cast
in the call to ux500_dma_is_compatible() from ux500_dma_channel_program():
drivers/usb/musb/ux500_dma.c: In function 'ux500_dma_channel_program':
drivers/usb/musb/ux500_dma.c:210:51: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
if (!ux500_dma_is_compatible(channel, packet_sz, (void *)dma_addr, len))
The problem is that ux500_dma_is_compatible() is called from the
main musb driver on the virtual address, but here we pass in a
DMA address, so the types are fundamentally different but it works
because the function only checks the alignment of the buffer and
that is the same.
We could work around this by adding another cast, but I have checked
that the buffer we get passed here is already checked before it
gets mapped, so the second check seems completely unnecessary
and removing it must be the cleanest solution.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
The musb driver prints DMA addresses in a few places, using the
0x%x format string. This is wrong on 64-bit architectures (which
need %lx) and 32-bit ARM with CONFIG_LPAE set (which needs
%llx), otherwise we print the wrong data, as gcc warns:
musb/musbhsdma.c: In function 'configure_channel':
musb/musbhsdma.c:120:53: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
dev_dbg(musb->controller, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n",
musb/musbhsdma.c: In function 'dma_channel_program':
musb/musbhsdma.c:155:53: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
dev_dbg(musb->controller, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n",
musb/tusb6010_omap.c: In function 'tusb_omap_dma_program':
musb/tusb6010_omap.c:313:53: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
dev_dbg(musb->controller, "ep%i %s dma ch%i dma: %08x len: %u(%u) packet_sz: %i(%i)\n",
This uses the %pad format string, which prints a dma_addr_t that
gets passed by reference, which works for all combinations.
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
The power_up function is used for otg or udc mode, but nost when
the driver is only configured for host mode:
drivers/usb/phy/phy-isp1301-omap.c:261:13: error: 'power_up' defined but not used [-Werror=unused-function]
This marks the function __maybe_unused to avoid the warning and
silently drop the definition when it is unused.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
The USB_FSL_MPH_DR_OF symbol is used to ensure the code that interprets
the DR device node is built whenever one of the two drivers (EHCI or
UDC) for the platform is enabled. However, if CONFIG_USB is disabled
and we only support gadget mode, this causes a Kconfig warning:
warning: (USB_FSL_USB2) selects USB_FSL_MPH_DR_OF which has unmet direct dependencies (USB_SUPPORT && USB)
We can avoid this warning by simply no longer using the symbol,
and making sure we enter the drivers/usb/host/ directory when
the UDC driver is enabled that needs the file, and then we use
Makefile syntax to ensure the file is built-in if needed.
There is currently a dependency on CONFIG_OF, but this is redundant,
as we already know that this is set unconditionally for the platforms
that use this driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
This converts the pxa25x udc driver to use readl/writel as normal
driver should do, rather than dereferencing __iomem pointers
themselves.
Based on the earlier preparation work, we can now also pass
the register start in the device pointer so we no longer need
the global variable.
The unclear part here is for IXP4xx, which supports both big-endian
and little-endian configurations. So far, the driver has done
no byteswap in either case. I suspect that is wrong and it would
actually need to swap in one or the other case, but I don't know
which. It's also possible that there is some magic setting in
the chip that makes the endianess of the MMIO register match the
CPU, and in that case, the code actually does the right thing
for all configurations, both before and after this patch.
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
This removes the dependency on the mach/hardware.h header file
from the pxa25x_udc driver after the register definitions were
already unified in the previous patch.
Following the model of pxa27x_udc (and basically all other drivers
in the kernel), we define the register numbers as offsets from
the register base address and use accessor functions to read/write
them.
For the moment, this still leaves the direct pointer dereference
in place, instead of using readl/writel, so this patch should
not be changing the behavior of the driver, other than using
ioremap() on the platform resource to replace the hardcoded
virtual address pointers.
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
ixp4xx and pxa25x both use this driver and provide a slightly
different set of register definitions for it. Aside from that,
the definition in the ixp4xx-regs.h header conflicts with the
on in the pxa27x device driver when compile-testing that:
In file included from ../drivers/usb/gadget/udc/pxa27x_udc.c:37:0:
../drivers/usb/gadget/udc/pxa27x_udc.h:26:0: warning: "UDCCR" redefined
#define UDCCR 0x0000 /* UDC Control Register */
^
In file included from ../arch/arm/mach-ixp4xx/include/mach/hardware.h:27:0,
from ../arch/arm/mach-ixp4xx/include/mach/io.h:18,
from ../arch/arm/include/asm/io.h:194,
from ../include/linux/io.h:25,
from ../include/linux/irq.h:24,
from ../drivers/usb/gadget/udc/pxa27x_udc.c:23:
../arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h:415:0: note: this is the location of the previous definition
#define UDCCR IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0000)
This addresses both issues by moving all the definitions into the
pxa25x_udc driver itself. It turns out the only difference between
them was 'UDCCS_IO_ROF', and that could well be a mistake when it
was incorrectly copied from pxa25x to ixp4xx.
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Since Some SoCs (e.g. R-Car Gen2) don't have the CSSTS bit in the
pipectrl registers ({DCP,PIPEn}CTR) because such SoCs have peripheral
mode only. So, this driver should not check the CSSTS bit if peripheral
mode is running.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Since the usb2 phy driver for gen3 (phy-rcar-gen3-usb2) cannot access
LPSTS and UGCTRL2 registers in the HSUSB module, this driver have to
initialize the registers. So, this patch adds such handling code into
rcar3.c.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Enable SuperSpeedPlus by programming the DCFG.speed and after
enumerating, set gadget->speed appropriately.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
If the maximum_speed is not set, set it to a known value, either
SuperSpeed or SuperSpeedPlus based on the type of controller we are
using. If we are on DWC_usb31 controller, check the PHY interface to see
if it is capable of SuperSpeedPlus.
Also this check is moved after dwc3_core_init() so that we can check
dwc->revision.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Update various places where the speed is checked so that it takes into
account SuperSpeedPlus properly.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Update various registers fields definitions for the DWC_usb31 controller
for SuperSpeedPlus support.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Add a convenience function to check if the controller is DWC_usb31.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Enable superspeed plus configuration for the mass storage gadget.
The mass storage function doesn't do anything special for
SuperSpeedPlus. Just pass in the same SuperSpeed descriptors for
SuperSpeedPlus.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Update the debug message reporting the speeds that a configuration
supports for SuperSpeedPlus.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Configure the usb_ep using the SuperSpeedPlus descriptors if connected
in SuperSpeedPlus.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Enable writing of SuperSpeedPlus descriptors for any SuperSpeedPlus
capable configuration when connected in SuperSpeedPlus.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
There are a couple places in the code that get the function descriptors
based on the speed. Move this lookup into a function call and add
support to handle the SuperSpeedPlus descriptors as well.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
If enumerated in SuperSpeedPlus, count the configurations that support
it.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
When a function is added to a configuration with usb_add_function(), the
configuration speed flags are updated. These flags indicate for which
speeds the configuration is valid for.
This patch adds a flag in the configuration for SuperSpeedPlus and
also updates this based on the existence of ssp_descriptors.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Add a ssp_descriptors member to struct usb_function and handle the
initialization and cleanup of it. This holds the SuperSpeedPlus
descriptors for a function that supports SuperSpeedPlus. This is added
by usb_assign_descriptors().
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Add the 'ssp_descriptors' parameter to the usb_assign_descriptors()
function. This allows a function driver to add descriptors for
SuperSpeedPlus speeds if it supports it.
Also update all uses of this function in the gadget subsystem so that
they pass NULL for the ssp_descriptors parameters.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
If a gadget supports SuperSpeedPlus or higher speeds, return a
SuperSpeedPlus USB Device Capability descriptor.
Currently this implementation returns a fixed descriptor with typical
values set.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
The USB 3.1 specification replaces the USB 3.0 specification and all new
devices that are running at SuperSpeed or higher speeds must report a
bcdUSB of 0x0310.
Refer to USB 3.1 Specification, Revision 1.0, Section 9.6.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
LPC32xx common clock framework driver correctly manages parent clocks
of USB OHCI clock, so there is no need to manually enable and
disable them from the driver, which now depends only on a single USB
host clock.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Direct access to clock control registers can be safely removed, the
task of clock management is done by platform clock driver based on
common clock framework.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The ehci-atmel driver uses #ifdef to check for CONFIG_PM, but then
uses SIMPLE_DEV_PM_OPS, which leaves the references out when
CONFIG_PM_SLEEP is not defined, so we get a warning with
PM=y && PM_SLEEP=n:
drivers/usb/host/ehci-atmel.c:189:12: error: 'ehci_atmel_drv_suspend' defined but not used [-Werror=unused-function]
drivers/usb/host/ehci-atmel.c:203:12: error: 'ehci_atmel_drv_resume' defined but not used [-Werror=unused-function]
This removes the incorrect #ifdef and instead uses a __maybe_unused
annotation to let the compiler know it can silently drop
the function definition.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The ohci-at91 driver uses #ifdef to check for CONFIG_PM, but then
uses SIMPLE_DEV_PM_OPS, which leaves the references out when
CONFIG_PM_SLEEP is not defined, so we get a warning with
PM=y && PM_SLEEP=n:
drivers/usb/host/ohci-at91.c:587:1: error: 'ohci_hcd_at91_drv_suspend' defined but not used [-Werror=unused-function]
drivers/usb/host/ohci-at91.c:631:12: error: 'ohci_hcd_at91_drv_resume' defined but not used [-Werror=unused-function]
This removes the incorrect #ifdef and instead uses a __maybe_unused
annotation to let the compiler know it can silently drop
the function definition.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to
conditionally set the correct suspend/resume options, and
also puts both the dev_pm_ops and the functions inside of
an #ifdef testing for CONFIG_PM_SLEEP, but those functions
then call other code that becomes unused:
drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function]
drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function]
drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function]
This replaces the #ifdef with __maybe_unused annotations so the
compiler knows it can silently drop them instead of warning.
For the DEV_PM_OPS definition, we can use an IS_ENABLED() check
to avoid defining the structure when CONFIG_PM is not set without
the #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There is no need to hide function declarations, and making
these visible to the SoC specific host drivers lets us
use __maybe_unused and IS_ENABLED() checks to control
their use, rather than having to use #ifdef to hide all
callers.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The usbip_protocol.txt, a document which describes usbip's
inner workings is currently located in the projects source
directory (drivers/usb/usbip/...). This patch moves it to
Documentation/usb.
This discussion was brought up by Guy Harris [0] during the
review of the USBIP dissector I wrote. For anyone interested:
support is available with the latest wireshark master/dev tree.
Simply select a packet from the usbip's tcp-stream you are
intrested on and select the USBIP as the protocol in the
"Decode As" dialog box [1].
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
[0] <https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=12127#c2>
[1] <https://www.wireshark.org/docs/wsug_html_chunked/ChCustProtocolDissectionSection.html#ChAdvDecodeAs>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb_autopm_put_interface() should be called regardless of what
idmouse_create_image() returns.
Signed-off-by: Junjie Mao <junjie.mao@enight.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
A typo of j for i led to a logic bug. To rule out future
confusion, the variable names are made meaningful.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add fallback compatibility strings for R-Car Gen2 and Gen3.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Here are some new device ids and a patch removing the mxu11x0 driver,
which turned out not to be needed.
Signed-off-by: Johan Hovold <johan@kernel.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJW2GZ1AAoJEEEN5E/e4bSVY9gQAKhsqZAtF8qpEVJVhDdEu21L
o5bNW9d04PaBWIwg/ju00Itsbt0rxBnlCjgAZlcj0sZy+ZR14GStFqxrW4YrPkif
o/VHSMiYJUKqNsvkqdqCWRxgIOK0Wa/FW0b8E0TrYIDI7zopC6uIrS0yxeXks51D
Y15L2Qh0dm4+l9aA0f8IoMRT2pG2zcQELtwlhyQGVrrjNj/WoKuauuzeewXsd2NF
Oz16UMp3/WsiVTpcM39gSdlV0EXxsFweuQsfTN5Fysd8wDf5xMcD+BtX8ApPibsx
/qHGwlGmghpMcXQXUUooKtM85vOhRL7bqUwr8+Q/DIoJ1L3qLaoIu6Z1M+s/jue3
gdavgB3g6nm/fmUp1gF7+3KeLYgPUxTE8y64iE7C1/dJmet5qi4dbA9R2chs6582
w6UsPcXXMUIlGpxE+cffBiYKfTM5/Qe1Ry6D4VP7ZezdGzy0oUhuOXDWzkAL3yjf
ykdyKa5LD11gQInkCJJofBzUT18T9uxWuEB/N9XLc/Nq06WfLef2fCMyUqKaezOF
+fZRrrX3MIAjN9/PuaQACCBpuD2Mtw2Vob/GORE1wLX0TsfBUkOBhjnPlG7Bu3T0
NwETj/pxX8BGJjcJjLo76+4Fl+5FxDFzSTWmEWNv7VEwhDl9CrRkgbn5AigIR74J
WAIVm7omLibBcz5jWO+j
=f2SZ
-----END PGP SIGNATURE-----
Merge tag 'usb-serial-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Jonan writes:
USB-serial fixes for v4.5-rc7
Here are some new device ids and a patch removing the mxu11x0 driver,
which turned out not to be needed.
Signed-off-by: Johan Hovold <johan@kernel.org>
MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on
sunxi systems using the OTG controller. This commit adds the missing
line so it loads automatically when building it as a module and running
on a system with an USB OTG port.
Signed-off-by: Emilio López <emilio.lopez@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
The MC74xx and EM74xx modules use different IDs by default, according
to the Lenovo EM7455 driver for Windows.
Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Johan Hovold <johan@kernel.org>
This reverts commit 0b2b093ad4.
Turns out the MOXA vendor driver was basically just a copy of the
ti_usb_3410_5052 driver. We don't want two drivers for the same chip
even if mxu11x0 had gotten some much needed clean up before merge. So
let's remove the mxu11x0 driver, add support for these Moxa devices to
the TI driver, and then clean that driver up instead.
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch adds support for 0x1045 PID of Telit LE922.
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
cp210x_get_config and cp210x_set_config are cumbersome to use. This change
switches large register access to use new block functions. The old
functions are removed because now they become unused.
Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
[johan: minor style change ]
Signed-off-by: Johan Hovold <johan@kernel.org>
cp210x_get_config and cp210x_set_config are cumbersome to use. This change
introduces new register access functions for 8 and 32-bit values, instead
of the above functions.
Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
cp210x_get_config and cp210x_set_config are cumbersome to use. This change
introduces new register access functions for 16-bit values, instead of
the above functions.
Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
The Parrot NMEA GPS Flight Recorder is a USB composite device
consisting of hub, flash storage, and cp210x usb to serial chip.
It is an accessory to the mass-produced Parrot AR Drone 2.
The device emits standard NMEA messages which make the it compatible
with NMEA compatible software. It was tested using gpsd version 3.11-3
as an NMEA interpreter and using the official Parrot Flight Recorder.
Signed-off-by: Vittorio Alfieri <vittorio88@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Avoid printing an error if adding the device failes with return
value EPROBE_DEFFER. This may happen e.g. due to missing GPIO for
the vbus-supply regulator.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
In chipidea IP RTL, there is a very limited design for siTD, the detail
like below:
There is no Max Packet Size at siTD, so it uses one constant for both
Max Packet Size for packet and the packet size for the last transaction
when considering schedule.
If the ttctrl.ttha does not match against Hub Address field in siTD,
this constant is 188 bytes, else this constant is 1023 bytes.
If the ttctrl.ttha is non-zero value, RTL will use 188 as this constant,
so it will lose the data if the packet size is larger than 188 bytes, eg,
if we playback a wav which format is 48khz, 16 bits, 2 channels, the
packet size will be 192bytes, but the controller will only send 188 bytes
for this packet, the noise will be heared using USB audio card.
The use case is single transaction, but higher frame rate.
If the ttctr.ttha is zero value, we can send 1023 bytes within one
transaction, but the controller will not accept the coming tranaction
if it considers the schedule time is less than 1023 bytes. So the
limitation is we can't schedule as many as transactions within frame.
If the total bytes is already 256 bytes for previous transactions within
frame, it can't accept another transaction. The use case is multiple
transactions, but less frame rate.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
retval is assigned to be -EOVERFLOW but is overwritten later before
it's used, remove this unused value assignment.
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Until now the imx23 uses the imx27 platform flag. But the
imx23 needs the flag CI_HDRC_TURN_VBUS_EARLY_ON, too. So
fix this by adding a separate platform flag.
Suggested-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Bool initializations should use true and false. Bool tests don't need
comparisons.
Also, use IS_ENABLED instead of ifdef.
Generated by: scripts/coccinelle/misc/boolinit.cocci
Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Remove unneeded variables when "0" can be returned.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Move constants to the right of binary operators where it increases
readability.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
[johan: drop some chunks and fix others, amend commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
The check for < 0 is impossible now that
of_clk_get_parent_count() returns an unsigned int. Simplify the
code and update the types.
Acked-by: Felipe Balbi <balbi@kernel.org>
Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
- Big PMC rework that touches clk, PM, usb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABCAAGBQJWxSJHAAoJEKbNnwlvZCyzEGsQALRmJvHYqYNPRgHKHlFGV4Uh
KuDuT0O/hVQqf1WB+gXt6E2WbDTzU+QGV8jux2zvZdi4ExdjZBTM9o1iQrORRyr0
AHcXsNRkbZ5t7mNp1WVQGMCmK3M/cuN2BmtPQzozmFyo4UNlPzxH7//DbhbrLxqI
zuYmxs5z1RMflIJTo4LfJGXzo6QzwrsRmiPANIr9niICa51F6x0HYMZTn1IMMGG/
KbJ9Rx8fOEqRgCo9LIvJPZa4jvFNjyqQN74qqX66XZW3LBJK4M5q+F/LUaw6M7Bi
7KVc47yRTujGOEHz/jhsf4IVbkUg1vidicIL1VMz9xjD1ZbjjCr0pdFlU/76r4BB
Ot2alkE56+zSAbpBaWGQ9nih97GF/vpwlD+qeGs+UwhmF69wmTOrtSEi1uL+gRzM
sdGXhQtMVPHJuK9fuZBP4bjgnAryZSpJHk/7VcEJ7rvuyXgXZGKdqN3lt8hjWyoi
SuOQ+mqpt726o1fGA8/kKwr/Po6BhYBYLw1SAJjBZ5BF4fTi+9d2Q1C/M8F9X0wE
UMXYfTkr4URDiNLFh8vyJoq/B0pN7FxtcPtaSoaCZO2jP5rXn36Axre35Si76WTb
ndT4YlSKCwOrhk84on2ym3yHEwOCJndB7F+CqiA2t/qool4aD2vcqDzlmeZoUT8r
qMB7zXbgpZ1ezqm6RKUB
=V4yQ
-----END PGP SIGNATURE-----
Merge tag 'at91-ab-4.6-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/drivers
From Alexandre Belloni:
"This is a rework of the PMC driver. It touches multiple subsystems so
the easiest path is through arm-soc."
drivers update for 4.6:
- Big PMC rework that touches clk, PM, usb
* tag 'at91-ab-4.6-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
clk: at91: remove useless includes
clk: at91: pmc: remove useless capacities handling
clk: at91: pmc: drop at91_pmc_base
usb: gadget: atmel: access the PMC using regmap
ARM: at91: remove useless includes and function prototypes
ARM: at91: pm: move idle functions to pm.c
ARM: at91: pm: find and remap the pmc
ARM: at91: pm: simply call at91_pm_init
clk: at91: pmc: move pmc structures to C file
clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe
clk: at91: remove IRQ handling and use polling
clk: at91: make use of syscon/regmap internally
clk: at91: make use of syscon to share PMC registers in several drivers
Signed-off-by: Olof Johansson <olof@lixom.net>
The most important fixes here are:
a) yet another fix to dwc3's EP transfer resource
assignment logic. This time around we will be
pre-allocating transfer resources to avoid any
future issues;
b) two DMA fixes for the old MUSB driver.
c) dwc2's data toggle fix for FS
Other than these, we have a few other minor fixes
elsewhere.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJWzAM4AAoJEIaOsuA1yqREBCUP+QGgS85vE3L4pdVsvIg92j5l
9kgSyhJvJEbWlxPQlft08gvYlazD1993IP1UW3aFVDVpJt/yxf1rd7zqMrnh1jSM
c0SWYrlXVpkPuH15o4JaNjSajsJ9CM7kOg32WcleOmqugWiY4et98wrOkxIYtm1Y
5cR34O12WL+XcdgluxNz0CF3UQTvnI3EurwJzLMRvEqG/QmUCoN6Ie3nRxKOglhn
/UIHVT2kv/qN1L3QgdNPZzn3n3fX7ZdSg6sTMjdM7VWGNOrziK6658KBx9q64XeG
G3HQyOtxzXhAMHFHNxjh0RCkg+KJL+vkfouZJHtEZtX8JialnGwGIVnnyCbqZTwn
VVQcR8Jwh5Ph2oBIAyefqjFPIiKrvZ+Xq34j912W03KGertIoAW+8uOWM4Y6i8Ey
CU/kvUPjyI6I7znddJaeLvik3AL4G9YIi2rMdLs33ayWFhU3A0Lyg5mIdZox5w+Z
sMBe8OOfr5DnbgzzHyRW2yoTQrGSy11q8ZJom88jXreH3afM1naMduhnDAaYGN9/
X2WmIu+NyyxbK/VeDsr4RiZtgmAp/8udfkootPkbAcH68mPlQo5/tztdYAFOrcNa
gUmvL4j4yukagBG1XiKyS2eevnRqGq4bRwMkCzQ4PutZUQr67Wk+LxllUEvhSIFp
7puDKjAIKHHd6lQZykmp
=5QjC
-----END PGP SIGNATURE-----
Merge tag 'fixes-for-v4.5-rc6' of http://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes:
usb: fixes for v4.5-rc6
The most important fixes here are:
a) yet another fix to dwc3's EP transfer resource
assignment logic. This time around we will be
pre-allocating transfer resources to avoid any
future issues;
b) two DMA fixes for the old MUSB driver.
c) dwc2's data toggle fix for FS
Other than these, we have a few other minor fixes
elsewhere.
Commit ac33cdb166 ("usb: musb: Remove ifdefs for musb_host_rx in
musb_host.c part5") introduces a problem setting DMA host mode.
The musb_advance_schedule() is called immediately after receiving an
endpoint RX interrupt without waiting for the DMA transfer to complete.
As a consequence when the dma complete interrupt arrives the in_qh
member of hw_ep is already null an the musb_host_rx() exits on !urb
error case. Fix the done condition that advances the musb schedule.
Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
When working in Dual Role Device mode, USB state machine is not kicked,
when host or gadget drivers are loaded. Fix this be explicitly triggering
state detection on client driver load.
Issue is that if the board is booted without micro usb cable and usb
device attached, kernel fails to populate the usb host and device.
The reason for this is that the state machine worker logic only checks
for USB_DR_MODE_PERIPHERAL and USB_DR_MODE_HOST modes to run worker
thread. However if the phy is configured in OTG mode it would fail
to run the state machine, resulting in failure to detect for very
first time.
This patch fixes the issue by removing the explicit checks.
Issue is noticed on Qualcomm Dragon board DB410C.
[srinivas.kandagatla@linaro.org: Added more details to log]
Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
This patch fixes the register offset used for super-speed connection's
max packet size. Without it using the 338x series of devices in enhanced
mode will only allow full or high speed operation to function correctly.
Signed-off-by: Simon Appleby <simon.appleby@pickeringtest.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Gadgetfs driver called usb_gadget_unregister_driver unconditionally, even
if it didn't register it earlier due to other failures. This patch fixes
this.
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Retry gadget probe only if the probe result is -EPROBE_DEFER, not on
every probe error.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Some platforms don't have DMA, but we should still be able to build USB
drivers for these platforms. They could still be used through vhci_hcd,
usbip_host, or maybe something like USB passthrough in UML from a
capable host.
If NO_DMA=y:
ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined!
ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined!
ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined!
ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined!
ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined!
Add a few checks for CONFIG_HAS_DMA to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The US_DEBUGPX macro uses printk without specifying a kernel log level, so
the default kernel log level is used, which may not match LOGLEVEL_DEBUG
used in usb_stor_dbg. Remove the macro and use usb_store_dbg instead.
Signed-off-by: Victor Dodon <printesoi@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
When the device is disconnected poll waiters were not being woken.
Changes for v2:
- add commit summary
- add Fixes and Reported-by tags
Fixes: eb6b92ecc0 ("Add support for receiving USBTMC USB488 SRQ notifications via poll/select")
Reported-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.
This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.
This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The write value is 8bit, but currently writing a larger number (eg a doubled
digit) is not errored but instead gets cast and sets off an action probably
undesired.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To allow for and clean handling of signals an URB is introduced.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shares the cleanup code between all probe failure paths, instead of
having per-failure cleanup at each point in the function.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This reverts commit 4b61b4f205.
As reported by Oliver, this change was unnecessary.
Reported-by: Oliver Neukum <oneukum@suse.com>
Cc: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This reverts commit d8f00cd685.
Tony writes:
This upstream commit is causing an oops:
d8f00cd685 ("usb: hub: do not clear BOS field during reset device")
This patch has already been included in several -stable kernels. Here
are the affected kernels:
4.5.0-rc4 (current git)
4.4.2
4.3.6 (currently in review)
4.1.18
3.18.27
3.14.61
How to reproduce the problem:
Boot kernel with slub debugging enabled (otherwise memory corruption
will cause random oopses later instead of immediately)
Plug in USB 3.0 disk to xhci USB 3.0 port
dd if=/dev/sdc of=/dev/null bs=65536
(where /dev/sdc is the USB 3.0 disk)
Unplug USB cable while dd is still going
Oops is immediate:
Reported-by: Tony Battersby <tonyb@cybernetics.com>
Cc: Du, Changbin <changbin.du@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Here are some new device ids.
Signed-off-by: Johan Hovold <johan@kernel.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWx3i4AAoJEEEN5E/e4bSVUncP/Rm5vy+8YJ8u2NzvXOtzXdoe
2+Ef8yE402DQl9d4SJNg5mL8nNcdUDaZGRoLKDlnws/iX1PcQf6RxrR4fhYbR8xk
kd6+BT+rUzICI7xD5Q190GPV4InFUXDJ9lH89LPb75A9aMLdffy+WpEFoXoKlDaw
O01b/OZClAsxqNmMO0UKr8Xbki2hMPlP5AM6rOVn5eJqZv4FB9mD/C9pwxxloW75
8iBq5pRHrJpHw3AiWOz9npW5RUxOag0HRln4Lx9b7gOHeMY/JH440LVufjQB0/4Y
cJ/G3w94rJqAuJ+87fYXJ8zDmAHTOfCVqSuloC7o4GqNXjV1PayRj3MMxOLjusHg
DLuCkZquCEQ8+X2+j09A/0+k4XFw6he+a8n7dmzJzfMYH5DAd+WU1oMn9c8p/zG6
Vf9t0C9m4DtCMh+lO1cz5M3q8133cePf282ogCkK8meGISBZH2ZUMSJWqkn9+RYd
/rytj1UVq5UH8wVqNPu2fVlIqEk3AaG8VrM7iLHGsEE4BsYJ3fYyEvu1NeVXqMEa
thZZQBrvBCkObZsJzkZIfKhjisvN+Pg1Wo4X3OzsFuXxt56zZYh52ysFl43GEyWp
Jyw+8ggpiWd5nrvps3uVMvDVLwaIhhCgMUW2XgVnnrtxBtFfguJRAjWjO513esuy
C0EfegNX9Qzx2MSTrtSH
=eFQw
-----END PGP SIGNATURE-----
Merge tag 'usb-serial-4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes:
USB-serial fixes for v4.5-rc5
Here are some new device ids.
Signed-off-by: Johan Hovold <johan@kernel.org>
In case of error, the function usb_phy_generic_register()
returns ERR_PTR() and never returns NULL. The NULL test in
the return value check should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
The write value is 8bit, but currently writing a larger number
(eg a doubled digit) is not errored but instead gets cast and
sets off an action probably undesired.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
(Change the style of commit log to fix checkpatch.pl warning)
Add USB ID for cp2104/5 devices on GE B650v3 and B850v3 boards.
Signed-off-by: Ken Lin <ken.lin@advantech.com.tw>
Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Use regmap to access the PMC to avoid using at91_pmc_read and
at91_pmc_write.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Commit 754fe4a92c ("usb: musb: Remove ifdefs for TX DMA for musb_host.c")
introduces a problem setting the desired channel mode for the Mentor DMA
engine.
There is a case where an address is incorrectly assigned to the DMA
channel desired mode when it should instead be assigned the actual mode
value. This results in the value of channel->desired_mode not being
correct.
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
There will be data toggle error happen for full speed buld-out transfer.
The data toggle bit is saved in qh for non-control transfers, it is wrong
to check the qtd for that case.
Also fix one static analysis tool issue after fix the data toggle error.
John Youn:
* Added WARN() to warn on improper usage of the
dwc2_hcd_save_data_toggle() function.
Signed-off-by: Dyson Lee <dyson.lee@intel.com>
Signed-off-by: Tang, Jianqiang <jianqiang.tang@intel.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Fixes memory manipulation issues and makes Host DDMA bulk transfers
work.
dwc2_process_non_isoc_desc() must return non zero value ONLY when
failure happens in one of the queued descriptors. After receiving
non zero value the caller must stop processing of remaining
QTDs and their descriptors from chain.
Commit 26a19ea699 ("usb: dwc2: host: fix use of qtd after
free in desc dma mode") breaks non_isoc transaction completion logic
in Host DDMA mode. There were bugs before that, but after this patch
dwc2_process_non_isoc_desc() returns fail status even if descriptor
was processed normally. This causes break from loop which is processing
remaining descriptors assigned to QTD, which is not correct for QTDs
containing more than one descriptor.
Current dwc2 driver gathers queued BULK URBs until receiving URB
without URB_NO_INTERRUPT flag. Once getting it, SW creates
descriptor chain, stores it in qh structure and passes start
address to HW. Multiple URB data is contained in that chain.
Hence on getting error on descriptor after its processing by HW,
SW should go out of both loops(qh->qtd, qtd->descs) and report
the failure.
Fixes: 26a19ea699 ("usb: dwc2: host: fix use of qtd after free in desc dma mode")
Cc: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
The assignement of EP transfer resources was not handled properly in the
dwc3 driver. Commit aebda61871 ("usb: dwc3: Reset the transfer
resource index on SET_INTERFACE") previously fixed one aspect of this
where resources may be exhausted with multiple calls to SET_INTERFACE.
However, it introduced an issue where composite devices with multiple
interfaces can be assigned the same transfer resources for different
endpoints. This patch solves both issues.
The assignment of transfer resources cannot perfectly follow the data
book due to the fact that the controller driver does not have all
knowledge of the configuration in advance. It is given this information
piecemeal by the composite gadget framework after every
SET_CONFIGURATION and SET_INTERFACE. Trying to follow the databook
programming model in this scenario can cause errors. For two reasons:
1) The databook says to do DEPSTARTCFG for every SET_CONFIGURATION and
SET_INTERFACE (8.1.5). This is incorrect in the scenario of multiple
interfaces.
2) The databook does not mention doing more DEPXFERCFG for new endpoint
on alt setting (8.1.6).
The following simplified method is used instead:
All hardware endpoints can be assigned a transfer resource and this
setting will stay persistent until either a core reset or hibernation.
So whenever we do a DEPSTARTCFG(0) we can go ahead and do DEPXFERCFG for
every hardware endpoint as well. We are guaranteed that there are as
many transfer resources as endpoints.
This patch triggers off of the calling dwc3_gadget_start_config() for
EP0-out, which always happens first, and which should only happen in one
of the above conditions.
Fixes: aebda61871 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE")
Cc: <stable@vger.kernel.org> # v3.2+
Reported-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Fixes an issue found on rockchip rk3036 and rk3188 SOC platforms. For
some reason, the existing msleep(25) is not enough after the force mode.
The following patch was reported to fix the issue.
This does increase the probe delay again slightly, but not up to the
level it was before the original series of patches that this fixes. It
does not cause any other issues when tested on Synopsys HAPS and Altera
socfpga platforms.
Need to revisit this series next release to see if we can address these
issues without having an unconditional delay.
Fixes: 09c96980dc ("usb: dwc2: Add functions to set and clear force mode")
Reported-by: Caesar Wang <caesar.upstream@gmail.com>
Reported-by: Michael Niewoehner <linux@mniewoehner.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Caesar Wang <caesar.upstream@gmail.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Most arches have an asm/gpio.h that merely includes linux/gpio.h. The
others select ARCH_HAVE_CUSTOM_GPIO_H, and when that's selected,
linux/gpio.h includes asm/gpio.h.
Therefore, code should include linux/gpio.h instead of including asm/gpio.h
directly.
Remove includes of asm/gpio.h, adding an include of linux/gpio.h when
necessary.
This is a follow-on to 7563bbf89d ("gpiolib/arches: Centralise
bolierplate asm/gpio.h").
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This patch fix spelling typos found in printk and Kconfig.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Some devices I got show an inability to operate right after
power on if they are already connected. They are beyond recovery
if the descriptors are requested multiple times. So in case of
a timeout we rather bail early and reset again. But it must be
done only on the first loop lest we get into a reset/time out
spiral that can be overcome with a retry.
This patch is a rework of a patch that fell through the cracks.
http://www.spinics.net/lists/linux-usb/msg103263.html
Signed-off-by: Oliver Neukum <oneukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add a new interface for userspace to preallocate memory that can be
used with usbfs. This gives two primary benefits:
- Zerocopy; data no longer needs to be copied between the userspace
and the kernel, but can instead be read directly by the driver from
userspace's buffers. This works for all kinds of transfers (even if
nonsensical for control and interrupt transfers); isochronous also
no longer need to memset() the buffer to zero to avoid leaking kernel data.
- Once the buffers are allocated, USB transfers can no longer fail due to
memory fragmentation; previously, long-running programs could run into
problems finding a large enough contiguous memory chunk, especially on
embedded systems or at high rates.
Memory is allocated by using mmap() against the usbfs file descriptor,
and similarly deallocated by munmap(). Once memory has been allocated,
using it as pointers to a bulk or isochronous operation means you will
automatically get zerocopy behavior. Note that this also means you cannot
modify outgoing data until the transfer is complete. The same holds for
data on the same cache lines as incoming data; DMA modifying them at the
same time could lead to your changes being overwritten.
There's a new capability USBDEVFS_CAP_MMAP that userspace can query to see
if the running kernel supports this functionality, if just trying mmap() is
not acceptable.
Largely based on a patch by Markus Rechberger with some updates. The original
patch can be found at:
http://sundtek.de/support/devio_mmap_v0.4.diff
Signed-off-by: Steinar H. Gunderson <sesse@google.com>
Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/built-in.o: In function `ehci_platform_probe':
/home/vegard/linux/drivers/usb/host/ehci-platform.c:282: undefined reference to `devm_ioremap_resource'
drivers/built-in.o: In function `oxu_drv_probe':
/home/vegard/linux/drivers/usb/host/oxu210hp-hcd.c:3821: undefined reference to `devm_ioremap_resource'
drivers/built-in.o: In function `isp1362_probe':
/home/vegard/linux/drivers/usb/host/isp1362-hcd.c:2668: undefined reference to `devm_ioremap_resource'
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC drivers/usb/host/xhci-mtk.o
drivers/usb/host/xhci-mtk.c:135:12: warning: ‘xhci_mtk_host_disable’ defined but not used [-Wunused-function]
static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk)
^
drivers/usb/host/xhci-mtk.c:313:13: warning: ‘usb_wakeup_enable’ defined but not used [-Wunused-function]
static void usb_wakeup_enable(struct xhci_hcd_mtk *mtk)
^
drivers/usb/host/xhci-mtk.c:321:13: warning: ‘usb_wakeup_disable’ defined but not used [-Wunused-function]
static void usb_wakeup_disable(struct xhci_hcd_mtk *mtk)
^
CC drivers/usb/host/sl811-hcd.o
drivers/usb/host/sl811-hcd.c: In function ‘sl811h_remove’:
drivers/usb/host/sl811-hcd.c:1607:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(sl811->data_reg);
^
drivers/usb/host/sl811-hcd.c: In function ‘sl811h_probe’:
drivers/usb/host/sl811-hcd.c:1669:3: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
addr_reg = ioremap(addr->start, 1);
^
drivers/usb/host/sl811-hcd.c:1669:12: warning: assignment makes pointer from integer without a cast [enabled by default]
addr_reg = ioremap(addr->start, 1);
^
drivers/usb/host/sl811-hcd.c:1675:12: warning: assignment makes pointer from integer without a cast [enabled by default]
data_reg = ioremap(data->start, 1);
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC drivers/usb/c67x00/c67x00-drv.o
drivers/usb/c67x00/c67x00-drv.c: In function ‘c67x00_drv_probe’:
drivers/usb/c67x00/c67x00-drv.c:148:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
c67x00->hpi.base = ioremap(res->start, resource_size(res));
^
drivers/usb/c67x00/c67x00-drv.c:148:19: warning: assignment makes pointer from integer without a cast [enabled by default]
c67x00->hpi.base = ioremap(res->start, resource_size(res));
^
drivers/usb/c67x00/c67x00-drv.c:185:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(c67x00->hpi.base);
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC drivers/usb/musb/tusb6010.o
drivers/usb/musb/tusb6010.c: In function ‘tusb_musb_init’:
drivers/usb/musb/tusb6010.c:1133:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
sync = ioremap(mem->start, resource_size(mem));
^
drivers/usb/musb/tusb6010.c:1133:7: warning: assignment makes pointer from integer without a cast [enabled by default]
sync = ioremap(mem->start, resource_size(mem));
^
drivers/usb/musb/tusb6010.c:1162:4: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(sync);
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC drivers/usb/host/r8a66597-hcd.o
drivers/usb/host/r8a66597-hcd.c: In function ‘r8a66597_remove’:
drivers/usb/host/r8a66597-hcd.c:2401:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(r8a66597->reg);
^
drivers/usb/host/r8a66597-hcd.c: In function ‘r8a66597_probe’:
drivers/usb/host/r8a66597-hcd.c:2447:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
reg = ioremap(res->start, resource_size(res));
^
drivers/usb/host/r8a66597-hcd.c:2447:6: warning: assignment makes pointer from integer without a cast [enabled by default]
reg = ioremap(res->start, resource_size(res));
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mvebu.c: In function ‘xhci_mvebu_mbus_init_quirk’:
drivers/usb/host/xhci-mvebu.c:58:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
base = ioremap(res->start, resource_size(res));
^
drivers/usb/host/xhci-mvebu.c:58:7: warning: assignment makes pointer from integer without a cast [enabled by default]
base = ioremap(res->start, resource_size(res));
^
drivers/usb/host/xhci-mvebu.c:69:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(base);
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/m66592-udc.c: In function ‘m66592_remove’:
drivers/usb/gadget/udc/m66592-udc.c:1538:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(m66592->reg);
^
drivers/usb/gadget/udc/m66592-udc.c: In function ‘m66592_probe’:
drivers/usb/gadget/udc/m66592-udc.c:1577:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
reg = ioremap(res->start, resource_size(res));
^
drivers/usb/gadget/udc/m66592-udc.c:1577:6: warning: assignment makes pointer from integer without a cast [enabled by default]
reg = ioremap(res->start, resource_size(res));
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/net2272.c: In function ‘net2272_remove’:
drivers/usb/gadget/udc/net2272.c:2232:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(dev->base_addr);
^
drivers/usb/gadget/udc/net2272.c: In function ‘net2272_plat_probe’:
drivers/usb/gadget/udc/net2272.c:2650:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration]
dev->base_addr = ioremap_nocache(base, len);
^
drivers/usb/gadget/udc/net2272.c:2650:17: warning: assignment makes pointer from integer without a cast [enabled by default]
dev->base_addr = ioremap_nocache(base, len);
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/isp116x-hcd.c: In function ‘isp116x_remove’:
drivers/usb/host/isp116x-hcd.c:1552:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(isp116x->data_reg);
^
drivers/usb/host/isp116x-hcd.c: In function ‘isp116x_probe’:
drivers/usb/host/isp116x-hcd.c:1604:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
addr_reg = ioremap(addr->start, resource_size(addr));
^
drivers/usb/host/isp116x-hcd.c:1604:11: warning: assignment makes pointer from integer without a cast [enabled by default]
addr_reg = ioremap(addr->start, resource_size(addr));
^
drivers/usb/host/isp116x-hcd.c:1613:11: warning: assignment makes pointer from integer without a cast [enabled by default]
data_reg = ioremap(data->start, resource_size(data));
^
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In several drivers in the pxa architecture, it was found that the
platform_get_irq() was not propagated. This breaks the the device-tree
probe deferral path, if -EPROBE_DEFER is returned. Unfortunately, the
error return in this case is transformed into -ENXIO, breaking the
deferral mechanism.
Even if in this specific case the driver was not broken, because the
interrupt controller is always probed before drivers, propagate the
proper return code.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This should cut down latencies and waste if the tty layer writes single bytes.
Signed-off-by: Oliver Neukum >oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The transfer burst count (TBC) field in the Isoc TRB does not fit the new
larger burst count available for USB 3.1 SSP Isoc tranfers.
xhci 1.1 solved this by reusing the TD size field for transfer burst count.
The Mult field was outgrown as well. xhci 1.1 controllers can calculate
Mult itself and is not set if the new layout is used.
xhci 1.1 controllers that support the new Isoc TRB format expose a
Extended TBC Capability (ETC). To take the new format into use the xhci
host controller driver needs to set a Extended TBC Enable (ETE) bit.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clean up xhci_queue_isoc_tx() and helpers to prepare them for USB 3.1 and
xhci 1.1 isoc TRB changes.
Only functional change is adding xhci version 1.1 to the BEI flag check
toghether with xhci version 1.0. Both versions behave the same.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
SuperSpeedPlus doubled the number of transactions per service interval
the isoc endpoints supports.
To support this, xhci 1.1 added Large ESIT Capability (LEC), which
takes into use new bits in the endpoint context to fit the parameters.
If xhci supports LEC, and the device has a SuperSpeedPlus Isoc companion
descriptor then take into use the high bits of max esit payload, and
skip calculating the Mult field as it wouldn't fit. LEC capable
host will calculate the Mult based on other paramenters.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
xhci_endpoint_init() and helper functions were a bit messy.
Adding the higher bandwidth SuperSpeedPlus Isoc support on
top of it would make it even harder to read.
No functional changes.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB 3.1 devices that support precision time measurement have an
additional PTM cabaility descriptor as part of the full BOS descriptor
Look for this descriptor while parsing the BOS descriptor, and store it in
struct usb_hub_bos if it exists.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB 3.1 devices can return a new SuperSpeedPlus isoc endpoint companion
descriptor for a isochronous endpoint that requires more than 48K bytes
per Service Interval.
The new descriptor immediately follows the old USB 3.0 SuperSpeed Endpoint
Companion and will provide a new BytesPerInterval value.
It is parsed and stored in struct usb_host_endpoint with the other endpoint
related descriptors, and should be used by USB3.1 capable hosts to reserve
bus time in the schedule.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fixing the error reported by script checkpatch.pl
static variables blinkenlights and old_scheme_first
were initialised to 0, correcting it.
Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Now that usb_bus_list has been removed and switched to idr
rename the related mutex accordingly.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Drivers should include asm/pci-bridge.h only when they need the arch-
specific things provided there. Outside of the arch/ directories, the only
drivers that actually need things provided by asm/pci-bridge.h are the
powerpc RPA hotplug drivers in drivers/pci/hotplug/rpa*.
Remove the includes of asm/pci-bridge.h from the other drivers, adding an
include of linux/pci.h if necessary.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
xhci_find_next_ext_cap doesn't check for PCI hotplug removal and may use
the PCI master abort bit pattern (~0) to calculate a new PCI address
offset to read/write. The has lead to reproducable crashes when testing
surprise removal during device initialization on a Stratus platform, at
least after commit d5ddcdf4d6 ("xhci: rework xhci extended capability
list parsing functions").
The crash is repeatable on a Stratus platform when injecting hardware
faults to induce xHCI host controller hotplug during driver
initialization. If a PCI read in xhci_find_next_ext_cap returns the
master abort pattern, quirk_usb_handoff_xhci may start using a bogus
ext_cap_offset to start searching more bogus PCI addresses.
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
DWC3 got a fix for OTG Certification, DWC2 has two fixes for regressions on
RasPI, MUSB has a NULL pointer dereference fix for ux500 platforms and two
PHYs (MSM and MXS) got some minor fixes.
While at that, I'm also adding a fix to my email address which has changed
recently.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJWszwYAAoJEIaOsuA1yqRE7WEQALbS4GzeSCbtmRFGeToA557W
3jcwmvMOH2OPShqnsrUHVYBQfq9ovOg3QYz8VECoZHhAIr8gpZsXlJYlQJjBDsnP
tDzTnL2ooLkudltKGtiQSoMz6DWlLj4DwU4myUnliIsCVQx7TeIHrzg0I6DYPBjg
TI7WZH2RvV0RH3e8zpu0YARty5rWUv6jqaPebWunytbgO0iyWAJpZhRAs649fCTH
Yl3mhgVc4LVoe79mlq0CNj940+/ib3ikuj6WEw3fP33ld6KaePrjYaQdtOqI3Q70
cknGq3IZ8U2sZKE5YwQqE0GLLOfIIjfiaFJSkR/y6oHF5XjKKZQLbmOo3rR2EzVO
7lb8pvo9W0Eh8vC092f3uMSocRxXGvBFHRWm2JV7LKy4vU7QFUBQvhiWvgcGkbIy
J/3f4vSrwqxzRhknZH1qex18FY1ICktYqVHLcud2ZwUlwcqU8bBmk0WMrZkxuN9C
S2CKwuH8KVS+OnfLb3Qe0pfVh4tITb6Akz7VgYqJw81hKdudRYkMZcHc9eEsUSk8
FjCXkeUtj1gKr8OgdpZrz70o66bECLtbu1qO9BpSWwDMngIuDmMUKmaBf6LAU8/4
7W5CNuD0yG2T3/HtOHRqXoRnMtrHAud/sZvN/5E0diAYlfLKF8jQEzbwPoCoc04g
P331Ie4L4XG3Xuis8Hay
=Zhyq
-----END PGP SIGNATURE-----
Merge tag 'fixes-for-v4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes:
usb: fixes for v4.5-rc2
DWC3 got a fix for OTG Certification, DWC2 has two fixes for regressions on
RasPI, MUSB has a NULL pointer dereference fix for ux500 platforms and two
PHYs (MSM and MXS) got some minor fixes.
While at that, I'm also adding a fix to my email address which has changed
recently.
Fix the following compiler warning (found by the kbuild test robot):
drivers/usb/host/ehci-hcd.c:312:13: warning: 'unlink_empty_async_suspended' declared 'static' but never defined
Commit 2a40f32454 ("USB: EHCI: fix regression during bus resume")
protected the function definition with a "#ifdef CONFIG_PM" block, so
now the declaration needs to be similarly protected. This patch moves
it to a better location.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
xhci driver frees data for all devices, both usb2 and and usb3 the
first time usb_remove_hcd() is called, including td_list and and xhci_ring
structures.
When usb_remove_hcd() is called a second time for the second xhci bus it
will try to dequeue all pending urbs, and touches td_list which is already
freed for that endpoint.
Cc: <stable@vger.kernel.org>
Reported-by: Joe Lawrence <joe.lawrence@stratus.com>
Tested-by: Joe Lawrence <joe.lawrence@stratus.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>