- 19 4月, 2012 1 次提交
-
-
由 Michael Grzeschik 提交于
If DEBUG is defined, the kmem_cache_create call a WARN_ON if the name of the cache uses a space. Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 11月, 2011 2 次提交
-
-
由 Arvid Brodin 提交于
This fixes a memory leak reported by Catalin Marinas: schedule_ptds() is called from isp1760_irq() and removes the qh from the controlqhs queue but ep->hcpriv still points to the qh and therefore it is not freed. Shortly after this, the isp1760_endpoint_disable() function sets ep->hcpriv to NULL and calls schedule_ptds() but since the corresponding qh is no longer in the queue, it is simply forgotten and reported by kmemleak. With this patch, the qh is always freed at endpoint_disable, instead, and the corresponding entry removed from the queue head list. While I was at it, I also replaced the lines in isp1760_endpoint_disable() that removed remaining qtds from the qh with a WARN_ON check for non-empty qh, in line with earlier comments from Alan Stern (linux-usb list, 2011-07-20). Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Tested-by: NCatalin Marinas <catalin.marinas@arm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Small code refactoring to ease the real fix in patch #2. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Tested-by: NCatalin Marinas <catalin.marinas@arm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 20 10月, 2011 1 次提交
-
-
由 Joachim Foerster 提交于
Properly triggering the reset wire is necessary with the ISP1761 used on Terasic DE4 Altera-FPGA boards using a NIOS2 processor, for example. This is an optional implementation for the OF binding only. The other bindings just pass an invalid GPIO to the isp1760_register() routine. Example, usage in DTS: gpios = <&pio_isp1761rst_0 0 1>; to point to a GPIO controller from within the ISP1761 node: GPIO 0, active low. Signed-off-by: NJoachim Foerster <joachim.foerster@missinglinkelectronics.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 23 8月, 2011 6 次提交
-
-
由 Arvid Brodin 提交于
When a low or full speed urb in progress is unlinked (or some other error occurs), the buffer in the transaction translator (part of the hub) might end up in an inconsistent state. This can make all further low and full speed transactions fail, unless the buffer is cleared. The bug can be seen when running the usbtest unlink tests as "set altsetting to 0 failed, -110", and gets fixed by this patch. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
1) A bug in the usage of time_after() in errata2_function(). 2) Clear done_maps just prior to starting a new transfer in start_bus_transfer(), instead of just after, when done_map bits might have been validly set by the started transfer. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
... and some small code style fixes. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Errata 2 for the isp1760 explains that the chip sometimes does not issue interrupts when an ATL (bulk or control) transfer is completed. There are several issues with the current work-around (SOF interrupts) for this: 1) It seems the chip sometimes does not even set the done bit for a completed transfer, in which case SOF interrupts does not solve the problem since we still check the done map to find out which transfer descriptors to handle. 2) The above point seems to happen only when ATL and SOF interrupts are enabled at the same time. However, disabling ATL interrupts increases the latency between transfer completion and handling. This is very noticeable in the testusb suite, which take several minutes more to run with ATL interrupts disabled. This patch removes the code to switch on SOF interrupts, and instead use a kernel timer to periodically check for "old" descriptors that have their VALID and ACTIVE flags unset, indicating completion, thus avoiding the dependency on the chip's done map (and SOF interrupts) to find transfers affected by this HW bug. [bigeasy@linutronix: 80 lines limit] Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Like the previous patch, this patch has been split from the next one for clarity. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Move the few lines of code in isp1760_enable_interrupts() and isp1760_init_maps() into isp1760_run(). This makes the following patch easier. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 09 8月, 2011 1 次提交
-
-
由 Arvid Brodin 提交于
Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 28 6月, 2011 1 次提交
-
-
由 Arvid Brodin 提交于
Both control and bulk transfers use isp1760 slots of type ATL, but the driver unlink code for ATL slots only acts on urbs describing a bulk transfer, letting the code for INT slots take care of the unlink instead, which often ended up removing the interrupt transfer for root hub events instead. That's not good, and gets fixed by this patch. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 20 5月, 2011 2 次提交
-
-
由 Arvid Brodin 提交于
Use skip map to avoid spurious interrupts from unlinked transfers. Also changes to urb_dequeue() and endpoint_disable() to avoid release of spinlock in uncertain state. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Preparation for patch #2. The function isp1760_endpoint_disable() does almost the same thing as urb_dequeue(). In patch #2 I change these to use a common helper function instead of calling each other - for clarity but also to avoid releasing the spinlock while in a "questionable" state. It seemed proper to have these functions close to each other in the code. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 03 5月, 2011 6 次提交
-
-
由 Arvid Brodin 提交于
This fixes a bug in my previous (2.6.38) patch series which caused urb->status value to be wrong after unlink (broke usbtest 11, 12). Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
This patch replaces the code that handles qtds. Intead of directly allocating chip mem and chip slot, enqueue the transfer in a list of queue heads. Use a centralized function enqueue_qtds() to prioritize and enqueue transfers. This removes all of the interrupt context BUG() calls when out of chip mem or transfer slots. It also makes it possible to efficiently use the dual-port mem on the chip for double-buffered transfers, which improve transfer times to/from/between usb sticks by about 40 % on my HW. With this patch it should also be possible to handle qtd scheduling outside of the interrupt handler, for significantly improved kernel latency. I have not implemented this since there are some locking issues which I haven't had time to look at. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
This fixes a bug in my previous (2.6.38) patch series which caused urb->status value to be wrong after unlink (broke usbtest 11, 12). Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Since we always set the OR flag for each transfer, we can just as well set all these bits to 1 at init and be done with it. Also, HcBufferStatus can be set at init as per the ISP1761 datasheet page 47 with no loss of performance. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
This collects urb enqueue code that was spread out all over the place into a couple of more readable functions. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
This removes the "qh is 0" printout. qh == NULL if the urb has been unlinked, so this condition is normal. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 15 4月, 2011 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
This reverts commit 58085446. To quote Richard: I don't think this should be mainlined. It was a misunderstanding on my part. If you see all the other hdc drivers in the same location, they all do the same thing (i.e. clear the interrupt status first, then do the work) that "glitch" I think I saw was actually two back-to-back interrupts. Sebastian (the original author of isp1760) explained it to me a few days after my submission. sorry for the confusion Cc: Richard Retanubun <RichardRetanubun@ruggedcom.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 14 4月, 2011 2 次提交
-
-
由 Richard Retanubun 提交于
This patch moves the HcInterrupt register write to clear the pending interrupt to after the isr work is done, doing this removes glitches in the irq line. Signed-off-by: NRichard Retanubun <richardretanubun@ruggedcom.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Randy Dunlap 提交于
Fix printk format build warning and grammar typo on same line. drivers/usb/host/isp1760-hcd.c:300: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'size_t' Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 14 3月, 2011 2 次提交
-
-
由 John Youn 提交于
Update the USB core to deal with USB 3.0 hubs. These hubs have a slightly different hub descriptor than USB 2.0 hubs, with a fixed (rather than variable length) size. Change the USB core's hub descriptor to have a union for the last fields that differ. Change the host controller drivers that access those last fields (DeviceRemovable and PortPowerCtrlMask) to use the union. Translate the new version of the hub port status field into the old version that khubd understands. (Note: we need to fix it to translate the roothub's port status once we stop converting it to USB 2.0 hub status internally.) Add new code to handle link state change status. Send out new control messages that are needed for USB 3.0 hubs, like Set Hub Depth. This patch is a modified version of the original patch submitted by John Youn. It's updated to reflect the removal of the "bitmap" #define, and change the hub descriptor accesses of a couple new host controller drivers. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Cc: Tony Olech <tony.olech@elandigitalsystems.com> Cc: "Robert P. J. Day" <rpjday@crashcourse.ca> Cc: Max Vozeler <mvz@vozeler.com> Cc: Tejun Heo <tj@kernel.org> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Rodolfo Giometti <giometti@linux.it> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Anton Vorontsov <avorontsov@mvista.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Lothar Wassmann <LW@KARO-electronics.de> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Martin Fuzzey <mfuzzey@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
由 Sarah Sharp 提交于
Using a #define to redefine a common variable name is a bad thing, especially when the #define is in a header. include/linux/usb/hcd.h redefined bitmap to DeviceRemovable to avoid typing a long field in the hub descriptor. This has unintended side effects for files like drivers/usb/core/devio.c that include that file, since another header included after hcd.h has different variables named bitmap. Remove the bitmap #define and replace instances of it in the host controller code. Cleanup the spaces around function calls and square brackets while we're at it. Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Cc: Tony Olech <tony.olech@elandigitalsystems.com> Cc: "Robert P. J. Day" <rpjday@crashcourse.ca> Cc: Max Vozeler <mvz@vozeler.com> Cc: Tejun Heo <tj@kernel.org> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Rodolfo Giometti <giometti@linux.it> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Anton Vorontsov <avorontsov@mvista.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Lothar Wassmann <LW@KARO-electronics.de> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Martin Fuzzey <mfuzzey@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
- 08 3月, 2011 1 次提交
-
-
由 Arvid Brodin 提交于
This fixes a problem with my previous patch series where there's a great risk that the kernel will crash when unplugging interrupt devices from the USB port. These lines must have got missing when I rebased the patches from the older kernel I was working with to 2.6.37 and 2.6-next: This fixes a bug where the kernel may crash if you unplug a USB device that has active interrupt transfers. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 01 3月, 2011 7 次提交
-
-
由 Arvid Brodin 提交于
Remove redundant "toggle" member from struct isp1760_qtd, and store toggle status in struct isp1760_qh only. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Replace the period calculation for INT packets with something readable. Seems to fix a rare bug with quickly repeated insertion/removal of several USB devices simultaneously (hub control INT packets). Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Consolidate printouts to use dev_XXX functions instead of an assortment of printks and driver specific macros. Remove some unused code snippets and struct members. Remove some unused function parameters and #defines. Change the "queue_entry" variable name which has different but related meanings in different places and use "slot" only. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Encapsulate payload addresses within qtds. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
Removes the redundant hw_next list pointer from struct isp1760_qtd, removes some unused #defines, removes redundant "urb" member from struct inter_packet_info. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arvid Brodin 提交于
This helps users with platform-bus-connected isp176xs, big-endian cpu, and missing byteswapping on the data bus. It does so by collecting all SW byteswaps in one place and also fixes a bug with non-32-bit io transfers on this hardware, where payload has to be byteswapped instead of ptds. Signed-off-by: NArvid Brodin <arvid.brodin@enea.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 18 2月, 2011 1 次提交
-
-
The document says: |2.1 Problem description | When at least two USB devices are simultaneously running, it is observed that | sometimes the INT corresponding to one of the USB devices stops occurring. This may | be observed sometimes with USB-to-serial or USB-to-network devices. | The problem is not noticed when only USB mass storage devices are running. |2.2 Implication | This issue is because of the clearing of the respective Done Map bit on reading the ATL | PTD Done Map register when an INT is generated by another PTD completion, but is not | found set on that read access. In this situation, the respective Done Map bit will remain | reset and no further INT will be asserted so the data transfer corresponding to that USB | device will stop. |2.3 Workaround | An SOF INT can be used instead of an ATL INT with polling on Done bits. A time-out can | be implemented and if a certain Done bit is never set, verification of the PTD completion | can be done by reading PTD contents (valid bit). | This is a proven workaround implemented in software. Russell King run into this with an USB-to-serial converter. This patch implements his suggestion to enable the high frequent SOF interrupt only at the time we have ATL packages queued. It goes even one step further and enables the SOF interrupt only if we have more than one ATL packet queued at the same time. Cc: <stable@kernel.org> # [2.6.35.x, 2.6.36.x, 2.6.37.x] Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 24 8月, 2010 1 次提交
-
-
由 Michael Hennerich 提交于
The ISP1760 has some timing requirements where it has to delay a short period after a write to a register has started. However, this delay is from the time the write hits the USB chip (the ISP1760), not from the time where the processor started processing the write. So on a quick enough processor, it is sometimes possible for the write to not hit the device before we start delaying, and we then violate the part's timing requirements, so things stop working. To avoid all this, insert a write barrier after the register write and before the timing delay/register read so we can guarantee we only start counting time after the write has hit the device. Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 11 8月, 2010 1 次提交
-
-
由 Alan Stern 提交于
This patch (as1393) converts several of the single-bit fields in struct usb_hcd to atomic flags. This is for safety's sake; not all CPUs can update bitfield values atomically, and these flags are used in multiple contexts. The flag fields that are set only during registration or removal can remain as they are, since non-atomic accesses at those times will not cause any problems. (Strictly speaking, the authorized_default flag should become atomic as well. I didn't bother with it because it gets changed only via sysfs. It can be done later, if anyone wants.) Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 21 5月, 2010 4 次提交
-
-
由 Anton Vorontsov 提交于
There were some reports[1] of isp1760 USB driver malfunctioning with high speed devices, noticed on Blackfin and PowerPC targets. These reports indicated that the original Philips 'pehcd'[2] driver worked fine. We've noticed the same issue with an ARM RealView platform. This happens under load (with only some mass storage devices, not all, just as in another report[3]): error bit is set in DW3 error bit is set in DW3 error bit is set in DW3 usb 1-1.2: device descriptor read/64, error -32 It appears that the 'pehcd' driver checks the X bit only if the transaction is halted (H bit), otherwise the error is so far insignificant. The ISP176x chips were modeled after EHCI, and EHCI spec says (thanks to Alan Stern for pointing out): "Transaction errors cause the status field to be updated to reflect the type of error, but the transaction continues to be retried until the Active bit is set to 0. When the error counter reaches 0, the Halt bit is set and the Active bit is cleared." So, just as the original Philips driver, isp1760 must report the error only if the transaction error and the halt bits are set. [1] http://markmail.org/message/lx4qrlbrs2uhcnly [2] svn co svn://sources.blackfin.uclinux.org/linux-kernel/trunk/drivers/usb/host -r 5494 See pehci.c:pehci_hcd_update_error_status(). [3] http://blackfin.uclinux.org/gf/tracker/5148Signed-off-by: NAnton Vorontsov <avorontsov@mvista.com> Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as1349b) clears up the confusion in many USB host controller drivers between port features and port statuses. In mosty cases it's true that the status bit is in the position given by the corresponding feature value, but that's not always true and it's not guaranteed in the USB spec. There's no functional change, just replacing expressions of the form (1 << USB_PORT_FEAT_x) with USB_PORT_STAT_x, which has the same value. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as1348) removes the bogus USB_PORT_FEAT_{HIGHSPEED,SUPERSPEED} symbols from ch11.h. No such features are defined by the USB spec. (There is a PORT_LOWSPEED feature, but the spec doesn't mention it except to say that host software should never use it.) The speed indicators are port statuses, not port features. As a temporary workaround for the xhci-hcd driver, a fictional USB_PORT_STAT_SUPER_SPEED symbol is added. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> CC: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Eric Lescouet 提交于
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: NEric Lescouet <eric@lescouet.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-