From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8973C4332F for ; Thu, 8 Dec 2022 16:04:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbiLHQEx (ORCPT ); Thu, 8 Dec 2022 11:04:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbiLHQEs (ORCPT ); Thu, 8 Dec 2022 11:04:48 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29FF99E468 for ; Thu, 8 Dec 2022 08:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670515422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IXsbEpWWvRn6V4K4AQAglneXzBPO0+xjG/LZYZe3/qc=; b=gYNk+s5934zWqbXnDymsz2MdrnhogO0DW6MIEG21Pz7amThbMHzhSCrww9lJce9EbpKd3l cepls96kcKn+l7eRfuhbYDv0EmFjq4W4Ciur7ikug2rxEQOhcoUb2ww87qAKC1hymO/GSP ccZnx/mwvaErHGb4BBo/e7rLBBp8SR0= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-596-JEhxGLu9PEaf-GK91Z1Fvw-1; Thu, 08 Dec 2022 11:03:41 -0500 X-MC-Unique: JEhxGLu9PEaf-GK91Z1Fvw-1 Received: by mail-ej1-f71.google.com with SMTP id hr21-20020a1709073f9500b007b29ccd1228so1432841ejc.16 for ; Thu, 08 Dec 2022 08:03:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IXsbEpWWvRn6V4K4AQAglneXzBPO0+xjG/LZYZe3/qc=; b=dGRgm2u32+waM3haQy7TT9vQ1S/X/tOJINfVwCkK+1777nouANVtpFrEUEQgQImIe6 ZyCJwbysJ/JnDvtMknL5dS0l97rKYR7CD5Cfq8uIOEE3RqAew9ZNUGREFlF22CUJHJQg UxVszETG6rK2/VpdED+8Nhk0nPJkf/SYF4vWGznUF3RNCWQ4r0dmmb/MVr2CZEGKDtLW RjXxLVgslBoSrTQiuABPJKU9c6U5tZ7lVeflQJ1wKedmuth8sg5S4VXSXrO0cjgWuzBo umvkP94BoS86fO6EmL/ZFgGdp7o48km/SGGf5wXq7/s/rjz95e74zsu8duPv5J0q1/ag Zs0Q== X-Gm-Message-State: ANoB5pl0/Db9zKE0HUmbiAG9VtBVfz4eHXXMSwiHyWEXFhqDuPx+gyp9 R1QlTMEmYLHx0xDr6dr18DtE5/txRkqnXqdg4CAeANGxWs/4MfWpZ3DeBIT+XGzxumghUFzdLMe P4mrBCxENrVPh/yJDVPqC X-Received: by 2002:a17:906:c51:b0:7b2:91e8:1553 with SMTP id t17-20020a1709060c5100b007b291e81553mr2320258ejf.20.1670515420125; Thu, 08 Dec 2022 08:03:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf6uLmr2ps/eoyIFTKExf/xJaLtd19e4nt+MMsCSb4MkIRG9XBk/nHAPLf9ph+m7OFZKDow9IA== X-Received: by 2002:a17:906:c51:b0:7b2:91e8:1553 with SMTP id t17-20020a1709060c5100b007b291e81553mr2320247ejf.20.1670515419917; Thu, 08 Dec 2022 08:03:39 -0800 (PST) Received: from ?IPV6:2001:1c00:c1e:bf00:d69d:5353:dba5:ee81? (2001-1c00-0c1e-bf00-d69d-5353-dba5-ee81.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:d69d:5353:dba5:ee81]) by smtp.gmail.com with ESMTPSA id fe17-20020a1709072a5100b0077a8fa8ba55sm9850087ejc.210.2022.12.08.08.03.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Dec 2022 08:03:39 -0800 (PST) Message-ID: Date: Thu, 8 Dec 2022 17:03:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 0/9] platform/surface: aggregator: Improve target/source handling in SSH messages Content-Language: en-US, nl To: Maximilian Luz , Jiri Kosina , Benjamin Tissoires , Sebastian Reichel Cc: Mark Gross , Jonathan Corbet , platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org, linux-input@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221202223327.690880-1-luzmaximilian@gmail.com> From: Hans de Goede In-Reply-To: <20221202223327.690880-1-luzmaximilian@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org Hi Maximilian, On 12/2/22 23:33, Maximilian Luz wrote: > We have some new insights into the Serial Hub protocol, obtained through > reverse engineering. In particular, regarding the command structure. The > input/output target IDs actually represent source and target IDs of > (what looks like) physical entities (specifically: host, SAM EC, KIP EC, > debug connector, and SurfLink connector). > > This series aims to improve handling of messages with regards to those > new findings and, mainly, improve clarity of the documentation and usage > around those fields. > > See the discussion in > > https://github.com/linux-surface/surface-aggregator-module/issues/64 > > for more details. > > There are a couple of standouts: > > - Patch 1 ensures that we only handle commands actually intended for us. > It's possible that we receive messages not intended for us when we > enable debugging. I've kept it intentionally minimal to simplify > backporting. The rest of the series patch 9 focuses more on clarity > and documentation, which is probably too much to backport. > > - Patch 8 touches on multiple subsystems. The intention is to enforce > proper usage and documentation of target IDs in the SSAM_SDEV() / > SSAM_VDEV() macros. As it directly touches those macros I > unfortunately can't split it up by subsystem. > > - Patch 9 is a loosely connected cleanup for consistency. Thank you for the patches. Unfortunately I don't have time atm to review this. And the next 2 weeks are the merge window, followed by 2 weeks of christmas vacation. So I'm afraid that I likely won't get around to reviewing this until the week of January 9th. > Hans, Jiri, Benjamin, Sebastian: While patch 8 ("platform/surface: > aggregator: Enforce use of target-ID enum in device ID macros") touches > multiple subsystems, it should be possible to take the whole series > through the pdx86 tree. The changes in other subsystems are fairly > limited. I agree that it will be best to take all of this upstream through the pdx86 tree. Sebastian thank you for the ack for patch 8/9. Jiri or Benjamin may we have your ack for merging patch 7/9 + 8/9 through the pdx86 tree ? Regards, Hans > Maximilian Luz (9): > platform/surface: aggregator: Ignore command messages not intended for > us > platform/surface: aggregator: Improve documentation and handling of > message target and source IDs > platform/surface: aggregator: Add target and source IDs to command > trace events > platform/surface: aggregator_hub: Use target-ID enum instead of > hard-coding values > platform/surface: aggregator_tabletsw: Use target-ID enum instead of > hard-coding values > platform/surface: dtx: Use target-ID enum instead of hard-coding > values > HID: surface-hid: Use target-ID enum instead of hard-coding values > platform/surface: aggregator: Enforce use of target-ID enum in device > ID macros > platform/surface: aggregator_registry: Fix target-ID of base-hub > > .../driver-api/surface_aggregator/client.rst | 4 +- > .../driver-api/surface_aggregator/ssh.rst | 36 ++++----- > drivers/hid/surface-hid/surface_hid.c | 2 +- > drivers/hid/surface-hid/surface_kbd.c | 2 +- > .../platform/surface/aggregator/controller.c | 12 +-- > .../platform/surface/aggregator/ssh_msgb.h | 4 +- > .../surface/aggregator/ssh_request_layer.c | 15 ++++ > drivers/platform/surface/aggregator/trace.h | 73 +++++++++++++++++-- > .../platform/surface/surface_aggregator_hub.c | 8 +- > .../surface/surface_aggregator_registry.c | 2 +- > .../surface/surface_aggregator_tabletsw.c | 10 +-- > drivers/platform/surface/surface_dtx.c | 20 ++--- > .../surface/surface_platform_profile.c | 2 +- > drivers/power/supply/surface_battery.c | 4 +- > drivers/power/supply/surface_charger.c | 2 +- > include/linux/surface_aggregator/controller.h | 4 +- > include/linux/surface_aggregator/device.h | 50 ++++++------- > include/linux/surface_aggregator/serial_hub.h | 40 ++++++---- > 18 files changed, 191 insertions(+), 99 deletions(-) >