• Mathias Nyman's avatar
    xhci: remove endpoint ring cache · c5628a2a
    Mathias Nyman authored
    Anurag Kumar Vulisha reported several issues with xhci endpoint
    ring caching.
    
    31 Rings are cached per device before a ring is freed.
    These cached rings are not used as default if a new ring is needed.
    They are only used if the driver fails to allocate memory for a ring.
    
    The current ring cache is more a reason to why we run out memory than a
    help when we actually do so.
    
    Anurag Kumar Vulisha tried to use cached rings as a first option and
    found new issues with cached ring initialization.
    Cached rings were first zeroed and then manually reinitialized with link
    trbs etc, but forgetting to set some important bits like cycle toggle bit.
    
    Remove the ring cache completely as it's a faulty premature optimization
    eating memory
    Reported-by: default avatarAnurag Kumar Vulisha <anuragku@xilinx.com>
    Tested-by: default avatarAnurag Kumar Vulisha <anuragku@xilinx.com>
    Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c5628a2a
xhci.c 147 KB