• David Brownell's avatar
    [PATCH] urb->transfer_flags updates · 774921a2
    David Brownell authored
    This patch fixes two problems that have already been discussed
    on this list:
    
    - USB_QUEUE_BULK is rather pointless (and UHCI-specific).
       If drivers really want only one bulk urb queued at a time,
       they just shouldn't issue such urbs till others complete.
    
         FIX:  remove it entirely.
    
    - USB_DISABLE_SPD is horribly named (based on a UHCI flag).
       What it really does is turn non-ISO short reads into errors.
    
         FIX:  rename it.  Now it's URB_SHORT_NOT_OK.
    
    I changed all the drivers using these two flags, including
    corresponding changes in the "usbfs" API.
    
    Most of the patch by volume is doc updates:
    
    - Documentation/usb/URB.txt hadn't been updated in two years (!)
       and was pretty out of date.  It also had many details that were
       inappropriately specific to usb-uhci.
    - Most of the URB flags weren't even commented as to intent.
    - DISABLE_SPD was often documented as if it were SHORT_IS_OK.
    - There was still some doc saying how iso should use urb->next.
    
    There are also some related updates:
    
    - Some of the submit sanity checks for transfer flags were
       overly broad ... SHORT_NOT_OK is only for reads, NO_FSBR
       is for non-periodic requests, ZERO_PACKET only for writes.
    - The ohci-hcd code thought SHORT_NOT_OK worked for ISO.
    - The uhci-hcd code thought QUEUE_BULK applied to non-bulk
    
    Note that this patch doesn't update any of the "old" HCDs,
    including usb-ohci-hcd.
    
    In the case of usb-uhci{,-hcd} it'd have been painful to fix
    the QUEUE_BULK logic.  That logic was, I think, the original
    reason to have that flag!  So I count switching to "uhci-hcd"
    as a win already ... :)
    774921a2
error-codes.txt 4.41 KB