usb: gadget: Fix f_mbim state machine

The USB f_mbim driver has a state machine to control the packets
transmissions from the QBI to the host. In use cases that the MBIM
connection with the host is restarted rapidly, the USB driver may still
receive packets from the QBI which belong to the previous session even
though the connection with the host has restarted.

This change makes sure that every packet that arrive from the QBI will be
notified back to the host only in the appropriate state of the state
machine, means only if the MBIM connection was successfully restarted by
finishing notify the host the CDC notifications as SPEED_CHANGE or
NETWORK_CONNECTION.

CRs-Fixed: 440163
Change-Id: Ifb162b73f677caa17721e5b7d2144dfbe670531d
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
usb: gadget: skip notify speed and notify connect for MBIM

The MBIM device can optionally notify the host on speed change or open
connection. Skipping these notifications as they are not necessary.

Change-Id: Ic2bd8471910687f848103e1df124b06bd9065bc9
CRs-Fixed: 440163
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
usb: gadget: purge pending responses upon rmnet suspend

Purge pending responses packets in case host suspend the bus as this
packets will not be requested by the host after resume.

Change-Id: I745b3a3611c1d4e2648364b5c3a78a8e6e3d9ea3
CRs-Fixed: 445433
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Merge "usb: gadget: Fix f_mbim state machine"
Merge "usb: gadget: skip notify speed and notify connect for MBIM"
Merge "usb: gadget: purge pending responses upon rmnet suspend"