BugLink: http://bugs.launchpad.net/bugs/1222850
This input device can get into a state that produces a high
volume of device status errors. Attempt to throttle these
error messages such that the kernel log is not flooded.
Signed-off-by: Tim Gardner <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to. So converted it to use that instead.
CC: Dmitry Torokhov <[email protected]>
CC: Axel Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We should always reference the input device for dev_err(), not the USB
device. Fix up the places where I got this wrong.
Reported-by: Dmitry Torokhov <[email protected]>
CC: Axel Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
err() was a very old USB-specific macro that I thought had
gone away. This patch removes it from being used in the
driver and uses dev_err() instead.
CC: Dmitry Torokhov <[email protected]>
CC: Axel Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If successful, usb_control_msg returns the number of bytes transferred,
otherwise a negative error number.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
For more clearance what the functions actually do,
usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()
They should only be used in code which really needs DMA coherency.
All call sites have been changed accordingly, except for staging
drivers.
Signed-off-by: Daniel Mack <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Pedro Ribeiro <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as1350) removes all usages of coherent buffers for USB
control-request setup-packet buffers. There's no good reason to
reserve coherent memory for these things; control requests are hardly
ever used in large quantity (the major exception is firmware
transfers, and they aren't time-critical). Furthermore, only seven
drivers used it. We might as well always use streaming DMA mappings
for setup-packet buffers, and remove some extra complexity from
usbcore.
The DMA-mapping portion of hcd.c is currently in flux. A separate
patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP
after everything else settles down. The removal should go smoothly,
as by then nobody will be using it.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Recent conversion from err(), warn(), info() to dev_* variants caused loss
of newlines at the end of messages, add them back.
Signed-off-by: Daniel Gimpelevich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
err(), warn(), info() are being removed in favor of dev_* variants.
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>