Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp792478ybl; Thu, 23 Jan 2020 07:51:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxM9uGIsB6fLTUlhchXDmB9kBRrHOTCL/xS3U0zK6mP0mdGMIcx+niWtSYyCrzMju7IW2e6 X-Received: by 2002:aca:fcd1:: with SMTP id a200mr10658394oii.74.1579794677286; Thu, 23 Jan 2020 07:51:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579794677; cv=none; d=google.com; s=arc-20160816; b=ezHXCVRyp0+XN868Y/uqws+zrG6eozpAhxcCc4RRL3ptazKiJDWD8tBUdx8+JQtDCG 758CN1L/gBSZvyMKx/PaO9DqFLdvGaOVN6IOmJXbhQe6KBBBvbJBikk6uw3JJV7PvthF AjrXKHFOQKK5TDr0l3CO42F7qdiCTfzVXwcvVJW1xPrkxwjwmCPXOigCHjM3qYIJTxRG SBML/X8j4oRpg2ZED5UoLbuuV5JO9pPCQ6iSD/Vg68j1Pz+4Zp2lOtMJPnnEAJVAoieT SLL1nOXIYt+CzikY+DXDISer3WQmMnpBZojlgL8XfI5x9Em1E16i6pYWgsp+IjN7EiOM 6wDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=LvMmv3bMnYDfYXZbXdYycpHNA0a+If2dceKz7YWaHbc=; b=nmXvZXPyw18ZAdLVTE7Zj6jHrtJJH1ReBEGd1noHcagxw6Xvgjf/55yPaEBz/yjMmT nnGBp0FB6hl1gRN03RgY5ca5zNnjAyS793RRaj8Z6i6Zd2Szcvez4lgQLPzidI74fhRQ RFG2xAKhpDyk7I0MDj2JFiY70e94pXtaSZvUH07YtHeQucsAr8molyMO5WPIi4E3gtrr p3eCmnC25+LvlDaGxz47vowxwGPq3vuRn2ygv4cMgI2XGHfvHS0PhNkvTvyEGLD9wr6I 4dnlVT1G/sMbfqwTYxOY2D7geqk+12rv0A+hdcT9dRXJj2UQJop1r53Cud1aE5F5LVPY +eLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m82si1014938oig.129.2020.01.23.07.51.04; Thu, 23 Jan 2020 07:51:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728205AbgAWPuG (ORCPT + 99 others); Thu, 23 Jan 2020 10:50:06 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:54888 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726231AbgAWPuG (ORCPT ); Thu, 23 Jan 2020 10:50:06 -0500 Received: (qmail 2710 invoked by uid 2102); 23 Jan 2020 10:50:05 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 23 Jan 2020 10:50:05 -0500 Date: Thu, 23 Jan 2020 10:50:05 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Paul Zimmerman cc: Greg Kroah-Hartman , David Heinzelmann , , Subject: Re: [REGRESSION][BISECTED] 5.5-rc suspend/resume failure caused by patch a4f55d8b8c14 ("usb: hub: Check device descriptor before resusciation") In-Reply-To: <20200122165454.757aaa25@EliteBook> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 22 Jan 2020, Paul Zimmerman wrote: > > Still, since there was no real connection change at the port, there's > > no reason to call hub_port_connect_change() here. Let's see if the > > patch below fixes your problem. > > > > Alan Stern > > > > > > > > Index: usb-devel/drivers/usb/core/hub.c > > =================================================================== > > --- usb-devel.orig/drivers/usb/core/hub.c > > +++ usb-devel/drivers/usb/core/hub.c > > @@ -1216,11 +1216,6 @@ static void hub_activate(struct usb_hub > > #ifdef CONFIG_PM > > udev->reset_resume = 1; > > #endif > > - /* Don't set the change_bits when the device > > - * was powered off. > > - */ > > - if (test_bit(port1, hub->power_bits)) > > - set_bit(port1, hub->change_bits); > > > > } else { > > /* The power session is gone; tell hub_wq */ > > > > I can confirm this fixes the issue for me, I did a couple dozen > suspend/resume cycles without seeing a failure. > > I see the code you removed was added by Lan Tianyu in commit > ad493e5e5805 ("usb: add usb port auto power off mechanism"). I No, not really. The set_bit() call was added by me in a much earlier commit (8808f00c7adf, merged in 2008). Lan Tianyu merely added the "if" test, so that set_bit() doesn't always get called. Now with this change, set_bit() never gets called. > wonder if your patch would break that? I don't know what that is > or how to test it. While some code review by people who are familiar with this material wouldn't hurt, I don't think you need to worry about any additional testing. > In any case: > Tested-by: Paul Zimmerman Thank you. I'll submit the patch soon. Alan Stern