linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Murugasen Krishnan, Kuhanh" <kuhanh.murugasen.krishnan@altera.com>
To: Xu Yilun <yilun.xu@linux.intel.com>
Cc: Moritz Fischer <mdf@kernel.org>, Xu Yilun <yilun.xu@intel.com>,
	Tom Rix <trix@redhat.com>,
	"linux-fpga@vger.kernel.org" <linux-fpga@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND][PATCH 1/1] fpga: altera-cvp: Limit driver registration to specific device ID
Date: Wed, 5 Nov 2025 06:29:06 +0000	[thread overview]
Message-ID: <6a74af58-3b9b-4a8d-a10f-abbcd545083b@altera.com> (raw)
In-Reply-To: <aQhrYucpkGBWI2zL@yilunxu-OptiPlex-7050>

On 3/11/2025 4:44 pm, Xu Yilun wrote:
> On Thu, Oct 30, 2025 at 03:05:44AM +0800, Kuhanh Murugasen Krishnan wrote:
>> From: "Murugasen Krishnan, Kuhanh" <kuhanh.murugasen.krishnan@altera.com>
> 
> Is this your first post?
> 
> https://lore.kernel.org/all/20250212223553.2717304-1-kuhanh.murugasen.krishnan@intel.com/
> 
> Please mark the patch v2 if this patch is for the same issue. And please
> firstly response the talk and make clear all previous concerns, rather than
> just sent the patch and left.
> 
Thanks Yilun for your review. Yes that was the first post, however I do 
not have access to my @intel email address anymore and had to resend 
this with a better commit title and description for clearer explanation 
of this patch. Apologies for the inconvenience.

>>
>> The Altera CvP driver previously used PCI_ANY_ID, which caused it to
>> bind to all PCIe devices with the Altera vendor ID. This led to
>> incorrect driver association when multiple PCIe devices with different
>> device IDs were present on the same platform.
>>
>> Update the device ID table to use 0x00 instead of PCI_ANY_ID so that
>> the driver only attaches to the intended device.
> 
> So could you please answer the previous concern here?
> 
> Does dev_id 0x00 covers all supported devices? Do you have any DOC for
> this?
> 
Yes it will connect to all supported Altera FPGA devices correctly, 
there was a bug previously which caused incorrect driver association 
with the use of PCI_ANY_ID. Limiting the driver registration to 0x00 
allows the driver to attach to the intended Altera FPGA device correctly 
since the FPGA default address is 0x00. Using PCI_ANY_ID could 
potentially allow the CVP driver to associate to other PCI devices.

>>
>> Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
> 
> I didn't see where the tag is from. Generally we don't prefer a
> Reviewed-by tag firstly appear from other than the person named.
> 
> Thanks,
> Yilun
> 
This patch was reviewed internally by Dinh and the tag was added. Should 
I send a v2 patch with this "Reviewed-by" removed?

>> Signed-off-by: Ang Tien Sung <tien.sung.ang@altera.com>
>> Signed-off-by: Murugasen Krishnan, Kuhanh <kuhanh.murugasen.krishnan@altera.com>
>> ---
>>   drivers/fpga/altera-cvp.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
>> index 5af0bd33890c..97e9d4d981ad 100644
>> --- a/drivers/fpga/altera-cvp.c
>> +++ b/drivers/fpga/altera-cvp.c
>> @@ -560,7 +560,7 @@ static int altera_cvp_probe(struct pci_dev *pdev,
>>   static void altera_cvp_remove(struct pci_dev *pdev);
>>   
>>   static struct pci_device_id altera_cvp_id_tbl[] = {
>> -	{ PCI_VDEVICE(ALTERA, PCI_ANY_ID) },
>> +	{ PCI_VDEVICE(ALTERA, 0x00) },
>>   	{ }
>>   };
>>   MODULE_DEVICE_TABLE(pci, altera_cvp_id_tbl);
>> -- 
>> 2.25.1
>>
>>


  reply	other threads:[~2025-11-05  6:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1761764670.git.kuhanh.murugasen.krishnan@altera.com>
2025-10-29 19:05 ` [RESEND][PATCH 1/1] fpga: altera-cvp: Limit driver registration to specific device ID Kuhanh Murugasen Krishnan
2025-11-03  8:44   ` Xu Yilun
2025-11-05  6:29     ` Murugasen Krishnan, Kuhanh [this message]
2025-11-05 15:24       ` Xu Yilun

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=6a74af58-3b9b-4a8d-a10f-abbcd545083b@altera.com \
    --to=kuhanh.murugasen.krishnan@altera.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    --cc=yilun.xu@linux.intel.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;
as well as URLs for NNTP newsgroup(s).