Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1273133pxb; Thu, 15 Apr 2021 19:43:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx60B3PkYbcUXWVVvz9nTsoktjBPPn86cm0JCaT5060L3Muix997pgzIZpDa91GuOLVslCj X-Received: by 2002:a17:907:76cb:: with SMTP id kf11mr6389108ejc.472.1618541001910; Thu, 15 Apr 2021 19:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618541001; cv=none; d=google.com; s=arc-20160816; b=n1sZkEmZeNQ820WJOi+qKTAp3oOQkEf6KIGkko6dA8ASPJPnf9GhazsuCBnf9AM9UU 3NC8SI/6JBeFB72cL3S+GwQ5YpgomWM/viLOdj2kBQKkn11eyYjPymjCFAuAypAysdvE m5V40n1OXzayx0f4r2NpG7Bza1l6/pBf8vadALXBaGl2s1Nnd1vlxa5U+72PwI1/RBII f+3qqhY4hYgKYAsLRwDL9HgGRDQwrpGnXP09uXyFWdFun294ea3xgIUxbiR5sQCDWApn scBhou3BzxLBep2oAQ9BrtJ7poXU1iYJ1arVIuxGcJq5fFd/rkGJlgbTwtfQ6ATsF52t 5CCQ== 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; bh=/bulXpuI8tDY/fXBLLWUp4LPd3sUmoquDA0BYMthGL8=; b=bw55PP7rppEEn5uh4nPUWzITMTdAS3bBbQUfFvd7qbRalfcTGw1dfOywTsfuIMiC28 VUvw9LDQ0AQ/OD7vY+5aUZlubSMi4PWqdkr+JceNNGVs8gV9uh7VC6AKq+loU4e9uz0y Fa2PC+Rh0mFEeoa5DITn905i2/CSjIfzirgsNAaFZKLeSXr+jiK/wbYODwT8mXPRf4zC 4JkGVYu5g+q9VMe6MTYh3gyh0JwVo2j+eN9evYJdtWzKb+m9bSHsNBzBF1PNl8Tp2hY/ LvvjdggBWnijzx/tXUWGs8v+CyO9G/CpeboPWGZ4PeBkxqVg8CWhe1G74cdGuryvS703 vZOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si3501402ejs.195.2021.04.15.19.42.58; Thu, 15 Apr 2021 19:43:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234961AbhDPBZJ (ORCPT + 99 others); Thu, 15 Apr 2021 21:25:09 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:44851 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234854AbhDPBZI (ORCPT ); Thu, 15 Apr 2021 21:25:08 -0400 Received: from mail-oo1-f71.google.com ([209.85.161.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lXDDu-0004Fg-EF for linux-kernel@vger.kernel.org; Fri, 16 Apr 2021 01:24:42 +0000 Received: by mail-oo1-f71.google.com with SMTP id i19-20020a4addd30000b02901e60c4a9d91so1806004oov.0 for ; Thu, 15 Apr 2021 18:24:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/bulXpuI8tDY/fXBLLWUp4LPd3sUmoquDA0BYMthGL8=; b=ppZN1gX1EnPhJ6F7sd7AWr7blfmtiWMKJrIHhiNc7ldVxZjsmQOsj401jom2W9gPDU 9aAU1SvHIdshyC6+RZY6dWpiLY7JxcppUc5wU7dhLvDbRNBAISP2di2fceT3KR2cNGMb EGLkLGjnKuFwIFqvB8UiSrbWJ+/CKSq2JI8GNoqNYRV6JBR04wwV9iqiCCHx2siv+VDz 1sbHRSHJuJ8wGw5QiR9m3+nyViIeULoyxvWIKsJV+6MpR0uPRozYmMct2JpS+Y1ZxnKy tVtI4XYDtlCiwkUJ8lyODROpgvy9lk1DR98/0BboDlhVGZoEJI4DYidFyjfeJ2c9si0t 4vjg== X-Gm-Message-State: AOAM531bhOgc64OLtpKDdT6C0PGIVvkQZ+xWOiUPMpb28E0/Y+HRbaEQ L4n2qAGVrlW+mn8mTqZpNoyfT6cCjqNZA+ehkZ3BPFXiJkw7xNVvA4YJxhD5v/FfCl+8UrxbvG/ E9QeOjSf9AnGUrp/ts693L/N+97xtkBUYs3/T1CyEMRl8fcfBqdvAIKVTuw== X-Received: by 2002:aca:3d86:: with SMTP id k128mr4686943oia.86.1618536281414; Thu, 15 Apr 2021 18:24:41 -0700 (PDT) X-Received: by 2002:aca:3d86:: with SMTP id k128mr4686934oia.86.1618536281250; Thu, 15 Apr 2021 18:24:41 -0700 (PDT) MIME-Version: 1.0 References: <20210415114856.4555-1-chris.chiu@canonical.com> <20210415184637.GA15445@rowland.harvard.edu> In-Reply-To: <20210415184637.GA15445@rowland.harvard.edu> From: Chris Chiu Date: Fri, 16 Apr 2021 09:24:30 +0800 Message-ID: Subject: Re: [PATCH v3] USB: Don't set USB_PORT_FEAT_SUSPEND on WD19's Realtek Hub To: Alan Stern Cc: Greg KH , m.v.b@runbox.com, hadess@hadess.net, linux-usb@vger.kernel.org, Linux Kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 16, 2021 at 2:46 AM Alan Stern wrote: > > On Fri, Apr 16, 2021 at 12:13:43AM +0800, Chris Chiu wrote: > > One thing worth mentioning here, I never hit the hub_ext_port_status -71 > > problem if I resume by waking up from the keyboard connected to the hub. > > I thought you said earlier that the port got into trouble while it was > suspending, not while it was resuming. You wrote: > > > [ 2789.679812] usb 3-4-port3: can't suspend, status -110 > > So if the problem occurs during suspend, how can it be possible to avoid > the problem by taking some particular action later while resuming? > The ETIMEDOUT is still there, but the port can resume w/o problems and I don't really know what the hub did. I can only reset_resume the hub to bring it back if I'm not waking up from the connected keyboard. > > But the usbcore kernel log shows me wPortStatus: 0503 wPortChane: 0004 > > of that port while resuming. In normal cases, they are 0507:0000. > > The 0004 bit of wPortChange means that the suspend status has changed; > the port is no longer suspended because the device attached to that port > (your keyboard) issued a wakeup request. > > > I don't know how to SetPortFeature() with setting the status change bit only. > > You can't. Only the hub itself can set the wPortChange bits. > > > Or maybe it's just some kind of timing issue of the > > idle/suspend/resume signaling. > > Not timing. It's because you woke the system up from the attached > keyboard. > > Alan Stern Got it. I'm just confused by the USB 2.0 spec 11.24.2.7.2 that "Hubs may allow setting of the status change bits with a SetPortFeature() request for diagnostic purposes." So for this case, I think USB_QUIRK_RESET_RESUME would be a better option to at least bring back the port. Any suggestion about what kind of test I can do on this hub? Thanks Chris