usbnet: runtime wake up device before calling usbnet_{read|write}_cmd
authorMing Lei <ming.lei@canonical.com>
Tue, 6 Nov 2012 04:53:08 +0000 (04:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Nov 2012 08:53:38 +0000 (03:53 -0500)
commit6f0a0986e328dd61610d898a09c9f4aa960ae64a
tree8f977eceb56500f10eb5c9e2480622649d78af14
parentec32115db2bcb7133171c6a036107ca7eb62267f
usbnet: runtime wake up device before calling usbnet_{read|write}_cmd

This patch gets the runtime PM reference count before calling
usbnet_{read|write}_cmd, and puts it after completion of the
usbnet_{read|write}_cmd, so that the usb control message can always
be sent to one active device in the non-PM context.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/usbnet.c