From: Bart Van Assche <bvanassche@acm.org>
To: TJ Adams <tadamsjr@google.com>,
Jack Wang <jinpu.wang@cloud.ionos.com>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K . Petersen" <mkp@kernel.org>
Cc: John Garry <john.garry@linux.dev>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] scsi: pm8001: Offset hardware queue index for MSI-X pre-vector
Date: Tue, 17 Nov 2026 11:27:30 -0800 [thread overview]
Message-ID: <350d2c49-1a12-47e2-8720-8deb8e322531@acm.org> (raw)
In-Reply-To: <20261117175558.4146151-1-tadamsjr@google.com>
On 11/17/26 9:55 AM, TJ Adams wrote:
> diff --git a/drivers/scsi/pm8001/pm8001_defs.h
b/drivers/scsi/pm8001/pm8001_defs.h
> index a9605ca317f3..ef7b6257cc8b 100644
> --- a/drivers/scsi/pm8001/pm8001_defs.h
> +++ b/drivers/scsi/pm8001/pm8001_defs.h
> @@ -178,6 +178,7 @@ enum port_type {
> #define PM8001_MAX_INB_NUM 64
> #define PM8001_MAX_OUTB_NUM 64
> #define PM8001_CAN_QUEUE 508 /* SCSI Queue depth */
> +#define PM8001_PRE_VECTORS 1 /* non-affinitized housekeeping vector */
The surrounding definitions have a tab between "#define" and the
macro name, while this one has a space. Is this intentional?
> -static u32 pm80xx_chip_get_q_index(struct sas_task *task)
> +static u32 pm80xx_chip_get_q_index(struct pm8001_hba_info *pm8001_ha,
> + struct sas_task *task)
> {
> struct request *rq = sas_task_find_rq(task);
>
> if (!rq)
> return 0;
>
> - return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(rq));
> + if (pm8001_ha->number_of_intr > PM8001_PRE_VECTORS)
> + return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(rq)) +
> + PM8001_PRE_VECTORS;
> +
> + return 0;
> }
A side effect of this change: completions for the highest hardware
queue now go to outbound queue max_q_num - 1. pm80xx_chip_init()
programs that vector as the fatal error interrupt. process_oq() reads
MSGU_SCRATCH_PAD_1 for every interrupt on that vector, and also
MSGU_SCRATCH_PAD_RSVD_0 if no fatal error is reported. Without this
patch, no I/O completions go to that queue, so those MMIO reads only
happen for fatal error interrupts. The code is still correct, and the
driver used that queue for I/O before commit 42f22fe36d51 too, but it
might be worth mentioning in the patch description. Alternatively, a
follow-up patch could move the fatal error interrupt to the
housekeeping vector.
Anyway:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
prev parent reply other threads:[~2026-11-17 19:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 17:55 TJ Adams
2026-11-17 19:27 ` Bart Van Assche [this message]
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=350d2c49-1a12-47e2-8720-8deb8e322531@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jinpu.wang@cloud.ionos.com \
--cc=john.garry@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=tadamsjr@google.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
all inboxes | Powered by JetHome®