From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 327452D7394 for ; Fri, 14 Nov 2025 11:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763119958; cv=none; b=qwL98+zbvt61w9siSZQbeQoKmBo9/D1OnTTPYCCXpVg7c+oR3XK0wKkg6dSFEQh4ozBq8jjA4/aDC83xIsMnAeKmHdjIBTIbhZ1Y8TSZYT6QiVn0nOsYAsx6xkCwPJc3f3dMAsAm6/f+8lgauH0seBtyw+bcEh+VVxUdfqsgaa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763119958; c=relaxed/simple; bh=tw80XQS7gcuhFgq2e+0cR4mYBq9i/GPA8MIbGKKIyFg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PnM7s4gyq8zcQQIlKxP6EgRdhSm1vU9jLUgvYGvVIqCT3sy//pz9xpSw+VWq0pAK098AZaPVAF+ZHf84zq5IpdBkr1tEWupgFk6HjzIJQvhw2+x1rxHE5SEekZavyh9xyCqC5oIgGSKEKWV16tSuIMuLpqpuhi8xMCA/RxTLchQ= 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=UG/B5ipj; arc=none smtp.client-ip=209.85.208.53 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="UG/B5ipj" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-64198771a9bso3515604a12.2 for ; Fri, 14 Nov 2025 03:32:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763119955; x=1763724755; 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=nwZ9IwziRvv511z74P1bPB0EzRXrY1p+mRsnhsQMPA0=; b=UG/B5ipjGtsz59MpTmyZ1H6SGVAiMwpgp4+QvcMr7G5M9RDdxiQWhFsvloC0B5gmex iFAFzMFZPPd+MZpf+tn1cnFPHE8P+pj8jaNRlCCiMs21Cn47uaxQFzpyNVn1C0v8H2MO unF15FdZV3i+VzLe3RCziSwQih3hPV8h1y7Vl+iE1+y7mGctT5D6ttWO51fAIL7qM83J 7qbIR9EamtatGGMi/QxQDS6zvX/KrjWYLY7Ztk8n/l6tgyK+pEkp+WCYHAFDWvou60OE 7YXdtRgJLmo8tV0cC1ZX3erk6cWUjvUUCJcpQ34jIyjefygAl4KpwHBfWWZJfb1C7vGb K5mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763119955; x=1763724755; 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=nwZ9IwziRvv511z74P1bPB0EzRXrY1p+mRsnhsQMPA0=; b=M+Jgyqa9uMMl0gDIWftOG+G8ZjqnpVRGFWOXEkDs+JFDlPI63Rzo3HXHTdWkLFfil6 uuH1LvWdZRRUsi1sOmg7ii0ftb1R4MCRvC2PwC2GhkzgtPdevef77B4czaNQh9PeiPoB lrEUpHQzH7ohFQTDRspuG2wkCqBEs+O4mK5u93Z13qEJFnqRjqm88N6JgChrJxC9H1HX walXPzeYDb/n1qhvLJ9nXuvyyePc7jUeRlMa2KRR4rk3ocKlUm07M5XFGwBe1HSsBs/k jjI/6uOF6SJnrVes3lIwyxhzrjITcxmn7pAUErGBUMpWPGHY0p9nWEP0+70XfcsObMGq uxWw== X-Forwarded-Encrypted: i=1; AJvYcCVO1BHXGNBKWXOzcTa4NeuTfZpspisbAnJ6euCb+dFGpLMH452s2lCjd7TJcuGyXJkLKdCr1s17MTpEU74=@vger.kernel.org X-Gm-Message-State: AOJu0YztMMsQJ9n2sjaxb8GwYvAE4zS6AKJ8/48vh7vzJiMm/qrqfg7V u+RvmcYxnZWO457HdLvwqoJa9+nQKQNStCXzg2XwRYcwA3y8QE89rwhd7DuopQ== X-Gm-Gg: ASbGncs9y+Grcx4Q2h9OcZpvbwJ/lwUL0HUCaGou7WxwAJg4NS5GQuNnvumF+uaJejD LgfwZ72UGBeANrPd0Qr/gSWu+8dPfXCxCNXliBtx6MGalIVwFbc0BW5IzyZeA6S4eT3mfvOe1g5 wvgWZSr2BU6NF82WNUYp9y6ErevErceVzXB7Za5A0CudK6Q9A0ZTzbKAjktxGWWHbdeRFOxh1CT SVRUI7gjwZzIm5Rxm3JetyKeFhjEd1XdaAKEAO/t0NgiMTXgwkuHqL0IHx0vtv7mr4GU4Fs6bCj hVb4r28qk1NIbb55h8w6Y2LaZhFEgnx3KTgHg/55QsS5C0a7uvwO9ekWgCwTA6MN2L33npmjkgl /doaQfx0GfctlBV2dZcDgQTvWuJz/XK40+VGoD+eRI6AtJhmuOjyS2TEx0sQxUTPhMZ1DHf5Nyw 3ZM0qzfMx9nSKXXAkUukd6 X-Google-Smtp-Source: AGHT+IHebChlUiARMNvR6+Q9RxaISSKBoJQh35WzGk3JES1+Xu8Hf9v0oU0TQYODRELhd+YOSDmbRg== X-Received: by 2002:a17:906:c153:b0:b73:5c12:3f8a with SMTP id a640c23a62f3a-b73678d2c5fmr307412666b.18.1763119955406; Fri, 14 Nov 2025 03:32:35 -0800 (PST) Received: from foxbook (bfd52.neoplus.adsl.tpnet.pl. [83.28.41.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b734fad41e5sm365888866b.19.2025.11.14.03.32.34 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 14 Nov 2025 03:32:35 -0800 (PST) Date: Fri, 14 Nov 2025 12:32:32 +0100 From: Michal Pecio To: Mathias Nyman Cc: Mathias Nyman , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: xhci: Don't unchain link TRBs on quirky HCs Message-ID: <20251114123232.0b96bfa5.michal.pecio@gmail.com> In-Reply-To: References: <20251107110837.7b7d686b.michal.pecio@gmail.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 Tue, 11 Nov 2025 18:19:38 +0200, Mathias Nyman wrote: > On 11/7/25 12:08, Michal Pecio wrote: > > +static void td_to_noop(struct xhci_hcd *xhci, struct xhci_virt_ep *ep, > > + struct xhci_td *td, bool flip_cycle) > > we could avoid passing xhci pointer to td_to_noop() and just grab it from > the xhci_virt_ep structure instead. i.e. ep->xhci I can do a v2 if you want. But OTOH, I didn't expect such pointer to exist (though I'm sure I must have seen it many times) because it doesn't seem strictly necessary. Maybe do the reverse and get rid of ep->xhci, or stop adding new users and clean up existing ones along the way? Main users are invalidate_cancelled_tds()/giveback_invalidated_tds(), their callers all have xhci and could easily supply it to them. And we even discussed removing the latter completely, but I got sidetracked by issues with URB_ZERO_PACKET. Another user is xhci_handle_cmd_set_deq() which already has xhci. I have a compile-tested patch which removes it completely right now, it took five minutes and zero mental effort to prepare. Regards, Michal