diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-01 14:50:31 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 16:53:46 -0400 |
commit | 105e53f863c04e1d9e5bb34bf753c9fdbce6a60c (patch) | |
tree | 63500c7cb130348b70279cdbfdfb278de6fc83ad /drivers/firewire/core-card.c | |
parent | 81bf52d8622f05cfe89893fd5c1101efd85f855b (diff) |
firewire: sbp2: parallelize login, reconnect, logout
The struct sbp2_logical_unit.work items can all be executed in parallel
but are not reentrant. Furthermore, reconnect or re-login work must be
executed in a WQ_MEM_RECLAIM workqueue.
Hence replace the old single-threaded firewire-sbp2 workqueue by a
concurrency-managed but non-reentrant workqueue with rescuer.
firewire-core already maintains one, hence use this one.
In earlier versions of this change, I observed occasional failures of
parallel INQUIRY to an Initio INIC-2430 FireWire 800 to dual IDE bridge.
More testing indicates that parallel INQUIRY is not actually a problem,
but too quick successions of logout and login + INQUIRY, e.g. a quick
sequence of cable plugout and plugin, can result in failed INQUIRY.
This does not seem to be something that should or could be addressed by
serialization.
Another dual-LU device to which I currently have access to, an
OXUF924DSB FireWire 800 to dual SATA bridge with firmware from MacPower,
has been successfully tested with this too.
This change is beneficial to environments with two or more FireWire
storage devices, especially if they are located on the same bus.
Management tasks that should be performed as soon and as quickly as
possible, especially reconnect, are no longer held up by tasks on other
devices that may take a long time, especially login with INQUIRY and sd
or sr driver probe.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/core-card.c')
-rw-r--r-- | drivers/firewire/core-card.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index bb8c4d22b03e..29d2423fae6d 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c | |||
@@ -228,7 +228,7 @@ void fw_schedule_bus_reset(struct fw_card *card, bool delayed, bool short_reset) | |||
228 | 228 | ||
229 | /* Use an arbitrary short delay to combine multiple reset requests. */ | 229 | /* Use an arbitrary short delay to combine multiple reset requests. */ |
230 | fw_card_get(card); | 230 | fw_card_get(card); |
231 | if (!queue_delayed_work(fw_wq, &card->br_work, | 231 | if (!queue_delayed_work(fw_workqueue, &card->br_work, |
232 | delayed ? DIV_ROUND_UP(HZ, 100) : 0)) | 232 | delayed ? DIV_ROUND_UP(HZ, 100) : 0)) |
233 | fw_card_put(card); | 233 | fw_card_put(card); |
234 | } | 234 | } |
@@ -241,7 +241,7 @@ static void br_work(struct work_struct *work) | |||
241 | /* Delay for 2s after last reset per IEEE 1394 clause 8.2.1. */ | 241 | /* Delay for 2s after last reset per IEEE 1394 clause 8.2.1. */ |
242 | if (card->reset_jiffies != 0 && | 242 | if (card->reset_jiffies != 0 && |
243 | time_before64(get_jiffies_64(), card->reset_jiffies + 2 * HZ)) { | 243 | time_before64(get_jiffies_64(), card->reset_jiffies + 2 * HZ)) { |
244 | if (!queue_delayed_work(fw_wq, &card->br_work, 2 * HZ)) | 244 | if (!queue_delayed_work(fw_workqueue, &card->br_work, 2 * HZ)) |
245 | fw_card_put(card); | 245 | fw_card_put(card); |
246 | return; | 246 | return; |
247 | } | 247 | } |