diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-08-14 12:43:00 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 13:34:14 -0400 |
commit | 09ee67abe997ee95cd3f6cc552fa9532bc722d83 (patch) | |
tree | 389f4726e5b4b3be1e4e4ed201a42ae33e67242d /drivers/ieee1394/sbp2.h | |
parent | 2a874182842c6a70f245b7f1ad859f9152517951 (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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h index 89098fe565e9..1c9fe422cf4c 100644 --- a/drivers/ieee1394/sbp2.h +++ b/drivers/ieee1394/sbp2.h | |||
@@ -346,6 +346,9 @@ struct scsi_id_instance_data { | |||
346 | 346 | ||
347 | /* Device specific workarounds/brokeness */ | 347 | /* Device specific workarounds/brokeness */ |
348 | unsigned workarounds; | 348 | unsigned workarounds; |
349 | |||
350 | atomic_t unfinished_reset; | ||
351 | struct work_struct protocol_work; | ||
349 | }; | 352 | }; |
350 | 353 | ||
351 | /* Sbp2 host data structure (one per IEEE1394 host) */ | 354 | /* Sbp2 host data structure (one per IEEE1394 host) */ |