UPSTREAM: net: qmi_wwan: call subdriver with control intf only
authorBjørn Mork <bjorn@mork.no>
Wed, 12 Sep 2012 20:44:35 +0000 (20:44 +0000)
committerGerrit <chrome-bot@google.com>
Wed, 10 Oct 2012 19:15:58 +0000 (12:15 -0700)
commit2db53ddc93f69de4ccee937595dfae4506de9b07
treed00b3bf98372e8f9403ef891a65358a495080959
parent52c8ad07bb38ae2a2f81e27f1f83dcb06b3e72dc
UPSTREAM: net: qmi_wwan: call subdriver with control intf only

This fixes a hang on suspend due to calling wdm_suspend on
the unregistered data interface. The hang should have been
a NULL pointer reference had it not been for a logic error
in the cdc_wdm code.

  commit 230718bd net: qmi_wwan: bind to both control and data interface

changed qmi_wwan to use cdc_wdm as a subdriver for devices with
a two-interface QMI/wwan function.  The commit failed to update
qmi_wwan_suspend and qmi_wwan_resume, which were written to handle
either a single combined interface function, or no subdriver at all.

The result was that we called into the subdriver both when the
control interface was suspended and when the data interface was
suspended.  Calling the subdriver suspend function with an
unregistered interface is not supported and will make the
subdriver bug out.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8624dd2a3e33b647cd672211b54ba276ddee2a2c)

Change-Id: I198c038b6560b8638ad5d67e1d3fa07edabf901c
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35030
Reviewed-by: Olof Johansson <olofj@chromium.org>
drivers/net/usb/qmi_wwan.c