Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3880610pxb; Sat, 6 Nov 2021 02:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKRX8iTdqxtUssfLPhdYcl/DzOWD/hPze6Eiby0a7S1X2pLsGH2ZhI83ckIVGbYlmDv7X5 X-Received: by 2002:a17:906:7305:: with SMTP id di5mr58301538ejc.182.1636190603147; Sat, 06 Nov 2021 02:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636190603; cv=none; d=google.com; s=arc-20160816; b=EfL48M9vHMSkTSmtq6cHKhR9DkBndfwmFB1WPaemVq0i8w+3uMxpjMlnCIUlxHv4GX eDQjHkMXeBekA9gqvU4ISnYIRnS5kufuC8mSgKSXL5RQr9xU2LWik5HpY1ruh+nLiUpn /l59MJ6igsqctILXi3P9nYAwfXpLUrabPp0zrOcdWPUqPSg6DaYbbqvyeTFmedVH7O/y 5VHOGfvhzh5aBrE6SQpOdzSiyoH7dlZCH2ZL9dr0BZO4aNRI8c8xVguHmZbxjUR1Hps8 j1+Esy8jnEr7vA/2tY8bz0ozV8gAifweCKX3lsZdxwjyZI+B68SpMZQA5ZsWuyXEHohT BYcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=gI3pVf2yiR5r/UEtG9xEBfrAQBOq8foMeThoRbLJKbY=; b=gUWA8Zdea4Kc3HhUI/Ex88Nu1keD0/B4ytlQfg1bwDNN18R4i68gd0zRukzX+AoMKv nOxkbZ+/+Wg/OVKAlwnVpJkrptZTiveef7eKJMudx8va0n2HrCBRmuKF9X237vdkMPcI C1RCWIQDsi/DSS92QooWOYc0y21ITAPTl2vNL+T/Nhnv15KZh6iwfIQZjhN4/gR6AOSb 9OxzQwLzOh11ZkSJAl43JoKaui4LyyV3RYsFwBlmJ6W7CV+EowlTHqgqjWosQn3aztxT 66mm3oD6r2i0FhLwQ1qpG/mynquHjn7nUJ6C6sTAWIjDew6A4PUMoCXIj+XKf9ZxKK4t Yr3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=nPqUMv49; dkim=neutral (no key) header.i=@suse.de header.b=dHX4a5zh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt17si9510558ejb.77.2021.11.06.02.22.59; Sat, 06 Nov 2021 02:23:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=nPqUMv49; dkim=neutral (no key) header.i=@suse.de header.b=dHX4a5zh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231658AbhKFCLr (ORCPT + 99 others); Fri, 5 Nov 2021 22:11:47 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:35952 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231332AbhKFCLq (ORCPT ); Fri, 5 Nov 2021 22:11:46 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8A8A7218F8; Sat, 6 Nov 2021 02:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1636164545; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gI3pVf2yiR5r/UEtG9xEBfrAQBOq8foMeThoRbLJKbY=; b=nPqUMv49auVsiO6ac9F9VZud6lAO8EnqnPYWyo/i1jKns3bUoKdJYLuITP/TiJwRrW8tVV GOVuFbkmAdN7X7M3AMMsX3s14ZVadLQcoemsITq9pNcQ28bhO83ylaRrmGqff28tFVvXCQ WNT2vIoVGOZRuZ0CKOHM7KmOq0VKJ9g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1636164545; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gI3pVf2yiR5r/UEtG9xEBfrAQBOq8foMeThoRbLJKbY=; b=dHX4a5zhXH9QJztD0665QVeRyJ0VbXgp55EiQgGLLfE5Uj7P+cq9o/E1gVv2GpLGz1dJ/3 wKJ4fAYWPWbhuOAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1140413DA1; Sat, 6 Nov 2021 02:09:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id r9kwMsDjhWH7FQAAMHmgww (envelope-from ); Sat, 06 Nov 2021 02:09:04 +0000 From: Enzo Matsumiya To: linux-nvme@lists.infradead.org Cc: Enzo Matsumiya , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-kernel@vger.kernel.org Subject: [RFC PATCH] nvme: add NO APST quirk for Kioxia device Date: Fri, 5 Nov 2021 23:08:57 -0300 Message-Id: <20211106020858.18625-1-ematsumiya@suse.de> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This particular Kioxia device times out and aborts I/O during any load, but it's more easily observable with discards (fstrim). The device gets to a state that is also not possible to use "nvme set-feature" to disable APST. Booting with nvme_core.default_ps_max_latency=0 solves the issue. We had a dozen or so of these behaving this same way on customer environment. Signed-off-by: Enzo Matsumiya --- drivers/nvme/host/core.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 838b5e2058be..a698c099164c 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2469,7 +2469,19 @@ static const struct nvme_core_quirk_entry core_quirks[] = { .vid = 0x14a4, .fr = "22301111", .quirks = NVME_QUIRK_SIMPLE_SUSPEND, - } + }, + { + /* + * This Kioxia device times out and aborts I/O during any load, + * but more easily reproducible with discards (fstrim). + * + * Device is left in a state that is also not possible to use "nvme set-feature" + * to disable APST, but booting with nvme_core.default_ps_max_latency=0 works. + */ + .vid = 0x1e0f, + .mn = "KCD6XVUL6T40", + .quirks = NVME_QUIRK_NO_APST, + } }; /* match is null-terminated but idstr is space-padded. */ -- 2.33.0