Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1977858rda; Tue, 24 Oct 2023 08:44:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYLWVojoC7bCa+GF1yye3sOxusFvfdj6vt/dNpH3sl+K2HmVaLVzKlsOOHkFNgHwWROSab X-Received: by 2002:a05:6a21:3b49:b0:16b:7602:1837 with SMTP id zy9-20020a056a213b4900b0016b76021837mr3047089pzb.29.1698162276455; Tue, 24 Oct 2023 08:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698162276; cv=none; d=google.com; s=arc-20160816; b=VT/ZpoetOogFHN4kPbLUtHEkMUheusC6MYXKqt6eYtNi+95M1J4vILJ48dKwmeaFm8 itPlwSNerdcXAhIhtWSNgJTlfCPUVFhg2+9lv3+8+7sGn3cCWwGbo2elfHVNs2OBQGeg NLdhDuJNcOmb6gE/gBjtZsKl4fU91+Pa1XUWQMnad4iy1VyYuRmO0URNyUe3RA3yaEfE XeV+EU3AlGogYKvWplHcvS9qLo9JFi+X2ks7tzrnEfL2o5F0ZvRf2S03mj/MJdzeZ751 OoGxYMXRnonfC+c37Q08Njg2RZgyJROdUnb9k+y4h0J/QbnB53hTmsAhNARMLSVAPEae 8Xjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=UCr1AF6I/Ln2HdoqtlBUcPglY3F/6pb6NfUq6WqK/tY=; fh=4X1RgmGQrcZrcM8CV/BM4B6MYOs5AiTW7dHsMy05d6g=; b=oxAgT4ucrvUx0awWMvkxDKm0D9H9WS5y7/wseCQ3RKt5Ty9HALzEFz3G+0+Kg/QVKZ ZSreKj/U7zsmG/+JA5/FjTH7PS19sE4pV++6MAfT9MVsMKag5BTk7sUw73zrlMabWUDx EJHSgJkn1fZEix5wsKH281A1xxNnWc5z5Q5eODaLHmUV+cJGWtYrQxHyHPhjUDjIBCK9 nIeb6qquxTRHmDle5Kf1+okI30jjeO/FHM/ENy9zHCyNvPXFj4K8NJZRwwdmib29Pj93 +JnaAZzVZATpXsl6NMcIXvvcBD+c6T+iIoEFABRrqmuIxYRGe9XWm+wYksZSMlQAbRLQ I8ag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id v186-20020a6389c3000000b005890aa054fcsi8449552pgd.400.2023.10.24.08.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 08:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A4AAD805C14E; Tue, 24 Oct 2023 08:44:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343956AbjJXPoY (ORCPT + 99 others); Tue, 24 Oct 2023 11:44:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343938AbjJXPoW (ORCPT ); Tue, 24 Oct 2023 11:44:22 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 688F9DE for ; Tue, 24 Oct 2023 08:44:20 -0700 (PDT) Received: (qmail 461325 invoked by uid 1000); 24 Oct 2023 11:44:19 -0400 Date: Tue, 24 Oct 2023 11:44:19 -0400 From: Alan Stern To: Hardik Gajjar Cc: Greg KH , mathias.nyman@intel.com, yangyingliang@huawei.com, jinpu.wang@ionos.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, erosca@de.adit-jv.com Subject: Re: [PATCH v4] usb: core: hub: Add quirks for reducing device address timeout Message-ID: References: <2023101155-unframed-satirical-f7ec@gregkh> <20231011164525.97616-1-hgajjar@de.adit-jv.com> <2023101620-shaky-sensitize-9708@gregkh> <20231017161021.GA62775@vmlxhi-118.adit-jv.com> <2023101750-bless-humorous-45c7@gregkh> <6c25beed-06fe-4be0-b51a-18e159d25072@rowland.harvard.edu> <2023102105-attribute-pajamas-a0dc@gregkh> <20231023161348.GA55951@vmlxhi-118.adit-jv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231023161348.GA55951@vmlxhi-118.adit-jv.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 08:44:34 -0700 (PDT) On Mon, Oct 23, 2023 at 06:13:48PM +0200, Hardik Gajjar wrote: > On Sat, Oct 21, 2023 at 12:15:35PM +0200, Greg KH wrote: > > On Tue, Oct 17, 2023 at 02:59:54PM -0400, Alan Stern wrote: > > > On Tue, Oct 17, 2023 at 06:53:44PM +0200, Greg KH wrote: > > > > On Tue, Oct 17, 2023 at 06:10:21PM +0200, Hardik Gajjar wrote: > > > > > More logs and detailed in patch V1: > > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_linux-2Dusb_20230818092353.124658-2D1-2Dhgajjar-40de.adit-2Djv.com_T_-23m452ec9dad94e8181fdb050cd29483dd89437f7c1&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=SAhjP5GOmrADp1v_EE5jWoSuMlYCIt9gKduw-DCBPLs&m=P0HXZTx6ta7v5M4y2Y7WZkPrY-dpKkxBq8tAzuX8cI9aj9tE2NuVvJjLl3Uvojpw&s=N_HwnQeZb_gHMmgz53uTGDUZVi28EXb1l9Pg6PdbvVI&e= > > > > > > > > > > > > > Achieving this is impossible in scenarios where the set_address is > > > > > > > not successful and waits for a timeout. > > > > > > > > > > > > Agreed, broken hardware is a pain, but if your device is allowed to take > > > > > > longer, it can, and will, so you have to support that. > > > > > > > > > > > The problem is not caused by the device taking an extended amount of time to > > > > > process the 'set_address' request. Instead, the issue lies in the absence of > > > > > any activity on the upstream bus until a timeout occurs. > > > > > > > > So, a broken device. Why are you then adding the hub to the quirk list > > > > and not the broken device? We are used to adding broken devices to > > > > qurik lists all the time, this shouldn't be new. > > > > > > Adding a quirk for the device isn't feasible, because the problem occurs > > > before the device has been initialized and enumerated. The kernel > > > doesn't know anything about the device at this point; only that it has > > > just connected. > > > > Ah, ick, you are right, but we do know the "broken hub" id, so that > > makes a bit more sense. Should this be a hub-only type quirk? > > In addition to the earlier comment, it appears that the issue is most likely > related to the hub. While we have identified one specific phone that triggers > this problem, we cannot determine how many other devices might encounter a > similar issue, where they enumerate as full speed initially and then switch > to high speed. To address this, we are proposing to use a 500 ms timeout for > all devices connected via the hub. This change aims to prevent potential > timeout-related problems with various devices So it sounds like the best approach is to make this a hub-specific quirk. > It does appear that the issue is related to the hub, and the ideal solution would involve > modifying the hub's firmware. However, implementing such a firmware fix is currently not > a straightforward task. As a result, we have implemented this quirk-based solution to > mitigate the issue to some extent > > Following is the LeCroy analyzer logs: > > 1. logs between Hub and phone with broken hub. > > In packet 58, there is a Full-speed J (suspend) event that lasted for 5.347 seconds. > It's suspected that the hub was suspended due to incorrect chirp parsing. > This anomaly in chirp parsing may be a contributing factor to the issue we're facing. Yes, that's probably true. It's another indication that the hub is somehow at fault. Alan Stern