All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jinpu Wang <jinpu.wang@ionos.com>
To: Ajish Koshy <Ajish.Koshy@microchip.com>
Cc: Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>,
	Vasanthalakshmi.Tharmarajan@microchip.com,
	Viswas G <Viswas.G@microchip.com>,
	Ruksar Devadi <Ruksar.devadi@microchip.com>,
	Ashokkumar N <Ashokkumar.N@microchip.com>,
	Jinpu Wang <jinpu.wang@cloud.ionos.com>
Subject: Re: [PATCH 3/4] scsi: pm80xx: Corrected Inbound and Outbound queue logging
Date: Mon, 30 Aug 2021 10:23:47 +0200	[thread overview]
Message-ID: <CAMGffEmt7QEd4L_d0hSyXy31GTkMcGM2ei7dD3JNF=F+Wjhuqw@mail.gmail.com> (raw)
In-Reply-To: <20210823082338.67309-4-Ajish.Koshy@microchip.com>

On Mon, Aug 23, 2021 at 9:28 AM Ajish Koshy <Ajish.Koshy@microchip.com> wrote:
>
> From: Viswas G <Viswas.G@microchip.com>
>
> Corrected inbound queue and outbound queue size in 'ib_log'
> and 'ob_log' sysfs entries.
>
> Signed-off-by: Viswas G <Viswas.G@microchip.com>
> Signed-off-by: Ajish Koshy <Ajish.Koshy@microchip.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Thanks
> ---
>  drivers/scsi/pm8001/pm8001_ctl.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c
> index ec05c42e8ee6..b25e447aa3bd 100644
> --- a/drivers/scsi/pm8001/pm8001_ctl.c
> +++ b/drivers/scsi/pm8001/pm8001_ctl.c
> @@ -409,6 +409,7 @@ static ssize_t pm8001_ctl_ib_queue_log_show(struct device *cdev,
>         char *str = buf;
>         int start = 0;
>         u32 ib_offset = pm8001_ha->ib_offset;
> +       u32 queue_size = pm8001_ha->max_q_num * PM8001_MPI_QUEUE * 128;
>  #define IB_MEMMAP(c)   \
>                 (*(u32 *)((u8 *)pm8001_ha->     \
>                 memoryMap.region[ib_offset].virt_ptr +  \
> @@ -419,7 +420,7 @@ static ssize_t pm8001_ctl_ib_queue_log_show(struct device *cdev,
>                 start = start + 4;
>         }
>         pm8001_ha->evtlog_ib_offset += SYSFS_OFFSET;
> -       if (((pm8001_ha->evtlog_ib_offset) % (PM80XX_IB_OB_QUEUE_SIZE)) == 0)
> +       if (((pm8001_ha->evtlog_ib_offset) % queue_size) == 0)
>                 pm8001_ha->evtlog_ib_offset = 0;
>
>         return str - buf;
> @@ -445,6 +446,7 @@ static ssize_t pm8001_ctl_ob_queue_log_show(struct device *cdev,
>         char *str = buf;
>         int start = 0;
>         u32 ob_offset = pm8001_ha->ob_offset;
> +       u32 queue_size = pm8001_ha->max_q_num * PM8001_MPI_QUEUE * 128;
>  #define OB_MEMMAP(c)   \
>                 (*(u32 *)((u8 *)pm8001_ha->     \
>                 memoryMap.region[ob_offset].virt_ptr +  \
> @@ -455,7 +457,7 @@ static ssize_t pm8001_ctl_ob_queue_log_show(struct device *cdev,
>                 start = start + 4;
>         }
>         pm8001_ha->evtlog_ob_offset += SYSFS_OFFSET;
> -       if (((pm8001_ha->evtlog_ob_offset) % (PM80XX_IB_OB_QUEUE_SIZE)) == 0)
> +       if (((pm8001_ha->evtlog_ob_offset) % queue_size) == 0)
>                 pm8001_ha->evtlog_ob_offset = 0;
>
>         return str - buf;
> --
> 2.27.0
>

  reply	other threads:[~2021-08-30  8:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23  8:23 [PATCH 0/4] pm80xx updates Ajish Koshy
2021-08-23  8:23 ` [PATCH 1/4] scsi: pm80xx: fix incorrect port value when registering a device Ajish Koshy
2021-08-30  7:58   ` Jinpu Wang
2021-09-01 11:44     ` Ajish.Koshy
2021-08-23  8:23 ` [PATCH 2/4] scsi: pm80xx: fix lockup due to commit <1f02beff224e> Ajish Koshy
2021-08-30  8:22   ` Jinpu Wang
2021-09-01 11:55     ` Ajish.Koshy
2021-08-23  8:23 ` [PATCH 3/4] scsi: pm80xx: Corrected Inbound and Outbound queue logging Ajish Koshy
2021-08-30  8:23   ` Jinpu Wang [this message]
2021-08-23  8:23 ` [PATCH 4/4] scsi: pm80xx: fix memory leak during rmmod Ajish Koshy
2021-08-30  8:25   ` Jinpu Wang

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='CAMGffEmt7QEd4L_d0hSyXy31GTkMcGM2ei7dD3JNF=F+Wjhuqw@mail.gmail.com' \
    --to=jinpu.wang@ionos.com \
    --cc=Ajish.Koshy@microchip.com \
    --cc=Ashokkumar.N@microchip.com \
    --cc=Ruksar.devadi@microchip.com \
    --cc=Vasanthalakshmi.Tharmarajan@microchip.com \
    --cc=Viswas.G@microchip.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-scsi@vger.kernel.org \
    /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.