]> git.hungrycats.org Git - linux/commit
cdc_ncm: toggle altsetting to force reset before setup
authorBjørn Mork <bjorn@mork.no>
Thu, 3 Mar 2016 21:20:53 +0000 (22:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2016 06:40:41 +0000 (15:40 +0900)
commit3aec7e0989d2ea5bec73c36081b28b0f11258c6f
tree8b4eac6dc881786854b112f9e4bc335303b78a2b
parent369b2427aabaf9d7ec7dc66b5e55b12c83c6770c
cdc_ncm: toggle altsetting to force reset before setup

[ Upstream commit 48906f62c96cc2cd35753e59310cb70eb08cc6a5 ]

Some devices will silently fail setup unless they are reset first.
This is necessary even if the data interface is already in
altsetting 0, which it will be when the device is probed for the
first time.  Briefly toggling the altsetting forces a function
reset regardless of the initial state.

This fixes a setup problem observed on a number of Huawei devices,
appearing to operate in NTB-32 mode even if we explicitly set them
to NTB-16 mode.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/cdc_ncm.c