]> git.baikalelectronics.ru Git - kernel.git/commit
wimax/i2400m: use -EL3RST to indicate device reset instead of -ERESTARTSYS
authorCindy H Kao <cindy.h.kao@intel.com>
Thu, 11 Jun 2009 00:06:19 +0000 (17:06 -0700)
committerInaky Perez-Gonzalez <inaky@linux.intel.com>
Thu, 11 Jun 2009 10:30:26 +0000 (03:30 -0700)
commit914c6a202d733bf56b1744bd30417d86b7d75afa
tree8b669ff99674f137918f47aced255034db662248
parent905e5174f879dd7b93b502ca130d657c5c3b9b8f
wimax/i2400m: use -EL3RST to indicate device reset instead of -ERESTARTSYS

When the i2400m device resets, the driver code will force some
functions to return a -ERESTARTSYS error code, which can is used by
the caller to determine which recovery actions to take.

However, in certain situations the only thing that can be done is to
bubble up said error code to user space, for handling.

However, -ERESTARSYS was a poor choice, as it is supposed to be used
by the kernel only.

As such, replace -ERESTARTSYS with -EL3RST; as well, in
i2400m_msg_to_dev(), when the device is in boot mode (following a
recent reset), return -EL3RST instead of -ENODEV (meaning the device
is in bootrom mode after a reset, not that the device was
disconnected, and thus, normal commands cannot be executed).

Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
drivers/net/wimax/i2400m/control.c
drivers/net/wimax/i2400m/driver.c