RE: [PATCH] qla2xxx: Add qla2x00_async_done routine for async routines.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ewan,
Thanks a lot for an update.

Hi Martin,
Can this be merged to original patch? 
Fixes: 31e6cdbe0eae ("scsi: qla2xxx: Implement ref count for SRB")

Thanks,
~Saurav

> -----Original Message-----
> From: Ewan Milne <emilne@xxxxxxxxxx>
> Sent: Thursday, February 10, 2022 1:39 AM
> To: Nilesh Javali <njavali@xxxxxxxxxxx>
> Cc: Martin K. Petersen <martin.petersen@xxxxxxxxxx>; linux-
> scsi@xxxxxxxxxxxxxxx; GR-QLogic-Storage-Upstream <GR-QLogic-Storage-
> Upstream@xxxxxxxxxxx>
> Subject: Re: [PATCH] qla2xxx: Add qla2x00_async_done routine for async
> routines.
> 
> Thanks, that appears to have resolved the crash on boot I was seeing.
> 
> Tested-by: Ewan D. Milne <emilne@xxxxxxxxxx>
> 
> On Tue, Feb 8, 2022 at 4:40 AM Nilesh Javali <njavali@xxxxxxxxxxx> wrote:
> >
> > From: Saurav Kashyap <skashyap@xxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxx>
> > Signed-off-by: Nilesh Javali <njavali@xxxxxxxxxxx>
> > ---
> >  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
> >





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux