diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-06-21 17:23:52 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-07-08 10:45:54 -0400 |
commit | ae948011071c12ff6a328348859c717ea885ed40 (patch) | |
tree | 7ca46403da2d288ca64e0d858dbe7cfc07e34a6d | |
parent | 3b2b65d68fc87b02ac393a031a4ebb3de84a8218 (diff) |
firewire: core: no need to track irq flags in bm_work
This is a workqueue job and always entered with IRQs enabled.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r-- | drivers/firewire/core-card.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index 156b098b0ada..11fc81500f82 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c | |||
@@ -239,17 +239,16 @@ static void fw_card_bm_work(struct work_struct *work) | |||
239 | struct fw_card *card = container_of(work, struct fw_card, work.work); | 239 | struct fw_card *card = container_of(work, struct fw_card, work.work); |
240 | struct fw_device *root_device; | 240 | struct fw_device *root_device; |
241 | struct fw_node *root_node; | 241 | struct fw_node *root_node; |
242 | unsigned long flags; | ||
243 | int root_id, new_root_id, irm_id, local_id; | 242 | int root_id, new_root_id, irm_id, local_id; |
244 | int gap_count, generation, grace, rcode; | 243 | int gap_count, generation, grace, rcode; |
245 | bool do_reset = false; | 244 | bool do_reset = false; |
246 | bool root_device_is_running; | 245 | bool root_device_is_running; |
247 | bool root_device_is_cmc; | 246 | bool root_device_is_cmc; |
248 | 247 | ||
249 | spin_lock_irqsave(&card->lock, flags); | 248 | spin_lock_irq(&card->lock); |
250 | 249 | ||
251 | if (card->local_node == NULL) { | 250 | if (card->local_node == NULL) { |
252 | spin_unlock_irqrestore(&card->lock, flags); | 251 | spin_unlock_irq(&card->lock); |
253 | goto out_put_card; | 252 | goto out_put_card; |
254 | } | 253 | } |
255 | 254 | ||
@@ -291,7 +290,7 @@ static void fw_card_bm_work(struct work_struct *work) | |||
291 | card->bm_transaction_data[0] = cpu_to_be32(0x3f); | 290 | card->bm_transaction_data[0] = cpu_to_be32(0x3f); |
292 | card->bm_transaction_data[1] = cpu_to_be32(local_id); | 291 | card->bm_transaction_data[1] = cpu_to_be32(local_id); |
293 | 292 | ||
294 | spin_unlock_irqrestore(&card->lock, flags); | 293 | spin_unlock_irq(&card->lock); |
295 | 294 | ||
296 | rcode = fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP, | 295 | rcode = fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP, |
297 | irm_id, generation, SCODE_100, | 296 | irm_id, generation, SCODE_100, |
@@ -322,7 +321,7 @@ static void fw_card_bm_work(struct work_struct *work) | |||
322 | goto out; | 321 | goto out; |
323 | } | 322 | } |
324 | 323 | ||
325 | spin_lock_irqsave(&card->lock, flags); | 324 | spin_lock_irq(&card->lock); |
326 | 325 | ||
327 | if (rcode != RCODE_COMPLETE) { | 326 | if (rcode != RCODE_COMPLETE) { |
328 | /* | 327 | /* |
@@ -341,7 +340,7 @@ static void fw_card_bm_work(struct work_struct *work) | |||
341 | * We weren't BM in the last generation, and the last | 340 | * We weren't BM in the last generation, and the last |
342 | * bus reset is less than 125ms ago. Reschedule this job. | 341 | * bus reset is less than 125ms ago. Reschedule this job. |
343 | */ | 342 | */ |
344 | spin_unlock_irqrestore(&card->lock, flags); | 343 | spin_unlock_irq(&card->lock); |
345 | fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 8)); | 344 | fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 8)); |
346 | goto out; | 345 | goto out; |
347 | } | 346 | } |
@@ -364,7 +363,7 @@ static void fw_card_bm_work(struct work_struct *work) | |||
364 | * If we haven't probed this device yet, bail out now | 363 | * If we haven't probed this device yet, bail out now |
365 | * and let's try again once that's done. | 364 | * and let's try again once that's done. |
366 | */ | 365 | */ |
367 | spin_unlock_irqrestore(&card->lock, flags); | 366 | spin_unlock_irq(&card->lock); |
368 | goto out; | 367 | goto out; |
369 | } else if (root_device_is_cmc) { | 368 | } else if (root_device_is_cmc) { |
370 | /* | 369 | /* |
@@ -402,7 +401,7 @@ static void fw_card_bm_work(struct work_struct *work) | |||
402 | (card->gap_count != gap_count || new_root_id != root_id)) | 401 | (card->gap_count != gap_count || new_root_id != root_id)) |
403 | do_reset = true; | 402 | do_reset = true; |
404 | 403 | ||
405 | spin_unlock_irqrestore(&card->lock, flags); | 404 | spin_unlock_irq(&card->lock); |
406 | 405 | ||
407 | if (do_reset) { | 406 | if (do_reset) { |
408 | fw_notify("phy config: card %d, new root=%x, gap_count=%d\n", | 407 | fw_notify("phy config: card %d, new root=%x, gap_count=%d\n", |