Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1658389pxb; Wed, 9 Feb 2022 01:25:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyT35QT95Z88xOapVdG8Fxo0aF8X3BmpCStoGLU/kWxEaEX/N4HNfrmkBBsqlnsjnN3bgrT X-Received: by 2002:a05:6a00:b4a:: with SMTP id p10mr1360377pfo.14.1644398755691; Wed, 09 Feb 2022 01:25:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644398755; cv=none; d=google.com; s=arc-20160816; b=W4b8AMNt5KG9PKRoPWpleXl+G5j4LRXQ83nPcsaZFIKEuLYx+Z1Uiv9qijvFtCXrHS P+kDHarerW4o2N4imI7EGM7wBF6cNW2c7ZLQEIBzWASsZcd2KY2bXmlUb0dWTPpGPDRJ SDov3DgvILpjIiy9S330SaBFuMOcUG1/n09+cvmYVvMkRPwsT/vpSPxCbeH4Ax/XsiUM vQusM46Obba3idRJOI01ZQkFVcWlgXwyrUrJskj5/PT2uAUST/eoUpGq2g1eRT41AgbR V0dk+zziYRah3Xjdqdowkgz2TDUmixKrLmDlStM/Sai883qCxZKp7+DNVCowx22uzF98 AIMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CnPuieAA45R+Cn7cQOpi068J2AYd/JgSUtDlGNknSQI=; b=X6Qn6r9ueLCxRWWC8dMQDvQTmj1iTZvOarNjQlqomExPY8aTNbxdBhkRGI/jTkPBbL Vanc+BmDMGGYYUZ6jhNVeQd3lsTdRaJDvk3lNvpCoz+jdEe0DukrpjGfUqEJl+EbeH52 ZOkggZ6/5/aZc39ahVzfq0AcdIxVfVoxw6MC/RTPpLEB+7sawqPPZYzIK6oIR2I6dDWp O2WAtFQRKshlyeQ+J64rG2iLDRFgYxMrXEwvzoVbE0Ixx34Oq40Hce1jCk13ch8Y9c9I QgmsWFJwzp5eGQTGwT423VA75ZWMkoy3s7LBH1VBbpdFkY6wRqszDMCyhcjLAnhv6O8J cjtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AZnwjfRs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x4si3639707pfa.187.2022.02.09.01.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:25:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AZnwjfRs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 617CBE03E22E; Wed, 9 Feb 2022 00:58:10 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346454AbiBIEOr (ORCPT + 99 others); Tue, 8 Feb 2022 23:14:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347340AbiBIDmL (ORCPT ); Tue, 8 Feb 2022 22:42:11 -0500 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B2DC06174F for ; Tue, 8 Feb 2022 19:42:09 -0800 (PST) Received: by mail-yb1-xb29.google.com with SMTP id 192so2293333ybd.10 for ; Tue, 08 Feb 2022 19:42:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CnPuieAA45R+Cn7cQOpi068J2AYd/JgSUtDlGNknSQI=; b=AZnwjfRshXyPzqPIPPOZIBwXE2OBB4TSrGQFToT0R0Wu4pzLEYJsDVs4oqb2JDdI2b NeQPh3dKpSqjUmhkIiEdUcdC2WLGHHYULSJfRHoCj+J0nyHK9KzthFi386KJOowopwvZ 00fFIXDuuJiUp0TZD2Sdh8n1KE2SAwXh0+i+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CnPuieAA45R+Cn7cQOpi068J2AYd/JgSUtDlGNknSQI=; b=fyITL1FeE9d0wA4JNgwXhKxFBjUjMeTnP4jIqlqIVRgoU6to6E2ruB9qUbUbdY+EsZ VQsAvWJ1DbsI2vw3j7f0ZaP+6rVq67G3sybVPwjZkUwrcLTDgrIqeyBsukFPU/6qAuaW DuHMaqbSAQ04kUaepCIYGyx6lUvWnGLohzm1foNRJXGlxYEriJ9Qc7YwqT4Ru1iElt9K TFS0nc2LYOD7pm89Di6fgK2+VSFIahsd7bl23SYzURpk2t+lUoohYqSG6cvwxPDBY6oh A2CbQRbYHuyhw2J+W/OngepwB8++Iecn3Grovpj4Rp110lnGFhtMEig3rE8Dv0TSheLS YLig== X-Gm-Message-State: AOAM530mSRDZikN/te8epHNBMjiCft5UXEjMUfjy/s4DO+G2U/AbCJge 7NWO2uaMXQh4PZLrbXw2sh0TCUwf7toS8L0tqWDiJw== X-Received: by 2002:a81:34d7:: with SMTP id b206mr290747ywa.489.1644378128857; Tue, 08 Feb 2022 19:42:08 -0800 (PST) MIME-Version: 1.0 References: <20220207214026.1526151-1-pmalani@chromium.org> <20220207214026.1526151-4-pmalani@chromium.org> In-Reply-To: From: Prashant Malani Date: Tue, 8 Feb 2022 19:41:58 -0800 Message-ID: Subject: Re: [PATCH 3/4] platform/chrome: cros_ec_typec: Configure muxes at start of port update To: Tzung-Bi Shih Cc: linux-kernel@vger.kernel.org, Benson Leung , Guenter Roeck , "open list:CHROMEOS EC USB TYPE-C DRIVER" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 8, 2022 at 7:31 PM Tzung-Bi Shih wrote: > > On Tue, Feb 08, 2022 at 02:58:51PM -0800, Prashant Malani wrote: > > On Tue, Feb 8, 2022 at 10:35 AM Prashant Malani wrote: > > > In general, I think you may benefit from reading: > > > - The entire cros_ec_typec driver > > > - The EC Type C state machine [2] and interfaces [3][4] > > > > > > The above 2 will help understand how this entire stack works. Without > > > it, it is challenging > > > to process the flow (just from code review). > > > > > > If you have further questions our would like to better understand the > > > drivers, feel free to reach > > > out to me over IM/email. I don't think public list code review is the > > > best option for this > > > sort of explanation. > > > > > > [1] https://elixir.bootlin.com/linux/latest/source/drivers/platform/chrome/cros_ec_typec.c#L549 > > > [2] https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/common/usbc/ > > > [3] https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/driver/usb_mux/usb_mux.c > > > [4] https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/common/usb_pd_host_cmd.c > > Thanks for the link pointers. It would take me some time to understand the > background for reviewing the patch though. > > But in general, I would suggest to change the title for a stronger signal > that it fixes something (per [1]). Otherwise, the title and the description > in cover letter looks like a move refactor. I'm hesitant to use the term "fix" in the title; IMO the commit message describes the potential race involved. Since it is an unlikely edge case, brought about by limitations in how the EC updates its state, I'd like to avoid assigning it a "Fixes" label too. I can perhaps add some info to the cover letter, but I don't think that alone is worth a v3. I'll let this series hang for a few days; if there are other comments which necessitate a respin, I'll reword the cover letter. -Prashant > > [1]: https://patchwork.kernel.org/project/chrome-platform/patch/20220207214026.1526151-4-pmalani@chromium.org/#24727676