summaryrefslogtreecommitdiff
path: root/drivers/ieee1394/sbp2.h
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-08-14 18:43:00 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-17 19:34:14 +0200
commit09ee67abe997ee95cd3f6cc552fa9532bc722d83 (patch)
tree389f4726e5b4b3be1e4e4ed201a42ae33e67242d /drivers/ieee1394/sbp2.h
parent2a874182842c6a70f245b7f1ad859f9152517951 (diff)
ieee1394: sbp2: handle "sbp2util_node_write_no_wait failed"
Fix for http://bugzilla.kernel.org/show_bug.cgi?id=6948 Because sbp2 writes to the target's fetch agent's registers from within atomic context, it cannot sleep to guaranteedly get a free transaction label. This may repeatedly lead to "sbp2util_node_write_no_wait failed" and consequently to SCSI command abortion after timeout. A likely cause is that many queue_command softirqs may occur before khpsbpkt (the ieee1394 driver's thread which cleans up after finished transactions) is woken up to recycle tlabels. Sbp2 now schedules a workqueue job whenever sbp2_link_orb_command fails in sbp2util_node_write_no_wait. The job will reliably get a transaction label because it can sleep. We use the kernel-wide shared workqueue because it is unlikely that the job itself actually needs to sleep. In the improbable case that it has to sleep, it doesn't need to sleep long since the standard transaction timeout is 100ms. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/sbp2.h')
-rw-r--r--drivers/ieee1394/sbp2.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h
index 89098fe565e..1c9fe422cf4 100644
--- a/drivers/ieee1394/sbp2.h
+++ b/drivers/ieee1394/sbp2.h
@@ -346,6 +346,9 @@ struct scsi_id_instance_data {
/* Device specific workarounds/brokeness */
unsigned workarounds;
+
+ atomic_t unfinished_reset;
+ struct work_struct protocol_work;
};
/* Sbp2 host data structure (one per IEEE1394 host) */