Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp767501ybl; Fri, 31 Jan 2020 07:40:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyFZg1BipYGMKNf5GVETzhTLs4EcM0y55DPchjetiFNmFwPNMZcmeRuviq1mHcFwOyyBGCl X-Received: by 2002:a05:6830:154c:: with SMTP id l12mr7980579otp.275.1580485204861; Fri, 31 Jan 2020 07:40:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580485204; cv=none; d=google.com; s=arc-20160816; b=SwxzvbolxRV3ARTG03ybkyJ7oCYfdaR57taT+0MTq457hjOt1CRkx9zRvM5pR/1XhC I9apWXmflNPAwohHOO7bJx75KTiVGe7A1hYwDXEBYFytPTFuFxNS7LqpZz+Ig5BmKrdI Fv/DAc2FPenWOstulvz0oGDZ3DZx/vTcCetRk1elahaqzQIlaiIGCtLpER21TUZ9IqbI RUmZG+0SnOhu+DwsmmykEaVLZTnJLI+YGo9eYA6elBnlMI1u85qe2sU7nlOj3DdUQsEH rBTlozZM53oNZxNQ081VjHdCL6Da7Z0m1Q36ZMy/4Ugkyd43MMk6/CF23MAPixNgOrPh NBfQ== 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=SIlpPltCOziVlSUL5Xyupwlizl0LGTbQohCx6vZcY9M=; b=ewRHFtCsYbsn83xrnxg41+TKXu8NSzamfpsoQaaot3nzVI6ahBDomFDJbX4M620R/r lDEj48mAttWY6oG9OIEINN5ZlCywKuySQC4RDA78FhcZBroepZn3BOoonslQlDDlZ2Bp mgN7Z9v/ZJMlV4DNiDkzRCQ4wEFFdY8qRBSA984p1bSJZ6pa03D6pmU+tNylN812bMih fnGJLiO6pOm0Hgu77qgqvwTKlxvrS265ysuw42y/V/qufp1YwBOrjxBpC65sVt+2Ltaj Jppx7mP4Sb4CraMYXNmyTkf3bpe9VvE0eXb1xW55t8mmUHpIbGsjaG+DjCdYKrdhzOqS OBAg== 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 i6si4882902otp.5.2020.01.31.07.39.52; Fri, 31 Jan 2020 07:40:04 -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 S1729222AbgAaPhq (ORCPT + 99 others); Fri, 31 Jan 2020 10:37:46 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:55998 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1729133AbgAaPhq (ORCPT ); Fri, 31 Jan 2020 10:37:46 -0500 Received: (qmail 3449 invoked by uid 2102); 31 Jan 2020 10:37:45 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 31 Jan 2020 10:37:45 -0500 Date: Fri, 31 Jan 2020 10:37:45 -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: <482da576-e945-b804-3d36-65aee142e645@gmail.com> 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 Thu, 30 Jan 2020, Paul Zimmerman wrote: > Hi Alan, > > On 1/23/20 8:50 AM, Alan Stern wrote: > > 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 > > Ping? Unfortunately 5.5 was released with this regression, do you plan > to submit this patch soon? Oops. It totally slipped my mind, sorry. Thanks for reminding me. Submission coming up... Alan Stern