mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
NTB: ntb_perf: Clear stale values in doorbell and command SPAD register
when ntb_perf is unloaded, the command scratchpad register still retains the last initialized value of PERF_CMD_INVAL. When ntb_perf is re-loaded and reads peer command scratchpad register and it mis interprets the peer state as initialized. To avoid this, clearing the local side command scratchpad register in perf_disable_service Signed-off-by: Sanjay R Mehta <[email protected]> Acked-by: Allen Hubbe <[email protected]> Acked-by: Logan Gunthorpe <[email protected]> Acked-by: Serge Semin <[email protected]> Signed-off-by: Jon Mason <[email protected]>
This commit is contained in:
parent
b1ee5998a5
commit
12c023d7c3
1 changed files with 8 additions and 0 deletions
|
|
@ -751,6 +751,14 @@ static void perf_disable_service(struct perf_ctx *perf)
|
|||
for (pidx = 0; pidx < perf->pcnt; pidx++)
|
||||
flush_work(&perf->peers[pidx].service);
|
||||
|
||||
for (pidx = 0; pidx < perf->pcnt; pidx++) {
|
||||
struct perf_peer *peer = &perf->peers[pidx];
|
||||
|
||||
ntb_spad_write(perf->ntb, PERF_SPAD_CMD(peer->gidx), 0);
|
||||
}
|
||||
|
||||
ntb_db_clear(perf->ntb, PERF_SPAD_NOTIFY(perf->gidx));
|
||||
|
||||
ntb_link_disable(perf->ntb);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue