Age | Commit message (Collapse) | Author | Files | Lines |
|
Removing NULL check for pool since dma_pool_destroy is safe
Signed-off-by: Salil Kapur <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
To match the rest of the kernel, the SPDX tags for the drivers/usb/core/
files are moved to the first line of the file. This makes it more
obvious the tag is present as well as making it match the other 12k
files in the tree with this location.
It also uses // to match the "expected style" as well.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
For xhci-hcd platform device, all the DMA parameters are not
configured properly, notably dma ops for dwc3 devices.
The idea here is that you pass in the parent of_node along with
the child device pointer, so it would behave exactly like the
parent already does. The difference is that it also handles all
the other attributes besides the mask.
sysdev will represent the physical device, as seen from firmware
or bus.Splitting the usb_bus->controller field into the
Linux-internal device (used for the sysfs hierarchy, for printks
and for power management) and a new pointer (used for DMA,
DT enumeration and phy lookup) probably covers all that we really
need.
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Sriram Dash <[email protected]>
Tested-by: Baolin Wang <[email protected]>
Tested-by: Brian Norris <[email protected]>
Tested-by: Alexander Sverdlin <[email protected]>
Tested-by: Vivek Gautam <[email protected]>
Signed-off-by: Mathias Nyman <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Grygorii Strashko <[email protected]>
Cc: Sinjan Kumar <[email protected]>
Cc: David Fisher <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: "Thang Q. Nguyen" <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Bjorn Andersson <[email protected]>
Cc: Ming Lei <[email protected]>
Cc: Jon Masters <[email protected]>
Cc: Dann Frazier <[email protected]>
Cc: Peter Chen <[email protected]>
Cc: Leo Li <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some of the USB core files were missing explicit license information.
As all files in the kernel tree are implicitly licensed under the
GPLv2-only, be explicit in case someone get confused looking at
individual files by using the SPDX nomenclature.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
NULL pointer dereferrence will happen when class driver
wants to allocate zero length buffer and pool_max[0]
can't be used, so simply returns NULL in the case.
Signed-off-by: Chunfeng Yun <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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 <[email protected]>
Acked-by: Vegard Nossum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixed two warnings sizeof name and Blank line after declaration
Signed-off-by: Nizam Haider <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
the following error pops up during "testusb -a -t 10"
| musb-hdrc musb-hdrc.1.auto: dma_pool_free buffer-128, f134e000/be842000 (bad dma)
hcd_buffer_create() creates a few buffers, the smallest has 32 bytes of
size. ARCH_KMALLOC_MINALIGN is set to 64 bytes. This combo results in
hcd_buffer_alloc() returning memory which is 32 bytes aligned and it
might by identified by buffer_offset() as another buffer. This means the
buffer which is on a 32 byte boundary will not get freed, instead it
tries to free another buffer with the error message.
This patch fixes the issue by creating the smallest DMA buffer with the
size of ARCH_KMALLOC_MINALIGN (or 32 in case ARCH_KMALLOC_MINALIGN is
smaller). This might be 32, 64 or even 128 bytes. The next three pools
will have the size 128, 512 and 2048.
In case the smallest pool is 128 bytes then we have only three pools
instead of four (and zero the first entry in the array).
The last pool size is always 2048 bytes which is the assumed PAGE_SIZE /
2 of 4096. I doubt it makes sense to continue using PAGE_SIZE / 2 where
we would end up with 8KiB buffer in case we have 16KiB pages.
Instead I think it makes sense to have a common size(s) and extend them
if there is need to.
There is a BUILD_BUG_ON() now in case someone has a minalign of more than
128 bytes.
Cc: [email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Rahul Bedarkar <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When building the htmldocs (in verbose mode), scripts/kernel-doc reports the
following type of warnings:
Warning(drivers/usb/core/usb.c:76): No description found for return value of
'usb_find_alt_setting'
Fix them by:
- adding some missing descriptions of return values
- using "Return" sections for those descriptions
Signed-off-by: Yacine Belkadi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixing all coding style issues in buffer.c
Signed-off-by: Tobias Ollmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The usbcore headers: hcd.h and hub.h are shared between usbcore,
HCDs and a couple of other drivers (e.g. USBIP modules).
So, it makes sense to move them into a more public location and
to cleanup dependency of those modules on kernel internal headers.
This patch moves hcd.h from drivers/usb/core into include/linux/usb/
Signed-of-by: Eric Lescouet <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When I want to use my webcam, I get:
vvvvvvv
cheese: page allocation failure. order:5, mode:0x8004
Pid: 8100, comm: cheese Not tainted 2.6.30-rc2-wl-dirty #102
Call Trace:
[<ffffffff802c5d8e>] __alloc_pages_internal+0x3fe/0x520
[<ffffffff80210a20>] dma_generic_alloc_coherent+0x90/0x120
[<ffffffffa001c91e>] hcd_buffer_alloc+0xee/0x130 [usbcore]
[<ffffffffa000d52d>] usb_buffer_alloc+0x2d/0x40 [usbcore]
[<ffffffffa0160e14>] uvc_alloc_urb_buffers+0x84/0x140 [uvcvideo]
[<ffffffffa0160ff6>] uvc_init_video+0x126/0x400 [uvcvideo]
[...]
Oddly, I remembered fixing this and putting in __GFP_NOWARN
because uvcvideo retries a smaller allocation. However, the
allocation function doesn't pass the gfp flags through to
dma_alloc_coherent so we still get the warning!
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes a number of coding style issues in the remaining .c files in
drivers/usb/core/
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
usb: dma bounce buffer support V4
This patch adds dma bounce buffer support to the usb core. These buffers
can be enabled with the HCD_LOCAL_MEM flag, and they make sure that all data
passed to the host controller is allocated using dma_alloc_coherent().
Signed-off-by: Magnus Damm <[email protected]>
Acked-by: Alan Stern <[email protected]>
Acked-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Not architecture specific code should not #include <asm/scatterlist.h>.
This patch therefore either replaces them with
#include <linux/scatterlist.h> or simply removes them if they were
unused.
Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
|
|
I was sitting in a train threatened to be blocked by ice. I took this
as a hint to do some more boring work for the common good. Here's
a bit more for coding style.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
SLAB_DMA is an alias of GFP_DMA. This is the last one so we
remove the leftover comment too.
Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
As part of the ongoing program to flatten out the HCD bus-glue layer,
this patch (as771b) eliminates the hcpriv, release, and kref fields
from struct usb_bus. hcpriv and release were not being used for
anything worthwhile, and kref has been moved into the enclosing
usb_hcd structure.
Along with those changes, the patch gets rid of usb_bus_get and
usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd.
The one interesting aspect is that the dev_set_drvdata call was
removed from usb_put_hcd, where it clearly doesn't belong. This means
the driver private data won't get reset to NULL. It shouldn't cause
any problems, since the private data is undefined when no driver is
bound.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Jörn Engel <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
|
|
USB: don't allocate dma pools for PIO HCDs
hcd_buffer_alloc() and hcd_buffer_free() have a similar dma_mask
check and revert to kmalloc()/kfree(), but hcd_buffer_create()
doesn't check dma_mask and allocates unused dma pools.
Signed-off-by: Chris Humbert <[email protected]>
Acked-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This lets us remove a lot of code in the drivers that were all checking
the same thing. It also found some bugs in a few of the drivers, which
has been fixed up.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Greg,
This patch fixes the kmalloc() flags argument type in USB
subsystem; hopefully all of its occurences. The patch was
made against patch-2.6.12-git2 from Jun 20.
Cleanup of flags for kmalloc() in USB subsystem.
Signed-off-by: Olav Kongas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
|