)]}'
{
  "commit": "04f272188ff293f112f914e235cb3bedf1063507",
  "tree": "6e61e88af609da761e77d93cceee900c74120fc8",
  "parents": [
    "e8e44c98f789dee45cfd24ffb9d4936e0606d7c6",
    "f2df9567b123145a07ee4ea7440e233f5d0232cc"
  ],
  "author": {
    "name": "Jakub Kicinski",
    "email": "kuba@kernel.org",
    "time": "Thu Mar 26 20:19:08 2026 -0700"
  },
  "committer": {
    "name": "Jakub Kicinski",
    "email": "kuba@kernel.org",
    "time": "Thu Mar 26 20:19:09 2026 -0700"
  },
  "message": "Merge branch \u0027net-enetc-safely-reinitialize-tx-bd-ring-when-it-has-unsent-frames\u0027\n\nWei Fang says:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nnet: enetc: safely reinitialize TX BD ring when it has unsent frames\n\nCurrently the driver does not reset the producer index register (PIR) and\nconsumer index register (CIR) when initializing a TX BD ring. The driver\nonly reads the PIR and CIR and initializes the software indexes. If the\nTX BD ring is reinitialized when it still contains unsent frames, its PIR\nand CIR will not be equal after the reinitialization. However, the BDs\nbetween CIR and PIR have been freed and become invalid and this can lead\nto a hardware malfunction, causing the TX BD ring will not work properly.\n\nSince the PIR and CIR are sofeware-configurable on ENETC v4. Therefore,\nthe driver must reset them if they are not equal when reinitializing\nthe TX BD ring.\n\nHowever, resetting the PIR and CIR alone is insufficient, it cannot\ncompletely solve the problem. When a link-down event occurs while the TX\nBD ring is transmitting frames, subsequent reinitialization of the TX BD\nring may cause it to malfunction. Because enetc4_pl_mac_link_down() only\nclears PMa_COMMAND_CONFIG[TX_EN] to disable MAC transmit data path. It\ndoesn\u0027t set PORT[TXDIS] to 1 to flush the TX BD ring. Therefore, it is\nnot safe to reinitialize the TX BD ring at this point.\n\nTo safely reinitialize the TX BD ring after a link-down event, we checked\nwith the NETC IP team, a proper Ethernet MAC graceful stop is necessary.\nTherefore, add the Ethernet MAC graceful stop to the link-down event\nhandler enetc4_pl_mac_link_down(). Note that this patch set is not\napplicable to ENETC v1 (LS1028A).\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nLink: https://patch.msgid.link/20260324062121.2745033-1-wei.fang@nxp.com\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\n",
  "tree_diff": []
}
