• Bjørn Mork's avatar
    net: cdc_ncm: inform usbnet when rx buffers are reduced · f42763db
    Bjørn Mork authored
    It doesn't matter whether the buffer size goes up or down.  We have to
    keep usbnet and device syncronized to be able to split transfers at the
    correct boundaries. The spec allow skipping short packets when using
    max sized transfers.  If we don't tell usbnet about our new expected rx
    buffer size, then it will merge and/or split NTBs.  The driver does not
    support this, and the result will be lots of framing errors.
    
    Fix by always reallocating usbnet rx buffers when the rx_max value
    changes.
    
    Fixes: 68864abf ("net: cdc_ncm: support rx_max/tx_max updates when running")
    Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f42763db
cdc_ncm.c 44.2 KB