)]}'
{
  "commit": "23d96de472f735858a7dd227c77aebff21ea09f5",
  "tree": "c8438055fc9c1fba75080833fd9e8b2fd5ce408f",
  "parents": [
    "e4f5b46dfb8ac27a822fa0b411bd4526abf5ba97"
  ],
  "author": {
    "name": "Lorenzo Bianconi",
    "email": "lorenzo.bianconi@oss.qualcomm.com",
    "time": "Thu Oct 29 11:33:57 2026 +0100"
  },
  "committer": {
    "name": "Paolo Abeni",
    "email": "pabeni@redhat.com",
    "time": "Mon Nov 02 16:59:43 2026 +0100"
  },
  "message": "net: stmmac: re-apply taprio offload in __stmmac_open() and stmmac_resume()\n\nThe core soft reset issued by stmmac_init_dma_engine(), called from\nstmmac_hw_setup(), clears the MTL_EST registers. Nothing re-applies the\ntaprio offload afterwards, so priv-\u003eest-\u003eenable stays true while the\nhardware EST block is left disabled: taprio keeps being reported as\noffloaded, the TX/XDP paths keep dropping frames larger than\npriv-\u003eest-\u003emax_sdu[], and the programmed base time is stale.\n\nRe-apply the offload from __stmmac_open() and stmmac_resume() after PTP\nhas been brought up. The base time is recomputed from the reserved base\ntime and the current PTP time, because the timestamp counter has been\nre-initialised and the previously programmed base time cannot be reused.\n\nFactor the recompute-and-program sequence into __stmmac_setup_est(),\nwhich must be called with est_lock held, and into stmmac_setup_est(),\nwhich takes the lock and re-applies the offload only when it is\ncurrently enabled and PTP has been brought up. Use the same helper in\nstmmac_adjust_time() so the PTP adjust path shares the base time\ncomputation.\n\nOnly tc_taprio_configure() updates priv-\u003eest-\u003eenable: it is set when a\nREPLACE succeeds and cleared on DESTROY or a programming failure. The\nre-apply helpers leave it untouched, so the flag records that an offload\nis installed rather than the current hardware programming state.\n__stmmac_setup_est() only reprograms the EST block, and\nstmmac_setup_est() replays the FPE mapping afterwards. On a failed\nre-apply the open and resume callers abort, while stmmac_adjust_time()\nkeeps the offload configured.\n\nThe same reset also discards the FPE preemption programming, and on XGMAC\nstmmac_dma_tx_mode() overwrites the queue-to-traffic-class map. Save the\npreemptible traffic class mask in priv-\u003eest-\u003epclass when a REPLACE\nsucceeds and replay the FPE mapping from stmmac_setup_est() as well.\n\nRe-applying the offload is best-effort with respect to PTP:\nstmmac_setup_est() does nothing when PTP was not enabled (for example\nwhen clk_ptp_rate is 0), so a missing PTP reference clock does not by\nitself fail ndo_open(). If re-applying the EST or FPE programming fails\nwhile restoring the interface, the failure is fatal to the caller:\n__stmmac_open() aborts the open, and stmmac_resume() takes the same error\npath already used for a failed timestamp counter restore.\n\nSince __stmmac_open() and stmmac_resume() now trust priv-\u003eest-\u003eenable,\nalso make tc_taprio_configure() consistent: hold est_lock across the\nwhole validate-and-program sequence, build the gate list in a temporary\nbuffer, and only commit it and enable EST after validation and hardware\nprogramming succeed. A REPLACE rejected during validation then leaves the\ncurrently installed schedule intact in both software and hardware, while\na hardware or FPE mapping failure disables EST instead of leaving a stale\nenable flag behind. Reject cycle times whose seconds field would not fit\nin priv-\u003eest-\u003ectr[1].\n\nFixes: b60189e0392f (\"net: stmmac: Integrate EST with TAPRIO scheduler API\")\nSigned-off-by: Lorenzo Bianconi \u003clorenzo.bianconi@oss.qualcomm.com\u003e\nReviewed-by: Maxime Chevallier \u003cmaxime.chevallier@bootlin.com\u003e\nTested-by: Maxime Chevallier \u003cmaxime.chevallier@bootlin.com\u003e\nLink: https://patch.msgid.link/20261029-stmmac-est-fixes-v5-3-85b830a795a9@oss.qualcomm.com\nSigned-off-by: Paolo Abeni \u003cpabeni@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "93292014c393768f3d94ef708aaa45f7ccf12d91",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/stmicro/stmmac/stmmac.h",
      "new_id": "b76acfe0d958be6ffbca54374dfa9981590a8c14",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/stmicro/stmmac/stmmac.h"
    },
    {
      "type": "modify",
      "old_id": "f15d4d046aa7456c8960055da58292048096cbb1",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_est.c",
      "new_id": "59e9a54e864d6ec276f12e86553ffb3a1fdbef17",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_est.c"
    },
    {
      "type": "modify",
      "old_id": "f70221c9c84afe6bce62782c7847a8005e469dd7",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_est.h",
      "new_id": "5e07b84957f35c5ddbf0e86aea913ec3dead6a30",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_est.h"
    },
    {
      "type": "modify",
      "old_id": "aacc56974409ff9e911e003bef519edbb9dc002e",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_main.c",
      "new_id": "7ffed295eb14af8dc78340cea00307590f71d40b",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_main.c"
    },
    {
      "type": "modify",
      "old_id": "9a32af00d7d2d5b7fc51c72e738a0a5a9a0c8c83",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c",
      "new_id": "a37405534bebf0d9702994eda37f9bd6ab50b474",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c"
    },
    {
      "type": "modify",
      "old_id": "ac926c60f9f9aa332459df3f85b50e4b032e8491",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c",
      "new_id": "10b61fa2c27c5da7d73c65971d1f3982ef08e637",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c"
    }
  ]
}
