]> git.baikalelectronics.ru Git - kernel.git/commit
wimax/i2400m: usb: fix device reset on autosuspend while not yet idle
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Fri, 8 May 2009 22:51:44 +0000 (15:51 -0700)
committerInaky Perez-Gonzalez <inaky@linux.intel.com>
Fri, 22 May 2009 07:13:18 +0000 (00:13 -0700)
commit16dcd983caa749a4fb76f71f91d6d7e563aebc70
tree3f29430d85ba6b7866a56da9e52b26a60a4c6223
parentdc919003c6a390eab6dd29f3d7a94fd6621addc8
wimax/i2400m: usb: fix device reset on autosuspend while not yet idle

When the i2400m is connected to a network, the host interface (USB)
cannot be suspended. For that to happen, the device has to have
negotiated with the basestation to put the link on IDLE state.

If the host tries to put the device in standby while it is connected
but not idle, the device resets, as the driver should not do that.

To avoid triggering that, when the USB susbsytem requires the driver
to autosuspend the device, the driver checks if the device is not yet
idle. If it is not, the request is rejected (will be retried again
later on after the autosuspend timeout). At some point the device will
enter idle and the request will succeed (unless of course, there is
network traffic, but at that point, there is no idle neither in the
link or the host interface).

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
drivers/net/wimax/i2400m/usb.c