public inbox for linux-coco@lists.linux.dev
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Li Ming <ming.li@zohomail.com>
Cc: dan.j.williams@intel.com, linux-pci@vger.kernel.org,
	linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI/IDE: Fix using wrong VF ID for RID range calculation
Date: Tue, 13 Jan 2026 15:46:29 -0600	[thread overview]
Message-ID: <20260113214629.GA781429@bhelgaas> (raw)
In-Reply-To: <20260111080631.506487-1-ming.li@zohomail.com>

On Sun, Jan 11, 2026 at 04:06:31PM +0800, Li Ming wrote:
> When allocate a new IDE stream for a pci device in SR-IOV case, the RID
> range of the new IDE stream should cover all VFs of the device. VF id
> range of a pci device is [0 - (num_VFs - 1)], so should use (num_VFs - )
> as the last VF's ID.

s/(num_VFs - )/(num_VFs - 1)/  (I think?)

s/pci/PCI/  (or could just omit, it's obvious these are PCI devices)
s/id/ID/

> Fixes: 1e4d2ff3ae45 ("PCI/IDE: Add IDE establishment helpers")
> Signed-off-by: Li Ming <ming.li@zohomail.com>
> ---
>  drivers/pci/ide.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/ide.c b/drivers/pci/ide.c
> index 26f7cc94ec31..9629f3ceb213 100644
> --- a/drivers/pci/ide.c
> +++ b/drivers/pci/ide.c
> @@ -283,8 +283,8 @@ struct pci_ide *pci_ide_stream_alloc(struct pci_dev *pdev)
>  	/* for SR-IOV case, cover all VFs */
>  	num_vf = pci_num_vf(pdev);
>  	if (num_vf)
> -		rid_end = PCI_DEVID(pci_iov_virtfn_bus(pdev, num_vf),
> -				    pci_iov_virtfn_devfn(pdev, num_vf));
> +		rid_end = PCI_DEVID(pci_iov_virtfn_bus(pdev, num_vf - 1),
> +				    pci_iov_virtfn_devfn(pdev, num_vf - 1));
>  	else
>  		rid_end = pci_dev_id(pdev);
>  
> -- 
> 2.34.1
> 

      parent reply	other threads:[~2026-01-13 21:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-11  8:06 [PATCH 1/1] PCI/IDE: Fix using wrong VF ID for RID range calculation Li Ming
2026-01-12  2:30 ` Xu Yilun
2026-01-13 13:44   ` Li Ming
2026-01-13 21:46 ` Bjorn Helgaas [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=20260113214629.GA781429@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ming.li@zohomail.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