From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Nilesh Javali <njavali@marvell.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
"GR-QLogic-Storage-Upstream@marvell.com"
<GR-QLogic-Storage-Upstream@marvell.com>,
"emilne@redhat.com" <emilne@redhat.com>
Subject: Re: [PATCH] qla2xxx: Add qla2x00_async_done routine for async routines.
Date: Tue, 8 Feb 2022 17:34:12 +0000 [thread overview]
Message-ID: <14292EE3-5AA2-476D-BB7F-2CFBA54C3AC5@oracle.com> (raw)
In-Reply-To: <20220208093946.4471-1-njavali@marvell.com>
> On Feb 8, 2022, at 1:39 AM, Nilesh Javali <njavali@marvell.com> wrote:
>
> From: Saurav Kashyap <skashyap@marvell.com>
>
> This done routine will delete the timer and check for it's return
> value and accordingly decrease the reference count.
>
> Fixes: 31e6cdbe0eae ("scsi: qla2xxx: Implement ref count for SRB")
> Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
FYI… You should add
Reported-by: Ewan Milne <emilne@redhat.com>
> ---
> drivers/scsi/qla2xxx/qla_iocb.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
> index 7dd82214d59f..5e3ee1f7b43c 100644
> --- a/drivers/scsi/qla2xxx/qla_iocb.c
> +++ b/drivers/scsi/qla2xxx/qla_iocb.c
> @@ -2560,6 +2560,20 @@ qla24xx_tm_iocb(srb_t *sp, struct tsk_mgmt_entry *tsk)
> }
> }
>
> +static void
> +qla2x00_async_done(struct srb *sp, int res)
> +{
> + if (del_timer(&sp->u.iocb_cmd.timer)) {
> + /*
> + * Successfully cancelled the timeout handler
> + * ref: TMR
> + */
> + if (kref_put(&sp->cmd_kref, qla2x00_sp_release))
> + return;
> + }
> + sp->async_done(sp, res);
> +}
> +
> void
> qla2x00_sp_release(struct kref *kref)
> {
> @@ -2573,7 +2587,8 @@ qla2x00_init_async_sp(srb_t *sp, unsigned long tmo,
> void (*done)(struct srb *sp, int res))
> {
> timer_setup(&sp->u.iocb_cmd.timer, qla2x00_sp_timeout, 0);
> - sp->done = done;
> + sp->done = qla2x00_async_done;
> + sp->async_done = done;
> sp->free = qla2x00_sp_free;
> sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
> sp->u.iocb_cmd.timer.expires = jiffies + tmo * HZ;
> --
> 2.23.1
>
Looks Good.
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
--
Himanshu Madhani Oracle Linux Engineering
next prev parent reply other threads:[~2022-02-08 17:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 9:39 [PATCH] qla2xxx: Add qla2x00_async_done routine for async routines Nilesh Javali
2022-02-08 17:34 ` Himanshu Madhani [this message]
2022-02-09 20:09 ` Ewan Milne
2022-02-10 3:54 ` Saurav Kashyap
2022-02-11 21:37 ` Martin K. Petersen
2022-02-15 3:19 ` 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=14292EE3-5AA2-476D-BB7F-2CFBA54C3AC5@oracle.com \
--to=himanshu.madhani@oracle.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=emilne@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=njavali@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.