The usb core is the only major place in the kernel that checks for
a non-NULL device dma_mask to see if a device is DMA capable. This
is generally a bad idea, as all major busses always set up a DMA mask,
even if the device is not DMA capable - in fact bus layers like PCI
can't even know if a device is DMA capable at enumeration time. This
leads to lots of workaround in HCD drivers, and also prevented us from
setting up a DMA mask for platform devices by default last time we
tried.
Replace this guess with an explicit HCD_DMA that is set by drivers that
appear to have DMA support.
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove return variable result and return the value directly.
Issue found using Coccinelle.
Signed-off-by: Nishka Dasgupta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are a few remaining drivers/staging/*/Kconfig files that do not
have SPDX identifiers in them. Add the correct GPL-2.0 identifier to
them to make scanning tools happy.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
I found that the comments had several typos such as "aenable", "internaly" and some others.
I fixed them all.
Signed-off-by: Laura Lazzati <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove unnecessary local variable "frame_number" and its assignments from function
cvmx_usb_get_frame_numbe. Suggested by Coccinelle.
Signed-off-by: Himadri Pandya <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Adding appropriate SPDX-License-Identifier (GPL-2) that were missing
from code, header and make files.
Signed-off-by: Georgios Tsotsos <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use usb_put_hdc to release hdc allocated by usb_create_hcd.
This is needed to handle sub-allocations and HCD sharing correctly.
Signed-off-by: Anton Bondarenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The module name in the Makefile and in the driver source file is
octeon-hcd, so correct the Kconfig text to be the same.
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move next pipe selection into a separate function to avoid deep
nesting.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move isochronous transfer handling into a separate function to
avoid deep indentation.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move bulk transfer handling into a separate function to avoid
deep indentation.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move bulk transfer handling into a separate function to avoid
deep indentation.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move control transfer handling into a separate function to
avoid deep indentation.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Since we always search the same list, we can just pass the transfer type.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Some if branches are missing braces as required by coding style.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Support official DT bindings alongside with the deprecated ones.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove parentheses around the right hand side of assignments as they are
not needed. Semantic patch used:
@@
expression a, b, c;
@@
(
a = (b == c)
|
a =
- (
b
- )
)
Signed-off-by: Janani Ravichandran <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Replace kmalloc with specialized function kmalloc_array
when the size is a multiplication of:
number_of_elements * size_of_element
Signed-off-by: Cristina Moraru <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.
Signed-off-by: Luis de Bethencourt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Make sure to copy the whole transfer buffer when releasing the temporary
buffer used for unaligned isochronous transfers as the data is not
necessarily contiguous in that case.
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Make CVMX_WAIT_FOR_FIELD32 to take full condition expression.
This should make the usage simpler, and the macro more readable.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Assume union type for FIELD32 macros to simplify usage.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Make cvmx_fifo_setup void, it does not return any value.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Eliminate extra indentation by putting all the code into the same block.
Also delete a bogus comment.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
On some hardware the USB fails to initialize to sane state after
cold boot. We can detect this based on some unexpected interrupt bits,
and recover by re-initializing.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>