• Sarah Sharp's avatar
    USB: xhci: Support interrupt transfers. · 1e7198c0
    Sarah Sharp authored
    commit 624defa1 upstream.
    
    Interrupt transfers are submitted to the xHCI hardware using the same TRB
    type as bulk transfers.  Re-use the bulk transfer enqueueing code to
    enqueue interrupt transfers.
    
    Interrupt transfers are a bit different than bulk transfers.  When the
    interrupt endpoint is to be serviced, the xHC will consume (at most) one
    TD.  A TD (comprised of sg list entries) can take several service
    intervals to transmit.  The important thing for device drivers to note is
    that if they use the scatter gather interface to submit interrupt
    requests, they will not get data sent from two different scatter gather
    lists in the same service interval.
    
    For now, the xHCI driver will use the service interval from the endpoint's
    descriptor (bInterval).  Drivers will need a hook to poll at a more
    frequent interval.  Set urb->interval to the interval that the xHCI
    hardware will use.
    Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    1e7198c0
xhci-ring.c 62.9 KB