hv/dcp: Add OOB ASYNC call context

Only observed with dcp/dptx in linux after initialisation and reset in
m1n1. On the initial startup dcp sends two D576 (hotPlug_notify_gated)
presumendly due to state confusion due to  the multiple dptx
connections.

Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
Janne Grunau 2023-11-26 18:17:40 +01:00 committed by Hector Martin
parent 5006e083c7
commit 2b92f4b1c3
2 changed files with 13 additions and 6 deletions

View file

@ -868,16 +868,18 @@ class DCPEp(EP):
self.state.ch = {}
self.state.dumpfile = None
self.ch_cb = DCPCallChannel(self, "CB", 0x60000, 0x8000)
self.ch_cmd = DCPCallChannel(self, "CMD", 0, 0x8000)
self.ch_async = DCPCallChannel(self, "ASYNC", 0x40000, 0x20000)
self.ch_oobcb = DCPCallChannel(self, "OOBCB", 0x68000, 0x8000)
self.ch_oobcmd = DCPCallChannel(self, "OOBCMD", 0x8000, 0x8000)
self.ch_cmd = DCPCallChannel(self, "CMD", 0x00000, 0x8000)
self.ch_oobcmd = DCPCallChannel(self, "OOBCMD", 0x08000, 0x8000)
self.ch_async = DCPCallChannel(self, "ASYNC", 0x40000, 0x8000)
self.ch_oobasync = DCPCallChannel(self, "OOBASYNC", 0x48000, 0x8000)
self.ch_cb = DCPCallChannel(self, "CB", 0x60000, 0x8000)
self.ch_oobcb = DCPCallChannel(self, "OOBCB", 0x68000, 0x8000)
self.cmd_ch = {
CallContext.CB: self.ch_cmd,
CallContext.CMD: self.ch_cmd,
CallContext.ASYNC: None, # unknown
CallContext.OOBASYNC: None, # unknown
CallContext.OOBCB: self.ch_oobcmd,
CallContext.OOBCMD: self.ch_oobcmd,
}
@ -886,6 +888,7 @@ class DCPEp(EP):
CallContext.CB: self.ch_cb,
CallContext.CMD: None,
CallContext.ASYNC: self.ch_async,
CallContext.OOBASYNC: self.ch_oobasync,
CallContext.OOBCB: self.ch_oobcb,
CallContext.OOBCMD: None,
}

View file

@ -25,6 +25,7 @@ class CallContext(IntEnum):
ASYNC = 3
OOBCB = 4
OOBCMD = 6
OOBASYNC = 7
class DCPEp_Msg(DCPMessage):
LEN = 63, 32
@ -124,7 +125,8 @@ class DCPEndpoint(ASCBaseEndpoint):
self.ch_cb = DCPCallbackChannel(self, "CB", 0x60000, 0x8000)
self.ch_cmd = DCPCallChannel(self, "CMD", 0, 0x8000)
self.ch_async = DCPCallbackChannel(self, "ASYNC", 0x40000, 0x20000)
self.ch_async = DCPCallbackChannel(self, "ASYNC", 0x40000, 0x8000)
self.ch_oobasync = DCPCallbackChannel(self, "OOBASYNC", 0x48000, 0x8000)
self.ch_oobcb = DCPCallbackChannel(self, "OOBCB", 0x68000, 0x8000)
self.ch_oobcmd = DCPCallChannel(self, "OOBCMD", 0x8000, 0x8000)
@ -144,6 +146,8 @@ class DCPEndpoint(ASCBaseEndpoint):
self.ch_oobcb.cb(msg)
elif msg.CTX == CallContext.ASYNC:
self.ch_async.cb(msg)
elif msg.CTX == CallContext.OOBASYNC:
self.ch_oobasync.cb(msg)
else:
raise Exception(f"Unknown RX callback channel {msg.CTX}")
return True