]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: determine channel from event
authorAlex Elder <elder@linaro.org>
Fri, 10 Jun 2022 15:46:14 +0000 (10:46 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jun 2022 11:01:58 +0000 (12:01 +0100)
commit783f5754068bf2576a539450f0ea35376d6ea39f
tree9a84124f2e35c68c5ecaafaac086d5e4f57bc6af
parent27b594db2de81af30c79a6f666a9cfce73a2a5ff
net: ipa: determine channel from event

Each event in an event ring describes the TRE whose completion
caused the event.  Currently, every event ring is dedicated to a
single channel, so the channel is easily derived from the event
ring.

An event ring can actually be shared by more than one channel
though, and to distinguish events for one channel from another, the
event structure contains a field indicating which channel the event
is associated with.

In gsi_event_trans(), use the channel ID in an event to determine
which channel the event is for.  This makes the channel pointer now
passed to that function irrelevant; pass the GSI pointer to that
function instead.

And although it shouldn't happen, warn if an event arrives that
records a channel ID that's not in use, or if the event does not
have a transaction associated with it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/gsi.c