Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3647186rwa; Tue, 23 Aug 2022 07:59:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Do+DCWd0IUK4mtIZEQxXOEQepWmPcGUnxlSTGBw33jd221XfhNW6VBBiPvDhNghkTD3yr X-Received: by 2002:a17:90a:f0c9:b0:1fa:e017:7d13 with SMTP id fa9-20020a17090af0c900b001fae0177d13mr3694781pjb.128.1661266791088; Tue, 23 Aug 2022 07:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661266791; cv=none; d=google.com; s=arc-20160816; b=FvESmNGh1D9xzrLmbV7yjHFjvKEbe+bWo46Z4q/9DAOM5ej5mj6IjGSBlNNXYKUPNo ReWM/dA84S1Ar/Lj0MwBiI6mKvZZ5aRGEk8KZ8VQOzo2utx5c+PlP1Q9x2UmayTrctmF RattUAY7MgLk343nbqlwovMws+rljhPRgEmK8UImBSdYmbrQ0Ge5mWR6OQBlrbk/Ra7a h4NIjipT2mJYIfiE5GvHl2j34fWWU9Vak0CCqauPpIWdhcIuEuw0Dabx0USMHHIDMf9f T7+F3G7vletd0HwfRhy0DLWlWNr5Yw/QNGVXHoyEPgQs1Ci+GhP7hZj7V4gZVFiZEPE+ K/9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xh6L0oPuedFsibqHYxV5ZQax5o4BfnZO7w2IrYmnTg4=; b=TT3Ws7dvLH5iXx6QkLUCOB6s8HOvIS+uYsjQqlEqSEXEI1nZpUOd24B5LiSoG3DvAy OhhtSy3JreEQyZ103uW1ijE6yPDQiMbcPJ9oA2mbCxUtAGSSYQanwCtn5YZhcUVAf44+ acQurUaj3B8N1gqY7sxi+EWuJd0Uop71pdgk+3V+droVa6r6kngNTkNyOJD0L1Ey/6F1 TSSb6PdUb/zR8EKAcbw1edoafuCW//1F1x7cQigXNv9LW0rcaSircrFGkShhHOYPNRwF NRwWw/3OV2Y7ud3eG+PBud3SSoiFC+E3A29kumL550Ql9kSwQLRoE+4a1J0IZfekVVTD FYJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jj11-20020a170903048b00b00172d1e059cfsi9563554plb.593.2022.08.23.07.59.39; Tue, 23 Aug 2022 07:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241602AbiHWOeJ (ORCPT + 99 others); Tue, 23 Aug 2022 10:34:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241359AbiHWOdx (ORCPT ); Tue, 23 Aug 2022 10:33:53 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0092CA2D9C for ; Tue, 23 Aug 2022 04:49:44 -0700 (PDT) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oQS2z-0004K1-CB; Tue, 23 Aug 2022 13:26:17 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Kishon Vijay Abraham I , Vinod Koul , Samuel Holland , Peter Geis , Peter Geis Cc: Markus Reichl , Michael Riesch , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] phy: rockchip-inno-usb2: Return zero after otg sync Date: Tue, 23 Aug 2022 13:26:16 +0200 Message-ID: <6544199.MhkbZ0Pkbq@diego> In-Reply-To: <20220822103219.3985075-1-pgwipeout@gmail.com> References: <20220822103219.3985075-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR autolearn=ham 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 Am Montag, 22. August 2022, 12:32:18 CEST schrieb Peter Geis: > The otg sync state patch reuses the ret variable, but fails to set it to > zero after use. This leads to a situation when the otg port is in > peripheral mode where the otg phy aborts halfway through setup. Fix this > by setting ret to zero after use. > > Fixes: 8dc60f8da22f ("phy: rockchip-inno-usb2: Sync initial otg state") > > Reported-by: Markus Reichl > Reported-by: Michael Riesch > Signed-off-by: Peter Geis > Tested-by: Michael Riesch > Tested-by: Markus Reichl > --- > drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c > index 0b1e9337ee8e..5fc7c374a6b4 100644 > --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c > +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c > @@ -1169,6 +1169,7 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy, > /* do initial sync of usb state */ > ret = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); > extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !ret); > + ret = 0; > } > } I also ran into that issue just now :-) . So am looking forward to v2. Thanks Heiko