|
@@ -177,6 +177,23 @@ const char *qeth_get_cardname_short(struct qeth_card *card)
|
|
|
return "n/a";
|
|
|
}
|
|
|
|
|
|
+void qeth_set_recovery_task(struct qeth_card *card)
|
|
|
+{
|
|
|
+ card->recovery_task = current;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(qeth_set_recovery_task);
|
|
|
+
|
|
|
+void qeth_clear_recovery_task(struct qeth_card *card)
|
|
|
+{
|
|
|
+ card->recovery_task = NULL;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(qeth_clear_recovery_task);
|
|
|
+
|
|
|
+static bool qeth_is_recovery_task(const struct qeth_card *card)
|
|
|
+{
|
|
|
+ return card->recovery_task == current;
|
|
|
+}
|
|
|
+
|
|
|
void qeth_set_allowed_threads(struct qeth_card *card, unsigned long threads,
|
|
|
int clear_start_mask)
|
|
|
{
|
|
@@ -205,6 +222,8 @@ EXPORT_SYMBOL_GPL(qeth_threads_running);
|
|
|
|
|
|
int qeth_wait_for_threads(struct qeth_card *card, unsigned long threads)
|
|
|
{
|
|
|
+ if (qeth_is_recovery_task(card))
|
|
|
+ return 0;
|
|
|
return wait_event_interruptible(card->wait_q,
|
|
|
qeth_threads_running(card, threads) == 0);
|
|
|
}
|