aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-09-23USB: quirks.h: use BIT()Greg Kroah-Hartman1-10/+10
Use the BIT macro instead of "open coding" bit fields. This makes it easier to actually see that the bits are not conflicting/overlapping. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23USB: Add device quirk for ASUS T100 Base Station keyboardLu Baolu3-2/+11
This full-speed USB device generates spurious remote wakeup event as soon as USB_DEVICE_REMOTE_WAKEUP feature is set. As the result, Linux can't enter system suspend and S0ix power saving modes once this keyboard is used. This patch tries to introduce USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk. With this quirk set, wakeup capability will be ignored during device configure. This patch could be back-ported to kernels as old as 2.6.39. Signed-off-by: Lu Baolu <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb3503: clarify what the registers 'PDS' and 'CFG1' really doTobias Jakobi1-2/+2
The current comment sounds like you have to disable some of the ports to be able to use self-powered mode. This is misleading, so change the wording to reflect this. Signed-off-by: Tobias Jakobi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb3503: fix typos in devicetree binding documentationTobias Jakobi1-2/+2
'availe' to 'available' 'desribed' to 'described' Signed-off-by: Tobias Jakobi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb3503: correct error message in probe ('connect' to 'interrupt')Tobias Jakobi1-1/+1
intn is obviously the interrupt pin. Signed-off-by: Tobias Jakobi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: Fixed a few typosMickael Maison5-6/+6
Fixed typos in comments of various drivers/usb files Signed-off-by: Mickael Maison <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23USB: storage: use %*ph specifier to dump small buffersAndy Shevchenko2-9/+5
Instead of dereference each byte let's use %*ph specifier in the printk() calls. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23drivers/usb/host/ehci-xilinx-of.c: Include "linux/of_irq.h" to avoid ↵Chen Gang1-0/+1
compiling error Need include it for irq_of_parse_and_map(), the related error with allmodconfig under microblaze: drivers/usb/host/ehci-xilinx-of.c: In function ‘ehci_hcd_xilinx_of_probe’: drivers/usb/host/ehci-xilinx-of.c:156:2: error: implicit declaration of function ‘irq_of_parse_and_map’ [-Werror=implicit-function-declaration] irq = irq_of_parse_and_map(dn, 0); ^ Signed-off-by: Chen Gang <[email protected]> Acked-by: Michal Simek <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: wusbcore: fix device disconnect on rekey timeoutThomas Pugliese2-1/+19
If three or more wireless devices are connected and two of them disconnect between 1-3 seconds apart, it can cause the HWA to disconnect the remaining devices due to failing to see a DN_Alive message from them. This happens because when the HWA detects that the first device is gone, it will attempt to rekey the remaining devices. If one of the devices is not responding because it has also been disconnected but not yet timed out, the synchronous rekey operation running on the wusbd workqueue can block for up to 5 seconds. This will prevent the KEEPALIVE timer from running and DN_Alive messages from being processed because they are processed by the same workqueue. This patch moves the rekey operation to a separate workqueue since it is the only wusb work item that needs to communicate directly with wireless devices. The rest of the WUSB work items either perform no device IO or communicate directly with the host controller and should not be blocked out by a non-responding wireless device. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: wusbcore: skip done segs before completing aborted transferThomas Pugliese1-3/+14
When completing an aborted transfer, skip done segs before calling wa_complete_remaining_xfer_segs to avoid a runtime warning. The warning is harmless in this case but avoiding it prevents false error reports. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: wusbcore: USB_WUSB_CBAF depends on USBThomas Pugliese1-0/+1
Add USB build dependency for USB_WUSB_CBAF. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: wusbcore: remove USB_WUSB build dependency on PCIThomas Pugliese1-1/+0
Wireless USB does not require PCI so remove USB_WUSB build dependency on PCI. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: hwa: add USB build dependency for USB_HWA_HCDThomas Pugliese1-1/+1
An HWA is a USB device so it depends on USB. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uwb: doc: add documentation for ASIE sysfs attributeThomas Pugliese1-0/+13
Document the /sys/class/uwb_rc/uwbN/ASIE sysfs attribute Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uwb: add an ASIE sysfs attribute to uwb_rc devicesThomas Pugliese1-0/+99
Allow user mode to add and remove application specific information elements (ASIEs) to the beacon of a uwb_rc device. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uwb: doc: bring uwb documentation up to dateThomas Pugliese1-13/+4
The existing UWB documentation states that UWB devices show up in /sys/class/uwb and /sys/bus/uwb/devices. Up until the most recent changes to add uwb devices to their own bus, neither of these statements were actually true. Now, UWB devices do show up in /sys/bus/uwb/devices so the documentation has been updated to reflect that and removed references to /sys/class/uwb. The existing documentation also states that local UWB radio controller (RC) devices also show up as UWB devices along with their wireless peer UWB devices under /sys/class/uwb. This is not true so that statement has been removed. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uwb: create a uwb bus type and add in-range peer devices to itThomas Pugliese3-4/+19
Documentation/usb/WUSB-Design-overview.txt states that UWB devices seen by a UWB radio controller are added to /sys/bus/uwb/devices, but this was not actually being done. This functionality is needed in order for UWB peer devices to be enumerated by user mode tools. This patch creates a uwb bus type and adds UWB peer devices to it as they are discovered by the radio controller. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uwb: remove UWB build dependency on PCIThomas Pugliese1-1/+0
UWB does not require PCI to be enabled so remove build dependency. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uwb: update uwb device prints to be more usefulThomas Pugliese1-4/+4
Print info about the radio controller device instead of the its parent when UWB devices connect and disconnect. Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uwb: line length cleanupThomas Pugliese1-1/+2
Fix line length in uwb-internal.h Signed-off-by: Thomas Pugliese <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23wusb: delete double assignmentJulia Lawall1-2/+0
Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression i; @@ *i = ...; i = ...; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: renesas_usbhs: fix driver dependenciesBartlomiej Zolnierkiewicz1-0/+1
Renesas USBHS controller support should be available only on Renesas ARM SoCs and SuperH architecture. Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Acked-by: Kyungmin Park <[email protected]> Cc: Magnus Damm <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Simon Horman <[email protected]> Acked-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: host: ohci-exynos: Remove unnecessary usb-phy supportVivek Gautam1-61/+20
Now that we have completely moved from older USB-PHY drivers to newer GENERIC-PHY drivers for PHYs available with USB controllers on Exynos series of SoCs, we can remove the support for the same in our host drivers too. We also defer the probe for our host in case we end up getting EPROBE_DEFER error when getting PHYs. Signed-off-by: Vivek Gautam <[email protected]> Acked-by: Jingoo Han <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: misc: yurex: remove useless casting of private_dataArjun Sreedharan1-4/+4
Signed-off-by: Arjun Sreedharan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23xhci: Log extra info on "ERROR Transfer event TRB DMA ptr not part of ↵Hans de Goede3-9/+27
current TD" Lately (with the use of uas / bulk-streams) we have been seeing several cases where this error triggers (which should never happen). Add some extra logging to make debugging these errors easier. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23xhci: Remove "FIXME - check all the stream rings for pending cancellations"Hans de Goede1-1/+0
Even though a Set TR deq ptr command operates on a ring, and an endpoint can have multiple rings, we can have only one Set TR deq ptr command pending. When an endpoint with streams halts or is stopped to unlink urbs, there will only be at most one ring active / one td being executed (the td stopped_td points to). So when we reset the endpoint (for a halt), or the stop command completes, we will queue one Set TR deq ptr command at most, cancelled urbs on other stream rings then the one being executed will have there trbs turned to nops, and once the hcd gets around to execute that stream ring they will be simply skipped. So the SET_DEQ_PENDING flag in the endpoint is sufficient protection against starting the endpoing before all stream rings are cleaned up. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Mathias Nyman <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd ↵Hans de Goede1-2/+2
completes Even if the stream for which the command was intended has been freed in the mean time. This ensures that things start rolling again after an unlink / halt. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Mathias Nyman <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23xhci: Fold queue_set_tr_deq into xhci_queue_new_dequeue_stateHans de Goede1-51/+32
xhci_queue_new_dequeue_state is the only caller of queue_set_tr_deq and queue_set_tr_deq checks for SET_DEQ_PENDING, where as xhci_queue_new_dequeue_state sets it which is inconsistent. Simply fold the 2 into one is a nice cleanup and fixes the inconsistency. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23xhci: xhci_ring_device: Ring stream ring bells for endpoints with streamsHans de Goede1-4/+11
Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23usb: xhci_suspend is not stopping the root hub timer for the shared HCDAl Cooper1-0/+4
V2 - Restart polling (which will restart the timer) for the shared HCD in xhci_resume(). xhci_suspend() will stop the primary HCD's root hub timer, but leaves the shared HCD's timer running. This change adds stopping of the shared HCD timer. Signed-off-by: Al Cooper <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23xhci: Move allocating of command for new_dequeue_state to queue_set_tr_deq()Hans de Goede3-20/+23
There are multiple reasons for this: 1) This fixes a missing check for xhci_alloc_command failing in xhci_handle_cmd_stop_ep() 2) This adds a warning when we cannot set the new dequeue state because of xhci_alloc_command failing 3) It puts the allocation of the command after the sanity checks in queue_set_tr_deq(), avoiding leaking the command if those fail 4) Since queue_set_tr_deq now owns the command it can free it if queue_command fails 5) It reduces code duplication Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Add response iu handlingHans de Goede1-0/+10
If something goes wrong in our communication with an uas device we may get a response iu in reaction to a cmnd, rather then a status iu. In this case propagate an error upwards, rather then logging a bogus iu message. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Log error codes when logging errorsHans de Goede1-5/+12
Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Cleanup uas_log_cmd_state usageHans de Goede1-33/+19
Instead of doing: uas_log_cmd_state(cmnd, __func__) scmd_printk(KERN_ERR, cmnd, "error doing foo %d\n", err) On error, resulting in 2 log calls for a single error, make uas_log_cmd_state take a status code, and change calls like the above to: uas_log_cmd_state(cmnd, "error doing foo", err) Also change various sanity checks (which should never trigger) from: "scmd_printk(KERN_ERR, cmnd, "sanity foo failed\n")" to calling the new uas_log_cmd_state(), so that when they do trigger we get more info. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Remove protype hardware usb interface infoHans de Goede1-2/+0
We've removed all hack from the driver for pre-production hardware. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Remove support for old sense ui as used in pre-production hardwareHans de Goede1-46/+1
I've access to a number of different uas devices now, and none of them use old style sense urbs. The only case where these code-paths trigger is with the asm1051 and there they do the wrong thing, as the asm1051 sends 8 bytes status iu-s when it does not have any sense data, but uses new style sense iu-s regardless, as can be seen for scsi cmnds where there is sense data. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Drop COMMAND_COMPLETED flagHans de Goede1-7/+3
It was only used to sanity check against completing the same cmnd twice, but that is the case we're likely operating on free-ed memory, and doing sanity checks on free-ed memory is not really helpful. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Use scsi_print_commandHans de Goede1-2/+3
Use scsi_print_command to print commands during errors, rather then printing the rather meaningless pointer to the command. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Do not log urb status error on cancellationHans de Goede1-5/+2
Check for both type of cancellation codes for sense and data urbs. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Use streams on upcoming 10Gbps / 3.1 USBHans de Goede1-1/+1
Limit the no-streams case to speeds less then USB_SPEED_SUPER. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: pre_reset and suspend: Fix a few racesHans de Goede1-6/+55
The purpose of uas_pre_reset is to: 1) Stop any new commands from being submitted while an externally triggered usb-device-reset is running 2) Wait for any pending commands to finish before allowing the usb-device-reset to continue The purpose of uas_suspend is to: 2) Wait for any pending commands to finish before suspending This commit fixes races in both paths: 1) For 1) we use scsi_block_requests, but the scsi midlayer calls queuecommand without holding any locks, so a queuecommand may already past the midlayer scsi_block_requests checks when we call it, add a check to uas_queuecommand to fix this 2) For 2) we were waiting for all sense-urbs to complete, there are 2 problems with this approach: a) data-urbs may complete after the sense urb, so we need to check for those too b) if a sense-urb completes with a iu id of READ/WRITE_READY a command is not yet done. We submit a new sense-urb immediately in this case, but that submit may fail (in which case it will get retried by uas_do_work), if this happens the sense_urbs anchor may become empty while the cmnd is not yet done Also unblock requests on timeout, to avoid things getting stuck in that case. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Fix memleak of non-submitted urbsHans de Goede1-0/+22
Not all urbs we've allocated are necessarily also submitted, non-submitted urbs will not be free-ed by their completion handler. So we need to free them manually. There are 2 scenarios where this can happen: 1) We have failed to submit some urbs at abort / disconnect 2) When running over usb-2 we may have never tried to submit the data urbs when completing the scsi cmnd, because we never got a READ/WRITE_READY iu Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Drop all references to a scsi_cmnd once it has been abortedHans de Goede1-3/+44
Do not keep references around to a cmnd which is under error handling. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Remove cmnd reference from the cmd urbHans de Goede1-6/+3
It is not strictly necessary for the cmd urb to have a reference to the cmnd, and without this reference it becomes easier to drop all references to a cmnd on an abort. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Drop inflight listHans de Goede1-16/+16
We've the same info doubled in both the inflight list and the cmnd array, drop the list. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: zap_pending: data urbs should have completed at this timeHans de Goede1-5/+5
The data urbs are all killed before calling zap_pending, and their completion handler should have cleared their inflight flag. Do not 0 the data inflight flags, and add a check for try_complete succeeding, as it should always succeed when called from zap_pending. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Simplify reset / disconnect handlingHans de Goede1-37/+6
Drop the whole dance with first moving cmnds to a dead-list. The resetting flag ensures that no new cmds / urbs will be submitted, and that any urb completions are short-circuited without trying to complete the scsi cmnd. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Free data urbs on completionHans de Goede1-2/+3
Now that we no longer drop our lock to unlink the data urbs, we can simply free them on completion, making their handling consistent with the other urbs. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Simplify unlink of data urbs on errorHans de Goede1-30/+18
There is no need for all the trickery with dropping the lock, we can simply reference the urbs while we hold the lock to ensure the urbs don't disappear beneath us, and do the actual unlink (+ unreference) after we've dropped the lock. This also fixes a race where we may loose of cmnd ownership to the scsi midlayer without holding the lock due to the midlayer re-claiming ownership through an abort (which will be handled by a future patch in this series). Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23uas: Check against unexpected completionsHans de Goede1-0/+12
The status urb should not complete before the command has been submitted, nor should we get a second status urb for the same tag after a IU_ID_STATUS. Data urbs should not complete before the command has been submitted, but may complete after the IU_ID_STATUS. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>