diff options
| -rw-r--r-- | drivers/net/usb/cdc_mbim.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c index 6533a9f7918b..253472a8a983 100644 --- a/drivers/net/usb/cdc_mbim.c +++ b/drivers/net/usb/cdc_mbim.c | |||
| @@ -429,9 +429,18 @@ static const struct driver_info cdc_mbim_info = { | |||
| 429 | }; | 429 | }; |
| 430 | 430 | ||
| 431 | /* MBIM and NCM devices should not need a ZLP after NTBs with | 431 | /* MBIM and NCM devices should not need a ZLP after NTBs with |
| 432 | * dwNtbOutMaxSize length. This driver_info is for the exceptional | 432 | * dwNtbOutMaxSize length. Nevertheless, a number of devices from |
| 433 | * devices requiring it anyway, allowing them to be supported without | 433 | * different vendor IDs will fail unless we send ZLPs, forcing us |
| 434 | * forcing the performance penalty on all the sane devices. | 434 | * to make this the default. |
| 435 | * | ||
| 436 | * This default may cause a performance penalty for spec conforming | ||
| 437 | * devices wanting to take advantage of optimizations possible without | ||
| 438 | * ZLPs. A whitelist is added in an attempt to avoid this for devices | ||
| 439 | * known to conform to the MBIM specification. | ||
| 440 | * | ||
| 441 | * All known devices supporting NCM compatibility mode are also | ||
| 442 | * conforming to the NCM and MBIM specifications. For this reason, the | ||
| 443 | * NCM subclass entry is also in the ZLP whitelist. | ||
| 435 | */ | 444 | */ |
| 436 | static const struct driver_info cdc_mbim_info_zlp = { | 445 | static const struct driver_info cdc_mbim_info_zlp = { |
| 437 | .description = "CDC MBIM", | 446 | .description = "CDC MBIM", |
| @@ -454,16 +463,13 @@ static const struct usb_device_id mbim_devs[] = { | |||
| 454 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), | 463 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), |
| 455 | .driver_info = (unsigned long)&cdc_mbim_info, | 464 | .driver_info = (unsigned long)&cdc_mbim_info, |
| 456 | }, | 465 | }, |
| 457 | /* Sierra Wireless MC7710 need ZLPs */ | 466 | /* ZLP conformance whitelist: All Ericsson MBIM devices */ |
| 458 | { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68a2, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | 467 | { USB_VENDOR_AND_INTERFACE_INFO(0x0bdb, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), |
| 459 | .driver_info = (unsigned long)&cdc_mbim_info_zlp, | 468 | .driver_info = (unsigned long)&cdc_mbim_info, |
| 460 | }, | ||
| 461 | /* HP hs2434 Mobile Broadband Module needs ZLPs */ | ||
| 462 | { USB_DEVICE_AND_INTERFACE_INFO(0x3f0, 0x4b1d, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | ||
| 463 | .driver_info = (unsigned long)&cdc_mbim_info_zlp, | ||
| 464 | }, | 469 | }, |
| 470 | /* default entry */ | ||
| 465 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | 471 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), |
| 466 | .driver_info = (unsigned long)&cdc_mbim_info, | 472 | .driver_info = (unsigned long)&cdc_mbim_info_zlp, |
| 467 | }, | 473 | }, |
| 468 | { | 474 | { |
| 469 | }, | 475 | }, |
