Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2410708lqt; Mon, 22 Apr 2024 09:54:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUIwwYLz5+uJ/PclldyMjB33Lp3MQprzInfDaVSe8JLSuFxUux8EnCYdxxlMnc21YdfYb4pieiBWIpQgnqqDsmQU7GtvVKOP7HnM5EJvg== X-Google-Smtp-Source: AGHT+IFprx5ScGuIkmAM4zDLcd3/YC1ScronHPOHlSZVdQSejTBfdwKxxcUGtIX6AfeMJ3hRO+Yw X-Received: by 2002:a05:6a20:9144:b0:1a7:919f:2b60 with SMTP id x4-20020a056a20914400b001a7919f2b60mr12169034pzc.37.1713804851964; Mon, 22 Apr 2024 09:54:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713804851; cv=pass; d=google.com; s=arc-20160816; b=GOCq7cICREcMrkyx+cI52Tszowr3HGv46bFDV8TuaUyqufkugVtFIxROHGTdbWStY1 Yq2ogXtGVVfD1bfBQPahkdQg2xi94PagQDZPy+AhJs++7RRvf9Vxnlw0ZdfiT4P7Mxrs OVRcQmyeLJT0V8zTcFKOpMkW0cNxG2jHAnkvi5eRzRH/KPcvRrnVnIRJx6dn2vDIrMED ftPf3ZQSPkMHUnLxfJ5XFfxdpFkE0j9R/p8MtauHTWpHIBeuiFX7+KZNpgm87xb44Mxi 9u3lOeGMMU9KwYM+N+3+Wj7AyrmQ29Gf+iPqiGC1xbuZz1Y+lPs+JfSwNKVJX4q8yDZA MHCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zFTLg1FWbQhUEReUEmSx616tImka9TKSXnRCMadk9Ng=; fh=AlpG14Ei/zegrHew1EHvwDqPf3fbp/mMdWYJ1vsb4CY=; b=yRNH03ETGOhMQL1PF6+Vs4j1EJrFjD7umYG/dbaLifWQarJfDw2/Dc2vK1YOOCbYyx rc5IE7UDrkk2Ugv+Hy4G/p/QULhCAL/JzwAt9+r649AJgLLRS4pHTgKh5tdbIldgfRj2 SprpvnNUz+fXJyHRb7VAnfLXSm04D66F7XyfJhdB6xg+iUTxZq1hP9Lem7lxsnCiQXR0 v8t7lGoDem5iFfwcg/8MfQ53XlT3dRzxgVR6bZSQAABFfE3yhLTXKjzJzndcUzFr8pmY oDQ+Ho0jjKcS93L4p/1a8wDgku3pbg8PSeptwJ0yqYTPNChRxAMhYkP+AIk1Y3MgaZDW cm8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ppG1k03i; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z20-20020a63ac54000000b005f7f7612dbdsi6271785pgn.834.2024.04.22.09.54.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 09:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ppG1k03i; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4740FB23FB0 for ; Mon, 22 Apr 2024 16:49:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17898153832; Mon, 22 Apr 2024 16:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ppG1k03i" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3CC6415358B; Mon, 22 Apr 2024 16:49:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713804565; cv=none; b=Xz3bx3IV33JvEfUpdPzB27U2i++CHXQ6c20erigRtVUBEfwAHgG3sxEjALVrSY+HEqC8SRmUyZTxiVSfryNjCSLdZLmYm23hWDS+xsfHGGpgAXP2Yp7DmA8hJHBtEXb5khvDSSp5JXi/FOtPBBZtpGIDb7Cd82PEH9dn1sEwAHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713804565; c=relaxed/simple; bh=bE7FnNf0IfF6MoCHb9dCmSncIpBLHSLJiBoyZV9ggi4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pbg/amPVkLU+Azq2gbOY9wsQ4FXDkfbxqf4/jFCYBZ1L7oYK3jstq9N7HQ1bWX9M9aj1cqZYoKmJA8N86iNVJg0n5BpoDe8vXHW0kiCbfLcbxRJgSGJgQkmL9ifiqHr4LY8FhEQpihOMlSFxRGZT+DcRVhtS45S7Ofm96p2fuoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ppG1k03i; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D288C113CC; Mon, 22 Apr 2024 16:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713804564; bh=bE7FnNf0IfF6MoCHb9dCmSncIpBLHSLJiBoyZV9ggi4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ppG1k03i2NISyJrq0pt0EK2X7yPyJCIHkbhBuDL6UEkj8sTffH7g7HZDyMtHthVaP vkHXwN2hNBJNBRe+K6mUxEL1kz7Nt2SbwVx1EoZfWaejolEsw+Adq2S9oee35kriz2 dsU+aET/4u3jOI0ZzXzdoJDRD+9GBBSKWV5LcCaKZVyXEHx7tCUe17JXTZftW/UP2v HN9lWXtsexyH2jUQftjtPF/rSkvJh7X3Qujva6UQvsW793Rya+NN7FSLReZ+xvnhly D8buqfFb1Ic7QI32HJeU0kW2EYLm2Sat4TWA0m3ZNozke/Th3C/W4ofG6WqWD0vN/7 gbSu/9F6cKdpw== Date: Mon, 22 Apr 2024 10:49:21 -0600 From: Keith Busch To: Sean Anderson Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] nvme-pci: Add quirk for broken MSIs Message-ID: References: <20240422162822.3539156-1-sean.anderson@linux.dev> 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-Disposition: inline In-Reply-To: <20240422162822.3539156-1-sean.anderson@linux.dev> On Mon, Apr 22, 2024 at 12:28:23PM -0400, Sean Anderson wrote: > Sandisk SN530 NVMe drives have broken MSIs. On systems without MSI-X > support, all commands time out resulting in the following message: > > nvme nvme0: I/O tag 12 (100c) QID 0 timeout, completion polled > > These timeouts cause the boot to take an excessively-long time (over 20 > minutes) while the initial command queue is flushed. > > Address this by adding a quirk for drives with buggy MSIs. The lspci > output for this device (recorded on a system with MSI-X support) is: Based on your description, the patch looks good. This will fallback to legacy emulated pin interrupts, and that's better than timeout polling, but will still appear sluggish compared to MSI's. Is there an errata from the vendor on this? I'm just curious if the bug is at the Device ID level, and not something we could constrain to a particular model or firmware revision. > 02:00.0 Non-Volatile memory controller: Sandisk Corp Device 5008 (rev 01) (prog-if 02 [NVM Express]) > Subsystem: Sandisk Corp Device 5008 > Flags: bus master, fast devsel, latency 0, IRQ 16, NUMA node 0 > Memory at f7e00000 (64-bit, non-prefetchable) [size=16K] > Memory at f7e04000 (64-bit, non-prefetchable) [size=256] > Capabilities: [80] Power Management version 3 > Capabilities: [90] MSI: Enable- Count=1/32 Maskable- 64bit+ > Capabilities: [b0] MSI-X: Enable+ Count=17 Masked- Interesting, the MSI capability does look weird here. I've never seen MSI-x count smaller than the MSI's. As long as both work, though, I think nvme would actually prefer whichever is bigger!