]> git.baikalelectronics.ru Git - kernel.git/commit
net: cdc_ncm: fix control message ordering
authorBjørn Mork <bjorn@mork.no>
Mon, 17 Mar 2014 15:25:18 +0000 (16:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Mar 2014 19:32:32 +0000 (15:32 -0400)
commit06081ce98bb33f8a3820ba335dc01d6c1ace62a1
tree92187e84bf62c3d9f6c8f474427dc0b94cd90af3
parent09dd7c1952363eefc05a19f0f1720ccf816ca01a
net: cdc_ncm: fix control message ordering

This is a context modified revert of commit 4074b5d36f55
("net: cdc_ncm: remove ncm_parm field") which introduced
a NCM specification violation, causing setup errors for
some devices. These errors resulted in the device and
host disagreeing about shared settings, with complete
failure to communicate as the end result.

The NCM specification require that many of the NCM specific
control reuests are sent only while the NCM Data Interface
is in alternate setting 0. Reverting the commit ensures that
we follow this requirement.

Fixes: 4074b5d36f55 ("net: cdc_ncm: remove ncm_parm field")
Reported-and-tested-by: Pasi Kärkkäinen <pasik@iki.fi>
Reported-by: Thomas Schäfer <tschaefer@t-online.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c
include/linux/usb/cdc_ncm.h