summaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore
Commit message (Collapse)AuthorAgeFilesLines
* USB: wusbcore: fix control-pipe directionsJohan Hovold2014-05-271-2/+2
| | | | | | | | Fix incorrect pipe directions in control requests (which has been silently fixed up by USB core). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: fix panic in wusbhc_chid_setThomas Pugliese2014-04-241-1/+1
| | | | | | | | | | If no valid CHID value has previously been set on an HWA, writing a value of all zeros will cause a kernel panic in uwb_radio_stop because wusbhc->uwb_rc has not been set. This patch skips the call to uwb_radio_stop if wusbhc->uwb_rc has not been initialized. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: convert nested lock to use spin_lock instead of spin_lock_irqThomas Pugliese2014-04-241-2/+2
| | | | | | | | | | Nesting a spin_lock_irq/unlock_irq inside a lock that has already disabled interrupts will enable interrupts before we are ready when spin_unlock_irq is called. This patch converts the inner lock to use spin_lock and spin_unlock instead. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: use multiple urbs for HWA iso transfer result frame readsThomas Pugliese2014-03-083-74/+134
| | | | | | | | | | Submit multiple concurrent urbs for HWA isochronous transfer result data frame reads. This keeps the read pipeline full and significantly improves performance in cases where the frame reads cannot be combined because they are not contiguous or multiples of the max packet size. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: combine iso transfer result frame reads when possibleThomas Pugliese2014-03-081-30/+76
| | | | | | | | | | | | When reading the transfer result data for an isochronous in request, if the current frame actual_length is contiguous with the next frame and actual_length is a multiple of the DTI endpoint max packet size, combine the current frame with the next frame in a single URB. This reduces the number of URBs that must be submitted in that case which increases performance and reduces CPU interrupt overhead. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: disable transfer notifications for Alereon HWAsThomas Pugliese2014-03-072-34/+60
| | | | | | | | | | | | | The HWA driver does not do anything with transfer notifications after receiving the first one and the Alereon HWA allows them to be disabled as a performance optimization. This patch sends a vendor specific command to the Alereon HWA on startup to disable transfer notifications. If the command is successful, the DTI system is started immediately since that would normally be started upon the first reception of a transfer notification which will no longer be sent. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: don't mark WA_SEG_DTI_PENDING segs as done in urb_dequeueThomas Pugliese2014-03-071-1/+10
| | | | | | | | | | Data for transfer segments in the WA_SEG_DTI_PENDING state is actively being read by the driver. Let the buffer read callback handle the transfer cleanup since cleaning it up in wa_urb_dequeue will cause the read callback to access invalid memory if the transfer is completed. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: fix potential double list_del on urb dequeueThomas Pugliese2014-03-071-2/+6
| | | | | | | | | | | | | This patch locks rpipe->seg_lock around the entire transfer segment cleanup loop in wa_urb_dequeue instead of just one case of the switch statement. This fixes a race between __wa_xfer_delayed_run and wa_urb_dequeue where a transfer segment in the WA_SEG_DELAYED state could be removed from the rpipe seg_list twice leading to memory corruption. It also switches the spin_lock call to use the non-irqsave version since the xfer->lock is already held and irqs already disabled. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: fix compile warningsThomas Pugliese2014-02-282-7/+3
| | | | | | | | Fix "pointer targets differ in signedness" and "variable set but not used" warnings Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: add info to HWA debug printsThomas Pugliese2014-02-281-9/+16
| | | | | | | | | | This patch adds a debug print in the transfer dequeue case where a transfer result arrives for a transfer that has already been cleaned up. It also adds the transfer ID to some debug prints and prints error codes as signed integers in a couple of others. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: read actual_length bytes isoc in segmentsThomas Pugliese2014-02-281-1/+1
| | | | | | | | | | | Use the iso_frame_desc.actual_length field instead of length when reading isoc in data segments from the HWA. This fixes a case where the isoc in read URB would never complete because it expected the HWA to send more data than it actually did. When this happened the URB would be stuck in the driver preventing module unload and clean shutdown. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: adjust iterator correctly when searching for ep comp descriptorThomas Pugliese2014-02-281-1/+1
| | | | | | | | | | | | | If the endpoint companion descriptor is not the first descriptor in the extra descriptor buffer of a usb_host_endpoint, the loop in rpipe_epc_find will get its buffer pointer and remaining size values out of sync. The buffer ptr 'itr' is advanced by the descriptor's bLength field but the remaining size value 'itr_size' is decremented by the bDescriptorType field which is incorrect. This patch fixes the loop to decrement itr_size by bLength as it should. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: add a convenience function for completing a transfer segmentThomas Pugliese2014-02-281-21/+27
| | | | | | | | | | | This patch adds a convenience function for the commonly performed task of marking a transfer segment as done. It combines the 3 steps of setting the segment status, incrementing the segs_done field of the transfer and checking if the completed segment results in the transfer also being done. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: prevent urb dequeue and giveback raceThomas Pugliese2014-02-281-10/+27
| | | | | | | | | | | | | | This patch takes a reference to the wa_xfer object in wa_urb_dequeue to prevent the urb giveback code from completing the xfer and freeing it while wa_urb_dequeue is executing. It also checks for done at the start to avoid a double completion scenario. Adding the check for done in urb_dequeue means that any other place where a submitted transfer segment is marked as done must complete the transfer if it is done. __wa_xfer_delayed_run was not checking this case so that check was added as well. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: fix stranded URB after HWA unplugThomas Pugliese2014-02-281-5/+51
| | | | | | | | | | | This patch adds error checking to the abort request callback to forcibly clean up the dequeued transfers if the abort request failed. The wa_complete_remaining_xfer_segs was modified so that it could be used in this situation as well. This fixes a stranded URB/PNP hang when the HWA is unplugged while playing audio to a wireless audio device. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: fix kernel panic on HWA unplugThomas Pugliese2014-02-281-4/+44
| | | | | | | | | | | This patch adds ref counting to sections of code that operate on struct wa_xfer objects that were missing it. Specifically, error handling cases need to be protected from freeing the xfer while it is still in use elsewhere. This fixes a kernel panic that can occur when pulling the HWA dongle while data is being transferred to a wireless device. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-082-2/+0
| | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix up coding style issues in wa-nep.cRahul Bedarkar2014-01-071-4/+6
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix up coding style issues in wa-rpipe.cRahul Bedarkar2014-01-071-3/+3
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix up coding style issues in wusbhc.c and wusbhc.hRahul Bedarkar2014-01-072-8/+14
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix up line break coding style issues in mmc.cRahul Bedarkar2014-01-071-3/+6
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix up line break coding style issues in security.cRahul Bedarkar2014-01-071-7/+11
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix up line break coding style issues in wa-hc.hRahul Bedarkar2014-01-071-4/+4
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix up minor coding style issues in cbaf.cRahul Bedarkar2014-01-071-5/+7
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: correct spelling mistakes in comments and error stringRahul Bedarkar2014-01-077-12/+12
| | | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: add debug prints to reservation and channel changeThomas Pugliese2013-12-202-0/+2
| | | | | | | | This patch adds debug prints to the reservation and channel change sequence to help with debugging channel change problems. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: add isochronous IN support to HWAThomas Pugliese2013-12-171-98/+207
| | | | | | | | | | This patch adds support for isochronous IN transfers to the HWA driver. The changes include removing the checks that return errors for isoc IN URBs and adding functionality to read the isoc data returned from the HWA. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge branch 3.13-rc4 into usb-nextGreg Kroah-Hartman2013-12-165-103/+153
|\
| * usb: wusbcore: set packet count correctly on isoc transfersThomas Pugliese2013-12-091-0/+5
| | | | | | | | | | | | | | | | | | | | This patch correctly sets the dwNumOfPackets field of the HWA transfer request for isochronous transfers with multiple segments. Previously all segments used the value that was set for the first segment which may not be correct. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: move isoc_frame_index from wa_xfer to wa_segThomas Pugliese2013-12-091-11/+10
| | | | | | | | | | | | | | | | | | | | If multiple segments belonging to an isoc transfer are submitted concurrently, the isoc_frame_index field in struct wa_xfer can get corrupted. This patch moves the isoc_frame_index field from struct wa_xfer to struct wa_seg to prevent this from happening. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: use USB_CTRL_SET_TIMEOUT and USB_CTRL_GET_TIMEOUTThomas Pugliese2013-12-094-22/+23
| | | | | | | | | | | | | | | | | | | | Use USB_CTRL_SET_TIMEOUT and USB_CTRL_GET_TIMEOUT for USB control messages instead of an arbitrary 1s timeout value. This is particularly useful for WUSB since in the worst case RF scanario, a WUSB device can be unresponsive for up to 4s and still be connected. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: fix short transfersThomas Pugliese2013-12-091-54/+74
| | | | | | | | | | | | | | | | | | | | | | If a URB is broken up into multiple transfer segments and a short transfer occurs in any segment other than the last, the URB will currently get stuck in the driver forever. This patch adds a check for a short transfer and cleans up any pending segments so the URB can complete properly. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: return -ENOENT for unlinked URBs.Thomas Pugliese2013-12-081-3/+5
| | | | | | | | | | | | | | Return -ENOENT for unlinked URBs. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: add more info to debug prints in urb_unlink pathThomas Pugliese2013-12-081-10/+11
| | | | | | | | | | | | | | Add more info to debug prints in urb_unlink path Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: add calls to usb_hcd_link_urb_to_ep, ↵Thomas Pugliese2013-12-082-3/+25
| | | | | | | | | | | | | | | | | | | | usb_hcd_unlink_urb_from_ep, and Add calls to usb_hcd_link_urb_to_ep, usb_hcd_unlink_urb_from_ep, and usb_hcd_check_unlink_urb in the appropriate locations. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: wusbcore: fix deadlock in wusbhc_gtk_rekeyThomas Pugliese2013-12-023-68/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When multiple wireless USB devices are connected and one of the devices disconnects, the host will distribute a new group key to the remaining devicese using wusbhc_gtk_rekey. wusbhc_gtk_rekey takes the wusbhc->mutex and holds it while it submits a URB to set the new key. This causes a deadlock in wa_urb_enqueue when it calls a device lookup helper function that takes the same lock. This patch changes wusbhc_gtk_rekey to submit a work item to set the GTK so that the URB is submitted without holding wusbhc->mutex. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: wusbcore: do device lookup while holding the hc mutexThomas Pugliese2013-12-021-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the device notification handler to not look up the wusb_dev object before it calls the lower-level handler routines since the wusbhc mutex is not held when calling those routines and the device could go away in the meantime. Instead, let the individual notification handlers get the device ptr if they need to after they have taken the mutex. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: wusbcore: send keepalives to unauthenticated devicesThomas Pugliese2013-12-021-4/+1
|/ | | | | | | | | | | | | | | | | | | | | This patch modifies the WUSB device disconnect timer code to send keepalives to all connected devices even if they are not authenticated. This fixes a problem where unauthenticated devices that lose their connection before they are authenticated will stay in the device tree forever. More importantly, devices in this situation will never relinquish their port on the root hub so eventually all root ports will be taken up and no other devices can connect. A comment in the existing code states that there are some devices that may not respond to keepalives if they have not been authenticated. That comment is about 5 years old and I don't know of any WUSB devices that act that way. Either way, any buggy devices that may still be around will continue to work as long as they can transition to the authenticated state within the WUSB LOA timeout of 4s, which is not unreasonable to expect. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: change WA_SEGS_MAX to a legal valueThomas Pugliese2013-10-291-2/+3
| | | | | | | | | change WA_SEGS_MAX to a number that is legal according to the WUSB spec. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: add a quirk for Alereon HWA device isoc behaviorThomas Pugliese2013-10-293-14/+52
| | | | | | | | Add a quirk for Alereon HWA devices to concatenate the frames of isoc transfer requests. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: combine multiple isoc frames in a single transfer request.Thomas Pugliese2013-10-291-111/+255
| | | | | | | | | | | Combine multiple isoc frames in a single transfer request. This allows the HWA to take advantage of bursting to deliver data to endpoints whose logical service interval is less than the minimum wireless USB service interval of 4ms. Wireless audio quality is much improved after this update. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: set the RPIPE wMaxPacketSize value correctlyThomas Pugliese2013-10-291-1/+4
| | | | | | | | | | For isochronous endpoints, set the RPIPE wMaxPacketSize value using wOverTheAirPacketSize from the endpoint companion descriptor instead of wMaxPacketSize from the normal endpoint descriptor. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: wusbcore: fix usb_dev leaksAlexey Khoroshilov2013-10-191-0/+3
| | | | | | | | | | | | | cbaf_probe() does cbaf->usb_dev = usb_get_dev(interface_to_usbdev(iface)), but there is no usb_put_dev() anywhere in cbaf. The patch adds usb_put_dev() to cbaf_disconnect() and to an error path in cbaf_probe(). Also it adds missed usb_put_intf(iface) to the error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: preserve endianness of cached descriptorsThomas Pugliese2013-10-191-1/+1
| | | | | | | | | | Do not overwrite the multi-byte fields of usb_wa_descriptor with their cpu format values after reading the descriptor. Leave the values as __le16 and swap on use. This is more consistent with other uses of USB descriptors. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: serialize access to the HWA data out endpointThomas Pugliese2013-10-193-21/+152
| | | | | | | | | | | | | | | This patch serializes access to the HWA data transfer out (DTO) endpoint. This prevents a situation where two transfer requests being sent concurrently to separate downstream endpoints could interleave their transfer request and transfer data packets causing data corruption. The transfer processing code will now attempt to acquire the DTO resource before sending a transfer to the HWA. If it cannot acquire the resource, the RPIPE that the transfer is assigned to will be placed on a waiting list. When the DTO resource is released, the actor releasing the resource will serivce the RPIPEs that are waiting. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: Remove unnecessary semicolonsJoe Perches2013-10-112-3/+3
| | | | | | | 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>
* usb: wusbcore: fix string formatting warnings on 64-bit buildsThomas Pugliese2013-10-071-2/+2
| | | | | | | | | | This patch fixes compile warnings on 64-bit builds that were introduced by the recent isoc changes. Reported-by: kbuild test robot <fengguang.wu@intel.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: add support for isoc out transfersThomas Pugliese2013-10-052-102/+406
| | | | | | | | | | | | | | | | | | | | | | | This patch adds support for isochronous out transfers to the HWA. The primary changes are: 1. Add a isoc_pack_desc_urb field to struct wa_seg. This urb is used to send the isochronous packet info message to the HWA which describes the isoc data segment(s) that will be sent as the payload of the transfer request. 2. Use the URB iso_frame_desc field to populate the isochronous packet info message and data segments sent to the HWA. 3. After the data is sent and transfer result is returned from the HWA, read the isoc packet status message from the HWA. The contents of the isoc packet status message are used to set the iso_frame_desc status and actual_length fields in the original isoc URB. This feature required the addition of a some state tracking variables in struct wahc so the dti_urb knows what type of packet it expects to receive next. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: set the RPIPE bOverTheAirInterval for isoc endpointsThomas Pugliese2013-10-031-2/+4
| | | | | | | | This patch sets the RPIPE bOverTheAirInterval field for RPIPES which refer to isochronous endpoints. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: wusbcore: avoid stack overflow in URB enqueue error pathThomas Pugliese2013-10-031-13/+38
| | | | | | | | | | | This patch modifies wa_urb_enqueue to return an error and not call the urb completion routine if it failed to enqueue the urb because the HWA device is gone. This prevents a stack overflow due to infinite submit/complete recursion when unplugging the HWA while connected to a HID device. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud