[SCSI] pm80xx: Spinlock fix
authorSuresh Thiagarajan <Suresh.Thiagarajan@pmcs.com>
Thu, 16 Jan 2014 09:56:21 +0000 (15:26 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:01 +0000 (10:19 -0700)
commit2b01d816f5f884d5ea16ab2498736b1221bc027c
tree5adfe6415c09702b8ae1a7d32adc28533d267459
parenteee0f03a547f50ca81a8d01ee9f1c84fecd1f64c
[SCSI] pm80xx: Spinlock fix

spin_lock_irqsave for the HBA lock is called in one function where flag
is local to that function. Another function is called from the first
function where lock has to be released using spin_unlock_irqrestore for
calling task_done of libsas. In the second function also flag is declared
and used. For calling task_done there is no need to enable the irq. So
instead of using spin_lock_irqsave and spin_unlock_irqrestore, spin_lock
and spin_unlock is used now. This also avoids passing the flags across all
the functions where HBA lock is being used. Also removed redundant code.

Reported-by: Jason Seba <jason.seba42@gmail.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com>
Signed-off-by: Viswas G <viswas.g@pmcs.com>
Acked-by: Jack Wang <xjtuwjp@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/pm8001/pm8001_hwi.c
drivers/scsi/pm8001/pm8001_sas.h
drivers/scsi/pm8001/pm80xx_hwi.c