Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2426081lqt; Mon, 22 Apr 2024 10:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYCMMeVJnlTabiBoq+w3Z6iJ+4Ghml3I0bBLkfmVx8F8bFud1HKhN5Fs5lIOFUQum0GB5KSkMK8+swShSx0uWsr/38Vh2Io3XFGucNsg== X-Google-Smtp-Source: AGHT+IEutydxomCXriWtXE/Kc+Ktvlu+qpsb73G3Jm5pTcQF0ULUbLb50xHXACIhVpNPR66bhrgw X-Received: by 2002:a05:6a00:2d25:b0:6ea:c7bd:90e3 with SMTP id fa37-20020a056a002d2500b006eac7bd90e3mr366796pfb.14.1713806153276; Mon, 22 Apr 2024 10:15:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713806153; cv=pass; d=google.com; s=arc-20160816; b=0WkQo+5+Mf02Ryi+veFRl/iAJmaOyTlxQ5bxToetv7EoG+iCE3gxIUGdIfojIrw/nT FRlN/jONRtBZoO/nf3g/YlMIvH80JhsJ/VGgvT1Gy3Bn0TqtksAnXyPEVCHp7yhVBFFJ e8GMzv6E0iFsycu1mZgKMZlHRTNZr5RJpX/7CX+K1OJHhb/j4FKaoWO3rAzEKATT/2FE SE4kCd4IrFLnFZgtR31KfPcRt0bizZOD97p7nUFwhw+FTGXkdFxuS0mDtcL5M+dgAc86 Ame3laf5ETVNKEnX1bmSxwl1+jqg6Losn3jvDDTlKk3GMmfyS4qbdjnW3oGsm/NDYC5E gg8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=n+HLUjf4Ec921cDOe34OXWrTEtib0L9ZdmgXujdfGBQ=; fh=1OhJChnDVGQUyhsJJLtg5ecWs7GtxL1h2qKwXW0jPGY=; b=OQFfZNVGvGILVOXn9JZ8KHj8AC9xim1EYEQiTPWPZBPNNDfQw2aw3sGZyFncfkGkUw cEtF6ajzBzujK32MA0FW+3t5gpk6EhtHARPO721S4tKw9PXfg5tzApj1KKVWiCYRAn2R whuagv1Jd0YNN5KoPdq0JnMBtsc0O7AryUcI5vMABIMgyCBP5F4Bzs+4cbFZjN5AwC74 j8pg0A3u4o3ya85n/ncpnDfBiHmbst7BONngoe79AH/oF2IXx8EHfCzWtxWn2MVSl0ME lJ5m+230U8Vkmxwk6V4Jg8HOK/l9p1WeFzWP5xbOUqylSdChMaso1dACIthrOAhJawwT V+yQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ktNv6d5O; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-153790-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s3-20020a62e703000000b006ed26c096b0si8098676pfh.141.2024.04.22.10.15.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:15:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153790-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ktNv6d5O; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-153790-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BE01C281632 for ; Mon, 22 Apr 2024 17:15:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D58D3153BE0; Mon, 22 Apr 2024 17:15:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ktNv6d5O" Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (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 1BBF72EB11 for ; Mon, 22 Apr 2024 17:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713806145; cv=none; b=uL0+x8KuTKbB2A1ThY58CluDYsqJgNegX5/iWyP91YTJafKbTIC94J8bfM9YF8unmQraKWeZlbBTOxphZZy+22qFN0kUjshB6svO1F/r3/K3p0fTqnd90+WYPDKfNdh+KlXAl3NDVdgr927HX7aCpztVXPfIfPWsL0FDccUHEbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713806145; c=relaxed/simple; bh=RvtvAb8VvmVlvxNaACOBvlflPCF10iUZ1zCt9p5N8P0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=W9kp/kltmSL+qQ2R3k6zKV+BVUMHHMD7VYB4PGzx7IGDU7snrchklRzpYvGbR0lLkQAyg4k4ER8sfkXboWZNviF6AQBMEGvkWkZlSyF5zCAyPCxnuu3BQHpu0Vy4ThCtkumU+LGNvfoiIjJyLLcdt9EUnYsUIlIGcN9Lw/0596E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ktNv6d5O; arc=none smtp.client-ip=91.218.175.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713806142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n+HLUjf4Ec921cDOe34OXWrTEtib0L9ZdmgXujdfGBQ=; b=ktNv6d5OL7NoonVORzxhzZasbuDFvJvHYczqImWOGZYQPCcgBpOQCgEOoqkjXM6afPa2DS vEFiG1pTZqOhQE9/Aco6VqEHR0o3bC3ag16tCJBFgUw5pygFtmmzUAhWnufe4o3tG4l4KI bgI1JmZtJZhcV10KsnCZTTixhrwCD2g= Date: Mon, 22 Apr 2024 13:15:38 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] nvme-pci: Add quirk for broken MSIs To: Keith Busch Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20240422162822.3539156-1-sean.anderson@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 4/22/24 12:49, Keith Busch wrote: > 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. I wasn't able to find any errata for this drive. I wasn't able to determine if there are any firmware updates for this drive (FWIW I have version "21160001"). I'll contact WD and see if they know about this issue. [1] https://www.westerndigital.com/products/internal-drives/pc-sn530-ssd >> 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! --Sean