Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Jack Wang" <jack_wang@usish.com>
To: 'Dan Carpenter' <dan.carpenter@oracle.com>, santoshprasadnayak@gmail.com
Cc: linux-scsi@vger.kernel.org
Subject: RE: [SCSI] pm8001: Fix bogus interrupt state flag issue.
Date: Fri, 2 Mar 2012 09:06:42 +0800	[thread overview]
Message-ID: <1A8CC42AE967403AB159BA2489CE1CB2@usish.com.cn> (raw)
In-Reply-To: <20120301142225.GA9789@elgon.mountain>

Dear Dan and Santosh Nayak,

I change task_state_lock to spin_lock is OK. Please feel free to send patch
out.

Thanks.

Jack
> 
> 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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


      parent reply	other threads:[~2012-03-02  1:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1A8CC42AE967403AB159BA2489CE1CB2@usish.com.cn \
    --to=jack_wang@usish.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=santoshprasadnayak@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox