summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2014-03-03 23:23:22 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2014-12-10 20:53:20 +0100
commit8e045a31e7c0536e4deb750b37c919fadcb44aa3 (patch)
tree803fb29487ccf05382aec1bbdd665fa179201cdb /drivers/firewire
parent0765cbd3be699b4a72db67069247d514f06a1e4f (diff)
downloadlinux-stable-8e045a31e7c0536e4deb750b37c919fadcb44aa3.tar.gz
linux-stable-8e045a31e7c0536e4deb750b37c919fadcb44aa3.tar.bz2
linux-stable-8e045a31e7c0536e4deb750b37c919fadcb44aa3.zip
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.c15
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)
struct fw_device *device = target_parent_device(lu->tgt);
struct sbp2_orb *orb, *next;
struct list_head list;
- unsigned long flags;
int retval = -ENOENT;
INIT_LIST_HEAD(&list);
- spin_lock_irqsave(&device->card->lock, flags);
+ spin_lock_irq(&device->card->lock);
list_splice_init(&lu->orb_list, &list);
- spin_unlock_irqrestore(&device->card->lock, flags);
+ spin_unlock_irq(&device->card->lock);
list_for_each_entry_safe(orb, next, &list, link) {
retval = 0;
@@ -737,15 +736,14 @@ static void sbp2_conditionally_unblock(struct sbp2_logical_unit *lu)
struct fw_card *card = target_parent_device(tgt)->card;
struct Scsi_Host *shost =
container_of((void *)tgt, struct Scsi_Host, hostdata[0]);
- unsigned long flags;
bool unblock = false;
- spin_lock_irqsave(&card->lock, flags);
+ spin_lock_irq(&card->lock);
if (lu->blocked && lu->generation == card->generation) {
lu->blocked = false;
unblock = --tgt->blocked == 0;
}
- spin_unlock_irqrestore(&card->lock, flags);
+ spin_unlock_irq(&card->lock);
if (unblock)
scsi_unblock_requests(shost);
@@ -762,11 +760,10 @@ static void sbp2_unblock(struct sbp2_target *tgt)
struct fw_card *card = target_parent_device(tgt)->card;
struct Scsi_Host *shost =
container_of((void *)tgt, struct Scsi_Host, hostdata[0]);
- unsigned long flags;
- spin_lock_irqsave(&card->lock, flags);
+ spin_lock_irq(&card->lock);
++tgt->dont_block;
- spin_unlock_irqrestore(&card->lock, flags);
+ spin_unlock_irq(&card->lock);
scsi_unblock_requests(shost);
}