• M
    USB: cypress_m8: Packet format is separate from characteristic size · 3416eaa1
    Mike Isely 提交于
    cypress_m8: Packet format is separate from characteristic size
    
    The Cypress app note states that when using an 8 byte packet buffer
    size that the packet format is modified (to be more compact).  However
    I have since discovered that newer DeLorme Earthmate LT-20 devices
    (those that are low speed USB with 8 byte packet size) STILL use the
    format that is really supposed to correspond to 32 byte packets.
    Further confusing things is the subsequent discovery that there are
    actually two different types of LT-20 - older LT-20's use 32 byte
    packets which is probably why this issue wasn't originally
    encountered.  The solution here is to flag the packet format
    separately from the buffer size.  Then at initialization time,
    identify the correct combination and set it up.  This is a critical
    fix for anyone with a newer LT-20.  Older devices and non-Earthmate
    devices should remain unaffected by this change.  (If other devices
    behave in this, uh, unexpected manner, it's now just a simple 1 line
    change to fix them as well (change the pkt_fmt member for that
    device).  Default behavior with this patch is still to drive the
    format as per the app-note; of course for Earthmate devices this is
    overridden.
    Signed-off-by: NMike Isely <isely@pobox.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    3416eaa1
cypress_m8.c 49.6 KB