From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (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 C0A5B19ADA4 for ; Sat, 6 Jun 2026 16:46:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780764375; cv=none; b=UGRFXbognKjmdCH4PBF8NA9NqvrRuYmpDXCWlu/xBGGsOx3a+RwhaQ4VZDq0Dwh7bbjQRn4uUzHsCXVdiArAUiagBGDIlIDnMU/hadRYKUZlKJ81wyzTSb+RSHf19OLqvWHWQoUnnvEn34jowkcIfPnd9F3TUOCthRF1JYM8hQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780764375; c=relaxed/simple; bh=Ff8Fy4eHBG4/BzHVJkR4pQSm6mkilhlVqPXSRn/JWGs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Nx2y/iVJigEuzo+uyQaRt5/aYE5EHmQ5HhBs/wo9nP53huM+5ShvFGSAVRySPZVT33xbKcyGZ9lj7sZz3CGaz8CN1FbZ+93xJqG/b1CWvoscPAckA52yQe6XF6LDpF54l4XP22vl3rgfsAamg77zmyI9GmH5PHV7fEsqKfYakzM= 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=YD9cyWPL; arc=none smtp.client-ip=209.85.216.47 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="YD9cyWPL" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-36da8439078so2693076a91.2 for ; Sat, 06 Jun 2026 09:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780764374; x=1781369174; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0CCEPdnbAf9O7YZGI5gomWMwSVZTv0vCb5M8aGMFXew=; b=YD9cyWPLe7Om9gTD9xlLSCsndVlk600zJgKyg73eBbs3Cetp4QJFo4Eo8ccb9N/9pD HVIAiAe91fDj3fUPIV3TIa6bZdDs7S5f74j+ztJJAnD+a83fyMlxe/tXVQXkUbTN5c9r IK9YCQZTtmhvPZumhkWBvxsfnZYA84ubcQ0yi37suqIiU95sGEm+mvyyib3XeW566fHs hFqVhjVbtdabfnKukOVTk4REUNfIk7/hJlF6fpX5YMBkQnod8UmVxNmJFzvR1R43FEQ1 bMM+zuNh9mxpvp1B0P6fbTFL9eXd+IkZ8W6xji/8/PnbVBoYX4iaKLAa+Qz46r3TM4dA GzUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780764374; x=1781369174; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0CCEPdnbAf9O7YZGI5gomWMwSVZTv0vCb5M8aGMFXew=; b=D9jL0CXTd0XS8lTtdhFrFc6wdVhSxA/FrGSa5nZJHd5MVQbjZsjh/NJLAubaSKtcXO EpxRlAoiiDYY1PELKNrR6EDuY9lMdImuW/tSp4ja0jEVwdXy8AXJq0Q+EtoU/QdejK+O RmDflQL9MYxkFeDHCcQpai+QskatLlM2iads/wTlGfQ3+RFIyUSjumO+Y97IOeudaB53 OIALcNYrfP8wRNQ57q4MMgBsoR5Of1qVT1SyGBCs5VnLSXvuKXUDrDsdkSovItd2/yCD pvFfWFUpFYF17GkR78hbxCjAtakgOQBLZ9RJOcSQZEVmwXhYOthFiBzDQzUO+MQ/RHRw tIwQ== X-Forwarded-Encrypted: i=1; AFNElJ/2s0Tq3x1FB1JQGew8toYr671TcfNJBgKC0TCQnQM8rBh5lUKW2oMAII9bTFEeGM6/VrACat5vVU7ne0g=@vger.kernel.org X-Gm-Message-State: AOJu0YyA8cOc+jCmN1WQS5664EjdUy4xWzuyGFuh4qf+uVsYfahgnyI6 B56ytj2HOrab923cl8GruSiG96i+rksvxTS30xvAh30ohOs7L8FASByN X-Gm-Gg: Acq92OFZ2nNMzTqfjPa5Nhl//ZCeOiuaOYnRv5BXDUMACSTf3ZdKzAx4xg9jLfAAXRI 7McqsG9pz7B26CcSK9pK5fdEuYOMo1/sWQbsIOlR7mwDr3Hsk6QEcao/DdeaKX8+pHkKjVLadjB dFwW5ByFtdWhCFZeu/n8o15gCcMq6/XtIwZjzkqxEonCmRauk2Ag2vQ6bHdnQfEI9/B5sc/xq0A ML6f71VGSScgwADcrqEJbpeEFDWlnHoVRCu06ZbPf3HgfhV85Bl3RdUlSCNR4z0iXWXEPuEPtcK 39l33Tanwgh48fY+kUbhpTdN2mUwdm00NB++6gx2dE/umqbpeXZpsP0hcwcaD7EWAKYLJZfZQHe KDsHYDxmM02wcVlsC8JxLv5zQVSslF0pCAMPt0mN0vzCT/O9Fq7/ClWXYK3SJtLEYuo4XmEfM4i 6PzO5YvYiYDPFUMZpDy69aufGBMpV2U5sEgVLjYZZlxQ== X-Received: by 2002:a17:90b:1ccd:b0:368:a297:bd38 with SMTP id 98e67ed59e1d1-370eedfff8dmr9852447a91.7.1780764369256; Sat, 06 Jun 2026 09:46:09 -0700 (PDT) Received: from [192.168.1.111] ([223.122.38.120]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36f714e26afsm10414758a91.17.2026.06.06.09.46.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Jun 2026 09:46:08 -0700 (PDT) Message-ID: Date: Sun, 7 Jun 2026 00:46:03 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] nvme-apple: Prevent tag collision across queues even if tag space is shared Content-Language: en-MW To: Sven Peter , Janne Grunau , Neal Gompa , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Yuriy Havrylyuk References: <20260606-prevent-tag-collision-t8015-v1-0-93ccf4eca550@gmail.com> <20260606-prevent-tag-collision-t8015-v1-2-93ccf4eca550@gmail.com> From: Nick Chan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sven Peter 於 2026/6/7 凌晨12:12 寫道: > On 06.06.26 15:25, Nick Chan wrote: >> From: Yuriy Havrylyuk >> >> Apple NVMe controllers require tags of pending commands to not be shared >> across admin and IO queues. However, on Apple A11 without linear SQ, it is >> not possible for either queue to skip over some tags and must go from 0 to >> the configured maximum before wrapping around. >> >> If a pending command tag is duplicated across queues, the firmware >> crashes with: "duplicate tag error for tag N", with N being the tag. >> >> Instead of partitioning the tag space, which is not possible without >> linear SQ, > > Isn't that just what the pci.c driver does with NVME_QUIRK_SHARED_TAGS > for the T2 macs or what we do in this driver with > if (anv->hw->has_lsq_nvmmu) > anv->tagset.reserved_tags = APPLE_NVME_AQ_DEPTH; > ? After adjusting the apple_nvme_submit_cmd_t8015() function to account for the admin queue depth, it seems that the existing workaround for M1 of reserving two tags for the admin queue works on A11 as well. Will post a much simplified v2. Best regards, Nick Chan > > > Sven >