lkml.org 
[lkml]   [2013]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.2 015/185] usb: wusbcore: set the RPIPE wMaxPacketSize value correctly
    3.2.54-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Thomas Pugliese <thomas.pugliese@gmail.com>

    commit 7b6bc07ab554e929c85d51b3d5b26cf7f12c6a3b upstream.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [bwh: Backported to 3.2: adjust context]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/usb/wusbcore/wa-rpipe.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    --- a/drivers/usb/wusbcore/wa-rpipe.c
    +++ b/drivers/usb/wusbcore/wa-rpipe.c
    @@ -332,7 +332,10 @@ static int rpipe_aim(struct wa_rpipe *rp
    /* FIXME: compute so seg_size > ep->maxpktsize */
    rpipe->descr.wBlocks = cpu_to_le16(16); /* given */
    /* ep0 maxpktsize is 0x200 (WUSB1.0[4.8.1]) */
    - rpipe->descr.wMaxPacketSize = cpu_to_le16(ep->desc.wMaxPacketSize);
    + if (usb_endpoint_xfer_isoc(&ep->desc))
    + rpipe->descr.wMaxPacketSize = epcd->wOverTheAirPacketSize;
    + else
    + rpipe->descr.wMaxPacketSize = ep->desc.wMaxPacketSize;
    rpipe->descr.bHSHubAddress = 0; /* reserved: zero */
    rpipe->descr.bHSHubPort = wusb_port_no_to_idx(urb->dev->portnum);
    /* FIXME: use maximum speed as supported or recommended by device */


    \
     
     \ /
      Last update: 2013-12-29 04:41    [W:2.093 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site