aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-dbg.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-02-15usb: host: {e|o}hci-dbg: kill useless 'ret' variable initializersSergey Shtylyov1-2/+2
The 'ret' local variables are often initialized to 0 but this value is unused, thus we can kill those initializers... Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Link: https://lore.kernel.org/r/901b7478-45b6-d8b3-f5c6-555712485232@omp.ru Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-10usb: host: Use fallthrough pseudo-keywordGustavo A. R. Silva1-1/+1
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200707195023.GA3792@embeddedor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-31USB: ehci-hcd: no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-22/+8
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28usb: host: fix incorrect updating of offsetColin Ian King1-1/+1
The variable temp is incorrectly being updated, instead it should be offset otherwise the loop just reads the same capability value and loops forever. Thanks to Alan Stern for pointing out the correct fix to my original fix. Fix also cleans up clang warning: drivers/usb/host/ehci-dbg.c:840:4: warning: Value stored to 'temp' is never read Fixes: d49d43174400 ("USB: misc ehci updates") Cc: stable <stable@vger.kernel.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-07USB: host: ehci: Remove redundant license textGreg Kroah-Hartman1-11/+0
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-17usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HWyuan linyu1-1/+1
a lot of embeded system SOC (e.g. freescale T2080) have both PCI and USB modules. But USB module is controlled by registers directly, it have no relationship with PCI module. when say N here it will not build PCI related code in USB driver. Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29USB: EHCI: make all debugging depend on CONFIG_DYNAMIC_DEBUGAlan Stern1-52/+34
The debugging facilities in ehci-dbg.c follow an uneven pattern. Some of them are protected by "#ifdef CONFIG_DYNAMIC_DEBUG" and some aren't, presumably in the hope of having some of the debugging output available in any configuration. This leads to build problems when dynamic debugging isn't configured. Rather than try to keep this complicated state of affairs, let's just make everything dependent on CONFIG_DYNAMIC_DEBUG. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: ehci: remove old stub_debug_files definitionGeyslan G. Bem1-2/+2
This patch removes the local STUB_DEBUG_FILES debugging definition. STUB_DEBUG_FILES was used only in ehci-hcd, whereas CONFIG_DYNAMIC_DEBUG is used all over the kernel. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: add function output_buf_tds_dir()Geyslan G. Bem1-33/+29
This patch fixes a coding style issue reported by checkpatch related to too many leading tabs. This moves part of the fill_periodic_buffer() to the new function output_buf_tds_dir(). Because it's inline, the file size has not changed. Before: text data bss dec hex filename 36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o After: text data bss dec hex filename 36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: prefer kmalloc_array over kmalloc times sizeGeyslan G. Bem1-1/+1
This patch fixes a coding style issue reported by checkpatch related to kmalloc_array usage. On the same line the sizeof operand was enclosed in parentheses. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: enclose conditional blocks with bracesGeyslan G. Bem1-4/+5
This patch fixes coding style issues reported by checkpatch concerning to conditional blocks without braces. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: replace sizeof operandGeyslan G. Bem1-1/+1
This patch fixes a coding style issue reported by checkpatch concerning to usage of sizeof operand as a variable instead the type. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: remove blank line before close braceGeyslan G. Bem1-1/+0
This patch fixes coding style issue reported by checkpatch concerning to an unnecessary line before close brace. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: add blank line after declarationsGeyslan G. Bem1-0/+1
This patch fixes coding style issues reported by checkpatch concerning to missing line after variable declarations. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: convert macro to inline functionGeyslan G. Bem1-20/+34
This patch converts macros into inline functions since the usage of second is encouraged by Coding Style instead of the first. Macros converted to functions: - dbg_status - dbg_cmd - dbg_port - speed_char The size after changes remains the same. Before: text data bss dec hex filename 36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o After: text data bss dec hex filename 36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: use a blank line after struct declarationsGeyslan G. Bem1-0/+3
This patch fixes coding style issues reported by checkpatch concerning to missing line after struct declarations. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: fix up function definitionsGeyslan G. Bem1-12/+16
This patch indents not empty functions to have the opening brace at the beginning of the next line and body conforming coding style. This also makes the function definition consistent with the file coding style aligning parameters in sequential lines and indenting them with two tabs. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: use scnprintf() in qh_lines()Geyslan G. Bem1-6/+2
This patch replaces two snprintf() calls with scnprintf() in qh_lines() and hence removes the unneeded sequential truncation tests. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: put spaces around operatorsGeyslan G. Bem1-8/+8
This patch fixes coding style issues reported by checkpatch concerning to missing spaces around operators. There is an additional change on line 49 that removes unnecessary parentheses around ternary operands. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: fix up closing parenthesisGeyslan G. Bem1-8/+4
This patch puts the closing parenthesis at the statement end removing unnecessary "new line". Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: move trailing statements to next lineGeyslan G. Bem1-16/+38
This patch fixes coding style issues reported by checkpatch concerning to switch case statements. There are few additional changes made to fix other coding styles issues. These additional changes are: - The compound statement "({...})" on line 474 is pulled out from snprintf parameters. - On line 723 the constant "0x03" is moved to right. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: use C89-style commentsGeyslan G. Bem1-10/+11
This patch fixes coding style issues reported by checkpatch. Coding style demands usage of C89-style comments and a specific format when it's multiline. This also removes the Free Software Foundation address because FSF can change it again. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: remove space before open square bracketGeyslan G. Bem1-17/+16
This patch fixes coding style issues reported by checkpatch. The only change in this patch that isn't just removing spaces before opening square brackets is at line 213 where the initialization of fls_strings[] is placed in same line. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03usb: host: ehci-dbg: remove space before open parenthesisGeyslan G. Bem1-100/+99
This patch fixes coding style issues reported by checkpatch. The vast majority of changes in this patch are removing spaces before opening parenthesis, but in some cases, a few additional changes are made to fix other coding style issues. These additional changes are: - Spaces around >> on line 50. - On line 55 a call to ehci_dbg reduced to a single line. - sizeof operands surrounded with parenthesis on lines 877, 883, 889 and 901. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-01USB: EHCI: enhance "async" debugfs outputAlan Stern1-4/+11
This patch enhances the "async" debugfs file in ehci-hcd by printing out several additional fields in the hardware-accessible data structures. These fields are important for determining the hardware's view of the async schedule, in particular, the addresses of the current and next qTDs for each QH along with the start address of each qTD's data buffer. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-10USB: ehci-dbg.c: move assignment out of if () blockGreg Kroah-Hartman1-1/+2
We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Felipe Balbi <balbi@ti.com>
2013-12-08usb: Use dev_is_pci() to check whether it is pci deviceYijing Wang1-1/+1
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03usb: kill DEBUG compile optionOliver Neukum1-4/+4
In the drivers that no longer need it, it is removed. It is removed from the Makefile. Drivers not fully converted to dynamic debug have it shifted down into the individual drivers. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14USB: EHCI: create per-TT bandwidth tablesAlan Stern1-0/+48
This patch continues the scheduling changes in ehci-hcd by adding a table to store the bandwidth allocation below each TT. This will speed up the scheduling code, as it will no longer need to read through the entire schedule to compute the bandwidth currently in use. Properly speaking, the FS/LS budget calculations should be done in terms of full-speed bytes per microframe, as described in the USB-2 spec. However the driver currently uses microseconds per microframe, and the scheduling code isn't robust enough at this point to change over. For the time being, we leave the calculations as they are. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11USB: EHCI: use a bandwidth-allocation tableAlan Stern1-0/+56
This patch significantly changes the scheduling code in ehci-hcd. Instead of calculating the current bandwidth utilization by trudging through the schedule and adding up the times used by the existing transfers, we will now maintain a table holding the time used for each of 64 microframes. This will drastically speed up the bandwidth computations. In addition, it eliminates a theoretical bug. An isochronous endpoint may have bandwidth reserved even at times when it has no transfers listed in the schedule. The table will keep track of the reserved bandwidth, whereas adding up entries in the schedule would miss it. As a corollary, we can keep bandwidth reserved for endpoints even when they aren't in active use. Eventually the bandwidth will be reserved when a new alternate setting is installed; for now the endpoint's reservation takes place when its first URB is submitted. A drawback of this approach is that transfers with an interval larger than 64 microframes will have to be charged for bandwidth as though the interval was 64. In practice this shouldn't matter much; transfers with longer intervals tend to be rather short anyway (things like hubs or HID devices). Another minor drawback is that we will keep track of two different period and phase values: the actual ones and the ones used for bandwidth allocation (which are limited to 64). This adds only a small amount of overhead: 3 bytes for each endpoint. The patch also adds a new debugfs file named "bandwidth" to display the information stored in the new table. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11USB: EHCI: create a "periodic schedule info" structAlan Stern1-3/+4
This patch begins the process of unifying the scheduling parameters that ehci-hcd uses for interrupt and isochronous transfers. It creates an ehci_per_sched structure, which will be stored in both ehci_qh and ehci_iso_stream structures, and will contain the common scheduling information needed for both. Initially we merely create the new structure and move some existing fields into it. Later patches will add more fields and utilize these structures in improved scheduling algorithms. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11usb: Remove unnecessary semicolonsJoe Perches1-1/+1
These aren't necessary after switch and if blocks. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30ehci: remove duplicate debug_async_open() prototype in ehci-dbg.cXenia Ragiadakou1-1/+0
This patch removes the duplicate of debug_async_open() prototype following three lines below the debug_async_open() declaration. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30ehci: enable debugging code when CONFIG_DYNAMIC_DEBUG is setXenia Ragiadakou1-4/+4
The debugging code for ehci is enabled to run if the DEBUG flag is defined. This patch enables the debugging code also when the kernel is configured with dynamic debugging on. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25USB: EHCI: convert singly-linked lists to list_headsAlan Stern1-6/+9
This patch (as1664) converts ehci-hcd's async_unlink, async_iaa, and intr_unlink from singly-linked lists to standard doubly-linked list_heads. Originally it didn't seem necessary to use list_heads, because items are always added to and removed from these lists in FIFO order. But now with more list processing going on, it's easier to use the standard routines than continue with a roll-your-own approach. I don't know if the code ends up being notably shorter, but the patterns will be more familiar to any kernel hacker. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-31USB: EHCI: remove unused Link Power Management codeAlan Stern1-97/+0
This patch (as1622) removes the USB-2.1 Link Power Management code from the ehci-hcd driver. This code was never integrated with usbcore, it is full of bugs, and it was not getting used by anybody. However, the debugging code for dumping the LPM-related fields in the EHCI registers is left in place. In theory it might be useful to see these values, even though we don't use them. This essentially amounts to a partial revert of commit aa4d8342988d0c1a79ff19b2ede1e81dfbb16ea5 (USB: EHCI: EHCI 1.1 addendum: preparation) and an almost full revert of commit 48f24970144479c29b8cee6d2e1dbedf6dcf9cfb (USB: EHCI: EHCI 1.1 addendum: Basic LPM feature support) plus its follow-ons. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24USB: EHCI: move logging macros to ehci.hAlan Stern1-15/+0
In preparation for splitting the ehci-hcd driver into a core library and separate platform-specific driver modules, this patch (as1616) moves the console logging macros from ehci-dbg.c to ehci.h, where they will be available to the platform drivers. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21USB: EHCI: remove useless testAlan Stern1-4/+2
This patch (as1605) removes a useless test from the EHCI debugfs code. There's no point checking whether p.qh is non-NULL; we already know it is and in any case it gets dereferenced aerlier in the function. The useless test was identified by smatch. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16USB: EHCI: add new root-hub state: STOPPINGAlan Stern1-0/+2
This patch (as1571) adds a new state for ehci-hcd's root hubs: EHCI_RH_STOPPING. This value is used at times when the root hub is being stopped and we don't know whether or not the hardware has finished all its DMA yet. Although the purpose may not be apparent, this distinction will come in useful later on. Future patches will avoid actions that depend on the root hub being operational (like turning on the async or periodic schedules) when they see the state is EHCI_RH_STOPPING. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16USB: EHCI: rename "reclaim"Alan Stern1-7/+9
This patch (as1569) renames the ehci->reclaim list in ehci-hcd. The word "reclaim" is used in the EHCI specification to mean something quite different, and "unlink_next" is more descriptive of the list's purpose anyway. Similarly, the "reclaim" field in the ehci_stats structure is renamed "iaa", which is more meaningful (to experts, anyway) and is a better match for the "lost_iaa" field. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16USB: EHCI: add symbolic constants for QHsAlan Stern1-3/+3
This patch (as1568) introduces symbolic constants for some of the less-frequently used bitfields in the QH structure. This makes the code a little easier to read and understand. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-23EHCI: maintain the ehci->command value properlyAlan Stern1-4/+2
The ehci-hcd driver is a little haphazard about keeping track of the state of the USBCMD register. The ehci->command field is supposed to hold the register's value (apart from a few special bits) at all times, but it isn't maintained properly. This patch (as1543) cleans up the situation. It keeps ehci->command up-to-date, and uses that value rather than reading the register from the hardware whenever possible. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-05simple_open: automatically convert to simple_open()Stephen Boyd1-8/+1
Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-02-24usb: Fix typo in ehci-dbg.cMasanari Iida1-1/+1
Correct spelling "peridic" to "periodic" in drivers/usb/host/ehci-dbg.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-10-18EHCI: workaround for MosChip controller bugAlan Stern1-1/+1
This patch (as1489) works around a hardware bug in MosChip EHCI controllers. Evidently when one of these controllers increments the frame-index register, it changes the three low-order bits (the microframe counter) before changing the higher order bits (the frame counter). If the register is read at just the wrong time, the value obtained is too low by 8. When the appropriate quirk flag is set, we work around this problem by reading the frame-index register a second time if the first value's three low-order bits are all 0. This gives the hardware a chance to finish updating the register, yielding the correct value. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Jason N Pitt <jpitt@fhcrc.org> CC: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-22USB: EHCI: remove usages of hcd->stateAlan Stern1-2/+15
This patch (as1483) improves the ehci-hcd driver family by getting rid of the reliance on the hcd->state variable. It has no clear owner and it isn't protected by the usual HCD locks. In its place, the patch adds a new, private ehci->rh_state field to record the state of the root hub. Along the way, the patch removes a couple of lines containing redundant assignments to the state variable. Also, the QUIESCING state simply gets changed to the RUNNING state, because the driver doesn't make any distinction between them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03USB: EHCI: Support controllers with big endian capability regsJan Andersson1-1/+1
The two first HC capability registers (CAPLENGTH and HCIVERSION) are defined as one 8-bit and one 16-bit register. Most HC implementations have selected to treat these registers as part of a 32-bit register, giving the same layout for both big and small endian systems. This patch adds a new quirk, big_endian_capbase, to support controllers with big endian register interfaces that treat HCIVERSION and CAPLENGTH as individual registers. Signed-off-by: Jan Andersson <jan@gaisler.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04USB: EHCI: Cleanup and rewrite ehci_vdgb().David Daney1-3/+1
The vdbg macro is not used anywhere so it can be removed. With pre-release GCC-4.6, there are several complaints of variables that are 'set but not used' caused by the ehci_vdbg() macro expanding to something that does not contain any of its arguments. We can quiet this warning by rewriting ehci_vdbg() as a variadic static inline that does nothing. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16Merge branch 'usb-next' into musb-mergeGreg Kroah-Hartman1-1/+1
* usb-next: (132 commits) USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added usb: gadget: f_ncm.c added usb: gadget: u_ether: prepare for NCM usb: pch_udc: Fix setup transfers with data out usb: pch_udc: Fix compile error, warnings and checkpatch warnings usb: add ab8500 usb transceiver driver USB: gadget: Implement runtime PM for MSM bus glue driver USB: gadget: Implement runtime PM for ci13xxx gadget USB: gadget: Add USB controller driver for MSM SoC USB: gadget: Introduce ci13xxx_udc_driver struct USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc USB: gadget: Separate out PCI bus code from ci13xxx_udc ...