summaryrefslogtreecommitdiff
path: root/drivers/net/wimax/i2400m/sdio-tx.c
diff options
context:
space:
mode:
authorCindy H Kao <cindy.h.kao@intel.com>2010-04-08 03:07:47 (GMT)
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-11 21:05:39 (GMT)
commit599e59538448ee49d5470f226bb191b2f78aa3a2 (patch)
tree03c8c92a907c19e28bb5f9eef0a1121081515b31 /drivers/net/wimax/i2400m/sdio-tx.c
parentf4e413458104210bc29aa5c437882c68b4b20100 (diff)
downloadlinux-fsl-qoriq-599e59538448ee49d5470f226bb191b2f78aa3a2.tar.xz
wimax/i2400m: add the error recovery mechanism on TX path
This patch adds an error recovery mechanism on TX path. The intention is to bring back the device to some known state whenever TX sees -110 (-ETIMEOUT) on copying the data to the HW FIFO. The TX failure could mean a device bus stuck or function stuck, so the current error recovery implementation is to trigger a bus reset and expect this can bring back the device. Since the TX work is done in a thread context, there may be a queue of TX works already that all hit the -ETIMEOUT error condition because the device has somewhat stuck already. We don't want any consecutive bus resets simply because multiple TX works in the queue all hit the same device erratum, the flag "error_recovery" is introduced to denote if we are ready for taking any error recovery. See @error_recovery doc in i2400m.h. Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/sdio-tx.c')
-rw-r--r--drivers/net/wimax/i2400m/sdio-tx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/sdio-tx.c b/drivers/net/wimax/i2400m/sdio-tx.c
index 412b6a8..b53cd1c 100644
--- a/drivers/net/wimax/i2400m/sdio-tx.c
+++ b/drivers/net/wimax/i2400m/sdio-tx.c
@@ -98,6 +98,10 @@ void i2400ms_tx_submit(struct work_struct *ws)
tx_msg_size, result);
}
+ if (result == -ETIMEDOUT) {
+ i2400m_error_recovery(i2400m);
+ break;
+ }
d_printf(2, dev, "TX: %zub submitted\n", tx_msg_size);
}