]> git.baikalelectronics.ru Git - kernel.git/commit
cdc_ncm: Set NTB format again after altsetting switch for Huawei devices
authorEnrico Mioso <mrkiko.rs@gmail.com>
Tue, 11 Jul 2017 15:21:52 +0000 (17:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jul 2017 15:15:05 +0000 (08:15 -0700)
commit2b02c20ce0c28974b44e69a2e2f5ddc6a470ad6f
treeba2f9e3295e42338f3a83f5bb95952580eab4b91
parent457839ed3e78618cf0354cf79a1f47fe6eb26aef
cdc_ncm: Set NTB format again after altsetting switch for Huawei devices

Some firmwares in Huawei E3372H devices have been observed to switch back
to NTB 32-bit format after altsetting switch.
This patch implements a driver flag to check for the device settings and
set NTB format to 16-bit again if needed.
The flag has been activated for devices controlled by the huawei_cdc_ncm.c
driver.

V1->V2:
- fixed broken error checks
- some corrections to the commit message
V2->V3:
- variable name changes, to clarify what's happening
- check (and possibly set) the NTB format later in the common bind code path

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Reported-and-tested-by: Christian Panton <christian@panton.org>
Reviewed-by: Bjørn Mork <bjorn@mork.no>
CC: Bjørn Mork <bjorn@mork.no>
CC: Christian Panton <christian@panton.org>
CC: linux-usb@vger.kernel.org
CC: netdev@vger.kernel.org
CC: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c
drivers/net/usb/huawei_cdc_ncm.c
include/linux/usb/cdc_ncm.h