mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
i3c: mipi-i3c-hci: Send DISEC before disabling IBIs in hardware
Reorder i3c_hci_disable_ibi() so that DISEC is sent before IBIs are disabled at the controller. This matches the sequence used by other I3C controller drivers. It also avoids dropping an IBI that races with the disable operation: an IBI received after DISEC is issued but before the controller disables IBIs can still be processed normally. Once DISEC has been sent, the hardware can be updated to NACK subsequent IBIs and complete the teardown. No functional change is intended beyond aligning the ordering with other drivers and handling the race window consistently. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260920151248.46936-8-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
ad869331ac
commit
dcaabb080e
|
|
@ -719,13 +719,14 @@ static int i3c_hci_disable_ibi(struct i3c_dev_desc *dev)
|
|||
struct i3c_master_controller *m = i3c_dev_get_master(dev);
|
||||
struct i3c_hci *hci = to_i3c_hci(m);
|
||||
|
||||
__i3c_hci_disable_ibi(hci, dev);
|
||||
/*
|
||||
* The DAT entry is now set to NACK and DISEC this target's IBIs, so
|
||||
* The DAT entry will be set to NACK and DISEC this target's IBIs, so
|
||||
* the IBI teardown can proceed even if DISEC below fails, so ignore
|
||||
* errors.
|
||||
*/
|
||||
i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
|
||||
|
||||
__i3c_hci_disable_ibi(hci, dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user