- 17 May, 2011 4 commits
-
-
Mark Brown authored
When not active the hardware should be able to tolerate voltages within the normal operating range so when removing set the maximum voltage we can use to the maximum rather than minimum of the operating range. This will improve interoperability in case we end up sharing the supply in some design. Signed-off-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Marcin Gałczyński authored
I am sharing patch to the devices/usb/serial/option.c. This allows operation of Huawei E353 broadband modem using the “option” driver. The patch simply adds new constant with proper product ID and an entry to usb_device_id. I worked on the 2.6.38.6 sources. Tested on Dell inspiron 1764 (i3 core cpu) and brand new Huawei E353 modem, Fedora 15 beta. Looking at the type of change, i doubt it has potential to introduce problems in other parts of kernel or the driver itself. Signed-off-by:
Marcin Galczynski <marcin@galczynski.pl> Cc: stable <stable@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Sarah Sharp authored
When the USB core wants to change to an alternate interface setting that doesn't include an active endpoint, or de-configuring the device, the xHCI driver needs to issue a Configure Endpoint command to tell the host to drop some endpoints from the schedule. After the command completes, the xHCI driver needs to free rings for any endpoints that were dropped. Unfortunately, the xHCI driver wasn't actually freeing the endpoint rings for dropped endpoints. The rings would be freed if the endpoint's information was simply changed (and a new ring was installed), but dropped endpoints never had their rings freed. This caused errors when the ring segment DMA pool was freed when the xHCI driver was unloaded: [ 5582.883995] xhci_hcd 0000:06:00.0: dma_pool_destroy xHCI ring segments, ffff88003371d000 busy [ 5582.884002] xhci_hcd 0000:06:00.0: dma_pool_destroy xHCI ring segments, ffff880033716000 busy [ 5582.884011] xhci_hcd 0000:06:00.0: dma_pool_destroy xHCI ring segments, ffff880033455000 busy [ 5582.884018] xhci_hcd 0000:06:00.0: Freed segment pool [ 5582.884026] xhci_hcd 0000:06:00.0: Freed device context pool [ 5582.884033] xhci_hcd 0000:06:00.0: Freed small stream array pool [ 5582.884038] xhci_hcd 0000:06:00.0: Freed medium stream array pool [ 5582.884048] xhci_hcd 0000:06:00.0: xhci_stop completed - status = 1 [ 5582.884061] xhci_hcd 0000:06:00.0: USB bus 3 deregistered [ 5582.884193] xhci_hcd 0000:06:00.0: PCI INT A disabled Fix this issue and free endpoint rings when their endpoints are successfully dropped. This patch should be backported to kernels as old as 2.6.31. Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org
-
Sarah Sharp authored
When an endpoint ring is freed, it is either cached in a per-device ring cache, or simply freed if the ring cache is full. If the ring was added to the cache, then virt_dev->num_rings_cached is incremented. The cache is designed to hold up to 31 endpoint rings, in array indexes 0 to 30. When the device is freed (when the slot was disabled), xhci_free_virt_device() is called, it would free the cached rings in array indexes 0 to virt_dev->num_rings_cached. Unfortunately, the original code in xhci_free_or_cache_endpoint_ring() would put the first entry into the ring cache in array index 1, instead of array index 0. This was caused by the second assignment to rings_cached: rings_cached = virt_dev->num_rings_cached; if (rings_cached < XHCI_MAX_RINGS_CACHED) { virt_dev->num_rings_cached++; rings_cached = virt_dev->num_rings_cached; virt_dev->ring_cache[rings_cached] = virt_dev->eps[ep_index].ring; This meant that when the device was freed, cached rings with indexes 0 to N would be freed, and the last cached ring in index N+1 would not be freed. When the driver was unloaded, this caused interesting messages like: xhci_hcd 0000:06:00.0: dma_pool_destroy xHCI ring segments, ffff880063040000 busy This should be queued to stable kernels back to 2.6.33. Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org
-
- 13 May, 2011 16 commits
-
-
Sarah Sharp authored
Dmitry's patch dfa49c4a USB: xhci - fix math in xhci_get_endpoint_interval() introduced a bug. The USB 2.0 spec says that full speed isochronous endpoints' bInterval must be decoded as an exponent to a power of two (e.g. interval = 2^(bInterval - 1)). Full speed interrupt endpoints, on the other hand, don't use exponents, and the interval in frames is encoded straight into bInterval. Dmitry's patch was supposed to fix up the full speed isochronous to parse bInterval as an exponent, but instead it changed the *interrupt* endpoint bInterval decoding. The isochronous endpoint encoding was the same. This caused full speed devices with interrupt endpoints (including mice, hubs, and USB to ethernet devices) to fail under NEC 0.96 xHCI host controllers: [ 100.909818] xhci_hcd 0000:06:00.0: add ep 0x83, slot id 1, new drop flags = 0x0, new add flags = 0x99, new slot info = 0x38100000 [ 100.909821] xhci_hcd 0000:06:00.0: xhci_check_bandwidth called for udev ffff88011f0ea000 ... [ 100.910187] xhci_hcd 0000:06:00.0: ERROR: unexpected command completion code 0x11. [ 100.910190] xhci_hcd 0000:06:00.0: xhci_reset_bandwidth called for udev ffff88011f0ea000 When the interrupt endpoint was added and a Configure Endpoint command was issued to the host, the host controller would return a very odd error message (0x11 means "Slot Not Enabled", which isn't true because the slot was enabled). Probably the host controller was getting very confused with the bad encoding. Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Dmitry Torokhov <dtor@vmware.com> Reported-by:
Thomas Lindroth <thomas.lindroth@gmail.com> Tested-by:
Thomas Lindroth <thomas.lindroth@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
* 'for-next' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb: MAINTAINERS: tree moved to kernel.org usb: musb: Calling VBUS pulsing API when SRP is initiated. usb: otg: TWL6030: OMAP4430: Adding SRP VBUS pulsing API usb: musb: host: remove duplicate check in musb_ep_program() usb: musb: export musb_interrupt symbol usb: musb: allow musb and glue layers to be modules usb: musb: drop unneeded musb_debug trickery
-
Felipe Balbi authored
composite.c always sets req->length to zero and expects function driver's setup handlers to return the amount of bytes to be used on req->length. If we test against req->length w_length will always be greater than req->length thus making us always stall that particular SEND_ENCAPSULATED_COMMAND request. Tested against a Windows XP SP3. Signed-off-by:
Felipe Balbi <balbi@ti.com> Cc: stable <stable@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jean-Christophe PLAGNIOL-VILLARD authored
on 9g20 they are the same as the 9260 Signed-off-by:
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by:
Nicolas Ferre <nicolas.ferre@atmel.com> Cc: stable <stable@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Julia Lawall authored
Several resources have been allocated before this kmalloc failure, and thus they should be released in this error handling code, as done in nearby error handling code. The semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression urb; statement S; position p1,p2; @@ urb = usb_alloc_urb@p1(...); ... when != urb if (urb == NULL) S ... when != urb ( return <+...urb...+>; | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ cocci.print_main("",p1) cocci.print_secs("",p2) // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jingoo Han authored
Return PTR_ERR(hsotg->clk) instead of -EINVAL if clk_get fails Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jingoo Han authored
This patch fixes the checkpatch warnings listed below: WARNING: braces {} are not necessary for any arm of this statement WARNING: please, no space before tabs Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jingoo Han authored
This patch fixes the checkpatch error and warning listed below: ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jingoo Han authored
clk_get() returns ERR_PTR() on error, not NULL. Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Thanks for kernel.org to give me an account on that server. Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Hema HK authored
Call VBUS pulsing API when there is SRP initiation from user space. Signed-off-by:
Hema HK <hemahk@ti.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Hema HK authored
Implement the start_srp API to generate the VBUS pulsing and assign it to otg_transciever function pointer. This will be used by the link driver when there is SRP initiation from user. Signed-off-by:
Hema HK <hemahk@ti.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Sergei Shtylyov authored
musb_ep_program() contains obviously duplicate check for 'dma_channel' in its IN/receive path -- removing it allows to save one level of indentation. While at it, improve the comment style... Signed-off-by:
Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Felipe Balbi authored
currently that's used by another module (am35x) which, granted, it shouldn't be using that, but in order to avoid compile errors, let's export that symbol temporarily until re-factoring work is done on that driver. Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Felipe Balbi authored
This in part reverts commit 7a180e70. (usb: musb: temporarily make it bool) and while at that we also allow glue layers to be compiled as modules. There are still some other changes needed until we can have a fully functional build with this setup, but we're getting there. Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Felipe Balbi authored
We have a generic way of enabling/disabling different debug messages on a driver called DYNAMIC_PRINTK. Anyone interested in enabling just part of the debug messages, please read the documentation under: Documentation/dynamic-debug-howto.txt for information on how to use that great infrastructure. Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
- 12 May, 2011 4 commits
-
-
huajun li authored
There are several functions using same code to get max ports and port array, this patch moves the common code to a function in order to reuse them easily. Signed-off-by:
Huajun Li <huajun.li.lee@gmail.com> Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com>
-
Andy Ross authored
The BIOS handoff for the unused EHCI controller on the ExoPC tablet hangs for 90 seconds on boot. Detect that device, skip negotiation and force the handoff. Signed-off-by:
Andy Ross <andy.ross@windriver.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Andy Ross authored
Factor the handoff code out from quirk_usb_disable_ehci Signed-off-by:
Andy Ross <andy.ross@windriver.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
Merge branch 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next * 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci: xhci: Fix bug in control transfer cancellation.
-
- 11 May, 2011 4 commits
-
-
Sarah Sharp authored
When the xHCI driver attempts to cancel a transfer, it issues a Stop Endpoint command and waits for the host controller to indicate which TRB it was in the middle of processing. The host will put an event TRB with completion code COMP_STOP on the event ring if it stops on a control transfer TRB (or other types of transfer TRBs). The ring handling code is supposed to set ep->stopped_trb to the TRB that the host stopped on when this happens. Unfortunately, there is a long-standing bug in the control transfer completion code. It doesn't actually check to see if COMP_STOP is set before attempting to process the transfer based on which part of the control TD completed. So when we get an event on the data phase of the control TRB with COMP_STOP set, it thinks it's a normal completion of the transfer and doesn't set ep->stopped_td or ep->stopped_trb. When the ring handling code goes on to process the completion of the Stop Endpoint command, it sees that ep->stopped_trb is not a part of the TD it's trying to cancel. It thinks the hardware has its enqueue pointer somewhere further up in the ring, and thinks it's safe to turn the control TRBs into no-op TRBs. Since the hardware was in the middle of the control TRBs to be cancelled, the proper software behavior is to issue a Set TR dequeue pointer command. It turns out that the NEC host controllers can handle active TRBs being set to no-op TRBs after a stop endpoint command, but other host controllers have issues with this out-of-spec software behavior. Fix this behavior. This patch should be backported to kernels as far back as 2.6.31, but it may be a bit challenging, since process_ctrl_td() was introduced in some refactoring done in 2.6.36, and some endian-safe patches added in 2.6.40 that touch the same lines. Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: stable@kernel.org
-
Kuninori Morimoto authored
The error processing order was wrong. This patch modify it. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Kuninori Morimoto authored
It was necessary to check pipe condition after disable fifo. Current driver checked it in a wrong place. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Erik Slagter authored
The Droids MuIn LCD operates like a serial remote terminal. Data received are displayed directly on the LCD. This patch fixes the kernel null pointer oops when it is plugged in. Add NO_DATA_INTERFACE quirk to tell the driver that "control" and "data" interfaces are not separated for this device, which prevents dereferencing a null pointer in the device probe code. Signed-off-by:
Erik Slagter <erik@slagter.name> Signed-off-by:
Maxin B. John <maxin.john@gmail.com> Tested-by:
Erik Slagter <erik@slagter.name> Cc: stable <stable@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- 10 May, 2011 12 commits
-
-
Thomas Abraham authored
The Samsung's S3C2416, S3C2443 and S3C2450 includes a USB High-Speed device controller module. This driver enables support for USB high-speed gadget functionality for the Samsung S3C24xx SoC's that include this controller. Signed-off-by:
Thomas Abraham <thomas.ab@samsung.com> Signed-off-by:
Sangbeom Kim <sbkim73@samsung.com> Signed-off-by:
Kukjin Kim <kgene.kim@samsung.com> Signed-off-by:
Alexander Neumann <alexander@bumpern.de> Signed-off-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Thomas Abraham authored
Add support for USB 2.0 High-Speed gadget controller driver for Samsung's S3C2416 processor. Signed-off-by:
Thomas Abraham <thomas.ab@samsung.com> Signed-off-by:
Sangbeom Kim <sbkim73@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Thomas Abraham authored
S3C2416, S3C2443 and S3C2450 includes a USB High-Speed Gadget controller module. This patch adds the following for supporting this controller. 1. Definition for USB High-Speed controller base address. 2. Platform device instantiation. 3. Declaration for platform data structure. 4. Functionality to setup platform data for the controller. Signed-off-by:
Thomas Abraham <thomas.ab@samsung.com> Signed-off-by:
Sangbeom Kim <sbkim73@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Thomas Abraham authored
Add register definitions required to configure the USB Phy. The definitions for PHYCTRL, PHYPWR, URSTCON and UCLKCON registers and corresponding bit field definitions are added. Signed-off-by:
Thomas Abraham <thomas.ab@samsung.com> Signed-off-by:
Sangbeom Kim <sbkim73@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Maxin B John authored
Comparing an unsigned integer with greater than or equal to zero is always true. So, it is safe to remove similar checks from 'f_mass_storage.c' and 'file_storage.c' Signed-off-by:
Maxin B. John <maxin.john@gmail.com> Acked-by:
Michal Nazarewicz <mina86@mina86.com> Acked-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Dietsche authored
On amd64 unsigned is not as wide as pointer and this causes a compiler warning. Switching to unsigned long corrects the problem. Signed-off-by:
Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jingoo Han authored
The __devinit and __devexit macros were added to probe and remove functions. The macros move the probe and remove functions to the devinit and devexit sections Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Florian Fainelli authored
CC: David Chalmers <david.chalmers@telegesis.com> Reported-by:
Xavier Carcelle <xavier.carcelle@gmail.com> Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Roger Quadros authored
Defer the SET_CONFIG and SET_INTERFACE control transfer's data/status stages till we are ready to process new CBW from the host. This way we ensure that we don't loose any CBW during MSC compliance tests and cause lock up. Signed-off-by:
Roger Quadros <roger.quadros@nokia.com> Acked-by:
Michal Nazarewicz <mina86@mina86.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Roger Quadros authored
Some USB function drivers (e.g. f_mass_storage.c) need to delay or defer the data/status stages of standard control requests like SET_CONFIGURATION or SET_INTERFACE till they are done with their bookkeeping and are actually ready for accepting new commands to their interface. They can now achieve this functionality by returning USB_GADGET_DELAYED_STATUS in their setup handlers (e.g. set_alt()). The composite framework will then defer completion of the control transfer by not completing the data/status stages. This ensures that the host does not send new packets to the interface till the function driver is ready to take them. When the function driver that requested for USB_GADGET_DELAYED_STATUS is done with its bookkeeping, it should signal the composite framework to continue with the data/status stages of the control transfer. It can do so by invoking the new API usb_composite_setup_continue(). This is where the control transfer's data/status stages are completed and host can initiate new transfers. The DELAYED_STATUS mechanism is currently only supported if the expected data phase is 0 bytes (i.e. w_length == 0). Since SET_CONFIGURATION and SET_INTERFACE are the only cases that will use this mechanism, this is not a limitation. Signed-off-by:
Roger Quadros <roger.quadros@nokia.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
Merge branch 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next * 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci: xHCI 1.0: Max Exit Latency Too Large Error xHCI 1.0: TT_THINK_TIME set xHCI 1.0: Block Interrupts for Isoch transfer xHCI 1.0: Isoch endpoint CErr field set xHCI 1.0: Control endpoint average TRB length field set xHCI 1.0: Setup Stage TRB Transfer Type flag
-
Greg Kroah-Hartman authored
This was needed to resolve a conflict in: drivers/usb/host/isp1760-hcd.c Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-