Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp1898lqb; Fri, 15 Mar 2024 13:01:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeuu7VaiDGAwtu1d0/WszUbral4Sk0m3CV1ynqGdAvj7AwXHLdqDcjbqN3DI+TrHPIGf2eLsdqiz3vP4ehRelqIWAnJ2NOICCy6vvYow== X-Google-Smtp-Source: AGHT+IGqF2bKYLvaLjeK4N7a8THYcmlx7bJtyRnUan5p0ldXEQAzicGlp6eYERJhdYi65nMiXDU1 X-Received: by 2002:a05:6a21:32a4:b0:1a1:44bb:da3f with SMTP id yt36-20020a056a2132a400b001a144bbda3fmr7447470pzb.53.1710532871771; Fri, 15 Mar 2024 13:01:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710532871; cv=pass; d=google.com; s=arc-20160816; b=hJfhmFnL96VoXWNY2+/kP+NW+TMnPq0jyp0i95eh5+7QxnLbIfuDxTEZdOb1RtxLs/ ukm0skzev/tbgk5rRoYIf+ytNZ+vewRHZKk4O6waRoOAJS6K1sqDFHYiKz2M0CJg/JyM UEBvKw/A98Vdzbw4fEele3aR1jb+4DyCULy454IWLpDY1kzxIoPm8a84ucv3pPk7eUjN V+8rbESZPEXM8eZLOFTJrat/bWWDqXQ1w1lVNUPgtc+Wyd9WOg1MoioDBGG8r9IwKhi0 MpIaXBcGEfRRWt85KE0HCWqGxz9LHY7oT4ieyS7e86P/uzcZTQufm3uuSdqfKW+4Z+Ld AwaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=o8Cl5OjCtIa/qmgmTBdm2TERBTpHQ0f90CB5e2hENKQ=; fh=naOeRqFC96IE+iH1sbATKA218XdtCCQqNiGJ5Se94DE=; b=0H4jBPL90/dbqzFvVJUCGOSjbPE5Cw/Vs54D+dSaqJD/cQAMgKvYvVx2Ls4U4hcLe7 MkpnSEmmcZH0RZXb/psTYuQv5Pu0FK7gevs1vGGq2vUFCmJ+ryD27oI/d+qojl0U3dDX VJSdCRTj327le7PPhmv8v7oiY4+gKbgEfCYnIkFtbq8Ic13owYL59xMxqddhx6oMDwgE Pi9CDi+dFsqeEgd1J0+rEhsZRAOoJkddAKx82SAlkkRKQWVs2+BmhxyySa5A/GrtInZ9 DKuiNLOjZDKh1VwMqNnyP/rW5hKBT0xbDWXqmbewiEAC+FnsnXlwNyr+OSoxRrEV6dVE RLlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ibugone.com dmarc=pass fromdomain=ibugone.com); spf=pass (google.com: domain of linux-kernel+bounces-104867-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104867-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ibugone.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f50-20020a056a000b3200b006e6b5abf255si4059711pfu.138.2024.03.15.13.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 13:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104867-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; arc=pass (i=1 spf=pass spfdomain=ibugone.com dmarc=pass fromdomain=ibugone.com); spf=pass (google.com: domain of linux-kernel+bounces-104867-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104867-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ibugone.com 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 85204B21D24 for ; Fri, 15 Mar 2024 20:01:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D46E9535B9; Fri, 15 Mar 2024 20:00:58 +0000 (UTC) Received: from rosemary.ibugone.net (unknown [202.38.75.2]) (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 4906750A75 for ; Fri, 15 Mar 2024 20:00:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.38.75.2 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710532858; cv=none; b=McBB/HZGOBIzmcJY2QZiimuj9QF9RW24egKjr7FBp43zyfhQes2GW3dOZst3985CYyvyi0KJtgPZAE+iRpiLtvOFwRhdvEIlGTaSwNWZLuAITeHDq72do5cNjI3+Y5c3Y4Yty1eoWE2OTuNPjWNNnld9dJ59Ru97fvpo9cfPmOE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710532858; c=relaxed/simple; bh=DWuHyDQ7KaouzyzHkM8sjp+zITuNkADl5Pm6V4ABgBU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cKgiSDSBYqX+N2tqcnidLjkSwjOUvqHWRNtXVcj/09gdLxWfLyLZqR+9NkoxpqOzNO+lkRd/i0Q4TVVtOE6awqGWFVKMAuWjVTMiTyC7dYK8YBE1wxxk6Wq5PoPaJaPuInRZZYt4jFxJB+F+wIbMIbbRC+a2Jwwxte2d7c57bAs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ibugone.com; spf=pass smtp.mailfrom=ibugone.com; arc=none smtp.client-ip=202.38.75.2 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ibugone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ibugone.com Received: by rosemary.ibugone.net (Postfix, from userid 1000) id 4D2CE7A56F4; Sat, 16 Mar 2024 03:32:09 +0800 (CST) From: iBug To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, "Jiawei Fu (iBug)" Subject: [PATCH] drivers/nvme: Add quirks for device 126f:2262 Date: Sat, 16 Mar 2024 03:27:49 +0800 Message-ID: <20240315192747.1749119-3-i@ibugone.com> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Jiawei Fu (iBug)" This commit adds NVME_QUIRK_NO_DEEPEST_PS and NVME_QUIRK_BOGUS_NID for device [126f:2262], which appears to be a generic VID:PID pair used for many SSDs based on the Silicon Motion SM2262/SM2262EN controller. Two of my SSDs with this VID:PID pair exhibit the same behavior: * They frequently have trouble exiting the deepest power state (5), resulting in the entire disk unresponsive. Verified by setting nvme_core.default_ps_max_latency_us=10000 and observing them behaving normally. * They produce all-zero nguid and eui64 with `nvme id-ns` command. The offending products are: * HP SSD EX950 1TB * HIKVISION C2000Pro 2TB Signed-off-by: Jiawei Fu --- drivers/nvme/host/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index e6267a6aa380..8e0bb9692685 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3363,6 +3363,9 @@ static const struct pci_device_id nvme_id_table[] = { NVME_QUIRK_BOGUS_NID, }, { PCI_VDEVICE(REDHAT, 0x0010), /* Qemu emulated controller */ .driver_data = NVME_QUIRK_BOGUS_NID, }, + { PCI_DEVICE(0x126f, 0x2262), /* Silicon Motion generic */ + .driver_data = NVME_QUIRK_NO_DEEPEST_PS | + NVME_QUIRK_BOGUS_NID, }, { PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */ .driver_data = NVME_QUIRK_NO_NS_DESC_LIST | NVME_QUIRK_BOGUS_NID, }, -- 2.43.2