Linux SCSI subsystem development
 help / color / mirror / Atom feed
* re: [SCSI] pm8001: Fix bogus interrupt state flag issue.
@ 2012-03-01 14:22 Dan Carpenter
  2012-03-01 14:24 ` santosh prasad nayak
  2012-03-02  1:06 ` Jack Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2012-03-01 14:22 UTC (permalink / raw)
  To: santoshprasadnayak; +Cc: Jack Wang, linux-scsi

Hello Santosh Nayak,

The patch bdaefbf580cd: "[SCSI] pm8001: Fix bogus interrupt state 
flag issue." from Feb 26, 2012, leads to the following warning:
drivers/scsi/pm8001/pm8001_hwi.c:2400 mpi_sata_completion()
	 error: double unlock 'irq:'


        } else if (t->uldd_task) {
-               spin_unlock_irqrestore(&t->task_state_lock, flags);
+               spin_unlock_irq(&t->task_state_lock);
                ^^^^^^^^^^^^^^^
                pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
                mb();/* ditto */
-               spin_unlock_irqrestore(&pm8001_ha->lock, flags);
+               spin_unlock_irq(&pm8001_ha->lock);
                ^^^^^^^^^^^^^^^
It doesn't make sense to enable IRQs twice.  I'm not sure if it should
be the first or second unlock which enables them.

                t->task_done(t);
-               spin_lock_irqsave(&pm8001_ha->lock, flags);
+               spin_lock_irq(&pm8001_ha->lock);
        } else if (!t->uldd_task) {
-               spin_unlock_irqrestore(&t->task_state_lock, flags);
+               spin_unlock_irq(&t->task_state_lock);
                ^^^^^^^^^^^^^^^
                pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
                mb();/*ditto*/
-               spin_unlock_irqrestore(&pm8001_ha->lock, flags);
+               spin_unlock_irq(&pm8001_ha->lock);
                ^^^^^^^^^^^^^^^
Same thing again.

                t->task_done(t);
-               spin_lock_irqsave(&pm8001_ha->lock, flags);
+               spin_lock_irq(&pm8001_ha->lock);
        }

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-02  1:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 14:22 [SCSI] pm8001: Fix bogus interrupt state flag issue Dan Carpenter
2012-03-01 14:24 ` santosh prasad nayak
2012-03-01 14:37   ` Dan Carpenter
2012-03-01 14:41     ` santosh prasad nayak
2012-03-02  1:06 ` Jack Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox