linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@gmail.com>
To: Vinayak Holikatti <vinholikatti@gmail.com>
Cc: James.Bottomley@hansenpartnership.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@linaro.org, linux-samsung-soc@vger.kernel.org,
	saugata.das@linaro.org, arnd@arndb.de, venkat@linaro.org,
	girish.shivananjappa@linaro.org, vishak.g@samsung.com,
	k.rajesh@samsung.com, yejin.moon@samsung.com,
	Santosh Yaraganavi <santoshsy@gmail.com>
Subject: Re: [PATCH 4/4] [SCSI] ufshcd: SCSI error handling
Date: Sun, 5 Feb 2012 16:37:05 +0900	[thread overview]
Message-ID: <CAKYAXd9k5i2_SuD8YSJeG25CBpK0b4jQGJstc-Ef1jD20cph1Q@mail.gmail.com> (raw)
In-Reply-To: <1328158649-4137-5-git-send-email-vinholikatti@gmail.com>

> +
> +/**
> + * ufshcd_abort - abort a specific command
> + * @cmd: SCSI command pointer
> + *
> + * Returns 0 on success, non-zero value on failure
> + */
> +static int ufshcd_abort(struct scsi_cmnd *cmd)
> +{
> +       struct Scsi_Host *host;
> +       struct ufs_hba *hba;
> +       unsigned long flags;
> +       unsigned int tag;
> +       unsigned int pos;
> +       int err;
> +
> +       host = cmd->device->host;
> +       hba = (struct ufs_hba *) host->hostdata;
> +       tag = cmd->request->tag;
> +
> +       spin_lock_irqsave(host->host_lock, flags);
> +       pos = (1 << tag);
> +
> +       /* check if command is still pending */
> +       if (!(hba->outstanding_reqs & pos)) {
> +               err = -1;
> +               spin_unlock_irqrestore(host->host_lock, flags);
> +               goto out;
> +       }
> +
> +       err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_ABORT_TASK);
Hi.
You called spin_lock_irqsave in ufshcd_issue_tm_cmd() without
spin_unlock_irqrestore.

> +       if (!err) {
> +               spin_lock_irqsave(host->host_lock, flags);
This case is same also.
Thanks.
> +               scsi_dma_unmap(cmd);
> +
> +               /* clear the respective UTRLCLR bit */
> +               writel(~pos,
> +                       (UFSHCD_MMIO_BASE +
> +                        REG_UTP_TRANSFER_REQ_LIST_CLEAR));
> +               hba->outstanding_reqs &= ~pos;
> +               hba->lrb[tag].cmd = NULL;
> +               spin_unlock_irqrestore(host->host_lock, flags);
> +       }
> +out:
> +       return err;
> +}
> +

  reply	other threads:[~2012-02-05  7:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-02  4:57 [PATCH 0/4] [SCSI] ufshcd: UFS Host Controller Driver Vinayak Holikatti
2012-02-02  4:57 ` [PATCH 1/4] [SCSI] ufshcd: UFS Host controller driver Vinayak Holikatti
2012-02-03 15:19   ` Arnd Bergmann
2012-02-04  6:58     ` Santosh Y
2012-02-07  7:16   ` Felipe Balbi
2012-02-07 15:10     ` Santosh Y
2012-02-09 19:15   ` Girish K S
2012-02-10  7:06     ` Santosh Y
2012-02-11 19:52       ` Arnd Bergmann
2012-02-02  4:57 ` [PATCH 2/4] [SCSI] ufshcd: UFS UTP Transfer requests handling Vinayak Holikatti
2012-02-05 12:51   ` Namjae Jeon
2012-02-05 14:36     ` Santosh Y
2012-02-08 19:48   ` Girish K S
2012-02-02  4:57 ` [PATCH 3/4] [SCSI] ufshcd: UFSHCI error handling Vinayak Holikatti
2012-02-02  4:57 ` [PATCH 4/4] [SCSI] ufshcd: SCSI " Vinayak Holikatti
2012-02-05  7:37   ` Namjae Jeon [this message]
2012-02-05  9:17     ` Santosh Y
2012-02-06  7:16   ` Amit Sahrawat
2012-02-06 19:00     ` Santosh Y
2012-02-11 17:39       ` Amit Sahrawat
2012-02-05  7:20 ` [PATCH 0/4] [SCSI] ufshcd: UFS Host Controller Driver Namjae Jeon
2012-02-05 22:45   ` Namjae Jeon
2012-02-06  7:17     ` Santosh Y
2012-02-09  4:34       ` Namjae Jeon
2012-02-09  7:53         ` Santosh Y

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=CAKYAXd9k5i2_SuD8YSJeG25CBpK0b4jQGJstc-Ef1jD20cph1Q@mail.gmail.com \
    --to=linkinjeon@gmail.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=arnd@arndb.de \
    --cc=girish.shivananjappa@linaro.org \
    --cc=k.rajesh@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=santoshsy@gmail.com \
    --cc=saugata.das@linaro.org \
    --cc=venkat@linaro.org \
    --cc=vinholikatti@gmail.com \
    --cc=vishak.g@samsung.com \
    --cc=yejin.moon@samsung.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;
as well as URLs for NNTP newsgroup(s).