linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "kjlu@umn.edu" <kjlu@umn.edu>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Bean Huo <beanhuo@micron.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Can Guo <cang@codeaurora.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dinghao Liu <dinghao.liu@zju.edu.cn>
Subject: RE: [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error
Date: Wed, 10 Jun 2020 07:16:31 +0000	[thread overview]
Message-ID: <SN6PR04MB464040E5275E7F5C28CFB9E9FC830@SN6PR04MB4640.namprd04.prod.outlook.com> (raw)
In-Reply-To: <yq1k10fsmaj.fsf@ca-mkp.ca.oracle.com>

Hi,
 
> Avri: Please review!
> 
> > When ufs_bsg_alloc_desc_buffer() returns an error code,
> > a pairing runtime PM usage counter decrement is needed
> > to keep the counter balanced.
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Please add:
Fixes: 74e5e468b664 (scsi: ufs-bsg: Wake the device before sending raw upiu commands)

Reviewed-by: Avri Altman <avri.altman@wdc.com>

Thanks,
Avri

> > ---
> >  drivers/scsi/ufs/ufs_bsg.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c
> > index 53dd87628cbe..516a7f573942 100644
> > --- a/drivers/scsi/ufs/ufs_bsg.c
> > +++ b/drivers/scsi/ufs/ufs_bsg.c
> > @@ -106,8 +106,10 @@ static int ufs_bsg_request(struct bsg_job *job)
> >               desc_op = bsg_request->upiu_req.qr.opcode;
> >               ret = ufs_bsg_alloc_desc_buffer(hba, job, &desc_buff,
> >                                               &desc_len, desc_op);
> > -             if (ret)
> > +             if (ret) {
> > +                     pm_runtime_put_sync(hba->dev);
> >                       goto out;
> > +             }
> >
> >               /* fall through */
> >       case UPIU_TRANSACTION_NOP_OUT:
> 
> --
> Martin K. Petersen      Oracle Linux Engineering

  reply	other threads:[~2020-06-10  7:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  4:59 [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error Dinghao Liu
2020-05-22  8:36 ` [EXT] " Bean Huo (beanhuo)
2020-05-22  8:54   ` dinghao.liu
2020-05-22 14:55     ` Bean Huo (beanhuo)
2020-05-23 10:10       ` dinghao.liu
2020-06-10  2:11 ` Martin K. Petersen
2020-06-10  7:16   ` Avri Altman [this message]
2020-06-16  3:46 ` Martin K. Petersen

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=SN6PR04MB464040E5275E7F5C28CFB9E9FC830@SN6PR04MB4640.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=alim.akhtar@samsung.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=jejb@linux.ibm.com \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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).