On Wed, Apr 13, 2022 at 07:01:01AM +0000, Khalid F. Sabzwari wrote: > Thanks Ozgur for quick reply.The link you shared below seems to work with MDIO interface.The PHY used on my board is Intel's i211 PHY which is controlled by PCIe interface.I found this link:https://docs.kernel.org/PCI/pci.html#how-to-access-pci-config-space > > I never wrote a kernel code before, and am trying to just hack for an experiment to write to config space of this PHY. so I will give it a try to see if i can read/write to i211's config space, during early kernel boot time, using pci_(read|write)_config_(byte|word|dword) Do so in the driver that binds to the device, before it initializes it. Not in the kernel core, otherwise in the kernel core you do not have access to the needed pci structures. thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies