aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)AuthorFilesLines
2015-12-11USB: mos7840: remove redundant conditionGeyslan G. Bem1-1/+1
This patch removes redundant condition. (length && length > 5) can be reduced to a single evaluation. Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-12-11USB: io_edgeport: remove redundant conditionsGeyslan G. Bem1-21/+14
This patch removes redundant conditions. (!A || (A && B)) is the same as (!A || B). Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-12-09Merge tag 'fixes-for-v4.4-rc5' of ↵Greg Kroah-Hartman4-5/+12
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for-v4.4-rc5 Hopefully final set of fixes for v4.4 release cycle. There's a fix for a regression on dwc3 caused by recent changes to how transfers are started. We're not pre-starting interrupt endpoints anymore. A NULL pointer dereference fix for the MSM phy driver. The UVC gadget got a minor fix for permissions to its configfs attributes and, finally, two fixes for MUSB. A fix for PM runtime when MUSB returns EPROBE_DEFER and a fix to actually return an error in case we can't initialize a DMA engine. Signed-off-by: Felipe Balbi <[email protected]>
2015-12-09usb: musb: fail with error when no DMA controller setAaro Koskinen1-0/+1
Fail with error when no DMA controller is set. Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-12-08usb: gadget: uvc: fix permissions of configfs attributesMian Yousaf Kaukab1-1/+1
76e0da3 "usb-gadget/uvc: use per-attribute show and store methods" removed write permission for writeable attributes. Correct attribute permissions. Fixes: 76e0da3 "usb-gadget/uvc: use per-attribute show and store methods" Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Mian Yousaf Kaukab <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-12-08usb: musb: core: Fix pm runtime for deferred probeTony Lindgren1-1/+6
If musb_init_controller fails at musb_platform_init, we have already called pm_runtime_irq_safe for musb and that causes the pm runtime count to be enabled for parent before the parent has completed initialization. This causes pm to stop working as on unload nothing gets idled. This issue can be reproduced at least with: # modprobe omap2430 HS USB OTG: no transceiver configured musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517 # modprobe phy-twl4030-usb # rmmod omap2430 And after the steps above omap2430 will block deeper idle states on omap3. To fix this, let's not enable pm runtime until we need to and the parent has been initialized. Note that this does not fix the issue of PM being broken for musb during runtime. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-12-08usb: phy: msm: fix a possible NULL dereferenceLABBE Corentin1-3/+3
of_match_device could return NULL, and so cause a NULL pointer dereference later. Even if the probability of this case is very low, fixing it made static analyzers happy. Solving this with of_device_get_match_data made also code simplier. Reported-by: coverity (CID 1324133) Signed-off-by: LABBE Corentin <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-12-04usb: ehci: ohci: fix bool assignmentsGeyslan G. Bem3-4/+4
When assigning bool use true instead of 1. If declaring it as static and it's false there's no need to initialize it, since static variables are zeroed by default. Caught by coccinelle. Signed-off-by: Geyslan G. Bem <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04xhci: refuse loading if nousb is usedOliver Neukum1-0/+4
The module should fail to load. Signed-off-by: Oliver Neukum <[email protected]> CC: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04usb: make "nousb" a clear module parameterOliver Neukum1-5/+0
It shouldn't matter how usbcore is compiled. As it is a subsystem, the correct way to use nousb should be usbcore.nousb Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04usb: use BUG_ON() instead of BUG()Geyslan G. Bem1-5/+3
Replace BUG() with BUG_ON(). Caught by coccinelle. Signed-off-by: Geyslan G. Bem <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04usb: whci: fhci: remove comparison to boolGeyslan G. Bem2-2/+2
Get rid of bool explicit comparisons. Caught by Coccinelle. Signed-off-by: Geyslan G. Bem <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04usb: Add connected retry on resume for non SS devicesAl Cooper1-6/+10
Currently usb_port_resume waits for up to 2 seconds for CONNECT status for SS devices only. This change will do the same thing for non-SS devices even though the reason is a little different. This will fix an issue where VBUS is turned off during system wide "suspend to ram" and some 2.0 devices take greater than the current max of 100ms to show connected after VBUS is enabled. This is most commonly seen on hard drive based devices and USB3.0 devices plugged into a 2.0 only port. Signed-off-by: Al Cooper <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irqAlexandre Belloni1-6/+5
The interrupt handler, ohci_hcd_at91_overcurrent_irq may be called right after registration. At that time, pdev->dev.platform_data is not yet set, leading to a NULL pointer dereference. Fixes: e4df92279fd9 (USB: host: ohci-at91: merge loops in ohci_hcd_at91_drv_probe) Reported-by: Peter Rosin <[email protected]> Tested-by: Peter Rosin <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Cc: [email protected] # 4.3+ Acked-by: Nicolas Ferre <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04usb: Quiet down false peer failure messagesDon Zickus1-2/+2
My recent Intel box is spewing these messages: xhci_hcd 0000:00:14.0: xHCI Host Controller xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2 usb usb2: New USB device found, idVendor=1d6b, idProduct=0003 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb2: Product: xHCI Host Controller usb usb2: Manufacturer: Linux 4.3.0+ xhci-hcd usb usb2: SerialNumber: 0000:00:14.0 hub 2-0:1.0: USB hub found hub 2-0:1.0: 6 ports detected usb: failed to peer usb2-port2 and usb1-port1 by location (usb2-port2:none) (usb1-port1:usb2-port1) usb usb2-port2: failed to peer to usb1-port1 (-16) usb: port power management may be unreliable usb: failed to peer usb2-port3 and usb1-port1 by location (usb2-port3:none) (usb1-port1:usb2-port1) usb usb2-port3: failed to peer to usb1-port1 (-16) usb: failed to peer usb2-port5 and usb1-port1 by location (usb2-port5:none) (usb1-port1:usb2-port1) usb usb2-port5: failed to peer to usb1-port1 (-16) usb: failed to peer usb2-port6 and usb1-port1 by location (usb2-port6:none) (usb1-port1:usb2-port1) usb usb2-port6: failed to peer to usb1-port1 (-16) Diving into the acpi tables, I noticed the EHCI hub has 12 ports while the XHCI hub has 8 ports. Most of those ports are of connect type USB_PORT_NOT_USED (including port 1 of the EHCI hub). Further the unused ports have location data initialized to 0x80000000. Now each unused port on the xhci hub walks the port list and finds a matching peer with port1 of the EHCI hub because the zero'd out group id bits falsely match. After port1 of the XHCI hub, each following matching peer will generate the above warning. These warnings seem to be harmless for this scenario as I don't think it matters that unused ports could not create a peer link. The attached patch utilizes that assumption and just turns the pr_warn into pr_debug to quiet things down. Tested on my Intel box. Signed-off-by: Don Zickus <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04usb: xhci: fix config fail of FS hub behind a HS hub with MTTChunfeng Yun1-0/+8
if a full speed hub connects to a high speed hub which supports MTT, the MTT field of its slot context will be set to 1 when xHCI driver setups an xHCI virtual device in xhci_setup_addressable_virt_dev(); once usb core fetch its hub descriptor, and need to update the xHC's internal data structures for the device, the HUB field of its slot context will be set to 1 too, meanwhile MTT is also set before, this will cause configure endpoint command fail, so in the case, we should clear MTT to 0 for full speed hub according to section 6.2.2 Signed-off-by: Chunfeng Yun <[email protected]> Cc: stable <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-04xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable()Mika Westerberg1-2/+6
There is a memory leak because acpi_evaluate_dsm() actually returns an object which the caller is supposed to release. Fix this by calling ACPI_FREE() for the returned object (this expands to kfree() so passing NULL there is fine as well). While there correct indentation in !CONFIG_ACPI case. Signed-off-by: Mika Westerberg <[email protected]> Cc: stable <[email protected]> # v4.2 Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: core: lpm: add sysfs node for usb3 lpm permitLu Baolu3-4/+105
USB3 LPM is default on in Linux kernel if both xHCI host controller and the USB devices declare to be LPM-capable. Unfortunately, some devices are known to work well with LPM disabled, but to be broken if LPM is enabled, although it declares the LPM capability. Users won't be able to use this kind of devices, until someone puts them in the kernel blacklist and gets the kernel upgraded. This patch adds a sysfs node to permit or forbit USB3 LPM U1 or U2 entry for a port. The settings apply to both before and after device enumeration. Supported values are "0" - neither u1 nor u2 permitted, "u1" - only u1 is permitted, "u2" - only u2 is permitted, "u1_u2" - both u1 and u2 are permitted. With this interface, users can use an LPM-unfriendly USB device on a released Linux kernel. Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Zhuang Jin Can <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: core: lpm: fix usb3_hardware_lpm sysfs nodeLu Baolu2-14/+56
Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM") introduced usb3_hardware_lpm sysfs node. This doesn't show the correct status of USB3 U1 and U2 LPM status. This patch fixes this by replacing usb3_hardware_lpm with two nodes, usb3_hardware_lpm_u1 (for U1) and usb3_hardware_lpm_u2 (for U2), and recording the U1/U2 LPM status in right places. This patch should be back-ported to kernels as old as 4.3, that contains Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM"). Cc: [email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: ehci-msm: Use posted data writes on AHBAndy Gross1-2/+2
This patch sets the AHBMODE to allow for posted data writes. This results in higher performance. Signed-off-by: Andy Gross <[email protected]> Tested-by: Georgi Djakov <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: chipidea: msm: Use posted data writes on AHBAndy Gross1-1/+2
This patch sets the AHBMODE to allow for posted data writes. This results in higher performance. Signed-off-by: Andy Gross <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: usbmon: Use 64bit timestamp for mon_bin_hdrTina Ruchandani1-8/+9
struct mon_bin_hdr allows for a 64-bit seconds timestamp. The code currently uses 'struct timeval' to populate the timestamp in mon_bin_hdr, which has a 32-bit seconds field and will overflow in year 2038 and beyond. This patch replaces 'struct timeval' with 'struct timespec64' which is y2038 safe. This patch is part of a larger attempt to remove instances of struct timeval and other 32-bit timekeeping (time_t, struct timespec) from the kernel. Signed-off-by: Tina Ruchandani <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: misc: usbtest: Remove timeval usageDeepa Dinamani1-82/+147
timeval is deprecated and not y2038 safe. Its size also changes according to 32 bit/ 64 bit compilation. Replace it with 32 and 64 bit versions of its individual fields, giving two ioctls with different code values. The two ioctls are necessary to maintain the 32 bit and 64 bit userspace compatibility with a 64/32 bit kernel. Change unsigned to __u32 types for a definitive userspace interface. This is in accordance with the psABI that the unsigned type is always 32 bits. Also use motonic timer instead of real time to ensure positive delta values. Refactor usbtest_ioctl for readability to isolate the handling of the testing timing measurement. The official testusb userspace tool can be changed in a separate patch to reflect the __u32 changes as well. It can use the usbtest_param_32 struct, since 32 bit seconds is long enough for test durations. Signed-off-by: Deepa Dinamani <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: usbmon: Remove timeval usage for timestampTina Ruchandani1-4/+5
struct timeval' uses 32-bits for its seconds field and will overflow in the year 2038 and beyond. This patch replaces the usage of 'struct timeval' in mon_get_timestamp() with timespec64 which uses a 64-bit seconds field and is y2038-safe. mon_get_timestamp() truncates the timestamp at 4096 seconds, so the correctness of the code is not affected. This patch is part of a larger attempt to remove instances of struct timeval and other 32-bit timekeeping (time_t, struct timespec) from the kernel. Signed-off-by: Tina Ruchandani <[email protected]> Suggested-by: Arnd Bergmann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: bcma: switch to GPIO descriptor for power controlRafał Miłecki1-11/+10
So far we were using simple (legacy) GPIO functions & some poor logic to control power. It got many drawbacks: we were ignoring OF flags (GPIO_ACTIVE_LOW), we were not setting direction to output and we were assuming gpio_request success all the time. Fix it by switching to gpiod functions and adding appropriate checks. Signed-off-by: Rafał Miłecki <[email protected]> Acked-by: Hauke Mehrtens <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: Use the USB_SS_MULT() macro to decode burst multiplier for log messageBen Hutchings1-1/+2
usb_parse_ss_endpoint_companion() now decodes the burst multiplier correctly in order to check that it's <= 3, but still uses the wrong expression if warning that it's > 3. Fixes: ff30cbc8da42 ("usb: Use the USB_SS_MULT() macro to get the ...") Signed-off-by: Ben Hutchings <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: whci-hcd: add check for dma mapping errorAlexey Khoroshilov1-0/+4
qset_fill_page_list() do not check for dma mapping errors. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: core : hub: Fix BOS 'NULL pointer' kernel panicHans Yang1-7/+8
When a USB 3.0 mass storage device is disconnected in transporting state, storage device driver may handle it as a transport error and reset the device by invoking usb_reset_and_verify_device() and following could happen: in usb_reset_and_verify_device(): udev->bos = NULL; For U1/U2 enabled devices, driver will disable LPM, and in some conditions: from usb_unlocked_disable_lpm() --> usb_disable_lpm() --> usb_enable_lpm() udev->bos->ss_cap->bU1devExitLat; And it causes 'NULL pointer' and 'kernel panic': [ 157.976257] Unable to handle kernel NULL pointer dereference at virtual address 00000010 ... [ 158.026400] PC is at usb_enable_link_state+0x34/0x2e0 [ 158.031442] LR is at usb_enable_lpm+0x98/0xac ... [ 158.137368] [<ffffffc0006a1cac>] usb_enable_link_state+0x34/0x2e0 [ 158.143451] [<ffffffc0006a1fec>] usb_enable_lpm+0x94/0xac [ 158.148840] [<ffffffc0006a20e8>] usb_disable_lpm+0xa8/0xb4 ... [ 158.214954] Kernel panic - not syncing: Fatal exception This commit moves 'udev->bos = NULL' behind usb_unlocked_disable_lpm() to prevent from NULL pointer access. Issue can be reproduced by following setup: 1) A SS pen drive behind a SS hub connected to the host. 2) Transporting data between the pen drive and the host. 3) Abruptly disconnect hub and pen drive from host. 4) With a chance it crashes. Signed-off-by: Hans Yang <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: constify usb_mon_operations structureJulia Lawall2-3/+3
The usb_mon_operations structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: misc: usbtest: improve the description for error messagePeter Chen1-2/+2
Now the function of complicated_callback is not only used for iso transfer, improve the error message to reflect it. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: ohci-pxa27x: use of_property_read_bool()Saurabh Sengar1-7/+7
for checking if a property is present or not, of_property_read_bool is more appropriate than of_get_property() Signed-off-by: Saurabh Sengar <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01uas: no gfp argument to uas_submit_urbs()Oliver Neukum1-12/+12
This function must be called with a spinlock held. Memory can be allocated only with GFP_ATOMIC. Passing a gfp_t argument is a waste. Signed-off-by: Oliver Neukum <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01uas: use the BIT() macroOliver Neukum1-12/+12
Use this macro to make the driver more readable. Signed-off-by: Oliver Neukum <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB-EHCI: Delete unnecessary checks before the function call "dma_pool_destroy"Markus Elfring1-13/+5
The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb : replace dma_pool_alloc and memset with dma_pool_zallocSaurabh Sengar5-12/+6
replace dma_pool_alloc and memset with a single call to dma_pool_zalloc Signed-off-by: Saurabh Sengar <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01xhci: rework xhci extended capability list parsing functionsMathias Nyman3-117/+64
Replace the existing two extended capability parsing helper functions with one called xhci_find_next_ext_cap(). The extended capabilities are read both in pci-quirks before xhci driver is loaded, and inside the xhci driver when adding ports. The existing helpers did not suit well for these cases and a lot of custom parsing code was needed. The new helper function simplifies these two cases a lot. The motivation for this rework was that code to support xhci debug capability needed to parse extended capabilities, and it included yet another capability parsing helper specific for its needs. With this solution it debug capability code can use this new helper as well Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01xhci: use debug level when printing out interval rounding messagesMathias Nyman1-1/+1
Don't use dev_warn() for intened behaviour, use dev_dbg() Rounding down the interval to the nearest power of 2 is required by xhci specs. Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01xhci: mediatek: support MTK xHCI host controllerChunfeng Yun8-6/+1383
There some vendor quirks for MTK xhci host controller: 1. It defines some extra SW scheduling parameters for HW to minimize the scheduling effort for synchronous and interrupt endpoints. The parameters are put into reseved DWs of slot context and endpoint context. 2. Its IMODI unit for Interrupter Moderation register is 8 times as much as that defined in xHCI spec. 3. Its TDS in Normal TRB defines a number of packets that remains to be transferred for a TD after processing all Max packets in all previous TRBs. Signed-off-by: Chunfeng Yun <[email protected]> Tested-by: Daniel Thompson <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: xhci-plat: add support for the R-Car H3 xHCI controllersYoshihiro Shimoda4-2/+21
The R-Car H3 has two xHCI controllers. This SoC is compatible with R-Car Gen2 SoCs, however this SoC doesn't need some specific registers setting, and need a new firmware. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: xhci-plat: add support for the R-Car M2-N xHCI controllerYoshihiro Shimoda1-0/+3
This patch adds support for R-Car M2-N (r8a7793) xHCI controller. This SoC is compatible with R-Car H2 (r8a7790) and R-Car M2-W (r8a7791). Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: xhci-rcar: Change code for new SoCsYoshihiro Shimoda3-14/+26
This patch changes code to ease the addition of next generation SoCs. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: xhci-plat: add firmware_name in xhci_plat_privYoshihiro Shimoda1-0/+1
This patch adds a member "firmware_name" in struct xhci_plat_priv to simplify the code to match specific firmware name. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: xhci-plat: add struct xhci_plat_privYoshihiro Shimoda2-25/+85
This patch adds struct xhci_plat_priv to simplify the code to match platform specific variables. For now, this patch adds a member "type" in the structure. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: xhci: add a platform-private fieldYoshihiro Shimoda1-0/+3
This patch adds an xhci->priv field for private use by XHCI platform drivers. Until now none of the platform drivers has used this private space. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01usb: host: xhci: cleanup hcd private sizeYoshihiro Shimoda3-3/+1
This patch cleanups the hcd private size to suitable size. The previous code has "sizeof(struct xhci_hcd *)" in xhci_hc_driver as hcd_priv_size and sizeof(struct xhci_hcd) in xhci_plat_overrides or xhci_pci_overrides as extra_priv_size. However, the xhci driver uses a "sizeof(struct xhcd_hcd)" memory space in each hcd (main_hcd and shared_hcd) actually. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01xhci: use the correct define to indicate port status suspend change.Mathias Nyman1-1/+1
use the variables defined for populating the port status and port chage bits retuend by GetPortStatus request intead of the hub class feature selectors. The defines for hub class feature selectors are used for other purposes, they work as port status and feature selectors are in the same order, and set the same bits, but it makes the code very hard to follow Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: EHCI: warn on unexpectedly active QHAlan Stern2-2/+8
This patch adds a new warning message to ehci-hcd. The warning is triggered whenever the driver finds that the hardware has set the Active bit in a QH at a time when the driver expects the QH to be completely idle. Such bugs have been observed by users in the past, and since they can lead to serious problems (such as inability to unlink an URB that never completes), it would be good to know about them when they occur. This won't fix these bugs; that's a bigger job for a later patch. But success isn't guaranteed, since this depends on aspects of the hardware which are not documented in the EHCI spec or for which the spec's recommendations are clearly unworkable. It therefore seems worthwhile to check for these bugs proactively. Signed-off-by: Alan Stern <[email protected]> Reported-by: Michael Reutman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: add usbfs snooping for REAP and DISCARDAlan Stern1-3/+13
This patch improves the usbfs_snoop debugging facility by adding messages for a couple of significant events which, up to now, have not been logged. The events are reaping and discarding (i.e., cancelling) an URB. The debugging messages include the userspace address of the URB being reaped or discarded. The reaping messages have to be added in four places, in order to handle blocking and non-blocking reaps in both normal and 32-bit compatibility mode. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01USB: limit usbfs snooping of URB contentsAlan Stern1-1/+8
The usbfs_snoop facility can be very useful for debugging problems involving usbfs. However, it always prints out the entire contents of every URB. When dealing with large quantities of data, this can be less than helpful. This patch ameliorates the situation by adding a module parameter to usbcore for controlling the maximum number of bytes to print when snooping an URB. This makes debugging much easier. For backward compatibility, the default value is set unreasonably high. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>