From patchwork Tue Dec 17 10:21:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 851636 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 039EE1E47D9 for ; Tue, 17 Dec 2024 10:19:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734430746; cv=none; b=owoyWYVMbRZ9xGmr+aLc0hNZAGciN179VJKd77CXYX5vlVlJIngXn0uJBwqTBkYGj54KbsswOSbk0sp1uIbnfkQrAGgbVuj4qLG18QSmWe9nJyO5GgQ9vZxHOkPq2o8CIRuuOcKftA8OzaDmT8neqU84wijDUjo3UqmxHeiDbOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734430746; c=relaxed/simple; bh=61FYFePu1X1dqyHSvL5pBpkDvUUljTgua5w3H/Pjd98=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ccgJkIhFzZnW6gcvWk1tQcXn1PYDxk9cnkv5vui8g0mAKV7iafoNemK3Ki6IB3oSYCju/AaOHDPIEbh2Xv3gfThjub5PlT6o7BR4dqcm/6efQIyC82tPdzVpbIz8G1pRbawT1t4Z05mHki8zigSBe3Iz3rNb2cazMo2fHbkqB5w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gWGVaesd; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gWGVaesd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734430745; x=1765966745; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=61FYFePu1X1dqyHSvL5pBpkDvUUljTgua5w3H/Pjd98=; b=gWGVaesdqoMkUR5Bg7EedLqcX2I3yC7GQZVDFNPzqiwCLwYzyrC4IBzL 3+ywKmyPF7rKts1vumE3fSzpfHAg4ePoANCbdVEt1c0Krp/shVW1GWbnE r7WFUl7joBkslgoenwRl5dWL0ppKPKMACKK4Xb5LgzmT0GB+83G8cSIGc A1/+36AvlSJv3wWp7/izYTrSkY6yoz587wMBMqus7dV26IzVOjEa9yWkp eNQr/9d7RuA4Eo9nmEP3KR2kixi7VxfEvUlJ9Mhevy8W3fsFKIoqLLFzI dQpkRQkFhfbBBKfeQEibhWuvY/71uJOxlWvka+DpdkpRopf4ITGcmUgMQ w==; X-CSE-ConnectionGUID: QjuTzg+7R6q03lQ3Ku/Akg== X-CSE-MsgGUID: q+0qtrCrQGmieCT+WFBaCg== X-IronPort-AV: E=McAfee;i="6700,10204,11288"; a="60236812" X-IronPort-AV: E=Sophos;i="6.12,241,1728975600"; d="scan'208";a="60236812" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2024 02:19:05 -0800 X-CSE-ConnectionGUID: exkqdSGTQR6h5cWyWois2w== X-CSE-MsgGUID: GUL4sb0dQo2tiSbZ1Hm/fw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="97335961" Received: from mattu-haswell.fi.intel.com ([10.237.72.199]) by orviesa010.jf.intel.com with ESMTP; 17 Dec 2024 02:19:03 -0800 From: Mathias Nyman To: Cc: , Niklas Neronin , Jeff Chua , Mathias Nyman Subject: [PATCH 2/2] usb: xhci: fix ring expansion regression in 6.13-rc1 Date: Tue, 17 Dec 2024 12:21:22 +0200 Message-Id: <20241217102122.2316814-3-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241217102122.2316814-1-mathias.nyman@linux.intel.com> References: <20241217102122.2316814-1-mathias.nyman@linux.intel.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Niklas Neronin The source and destination rings were incorrectly assigned during the ring linking process. The "source" ring, which contains the new segments, was not spliced into the "destination" ring, leading to incorrect ring expansion. Fixes: fe688e500613 ("usb: xhci: refactor xhci_link_rings() to use source and destination rings") Reported-by: Jeff Chua Closes: https://lore.kernel.org/lkml/CAAJw_ZtppNqC9XA=-WVQDr+vaAS=di7jo15CzSqONeX48H75MA@mail.gmail.com/ Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 15db90c54a45..92703efda1f7 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -436,7 +436,7 @@ int xhci_ring_expansion(struct xhci_hcd *xhci, struct xhci_ring *ring, goto free_segments; } - xhci_link_rings(xhci, ring, &new_ring); + xhci_link_rings(xhci, &new_ring, ring); trace_xhci_ring_expansion(ring); xhci_dbg_trace(xhci, trace_xhci_dbg_ring_expansion, "ring expansion succeed, now has %d segments",