diff options
| author | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
| commit | 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e (patch) | |
| tree | d57f3a63479a07b4e0cece029886e76e04feb984 /drivers/platform/surface/aggregator/ssh_request_layer.c | |
| parent | 5dc63e56a9cf8df0b59c234a505a1653f1bdf885 (diff) | |
| parent | 53bea86b5712c7491bb3dae12e271666df0a308c (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.4 merge window.
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_request_layer.c')
| -rw-r--r-- | drivers/platform/surface/aggregator/ssh_request_layer.c | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/platform/surface/aggregator/ssh_request_layer.c b/drivers/platform/surface/aggregator/ssh_request_layer.c index f5565570f16c..90634dcacabf 100644 --- a/drivers/platform/surface/aggregator/ssh_request_layer.c +++ b/drivers/platform/surface/aggregator/ssh_request_layer.c @@ -916,6 +916,21 @@ static void ssh_rtl_rx_command(struct ssh_ptl *p, const struct ssam_span *data)  	if (sshp_parse_command(dev, data, &command, &command_data))  		return; +	/* +	 * Check if the message was intended for us. If not, drop it. +	 * +	 * Note: We will need to change this to handle debug messages. On newer +	 * generation devices, these seem to be sent to SSAM_SSH_TID_DEBUG. We +	 * as host can still receive them as they can be forwarded via an +	 * override option on SAM, but doing so does not change the target ID +	 * to SSAM_SSH_TID_HOST. +	 */ +	if (command->tid != SSAM_SSH_TID_HOST) { +		rtl_warn(rtl, "rtl: dropping message not intended for us (tid = %#04x)\n", +			 command->tid); +		return; +	} +  	if (ssh_rqid_is_event(get_unaligned_le16(&command->rqid)))  		ssh_rtl_rx_event(rtl, command, &command_data);  	else  |