Commit graph

9 commits

Author SHA1 Message Date
Thomas Pugliese 7b3e3740f2 usb: wusbcore: use USB_CTRL_SET_TIMEOUT and USB_CTRL_GET_TIMEOUT
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>
2013-12-09 13:28:48 -08:00
Thomas Pugliese b374487ebe usb: wusbcore: add calls to usb_hcd_link_urb_to_ep, 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>
2013-12-08 17:54:15 -08:00
Thomas Pugliese f07ddb9ef5 usb: wusbcore: add a quirk for Alereon HWA device isoc behavior
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>
2013-10-29 16:44:49 -07:00
Thomas Pugliese 679ee475a1 usb: wusbcore: serialize access to the HWA data out endpoint
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>
2013-10-19 05:19:21 -07:00
Thomas Pugliese 7a32d9be33 usb: wusbcore: add support for isoc out transfers
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>
2013-10-05 17:54:13 -07:00
Thomas Pugliese 0367eef281 usb: wusbcore: rename fields in struct wahc
Rename xfer_result to dti_buf and xfer_result_size to dti_buf_size in
struct wahc.  The dti buffer will also be used for isochronous status
packets once isochronous transfers are supported.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:27:20 -07:00
Thomas Pugliese 6d33f7bb8c USB: WUSBCORE: clear RPIPE stall for control endpoints
When the HWA encounters a STALL on a control endpoint, it should clear the
RPIPE_STALL feature on the RPIPE before processing the next transfer
request.  Otherwise, all transfer requests on that endpoint after the
first STALL will fail because the RPIPE is still in the halted state.
This also removes the unneccessary call to spin_lock_irqsave for a nested
lock that was present in the first patch.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:35:31 -07:00
Uwe Kleine-Koenig 3dbda77e6f trivial: fix typos "man[ae]g?ment" -> "management"
Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:56 +02:00
Inaky Perez-Gonzalez df3654236e wusb: add the Wire Adapter (WA) core
Common code for supporting Host Wire Adapters and Device Wire Adapters.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:31 +01:00