Home
last modified time | relevance | path

Searched hist:dad957d7 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/usb/
H A Dcdc_ncm.cdad957d7 Mon Oct 22 05:56:28 CDT 2012 Bjørn Mork <bjorn@mork.no> net: cdc_ncm: workaround NTB input size firmware bug

Some devices do not support the 8 byte variants of the NTB input
size control messages despite announcing such support in their
NCM or MBIM functional descriptor.

According to the NCM specification, all devices must support the
4 byte variant regardless of whether or not the flag is set:

If bit D5 is set in the bmNetworkCapabilities field of
function’s NCM Functional Descriptor, the host may
set wLength either to 4 or to 8. If wLength is 4, the
function shall assume that wNtbInMaxDatagrams is to be
set to zero. If wLength is 8, then the function shall
use the provided value as the limit. The function shall
return an error response (a STALL PID) if wLength is set
to any other value.

We do not set wNtbInMaxDatagrams in any case, so we can just as
well unconditionally use the 4 byte variant without losing any
functionality. This works around the known firmware bug, and
simplifies the code considerably.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
dad957d7 Mon Oct 22 05:56:28 CDT 2012 Bjørn Mork <bjorn@mork.no> net: cdc_ncm: workaround NTB input size firmware bug

Some devices do not support the 8 byte variants of the NTB input
size control messages despite announcing such support in their
NCM or MBIM functional descriptor.

According to the NCM specification, all devices must support the
4 byte variant regardless of whether or not the flag is set:

If bit D5 is set in the bmNetworkCapabilities field of
function’s NCM Functional Descriptor, the host may
set wLength either to 4 or to 8. If wLength is 4, the
function shall assume that wNtbInMaxDatagrams is to be
set to zero. If wLength is 8, then the function shall
use the provided value as the limit. The function shall
return an error response (a STALL PID) if wLength is set
to any other value.

We do not set wNtbInMaxDatagrams in any case, so we can just as
well unconditionally use the 4 byte variant without losing any
functionality. This works around the known firmware bug, and
simplifies the code considerably.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>