On Mon, 10 Apr 2023 15:48:56 +0300 Radu Pirea (OSS) wrote:Yes, you are right. Thank you for this catch. I discovered this fix based on a driver code review and it did not trigger any issues. I just wanted to be sure if the PTP irqs are left in an inconsistent state, they are disabled from the kill switch.
- if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
+ if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
+ phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, PTP_IRQS, PTP_IRQS);
Isn't the third argument supposed to be the address?
Am I missing something or this patch was no tested properly?
This register might not be present on every PHY, that's why the return value is ignored.
Also why ignore the return value?