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>
This commit is contained in:
parent
0765cbd3be
commit
8e045a31e7
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue