Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp302362rwl; Tue, 11 Apr 2023 18:57:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZgJVTwpcmZ3wP1ZsNMEem7U8YkiBQ0ddlPUKEfLim+bHu0bgO4Hkm75kajzgbeCrc7sZif X-Received: by 2002:a62:5206:0:b0:626:444:bfa6 with SMTP id g6-20020a625206000000b006260444bfa6mr13522139pfb.26.1681264648036; Tue, 11 Apr 2023 18:57:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681264648; cv=none; d=google.com; s=arc-20160816; b=JaXSUGZxOxPP+uWOl4IfZPkdLC+YXgJ5gooYmcnorzyOXh6jgKPB29NjHIySF5APH6 lLzQtkyG5pp1UK8eNX8p8ZSp8kEtwCLDTS4QCPRGTTMuGiDk0l9EKjPrv6IYJCthmRr+ PHuE6UyXAfdWoAjn1wJ+XzRwDAAthNEuq0pVWD3SOh9lwcSULguP+K8cwCLA2ZZs6LhK eQJ5WBZJfibDvBLG+tk52UwdeLzUvoGQd/j1j6lIlRDyGvbfhfNPBW1XoaZyqHSQa1th 89OzJak+bjZZj7W6Xeo33m0In7CCzZzTcdRnL3Bqb5TBTwZgNSKlYRvKrz/MM+B06gh1 qAuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DCRgCd8nApy7TzIvIs1yvnfBLl2jT7+YOoX4vupYous=; b=PbsDr9M5nsm66aeQyYMEEseVDbUV+RSMgSbhzbJrMOG9Ebl0ICq5HUgRX+E5djSyPB /N7IVIYIib8Kxh/dg7n9FdY6TC9aUE5qTUY003qP1xeL6//ETTiPzPQ3N3rXXGEN1Pfb 3OeMvBn9lJcn99VHeuMDzebUF/+xUBh2L4RX7gGiGKbCjPIcS1XBB/Uxy1ZOmCV7f4w8 a/uk337frXseC69Lurv7TnqjKmnhltlh4urvah3IbCGUWAiFiqk7MIxuYGXbtCPEN36s RFsGb2k4Uq+Q6Y8kI4vXrBp53pm08wQNeKeesuBaTgXsNAUtq8f+9vakaAlPthuZLoNV sJ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=dVeRnczi; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020aa78e91000000b00638f2eb16f9si5894892pfr.343.2023.04.11.18.57.13; Tue, 11 Apr 2023 18:57:28 -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; dkim=pass header.i=@google.com header.s=20221208 header.b=dVeRnczi; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbjDLBzT (ORCPT + 99 others); Tue, 11 Apr 2023 21:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbjDLBzQ (ORCPT ); Tue, 11 Apr 2023 21:55:16 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3062D2D44 for ; Tue, 11 Apr 2023 18:55:15 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-50489d2f5e0so2278388a12.3 for ; Tue, 11 Apr 2023 18:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681264513; x=1683856513; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DCRgCd8nApy7TzIvIs1yvnfBLl2jT7+YOoX4vupYous=; b=dVeRnczi9X1vCcRP5rlKjAm6s3NxyK5XM0FhCqATZrFj7i015vBdufb3N+NhNbcop2 tTmFO92+rhWLisaBsqrOkvdsJ42RRjltikomO2YcRHg5tcP0Y7X+XEvUjqDEYXlGLCqm doRRq74umLPEjgn8ismz4+x89kq0x7x1hWkk6qTaUwLFNxytYdBX4qb9drX5f+XToaea 2K1dZ3IPkahWJx/eWeuMDl3EA6vMw7pMnnpRbSWxa7umoZdfJPvRbEoHThAvil9Rooe2 74OMZr9wIalpa2/XtASWuOpbvc3K+9div3AnWfZA2eS/hI2Gno5vqc0CvN5AX/SICILQ kghg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681264513; x=1683856513; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DCRgCd8nApy7TzIvIs1yvnfBLl2jT7+YOoX4vupYous=; b=ONJ+dpYLuXMiRVwuy4NKdo66FKunGMPd7vTRIY5ofG6PuS8v0cyi6M9HdObx19lMYJ HHTuQ4+Uw72A0WxmbvM50PZk549QQ9caEFLHViqtYYrc9Jsv1ilSmPVnKZPRb5BsB3A4 eqKVuD0shqbWAU/AZIevy7FdSMAIZyEV/P5/CwdmVnIcNxxgGlka6AR/kmr86MoZwiQ7 CmEjdK8UezvIQDyjNweZxuKBF1AeoBN+7UPOhKlAwuJrtOuqIbty+oL4QWdtpCVXdlix Ms5OK6UGFG4NClGHyogY5zakyHADHhTT5QR2DcCRJ39ANsh6o1wPqxmqMuTUolkQX5Ve AwVQ== X-Gm-Message-State: AAQBX9dbxcRrg2mbX1RGk7ZT2J8O+Q+6fDG04Mz8C1SqNrfqXw8FrfxO mTT7oxfEDUqn6YiHTwl7kEcUf5IhrKprvX/eZpp7pQ== X-Received: by 2002:a50:baec:0:b0:504:9390:180f with SMTP id x99-20020a50baec000000b005049390180fmr5065023ede.2.1681264513494; Tue, 11 Apr 2023 18:55:13 -0700 (PDT) MIME-Version: 1.0 References: <20230411083145.2214105-1-hhhuuu@google.com> In-Reply-To: From: Jimmy Hu Date: Wed, 12 Apr 2023 09:55:02 +0800 Message-ID: Subject: Re: [PATCH] usb: core: hub: Disable autosuspend for VIA VL813 USB3.0 hub To: Alan Stern Cc: gregkh@linuxfoundation.org, badhri@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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, Apr 11, 2023 at 9:55=E2=80=AFPM Alan Stern wrote: > > On Tue, Apr 11, 2023 at 08:31:45AM +0000, Jimmy Hu wrote: > > The VIA VL813 USB3.0 hub appears to have an issue with autosuspend and > > detecting USB3 devices. This can be reproduced by connecting a USB3 > > device to the hub after the hub enters autosuspend mode. > > > > //connect the hub > > [ 106.854204] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using = xhci-hcd > > [ 107.084993] usb 2-1: New USB device found, idVendor=3D2109, idProduc= t=3D0813, bcdDevice=3D90.15 > > [ 107.094520] usb 2-1: New USB device strings: Mfr=3D1, Product=3D2, S= erialNumber=3D0 > > [ 107.111836] usb 2-1: Product: USB3.0 Hub > > [ 107.116835] usb 2-1: Manufacturer: VIA Labs, Inc. > > [ 107.314230] hub 2-1:1.0: USB hub found > > [ 107.321356] hub 2-1:1.0: 4 ports detected > > > > //the hub enters autosuspend mode > > [ 107.738873] hub 2-1:1.0: hub_suspend > > [ 107.922097] usb 2-1: usb auto-suspend, wakeup 1 > > > > //connect a USB3 device > > [ 133.120060] usb 2-1: usb wakeup-resume > > [ 133.160033] usb 2-1: Waited 0ms for CONNECT > > [ 133.165423] usb 2-1: finish resume > > [ 133.176919] hub 2-1:1.0: hub_resume > > [ 133.188026] usb 2-1-port3: status 0263 change 0041 > > [ 133.323585] hub 2-1:1.0: state 7 ports 4 chg 0008 evt 0008 > > [ 133.342423] usb 2-1-port3: link state change > > [ 133.358154] usb 2-1-port3: status 0263, change 0040, 5.0 Gb/s > > This status value indicates that the port is in the U3 suspend state. > Maybe the port needs to be put back into U0 before it can be reset. > > > [ 133.875150] usb 2-1-port3: not reset yet, waiting 10ms > > [ 133.895502] usb 2-1-port3: not reset yet, waiting 10ms > > [ 133.918239] usb 2-1-port3: not reset yet, waiting 200ms > > [ 134.139529] usb 2-1-port3: not reset yet, waiting 200ms > > [ 134.365296] usb 2-1-port3: not reset yet, waiting 200ms > > [ 134.590185] usb 2-1-port3: not reset yet, waiting 200ms > > [ 134.641330] hub 2-1:1.0: state 7 ports 4 chg 0000 evt 0008 > > [ 134.658880] hub 2-1:1.0: hub_suspend > > [ 134.792908] usb 2-1: usb auto-suspend, wakeup 1 > > > > Disabling autosuspend for this hub resolves the issue. > > It may be possible to fix the problem. You should try that before > giving up. > > Alan Stern [ 133.120060] usb 2-1: usb wakeup-resume [ 133.160033] usb 2-1: Waited 0ms for CONNECT [ 133.165423] usb 2-1: finish resume [ 133.176919] hub 2-1:1.0: hub_resume When a USB3 device is connected to the hub, it did finish the resume and should be put back into U0, but it seems to have failed.