diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2014-03-03 17:23:22 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2014-12-10 14:53:20 -0500 |
commit | 8e045a31e7c0536e4deb750b37c919fadcb44aa3 (patch) | |
tree | 803fb29487ccf05382aec1bbdd665fa179201cdb /drivers/firewire | |
parent | 0765cbd3be699b4a72db67069247d514f06a1e4f (diff) |
firewire: sbp2: replace some spin_lock_irqsave by spin_lock_irq
Users of card->lock Calling context
------------------------------------------------------------------------
sbp2_status_write AR-req handler, tasklet
complete_transaction AR-resp or AT-req handler, tasklet
sbp2_send_orb among else scsi host .queuecommand, which may
be called in some sort of atomic context
sbp2_cancel_orbs sbp2_send_management_orb/
sbp2_{login,reconnect,remove},
worklet or process
sbp2_scsi_abort, scsi eh thread
sbp2_allow_block sbp2_login, worklet
sbp2_conditionally_block among else complete_command_orb, tasklet
sbp2_conditionally_unblock sbp2_{login,reconnect}, worklet
sbp2_unblock sbp2_{login,remove}, worklet or process
Drop the IRQ flags saving from sbp2_cancel_orbs,
sbp2_conditionally_unblock, and sbp2_unblock.
It was already omitted in sbp2_allow_block.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/sbp2.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index c7fc78c23978..1f3f37a39a60 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c | |||
@@ -524,13 +524,12 @@ static int sbp2_cancel_orbs(struct sbp2_logical_unit *lu) | |||
524 | struct fw_device *device = target_parent_device(lu->tgt); | 524 | struct fw_device *device = target_parent_device(lu->tgt); |
525 | struct sbp2_orb *orb, *next; | 525 | struct sbp2_orb *orb, *next; |
526 | struct list_head list; | 526 | struct list_head list; |
527 | unsigned long flags; | ||
528 | int retval = -ENOENT; | 527 | int retval = -ENOENT; |
529 | 528 | ||
530 | INIT_LIST_HEAD(&list); | 529 | INIT_LIST_HEAD(&list); |
531 | spin_lock_irqsave(&device->card->lock, flags); | 530 | spin_lock_irq(&device->card->lock); |
532 | list_splice_init(&lu->orb_list, &list); | 531 | list_splice_init(&lu->orb_list, &list); |
533 | spin_unlock_irqrestore(&device->card->lock, flags); | 532 | spin_unlock_irq(&device->card->lock); |
534 | 533 | ||
535 | list_for_each_entry_safe(orb, next, &list, link) { | 534 | list_for_each_entry_safe(orb, next, &list, link) { |
536 | retval = 0; | 535 | retval = 0; |
@@ -737,15 +736,14 @@ static void sbp2_conditionally_unblock(struct sbp2_logical_unit *lu) | |||
737 | struct fw_card *card = target_parent_device(tgt)->card; | 736 | struct fw_card *card = target_parent_device(tgt)->card; |
738 | struct Scsi_Host *shost = | 737 | struct Scsi_Host *shost = |
739 | container_of((void *)tgt, struct Scsi_Host, hostdata[0]); | 738 | container_of((void *)tgt, struct Scsi_Host, hostdata[0]); |
740 | unsigned long flags; | ||
741 | bool unblock = false; | 739 | bool unblock = false; |
742 | 740 | ||
743 | spin_lock_irqsave(&card->lock, flags); | 741 | spin_lock_irq(&card->lock); |
744 | if (lu->blocked && lu->generation == card->generation) { | 742 | if (lu->blocked && lu->generation == card->generation) { |
745 | lu->blocked = false; | 743 | lu->blocked = false; |
746 | unblock = --tgt->blocked == 0; | 744 | unblock = --tgt->blocked == 0; |
747 | } | 745 | } |
748 | spin_unlock_irqrestore(&card->lock, flags); | 746 | spin_unlock_irq(&card->lock); |
749 | 747 | ||
750 | if (unblock) | 748 | if (unblock) |
751 | scsi_unblock_requests(shost); | 749 | scsi_unblock_requests(shost); |
@@ -762,11 +760,10 @@ static void sbp2_unblock(struct sbp2_target *tgt) | |||
762 | struct fw_card *card = target_parent_device(tgt)->card; | 760 | struct fw_card *card = target_parent_device(tgt)->card; |
763 | struct Scsi_Host *shost = | 761 | struct Scsi_Host *shost = |
764 | container_of((void *)tgt, struct Scsi_Host, hostdata[0]); | 762 | container_of((void *)tgt, struct Scsi_Host, hostdata[0]); |
765 | unsigned long flags; | ||
766 | 763 | ||
767 | spin_lock_irqsave(&card->lock, flags); | 764 | spin_lock_irq(&card->lock); |
768 | ++tgt->dont_block; | 765 | ++tgt->dont_block; |
769 | spin_unlock_irqrestore(&card->lock, flags); | 766 | spin_unlock_irq(&card->lock); |
770 | 767 | ||
771 | scsi_unblock_requests(shost); | 768 | scsi_unblock_requests(shost); |
772 | } | 769 | } |