From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C8B620B80D for ; Fri, 10 Jan 2025 15:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736523899; cv=none; b=DhtTenSo/4zVLM/aj2xMTXcfC9q3t8GYoysR+jbPnTUotsSbcqLgOypfnJTvIfIcxl9pLR3gajkqDqngWxMoMXQRZ1yW16z51QltXIcpeRAm4ivMRGCXfMUMdMiZSnTvAxgGkdtTYj6PiUKC2EcwYMbrHhY1D6bYnAnSSmSS77A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736523899; c=relaxed/simple; bh=2YHd/xEIXsTeUXVN4rOdVMuCXbGDJ+OJX04WA75eC3c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pj6rYfQ7sXsCvBDF05ea/Ztmh7TdSIL2+U9ZalOWpWh7NuCD/wriUL9j6q//Mv++25Zfoj3C9JS468Jsw6idC9RQRtA/eDTbnVA8vab26MWjMIgreTY3znMZcUq4/XtuMasuvwF5Aj3deJH0iBphu3jLFTO1WUi3lBx5IKAwXW4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rowland.harvard.edu; spf=fail smtp.mailfrom=g.harvard.edu; dkim=pass (2048-bit key) header.d=rowland.harvard.edu header.i=@rowland.harvard.edu header.b=USXoiDRm; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=g.harvard.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rowland.harvard.edu header.i=@rowland.harvard.edu header.b="USXoiDRm" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6dcdf23b4edso18334116d6.0 for ; Fri, 10 Jan 2025 07:44:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rowland.harvard.edu; s=google; t=1736523896; x=1737128696; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MapozRkTPgyA0rzoSDPzN8c9CZKYG/kmmqSvGjXwZIQ=; b=USXoiDRmptalGBa7n528wpp7kR+qvYGu1qwHdHAuThRpZGFKbEpGZplyrTE1IQ783t 4l7Y/Bd/UuVvPz6zoE7STbp3MXoMVmD+ZnxQH/CDn6AaOuJw01WBWeNSmMUmMQwgw4OG YEm1lWKRy0AaCcI0JUMe+V3wxEM/ITElHA6Kcctw3JlK3slGX9lnsTBz70FFL0vWRuQE R1o3sq34VqkmD7e0wmWiOBBZftJE9MqP/htu1DK9qv/ac2lZziNVqG88trRkTpplVo26 z7R17dm99GIrQlgnMuu7PVeiX8WygYBWzS5Hf7jfUzw+TV3oQdWa2o+Yu8NRr7WT2y+U Ul7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736523896; x=1737128696; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MapozRkTPgyA0rzoSDPzN8c9CZKYG/kmmqSvGjXwZIQ=; b=Fu0XcWLcXtgt9XB2Q2MEwALXqaL5XhEO35zcyjgRNA/EKhMjtjE5L0Phrn7X+FBRQ8 6G0Gk/IUiW79olq+pTQUjwIF/quzxONvgbLOl/fu5hW64OgTvFjWK4j187TWZAPOLLP/ pxQ7omt6+Tii94WPthjVmuTLtLd8h0b1A/R2TFKyI/9QOvEt/hharzbwaikrqUwPHg2R j6dmn/hLZy7wkj/SJTqoMt02XrLE1Jfw2RQe2O8/nmfWef8OtqgBNzvPSw9op/Biajpo 4kge1MQT1K87srPu2j3wpw7YDwLmDRwwVwKKICSrCXLusO4Pu7XqFv6MB/o/j2f2iffB UOHA== X-Forwarded-Encrypted: i=1; AJvYcCWCBFyv51L7ymvgYKq0cT1UFu+HhPXYy1DoIunZXcADZY72MXhsXGJFfK9h4uVLz0fNqQ1Ni4uIPhV6myU=@vger.kernel.org X-Gm-Message-State: AOJu0Yzek9N0sp0JLMpg2bsK4nUnmzchYBLWz22/6suHhE7fLn+luv6Z JpmSFkKM2i0fhvmKVd2DWAqIdV3D+4NBh9jZjOEQZ/H3DReTFMxsOYB9lvABHg== X-Gm-Gg: ASbGncstVywwV3S1gkM/F1b8ds6QJzWOWqbKPaxzmK46HqoUPHIW+l88Yts/0w9QJA1 KlIQIqj9dWS84SAiPGVTxjVEHwfUmPN9Ca34J5bDIrK6/RwTMVoy9aB+1OkrbkRrGESki/2N0IS mIUA1oNEDBvqM9B69laTB82bPOlfjBBszMyJR5CGTfO572rcvZROWQ2p5DRuVHNMwg31SJgell7 1CfIRb3P9txBf4f1j7HwPVa83gizF5uxUb9YaZOGjHdaSqYr5y+O5g1Bg== X-Google-Smtp-Source: AGHT+IF0RpZocJNE1ArqvKlBEjytgNfQVhmD91xG/c7hrqqcIVnudSSTZQaw6Jur8F228MQhz3Qpqg== X-Received: by 2002:a05:6214:3c8f:b0:6cd:ec00:205e with SMTP id 6a1803df08f44-6df9b0eda40mr178930136d6.0.1736523896606; Fri, 10 Jan 2025 07:44:56 -0800 (PST) Received: from rowland.harvard.edu ([2601:19b:681:fd10::bde5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dfade73245sm10216446d6.76.2025.01.10.07.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 07:44:56 -0800 (PST) Date: Fri, 10 Jan 2025 10:44:52 -0500 From: Alan Stern To: "Yo-Jung (Leo) Lin" Cc: gregkh@linuxfoundation.org, rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com, bhelgaas@google.com, duanchenghao@kylinos.cn, dlemoal@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, hdegoede@redhat.com Subject: Re: [PATCH] USB: Prevent xhci from resuming root hub during suspend entrance Message-ID: References: <20250110084413.80981-1-leo.lin@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250110084413.80981-1-leo.lin@canonical.com> On Fri, Jan 10, 2025 at 04:44:10PM +0800, Yo-Jung (Leo) Lin wrote: > The commit d9b4067aef50 ("USB: Fix the issue of task recovery failure > caused by USB status when S4 wakes up") fixed an issue where if an USB > port change happens during the entering steps of hibernation, xhci driver > would attempt to resume the root hub, making the hibernation fail. > > System-wide suspend may fail due to the same reason, but this hasn't been > addressed yet. This has been found on HP ProOne 440[1], as well as on > some newer Dell all-in-one models. When suspend fails due to this reason, > the kernel would show the following messages: I believe this problem was discussed on the mailing list before, and it turned out that the issue was caused by a bug in the xhci-hcd driver, not a bug in the USB core. Basically, suspend is _supposed_ to fail if a wakeup event occurs while the suspend is in progress. As I recall, the bug in xhci-hcd was that it treats some non-wakeup events as if they were wakeup events. In particular, a port change on the root hub should be treated as a wakeup event if and only if the root hub is enabled for wakeup. Does xhci-hcd check for this before failing the suspend? This reasoning shows that your proposed fix is incorrect. Alan Stern