From patchwork Thu Apr 7 20:00:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Nowakowski-Krijger X-Patchwork-Id: 1614631 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=uSDT9TH0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KZC1k61jzz9sGP for ; Fri, 8 Apr 2022 06:01:13 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ncYJR-0008J8-G2; Thu, 07 Apr 2022 20:01:01 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ncYJP-0008Is-Bw for kernel-team@lists.ubuntu.com; Thu, 07 Apr 2022 20:00:59 +0000 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 112673F20F for ; Thu, 7 Apr 2022 20:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1649361659; bh=8UpoVIhWKw/yTgkZZTZaGOQuqeUzf/yZ/sGHA9Fbo58=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=uSDT9TH0ZbCuoPgoZRhNcgjofiLPT5nIK+XiyRTd1EBxr62LFqaxgT5THuo/zFYHv O8IZdg0L7WLTgMwuqJYhP8CxhffiCIGawJwR2NuES2qCu4CtWr38YUU8HUJWsjdAiq l9M4xD1iI4iPZXcfC2bkW59OTdAlPI9n6ld+iuifmYdshAHSvuXmgbQm10hh6MTelC gJVesAyobaeQddeVeip937UY8L/HaJVlarVleKnHC/bjR/mqUbgXGugmccd0zaHfT+ wUVdgOo15Rismr281QD7Elv2j3Z8AGUhRKObjTSeC3P5zTvD/obUVmrd0z9gaSsTAt KFfS96a67mr6Q== Received: by mail-pj1-f70.google.com with SMTP id c9-20020a17090a1d0900b001caaf769af6so4101498pjd.2 for ; Thu, 07 Apr 2022 13:00:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8UpoVIhWKw/yTgkZZTZaGOQuqeUzf/yZ/sGHA9Fbo58=; b=ouzCuO0dg/+lXxk2qfh8jJQmXMT+Dnw8PwBupC27V0eede0FwFqmIN7ofZoW3A9jXL 9K4hGrfGouDg5IiFFWVLOoRY+hH3J63PdMG8tN6c7u8rxRporsBToEFDx8jjhKu6v81v r8XiKHA9dnqAohC2IjYmnMsZOwimIBir0b6eg0sdq1/zUlLwYTN96C56zSXx5CkggzvS fd3zPtB0H7E6KdYZAU6alqHnIucNQ+jBHIrWNkSPPbSlh3nk3v0Ttx0Di+r4JoTd57kJ akRcOWpEx8oIJRM3tvz0tW4ldEoNdHw1Z3c/KkYZSQ1LzcA14+bMdi+yfL4puM5kBKdH EyBw== X-Gm-Message-State: AOAM5305W3++Oe/GObMHZH/4h+H+CwKYnFbeR9s6Dnaj56zV2wbL+3n5 txvmnepxE9kMPPSB20cSEqRd0YKkXVx8CpCf8sJVBFK+2ovZ76n8javTMaN4QDy+C8kjsJ1mAJc IxM1KxpN+WnpGFph69KSpX7YvRNleaEbhmIu88F9+Ug== X-Received: by 2002:a65:6093:0:b0:373:9c75:19ec with SMTP id t19-20020a656093000000b003739c7519ecmr13023639pgu.539.1649361657098; Thu, 07 Apr 2022 13:00:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeW7ad4TegEbhbkuRpXOyeYqdy0ZCW/mCzQWtGxDH1yiJkW0CaXFhKHpwrOdj7jy3xUXol7Q== X-Received: by 2002:a65:6093:0:b0:373:9c75:19ec with SMTP id t19-20020a656093000000b003739c7519ecmr13023618pgu.539.1649361656705; Thu, 07 Apr 2022 13:00:56 -0700 (PDT) Received: from luke-ubuntu.. (cpe-66-27-118-101.san.res.rr.com. [66.27.118.101]) by smtp.gmail.com with ESMTPSA id e13-20020a63370d000000b003810782e0cdsm19661273pga.56.2022.04.07.13.00.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:00:56 -0700 (PDT) From: Luke Nowakowski-Krijger To: kernel-team@lists.ubuntu.com Subject: [SRU][F/I][PATCH 0/4] Fix USB devices not being detected at boot Date: Thu, 7 Apr 2022 13:00:50 -0700 Message-Id: X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" [SRU Justification] [Impact] There are users with certain intel xHCI controllers that are experiencing problems with USB devices not being detected at boot. This is because when the primary roothub is registered, device enumeration happens before xHC is running and leads to devices not being detected. This results in the error that looks something like 'usb usb1-port3: couldn't allocate usb_device'. [Fix] Register both root hubs along with the secondary hcd for xhci. This original fix was reverted upstream due to regressions that occured due to racing that happened when both roothubs were registered simultaneously. However with those fixes being addressed in commits ("usb: hub: Fix usb enumeration issue due to address0 race") ("usb: hub: Fix locking issues with address0_mutex") the maintainers have stated that they will be reintroducing this commit. So lets reintroduce it here to fix the issues that users are experiencing. [Test Case] Confirmed by Chris Chiu that this issue exists on similiar hardware reported by the users and that reverting these reverts fixes the issue showing no signs of 'couldn't allocate usb_device' and with USB devices available after boot. [Regression Potential] Should be low now that we carry the fixes that seemed to be caused by this patch series. Luke Nowakowski-Krijger (2): UBUNTU: SAUCE: Revert "Revert "xhci: Set HCD flag to defer primary roothub registration"" UBUNTU: SAUCE: Revert "Revert "usb: core: hcd: Add support for deferring roothub registration"" drivers/usb/core/hcd.c | 29 +++++++++++++++++++++++------ drivers/usb/host/xhci.c | 1 + include/linux/usb/hcd.h | 2 ++ 3 files changed, 26 insertions(+), 6 deletions(-) Acked-by: Kleber Sacilotto de Souza Acked-by: Khalid Elmously