From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 043423D9050 for ; Thu, 4 Jun 2026 06:51:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780555904; cv=none; b=IVTlWUXlufleRcZuL8f4FIFpPF67IAlN8RhSjXDg86itcWBrADEwRWgU4PHuI5rr7qQ/7qSTN8Hmp8ewCuefm+zJnb+GybFP3IlBzbhZ1+cNaD0Fs4+7Rql6O7RXWhVsp4bu5Z+/uv8XfaSmyRWjLY4/jFOjf7hgU3LQvrX2Wr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780555904; c=relaxed/simple; bh=QPh7pXnQWAgvBseCTT3sjqUAdqx7C5ZI3IxDiLz3cjg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Sgr1uLmkPUqXlBGZYiaaGXXP2jMtJf81o4D8npR9l9KtFTI5WmByuAWcYgqONVvIYcyXosUSmUGdp6k54cLA3zlPLy7ZD44BYWXpo23rOBceR5al+G4sJVLCex+IWzyGM6GrQ0jJ4UVxG0ENSUNUlRQyCZbblIDG4NRqwS/xF1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SxqLIn7Q; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SxqLIn7Q" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-49068493267so2526995e9.1 for ; Wed, 03 Jun 2026 23:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780555901; x=1781160701; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=dsA0E2zRhI7EC9Ntl7Pf6hMb9UBTbaRJjBOLy9s7eyI=; b=SxqLIn7QY1cnFh7YWtCceRefAgMjU92rk/x0zLTJG7/Gyn8lWg/isG0f+9Y9j41uJE C6nRt12Md3MI5aSlZP9Kehm0lt1i0cglMSFCIDinoI/n3hRL7Frm4YKZqHdEJSVRMb63 dH0gFPBgwb5iTuNWM54lzooKyelCWu4PnWDzaxPWOK8uns0T6Mah+f6Obw4SaL6xwPYu l1l2GgYfISILDM2Ihi69hTT+kQV/Wq1IvYH6YqKZxhZRa5mvfab9n9pHnRK2V2FgfTVV PE21kX8V0a8selErhmz2Ky+VCSK1Jpj7ffkXxx8BBVfk3Kl85+rSCA+SA1HBAu4TwiXo /MNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780555901; x=1781160701; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dsA0E2zRhI7EC9Ntl7Pf6hMb9UBTbaRJjBOLy9s7eyI=; b=WPo9QvUCI9Tn+L3h4JfVmU/H096zlJuHTg1cegfEmx3YcCA8OapuuwXhq91evnpfif yYjXgf8XIBdfUbPfIW+0/noCW0q0tXXPggUS9Wvv8VFM7lq6y6rz1Sp5msZURzwlURKs wI0XhLVSXrs5VRGA1L8HPPY7hBDbt59oXp35WNrzgN5gss9Ph2eNqssB7MoRVOisEhS0 o8EoD87HBb8pvcF83JUy8kWS1v45TbRoO/vzq2u+4YPpps3N5mLMX2sEAgDDOYh5zoiJ GULN1lTLc8M5oHCH8F0Lrlk90ElkDhmc5+4RFrLNSaeU8esKCMHvoqBngTc23Dc5HDZB GqoQ== X-Forwarded-Encrypted: i=1; AFNElJ8yzEkyA0ODCqUkzBHRDLjo8iRctGYuN1MbaMS5d9u/gpSXsWtsm82/+o9n4FCEosmIKxtJPV70766nuLA=@vger.kernel.org X-Gm-Message-State: AOJu0YyWWhFV7YQtL3qa8ATm8o5jVtIN854lTt8Z2X+UamX478vy4mRk cK1lhExPogpCKjq6UExr+xS3svfl/7oViaDPc7UY8mOAW2r0+uvJgQ58 X-Gm-Gg: Acq92OFwqDRS2/LVcr2gUdk7IZO67a4qUibSnHnBUve/4H4+ci5ebX/Z8p5ugO5b94U XlKliPxQQaDO/AdPDvu3MEhzvAY8mQZsdyTYXlfki8pWo96gO6UFiTdl2bpc9pTfMNfiaKDUVAU fR1MMPaYRClb4e3lpOcvgJJmmLXKgkeJeZ5tuOj2Mm8+wHBfvG2tAKsXj0GqVNr/6g3VYBIEmTv yLm4De84zXhj8yi26bc2rzsr6u4n+RPpDbE2EAofZUyu3FHHf1qRSIOBAWm8zr3mrYPqmhuDRGE /ctrbwj/ryR+Oj/zk0D/wltmmDeii4b1WnH+0Qs0IedDd8nyGpKndPZjiXQVMb2vW9hTt56oomH yGKhio3cVj/q304y2iUPTPTqPPJ6M+nr2pWUD0hh4o98f4bazA2XGyp7r2HjSNxEuadDSnvtRw2 CAbo4iLt8vvl025eSf5Y5UP2d0u038n+0XjTkxa7S8um/Ktw== X-Received: by 2002:a05:600c:8b51:b0:48e:6db3:ff2e with SMTP id 5b1f17b1804b1-490b5ebc449mr104510385e9.15.1780555901284; Wed, 03 Jun 2026 23:51:41 -0700 (PDT) Received: from foxbook (bfe246.neoplus.adsl.tpnet.pl. [83.28.42.246]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b7a7cb85sm133041495e9.1.2026.06.03.23.51.40 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 03 Jun 2026 23:51:40 -0700 (PDT) Date: Thu, 4 Jun 2026 08:51:36 +0200 From: Michal Pecio To: raoxu Cc: mathias.nyman@intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Cen , Niklas Neronin Subject: Re: [PATCH] usb: xhci: limit ports on the correct root hub Message-ID: <20260604085136.6b20d2e8.michal.pecio@gmail.com> In-Reply-To: <185F99CE35DA6675+20260604034818.2734932-1-raoxu@uniontech.com> References: <185F99CE35DA6675+20260604034818.2734932-1-raoxu@uniontech.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-Transfer-Encoding: 7bit On Thu, 4 Jun 2026 11:48:18 +0800, raoxu wrote: > From: Xu Rao > > xhci_create_rhub_port_array() is used for both USB2 and USB3 > root hubs. The limit path always writes usb3_rhub.num_ports. > > When the helper limits the USB2 root hub, this leaves the passed > root hub unchanged and modifies the wrong root hub instead. > > Limit the root hub passed to the helper so the cap is applied to > the root hub currently being initialized. > > Fixes: 9a7ad750a8fb ("usb: xhci: move roothub port limit validation") > Signed-off-by: Xu Rao Previous patch for the same bug, Cc its author and bad commit author. https://lore.kernel.org/linux-usb/20260516033443.3646966-1-rollkingzzc@gmail.com/ I'm not sure how people keep discovering this issue - only by review or are there really xHCI controllers with more than 31 USB 2.0 ports? Should things be patched to support them properly? Regards, Michal