)]}'
{
  "commit": "bde5212360bd44506edec073ebbd6d0c72f75820",
  "tree": "64772922ee17b202efed3fef2de14e910ac456be",
  "parents": [
    "6fb0a9d9071f1ff0cc5cfc0782302d9c90d642cb"
  ],
  "author": {
    "name": "Ahmed Naseef",
    "email": "naseefkm@gmail.com",
    "time": "Sat Sep 12 17:43:06 2026 +0400"
  },
  "committer": {
    "name": "Jakub Kicinski",
    "email": "kuba@kernel.org",
    "time": "Mon Sep 14 19:01:51 2026 -0700"
  },
  "message": "net: phy: mediatek: do not report link and per-speed LED rules together\n\nmtk_phy_led_hw_ctrl_get() reports TRIGGER_NETDEV_LINK whenever any of the\nspeed bits in on_set is on, and in addition reports every individual\nTRIGGER_NETDEV_LINK_* bit that is set. The netdev trigger refuses that\ncombination: netdev_led_attr_store() rejects TRIGGER_NETDEV_LINK together\nwith any per-speed rule, and it validates the whole resulting mode rather\nthan just the bit being written. Once the hardware has any link bit\nprogrammed, every write to the trigger attributes of that LED therefore\nfails with -EINVAL and the LED can no longer be configured.\n\nThe rules are also fed back into the hardware: the trigger stores what is\nread back, and a later write of device_name programs it again, expanding\nTRIGGER_NETDEV_LINK to every speed in on_set. An LED configured for a\nsingle speed is thereby silently widened to \"on at any link speed\".\n\nBoth are easy to see on the EcoNet EN7528, whose four PHYs share one LED\nblock. The first LED programs the block correctly, the second reads those\nrules back and rewrites them widened, and the remaining two then read the\nwidened value, so an LED configured for \"link_10 link_100\" ends up lit on a\n1000 Mbps link.\n\non_set holds every speed the LED can indicate and is exactly what\nmtk_phy_led_hw_ctrl_set() programs for TRIGGER_NETDEV_LINK, so report the\nspeed independent rule only when all of them are on, and the individual\nspeeds otherwise. The mapping is then the inverse of the one used when\nprogramming the LED and round trips without changing the register.\n\nFixes: c66937b0f8db (\"net: phy: mediatek-ge-soc: support PHY LEDs\")\nCc: stable@vger.kernel.org\nSigned-off-by: Ahmed Naseef \u003cnaseefkm@gmail.com\u003e\nReviewed-by: Andrew Lunn \u003candrew@lunn.ch\u003e\nLink: https://patch.msgid.link/20260912134306.3544329-1-naseefkm@gmail.com\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dfd0f4e439a214343e66b7bd0abb7ace8ddc36c6",
      "old_mode": 33188,
      "old_path": "drivers/net/phy/mediatek/mtk-phy-lib.c",
      "new_id": "608072fbfde97ed223015562ecd9994bc959fa25",
      "new_mode": 33188,
      "new_path": "drivers/net/phy/mediatek/mtk-phy-lib.c"
    }
  ]
}
