net: cdc_mbim: change the default to send ZLPs
A number of devices in the wild have turned out to require ZLPs. Even if this is a spec violation, our priority is to make any device work as good as possible. Devices needing ZLPs will fail to receive any full sized frame we send. On the other hand, devices which do not need the ZLP will still work if we send them. This gives us no other option than sending ZLPs by default. This will prevent devices conforming to the spec from making the optimizations which are possible without ZLPs. Adding known such devices to a whitelist, to avoid the possible negative impact of the new spec violating default. Cc: Greg Suarez <gsuarez@smithmicro.com> Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5b8f15f78e
commit
c1a2e95435
1 changed files with 18 additions and 12 deletions
|
@ -429,9 +429,18 @@ static const struct driver_info cdc_mbim_info = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* MBIM and NCM devices should not need a ZLP after NTBs with
|
/* MBIM and NCM devices should not need a ZLP after NTBs with
|
||||||
* dwNtbOutMaxSize length. This driver_info is for the exceptional
|
* dwNtbOutMaxSize length. Nevertheless, a number of devices from
|
||||||
* devices requiring it anyway, allowing them to be supported without
|
* different vendor IDs will fail unless we send ZLPs, forcing us
|
||||||
* forcing the performance penalty on all the sane devices.
|
* to make this the default.
|
||||||
|
*
|
||||||
|
* This default may cause a performance penalty for spec conforming
|
||||||
|
* devices wanting to take advantage of optimizations possible without
|
||||||
|
* ZLPs. A whitelist is added in an attempt to avoid this for devices
|
||||||
|
* known to conform to the MBIM specification.
|
||||||
|
*
|
||||||
|
* All known devices supporting NCM compatibility mode are also
|
||||||
|
* conforming to the NCM and MBIM specifications. For this reason, the
|
||||||
|
* NCM subclass entry is also in the ZLP whitelist.
|
||||||
*/
|
*/
|
||||||
static const struct driver_info cdc_mbim_info_zlp = {
|
static const struct driver_info cdc_mbim_info_zlp = {
|
||||||
.description = "CDC MBIM",
|
.description = "CDC MBIM",
|
||||||
|
@ -454,17 +463,14 @@ static const struct usb_device_id mbim_devs[] = {
|
||||||
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
|
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
|
||||||
.driver_info = (unsigned long)&cdc_mbim_info,
|
.driver_info = (unsigned long)&cdc_mbim_info,
|
||||||
},
|
},
|
||||||
/* Sierra Wireless MC7710 need ZLPs */
|
/* ZLP conformance whitelist: All Ericsson MBIM devices */
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68a2, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
|
{ USB_VENDOR_AND_INTERFACE_INFO(0x0bdb, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
|
||||||
.driver_info = (unsigned long)&cdc_mbim_info_zlp,
|
|
||||||
},
|
|
||||||
/* HP hs2434 Mobile Broadband Module needs ZLPs */
|
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x3f0, 0x4b1d, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
|
|
||||||
.driver_info = (unsigned long)&cdc_mbim_info_zlp,
|
|
||||||
},
|
|
||||||
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
|
|
||||||
.driver_info = (unsigned long)&cdc_mbim_info,
|
.driver_info = (unsigned long)&cdc_mbim_info,
|
||||||
},
|
},
|
||||||
|
/* default entry */
|
||||||
|
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&cdc_mbim_info_zlp,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue