RE: [PATCH v8 5/5] misc: pci_endpoint_test: Document a policy about adding pci_device_id

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

 



Hi Bjorn,

> From: Bjorn Helgaas, Sent: Thursday, June 6, 2024 2:28 AM
> 
> On Mon, May 20, 2024 at 04:43:00PM +0900, Yoshihiro Shimoda wrote:
> > To avoid becoming struct pci_device_id pci_endpoint_test_tbl longer
> > and longer, document a policy. For example, if PCIe endpoint controller
> > can configure vendor id and/or product id, you can reuse one of
> > existing entries to test.
> 
> Possible text:
> 
>   Add a comment suggesting that if the endpoint controller Vendor and
>   Device ID are programmable, an existing entry might be usable for
>   testing without having to add an entry to pci_endpoint_test_tbl[].

Thank you for the suggestion. I'll fix the description.

> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
> > Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> > ---
> >  drivers/misc/pci_endpoint_test.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
> > index c38a6083f0a7..727db13b6450 100644
> > --- a/drivers/misc/pci_endpoint_test.c
> > +++ b/drivers/misc/pci_endpoint_test.c
> > @@ -980,6 +980,7 @@ static const struct pci_endpoint_test_data j721e_data = {
> >  	.irq_type = IRQ_TYPE_MSI,
> >  };
> >
> > +/* Do not add a new entry if the controller can use existing VID:PID combinations */
> 
>   /*
>    * If the controller's Vendor/Device ID are programmable, you may be
>    * able to use one of the existing entries for testing instead of
>    * adding a new one.
>    */

I'll write this on v9.

Best regards,
Yoshihiro Shimoda

> >  static const struct pci_device_id pci_endpoint_test_tbl[] = {
> >  	{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA74x),
> >  	  .driver_data = (kernel_ulong_t)&default_data,
> > --
> > 2.25.1
> >





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux