diff options
-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 | } |