Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3612605rwr; Sat, 22 Apr 2023 08:16:39 -0700 (PDT) X-Google-Smtp-Source: AKy350Z0cL5BcclfcUNxeYh8mEeJMZXmWJ2DpoO+9+4fdsPk4GWjX3lpSFCjfEsmNOH1NNv+le6p X-Received: by 2002:a05:6a21:789c:b0:eb:7d41:a70b with SMTP id bf28-20020a056a21789c00b000eb7d41a70bmr12063691pzc.1.1682176599182; Sat, 22 Apr 2023 08:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682176599; cv=none; d=google.com; s=arc-20160816; b=t2VdeWiWVfGJK9hbdjqbCapLiB+RRfw/Cxs47bLdj0GidDzo9qNXMcOrcI9rdg/fbo oq6K5Zoy0A2dgugMMEYILic0DhB/BnreuakVibg8XdEjtCvKOoeKVV8rW13kqoxLEyB/ ZQPgVn/HfQZMpDo/OnMF94t3AuNrd6MJFXNxMAKcHFlCrJ+vweGC7d0Mtik97SQpdOAe CavrL65VotSjTPstntinj8XsTVvp+nXb4rRgvS6Qf8rdQHmDgD3xbFERJ4dt+0UxdTyX KS2AB73ZzS194DLCPA/iPIfSQi+TJZatLlD/FrcvqCGjZ/YhN63D9fOPe+8GRti13qqX gF4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=a8oIQeonm7Nx+9aZRvPSGE2uZskFF0bF4mqKmzZ1HaU=; b=C2IHoXKM/2pRIy3JbuMrJvvPA1CK9ISyIyTb88G5tUE+KchJyT+tr0T5wK/D5RZdLc AweeHleJ276lWFfOMxo8JzqM9oiqJqkaSbPRS8Bh8UKlXYXP6UwLfkinbkUxhgcNgAUN ePfyssh1iUFnjDQ/b3NmI6sjKhC4xfFSHGybY1SMYbr3DGGBy/cxOA8EGZn19YyKlbJq zudaq6/77s7R1CLcfbZUcZDUGyn17WHIUWO6gc3nxqVkxY04fBHogv3Z3Q0DaBvoDpOX ioYi63E3SifWRk46Kc73wwlYj/tBF6eIrIxcYBjmQRn88PbB8j9IycznjYpc8tc0Ok4E L1uA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020a6555c4000000b0051b2893b8c9si6923832pgs.442.2023.04.22.08.16.00; Sat, 22 Apr 2023 08:16:39 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbjDVPMB (ORCPT + 99 others); Sat, 22 Apr 2023 11:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjDVPL6 (ORCPT ); Sat, 22 Apr 2023 11:11:58 -0400 Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [203.110.167.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F0551BE3 for ; Sat, 22 Apr 2023 08:11:55 -0700 (PDT) X-ASG-Debug-ID: 1682176311-1eb14e638841370001-xx1T2L Received: from ZXSHMBX3.zhaoxin.com (ZXSHMBX3.zhaoxin.com [10.28.252.165]) by mx2.zhaoxin.com with ESMTP id ljftPdxn0Gr5sTUK (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 22 Apr 2023 23:11:51 +0800 (CST) X-Barracuda-Envelope-From: WeitaoWang-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHMBX3.zhaoxin.com (10.28.252.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Sat, 22 Apr 2023 23:11:51 +0800 Received: from [192.168.0.100] (115.171.114.112) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Sat, 22 Apr 2023 23:11:49 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 Message-ID: <235c2ebc-ca9b-8765-0914-fcd839f1e45c@zhaoxin.com> X-Barracuda-RBL-Trusted-Forwarder: 192.168.0.100 Date: Sun, 23 Apr 2023 07:11:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2] UHCI:adjust zhaoxin UHCI controllers OverCurrent bit value Content-Language: en-US X-ASG-Orig-Subj: Re: [PATCH v2] UHCI:adjust zhaoxin UHCI controllers OverCurrent bit value To: Alan Stern CC: , , , , , References: <20230421174142.382602-1-WeitaoWang-oc@zhaoxin.com> From: "WeitaoWang-oc@zhaoxin.com" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [115.171.114.112] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) X-Barracuda-Connect: ZXSHMBX3.zhaoxin.com[10.28.252.165] X-Barracuda-Start-Time: 1682176311 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.36:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 2276 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: 1.09 X-Barracuda-Spam-Status: No, SCORE=1.09 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=DATE_IN_FUTURE_06_12, DATE_IN_FUTURE_06_12_2 X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.107774 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date 3.10 DATE_IN_FUTURE_06_12_2 DATE_IN_FUTURE_06_12_2 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 2023/4/21 22:59, Alan Stern wrote: > On Sat, Apr 22, 2023 at 01:41:42AM +0800, Weitao Wang wrote: >> OverCurrent condition is not standardized in the UHCI spec. >> Zhaoxin UHCI controllers report OverCurrent bit active off. >> In order to handle OverCurrent condition correctly, the uhci-hcd >> driver needs to be told to expect the active-off behavior. >> >> Suggested-by: Alan Stern >> Cc: stable@vger.kernel.org >> Signed-off-by: Weitao Wang >> --- >> v1->v2 >> - Modify the description of this patch. >> - Let Zhaoxin and VIA share a common oc_low flag >> >> drivers/usb/host/uhci-pci.c | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/usb/host/uhci-pci.c b/drivers/usb/host/uhci-pci.c >> index 3592f757fe05..034586911bb5 100644 >> --- a/drivers/usb/host/uhci-pci.c >> +++ b/drivers/usb/host/uhci-pci.c >> @@ -119,11 +119,12 @@ static int uhci_pci_init(struct usb_hcd *hcd) >> >> uhci->rh_numports = uhci_count_ports(hcd); >> >> - /* Intel controllers report the OverCurrent bit active on. >> - * VIA controllers report it active off, so we'll adjust the >> - * bit value. (It's not standardized in the UHCI spec.) >> + /* Intel controllers report the OverCurrent bit active on. VIA >> + * and ZHAOXIN controllers report it active off, so we'll adjust >> + * the bit value. (It's not standardized in the UHCI spec.) >> */ > > The style we use now for multi-line comments is: > > /* > * Blah blah blah > * blah blah blah > */ > >> - if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA) >> + if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA || >> + to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN) > > The indentation level of the continuation line should be different from > the indentation of the statement below. Otherwise it looks like the > continuation line is part of the conditional block. > I see, Thanks for your careful examination. I'll change it later. Best Regards, Weitao > Alan Stern > >> uhci->oc_low = 1; >> >> /* HP's server management chip requires a longer port reset delay. */ >> -- >> 2.32.0 >> > .