Age | Commit message (Collapse) | Author | Files | Lines |
|
Use devm_ioremap_resource() to make the code a bit cleaner and
simpler.
Signed-off-by: H Hartley Sweeten <[email protected]>
Acked-by: Alan Stern <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Updated skel_read() in usb-skeleton.c. When there is no data in the
buffer, we would allow retry for both blocking and nonblocking cases.
Original logic give retry only for blocking case. Actually we can also
allow retry for nonblocking case. This will reuse the existing retry
logic and handle the return of -EAGAIN in one place. Also if the data to
be read is short and can be retrieved in quick time, we can also give a
chance for nonblocking case and may catch the data and copy it back to
userspace in one read() call too.
Signed-off-by: Chen Wang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
kfree(data) will be called implicitly.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
There is a few cases where braces are not needed. This patch removes
unnecessary '& 255' pieces as well when lvalue type is u8.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Additionally remove useless label.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Recent patch series introduces few trailing spaces. This patch removes them.
No functional change.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
For certain (HP) printers the printer device_id does not only contain a
static part identifying the printer, but it also contains a dynamic part
giving printer status, ink level, etc.
To get to this info various userspace utilities need to be able to make a
printer class 'get_device_id' request without first claiming the interface
(as that is in use for the actual printer driver).
Since the printer class 'get_device_id' request does not change interface
settings in anyway, allowing this without claiming the interface should not
cause any issues.
CC: Sanjay Kumar <[email protected]>
CC: Alan Stern <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Most HCD drivers are doing the same thing in their ".shutdown" callback
so it makes sense to use the generic usb_hcd_platform_shutdown()
handler there.
Signed-off-by: Roger Quadros <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes a redundant nested "#ifdef CONFIG_PM" from the hub
driver. It also adds a label to the "#endif" line corresponding to
the outer "#ifdef CONFIG_PM".
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
An Embedded Host High-Speed Electrical Test (EHSET) test fixture is
used to initiate test modes on a host controller in order to perform
the high speed electrical testing procedure for USB-IF compliance.
When this test fixture is connected to a host, it can enumerate as
one of several selectable VID/PID pairs, each corresponding to one
of the following test modes:
* TEST_SE0_NAK
* TEST_J
* TEST_K
* TEST_PACKET
* HS_HOST_PORT_SUSPEND_RESUME
* SINGLE_STEP_GET_DEV_DESC
* SINGLE_STEP_SET_FEATURE
The USB EHSET procedure can be found here:
http://www.usb.org/developers/onthego/EHSET_v1.01.pdf
Signed-off-by: Manu Gautam <[email protected]>
[[email protected]: imported from commit 073c9409 on codeaurora.org;
minor cleanup and updated author email]
Signed-off-by: Jack Pham <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
bInterval must be on the range 1 - 16, if we
want to pass the maximum allowed, we should
be passing 16.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
bInterval must be on the range 1 - 16, if we
want to pass the maximum allowed, we should
be passing 16
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Control transfers have both IN and OUT (or SETUP) packets, so when
clearing TT buffers for a control transfer it's necessary to send
two HUB_CLEAR_TT_BUFFER requests to the hub.
Signed-off-by: William Gulland <[email protected]>
Acked-by: Alan Stern <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix memory leaks introduced in commits:
40d133d7f542616cf9538508a372306e626a16e9
usb: gadget: f_ncm: convert to new function interface with backward compatibility
fee562a6450b7806f1fbbe1469a67b5395b5c10a
usb: gadget: f_ecm: convert to new function interface with backward compatibility
fcbdf12ebef73a6069e2a1aada1e546fb578a4aa
usb: gadget: f_phonet: convert to new function interface with backward compatibility
b29002a157940752dfed2c488b2011f63f007d71
usb: gadget: f_eem: convert to new function interface with backward compatibility
8cedba7c73af1369599b1111639cfeb66fe13aaa
usb: gadget: f_subset: convert to new function interface with backward compatibility
f466c6353819326873fa48a02c6f2d7c903240d6
usb: gadget: f_rndis: convert to new function interface with backward compatibility
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Allocated urbs and buffers were never freed on errors in open.
Cc: [email protected]
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some (very few) early devices like mine, where not exposting a proper CDC
descriptor. This was fixed with an immediate firmware update from the vendor,
and pre-installed on newer devices.
So actual devices can be driven by cdc_acm.c + cdc_ether.c.
Signed-off-by: Enrico Mioso <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Speaks AT on interfaces 5 (command & PPP) and 3 (secondary), other
interface protocols are unknown.
Signed-off-by: Dan Williams <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Prevent the option driver from binding itself to the QMI/WWAN interface, making
it unusable by the proper driver.
Signed-off-by: enrico Mioso <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix memory leaks introduced in commits:
40d133d7f542616cf9538508a372306e626a16e9
usb: gadget: f_ncm: convert to new function interface with backward compatibility
fee562a6450b7806f1fbbe1469a67b5395b5c10a
usb: gadget: f_ecm: convert to new function interface with backward compatibility
fcbdf12ebef73a6069e2a1aada1e546fb578a4aa
usb: gadget: f_phonet: convert to new function interface with backward compatibility
b29002a157940752dfed2c488b2011f63f007d71
usb: gadget: f_eem: convert to new function interface with backward compatibility
8cedba7c73af1369599b1111639cfeb66fe13aaa
usb: gadget: f_subset: convert to new function interface with backward compatibility
f466c6353819326873fa48a02c6f2d7c903240d6
usb: gadget: f_rndis: convert to new function interface with backward compatibility
Acked-by: Michal Nazarewicz <[email protected]>
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Fix bugs introduced in
9c62ce83e4258bacc459faf57bf2ed83cce6be08
usb: gadget: ether: convert to new interface of f_ecm
94b5573e97729f0e1496d23b69cbe2c6b24ec0c3
usb: gadget: ether: convert to new interface of f_eem
8af5232d6f48896b151898ccb2e9e155481bb785
usb: gadget: ether: convert to new interface of f_subset
9bd4a10e1bf881af0b0a7c117c7092b558447047
usb: gadget: ether: convert to new interface of f_rndis
Acked-by: Michal Nazarewicz <[email protected]>
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
Sarah writes:
xhci: Bug fixes, now with more tags!
Hi Greg,
Here's five bug fixes for 3.12.
The three patches are marked for stable. Two fix NULL pointer dereferences.
The third marked for stable suppresses some serious log spam from unnecessary
xHCI driver warnings, whenever an isochronous short packet happens on an xHCI
1.0 host.
The other two patches fix build warnings.
Sarah Sharp
|
|
in some cases where device is attched to xhci port and do not responding,
for example ath9k_htc with stalled firmware, kernel will
crash on ring_doorbell_for_active_rings.
This patch check if pointer exist before it is used.
This patch should be backported to kernels as old as 2.6.35, that
contain the commit e9df17eb1408cfafa3d1844bfc7f22c7237b31b8 "USB: xhci:
Correct assumptions about number of rings per endpoint"
Signed-off-by: Oleksij Rempel <[email protected]>
Signed-off-by: Sarah Sharp <[email protected]>
Cc: [email protected]
|
|
Xhci controllers with hci_version > 0.96 gives spurious success
events on short packet completion. During webcam capture the
"ERROR Transfer event TRB DMA ptr not part of current TD" was observed.
The same application works fine with synopsis controllers hci_version 0.96.
The same issue is seen with Intel Pantherpoint xhci controller. So enabling
this quirk in xhci_gen_setup if controller verion is greater than 0.96.
For xhci-pci move the quirk to much generic place xhci_gen_setup.
Note from Sarah:
The xHCI 1.0 spec changed how hardware handles short packets. The HW
will notify SW of the TRB where the short packet occurred, and it will
also give a successful status for the last TRB in a TD (the one with the
IOC flag set). On the second successful status, that warning will be
triggered in the driver.
Software is now supposed to not assume the TD is not completed until it
gets that last successful status. That means we have a slight race
condition, although it should have little practical impact. This patch
papers over that issue.
It's on my long-term to-do list to fix this race condition, but it is a
much more involved patch that will probably be too big for stable. This
patch is needed for stable to avoid serious log spam.
This patch should be backported to kernels as old as 3.0, that
contain the commit ad808333d8201d53075a11bc8dd83b81f3d68f0b "Intel xhci:
Ignore spurious successful event."
The patch will have to be modified for kernels older than 3.2, since
that kernel added the xhci_gen_setup function for xhci platform devices.
The correct conflict resolution for kernels older than 3.2 is to set
XHCI_SPURIOUS_SUCCESS in xhci_pci_quirks for all xHCI 1.0 hosts.
Signed-off-by: George Cherian <[email protected]>
Signed-off-by: Sarah Sharp <[email protected]>
Cc: [email protected]
|
|
Fix warning when CONFIG_PCI is not enabled
(from commit 296365781903226a3fb8758901eaeec09d2798e4).
drivers/usb/host/pci-quirks.h: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: Geert Uytterhoeven <[email protected]>
Cc: Moiz Sonasath <[email protected]>
Signed-off-by: Sarah Sharp <[email protected]>
|
|
Resolves the following build warnings:
drivers/usb/host/xhci.c:332:13: warning: 'xhci_msix_sync_irqs' defined but not used [-Wunused-function]
drivers/usb/host/xhci.c:3901:12: warning: 'xhci_change_max_exit_latency' defined but not used [-Wunused-function]
These functions are not always used, and since they're marked static
they will produce build warnings:
- xhci_msix_sync_irqs is only used with CONFIG_PCI.
- xhci_change_max_exit_latency is a little more complicated with
dependencies on CONFIG_PM and CONFIG_PM_RUNTIME.
Instead of building a bigger maze of ifdefs in this code, I've just
marked both with __maybe_unused.
Signed-off-by: Olof Johansson <[email protected]>
Signed-off-by: Sarah Sharp <[email protected]>
|
|
When the host controller fails to respond to an Enable Slot command, and
the host fails to respond to the register write to abort the command
ring, the xHCI driver will assume the host is dead, and call
usb_hc_died().
The USB device's slot_id is still set to zero, and the pointer stored at
xhci->devs[0] will always be NULL. The call to xhci_check_args in
xhci_free_dev should have caught the NULL virt_dev pointer.
However, xhci_free_dev is designed to free the xhci_virt_device
structures, even if the host is dead, so that we don't leak kernel
memory. xhci_free_dev checks the return value from the generic
xhci_check_args function. If the return value is -ENODEV, it carries on
trying to free the virtual device.
The issue is that xhci_check_args looks at the host controller state
before it looks at the xhci_virt_device pointer. It will return -ENIVAL
because the host is dead, and xhci_free_dev will ignore the return
value, and happily dereference the NULL xhci_virt_device pointer.
The fix is to make sure that xhci_check_args checks the xhci_virt_device
pointer before it checks the host state.
See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1203453 for
further details. This patch doesn't solve the underlying issue, but
will ensure we don't see any more NULL pointer dereferences because of
the issue.
This patch should be backported to kernels as old as 3.1, that
contain the commit 7bd89b4017f46a9b92853940fd9771319acb578a "xhci: Don't
submit commands or URBs to halted hosts."
Signed-off-by: Sarah Sharp <[email protected]>
Reported-by: Vincent Thiele <[email protected]>
Cc: [email protected]
|
|
This patch adds support for the ONYX 3G device (version 1) from ALFA
NETWORK.
Signed-off-by: Enrico Mioso <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This reverts commit 1dd3d123239179fad5de5dc00a6e0014a1918fde.
The email address for the developer now bounces, which means they have
moved on, so remove the driver until someone else from the company steps
up to maintain it.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
FOTG210 is an OTG controller which can be configured as an
USB2.0 host. FOTG210 host is an ehci-like controller with
some differences. First, register layout of FOTG210 is
incompatible with EHCI. Furthermore, FOTG210 is lack of
siTDs which means iTDs are used for both HS and FS ISO
transfer.
Signed-off-by: Yuan-Hsin Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The driver failed to take the dynamic ids into account when determining
the device type and therefore all devices were detected as 2-port
devices when using the dynamic-id interface.
Match on the usb-serial-driver field instead of doing redundant id-table
searches.
Reported-by: Anders Hammarquist <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
USB spec stats that short packet can only appear at the end
of transfer. Because lost of HC(EHCI/UHCI/OHCI/...) can't
build a full packet from discontinuous buffers, we introduce
the limit in usb_submit_urb() to avoid such kind of bad sg buffers
coming from driver.
The limit might be a bit strict:
- platform has iommu to do sg list mapping
- some host controllers may support to build full packet from
discontinuous buffers.
But considered that most of HCs don't support that, and driver
need work well or keep consistent on different HCs and ARCHs, we
have to introduce the limit.
Currently, only usbtest is reported to pass such sg buffers to HC,
and other users(mass storage, usbfs) don't have the problem.
We don't check it on USB wireless device, because:
- wireless devices can't be attached to common USB
bus(EHCI/UHCI/OHCI/...)
- the max packet size of endpoint may be odd, and often can't
devide 4KB which is a typical usage in usb mass storage application
Reported-by: Konstantin Filatov <[email protected]>
Reported-by: Denis V. Lunev <[email protected]>
Cc: Felipe Balbi <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Drivers should not be putting debug files in /proc/ that is what debugfs
is for, so move the isp1362 driver's debug file to debugfs.
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Drivers should not be putting debug files in /proc/ that is what debugfs
is for, so move the sl811 driver's debug file to debugfs.
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
None of these USB files need idr.h, so don't include it.
Cc: Alexander Shishkin <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
Sarah writes:
xhci: Features for 3.12
In the spirit of "let's stop gossiping around the water cooler and get to work",
here's some xHCI patches for 3.12.
They include a patch for suspend/resume support for xhci platform hosts, two
patches to support showing USB 2.1 link status, and a patch to future-proof the
Intel EHCI to xHCI port switchover.
Sarah Sharp
|
|
This removes the dependency of the driver on CONFIG_USB_DEBUG and moves
it to us the dynamic debug subsystem instead. Bonus is the fact that we
can now properly determine the exact hardware that is spitting out the
messages.
This lets debugging be enabled without having to rebuild the driver, an
important thing for users that can not do it.
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Move all debugging messages in the driver to use the dynamic debug
subsystem, and not rely on CONFIG_USB_DEBUG to turn them on or off.
This lets debugging be enabled without having to rebuild the driver, an
important thing for users that can not do it.
It also removes the pointless IRQ_TEST() macro, as that was totally
useless and obviously never used.
Cc: Olav Kongas <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Now that the debugging macros are cleaned up, just rely on the dynamic
debug code in the kernel to do the debug messages for the driver.
This lets debugging be enabled without having to rebuild the driver, an
important thing for users that can not do it.
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
If you want a debug call, just make it, so move to using the
already-there DBG() call. No need to make things more complex than they
really need to be.
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Like _BUG_ON(), _WARN_ON() wasn't ever being used, so just delete it, as
obviously things are working properly now (if not, we have bigger
problems...)
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We shouldn't ever panic in a driver, and these calls were never being
used, so just delete them, as obviously the driver is working properly
now (right?)
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This endif is for CONFIG_USB_GADGET_DEBUG_FILES, not CONFIG_USB_DEBUG,
so document it properly.
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Now that no USB phy driver is using CONFIG_USB_DEBUG, remove it from the
Makefile.
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the in-kernel pr_debug() calls instead of trying to roll your own
DBG macro. This means the dynamic debugging calls now work here, and
there is no dependency on CONFIG_USB_DEBUG for the phy code anymore.
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Now that no USB atm driver is relying on the CONFIG_USB_DEBUG option
(well, really the DEBUG option, thanks to some Makefile fun), remove it
from the Makefile.
Also remove two last vestiges of DEBUG in the usbatm.c driver, moving
one to VERBOSE_DEBUG, which no one ever really cares about, and the
other to use the dynamic debug subsystem.
Cc: Duncan Sands <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Move the atm_dbg() call to use the dynamic debug subsystem, and not rely
on CONFIG_USB_DEBUG for if things should be printed out or not.
This also means the drivers do not have to be rebuilt to get debugging
messages, important for getting information from users who can not
rebuild their kernels.
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Enable the USB atm drivers to use the dynamic debugging subsystem, and
not rely on if CONFIG_USB_DEBUG is enabled or not for debugging
messages. This also provides a saner debug message, pointing out the
exact device the message is coming from.
This also means the drivers do not have to be rebuilt to get debugging
messages, important for getting information from users who can not
rebuild their kernels.
Cc: Duncan Sands <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We have an in-kernel trace subsystem, so use that instead of printk for
trying to figure out what functions are being called.
Cc: Duncan Sands <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
If this code isn't triggering this assert by now, it never will, so just
remove it, it's pointless.
Cc: Duncan Sands <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove the vendor and product module parameters which were added a long
time ago when we did not have the dynamic sysfs interface to add
new device ids (and which isn't limited to five new vid/pid pair).
A vid/pid pair can be added dynamically using sysfs, for example:
echo 0451 1234 >/sys/bus/usb-serial/drivers/ti_usb_3410_5052_1/new_id
for 1-port adapters, or
echo 0451 1234 >/sys/bus/usb-serial/drivers/ti_usb_3410_5052_2/new_id
for 2-port adapters.
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|