On Sun, Dec 08, 2024 at 06:12:08PM +0530, Manivannan Sadhasivam wrote: > On Tue, Dec 03, 2024 at 05:43:10AM +0100, Niklas Cassel wrote: > > Hello Mani, > > > > On Sat, Nov 30, 2024 at 01:42:45PM +0530, Manivannan Sadhasivam wrote: > > > > > > > > struct pci_epf_test { > > > > @@ -74,6 +76,7 @@ struct pci_epf_test_reg { > > > > u32 irq_type; > > > > u32 irq_number; > > > > u32 flags; > > > > + u32 caps; > > > > > > Can we rename the 'magic' register? It is not used since the beginning and I > > > don't know if we will ever have a usecase for it. > > > > It is actually used! > > > > When doing PCITEST_BAR (pci_endpoint_test_bar()), > > and barno == test->test_reg_bar, we are only filling the first 4 bytes, > > rather than filling the whole BAR: > > https://github.com/torvalds/linux/blob/v6.13-rc1/drivers/misc/pci_endpoint_test.c#L293-L294 > > > > These first 4 bytes are stored in the magic register. > > > > heh, not so evident... thanks anyway. > > > I do agree that the magic register name is slightly misleading, but that > > seems completely unrelated to this patch. > > > > If you can come up with a better name, send a patch and you shall have > > my Reviewed-by tag :) > > > > How about 'scratchpad'? Sounds good to me. When sending a patch, don't forget to update: Documentation/PCI/endpoint/pci-test-function.rst: 1) PCI_ENDPOINT_TEST_MAGIC Documentation/PCI/endpoint/pci-test-function.rst:* PCI_ENDPOINT_TEST_MAGIC drivers/misc/pci_endpoint_test.c:#define PCI_ENDPOINT_TEST_MAGIC in addition to renaming the struct member in struct pci_epf_test_reg. Kind regards, Niklas