[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN6PR04MB464040E5275E7F5C28CFB9E9FC830@SN6PR04MB4640.namprd04.prod.outlook.com>
Date: Wed, 10 Jun 2020 07:16:31 +0000
From: Avri Altman <Avri.Altman@....com>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
CC: "kjlu@....edu" <kjlu@....edu>,
Alim Akhtar <alim.akhtar@...sung.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Bean Huo <beanhuo@...ron.com>,
Bart Van Assche <bvanassche@....org>,
Can Guo <cang@...eaurora.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dinghao Liu <dinghao.liu@....edu.cn>
Subject: RE: [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error
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@....edu.cn>
Please add:
Fixes: 74e5e468b664 (scsi: ufs-bsg: Wake the device before sending raw upiu commands)
Reviewed-by: Avri Altman <avri.altman@....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
Powered by blists - more mailing lists