Message ID | TYAPR03MB3085DD9F15177F126E9DF7C6AE249@TYAPR03MB3085.apcprd03.prod.outlook.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp70276wrs; Fri, 14 Oct 2022 01:47:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5CIywKNgZO3DZGoP8KQTUnIvGYod9Lf5C7tCU8DObdH8LlRyquIY4fGDF664Ol84bLyMH+ X-Received: by 2002:a17:906:8446:b0:78d:9f1a:9afc with SMTP id e6-20020a170906844600b0078d9f1a9afcmr2733229ejy.637.1665737277614; Fri, 14 Oct 2022 01:47:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665737277; cv=pass; d=google.com; s=arc-20160816; b=svrOjGDTgHG/eQR8hTa8Zk/Wld0zpVNW+JkKYzPnS5ILvzE41z/aZdvnCjCXYTvqqb vauEJcmvC4RzDv0hNgXJjS2T7sWvQvfXIouEzYXz+K+P0RB97Gc86ju3MfUccgQxjNnS rAQLXT5U2aPY99zhYh47FGfA/grmX1CCANgLF7AqSHADUjHUbC9Bls0GuGN5RXJGcyk+ yJ1cRG8rvMPNnHPc60/iTM6EkxaKSuGpwfnTwVr6OJ4s/UtrcXzrjurpwOHdf25hippb yAwE8DCNUAoM5kcgEDjM6QHxNhrTAggTO7bBhuZUXCS7JkmsFkSpnAhEl8A3Rl34TpSi b5xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nWpqODx8a3PsndcMwJK2Hg/wSakdBFskh21+hmURKro=; b=BCM+cs3xsYcxblVv1/VtlQmvQnkeNQJEK2mtSqD6vURy8QUZcAhXrrDAGYEJbzYs5u 7Fw/tobXMqjIyF5X4QfHOxGsY/b3YSO6bfq2rxxLtlF9xUPm4CKKTT4I4e5+5kG7TtCr 0HIqO6VXS5LAtlOQ1G/8ObqwLY1dgU7QPk8CrTNjrZvTXURu8n7cHhin4dVGyEIr4om1 lXoadBzp9ZMh0Bvy3YluhtOC0wrQxoNpBKoU2H7P+/BmBuv8kbwr4CA/ka7+1D+LbGhd j3CxysJ1AP+lQssCAhxADXDvDV1RcoIzpkIT5jTEro5BXujmITY6nyPUfu8W1FbnnDha wlIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=YjRLGxXx; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht22-20020a170907609600b0078de8d119d5si2068819ejc.899.2022.10.14.01.47.30; Fri, 14 Oct 2022 01:47:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=YjRLGxXx; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229777AbiJNIcN (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Fri, 14 Oct 2022 04:32:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbiJNIcL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Oct 2022 04:32:11 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2013.outbound.protection.outlook.com [40.92.52.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E2CB1C25FF for <linux-kernel@vger.kernel.org>; Fri, 14 Oct 2022 01:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZmznMz0R5qYoAHUbZIEbCFBM2nmB2r/VQJToUEMarAa68KH+M65pDi0uuZagJeU6XEIydaQK7tDiWNd9YmpBi93k6fQgzm+gNEpjZcALo2eNmPorQJQJNsD+7q3Uu4qhSm2nkGrRz6wVH2qTW5I4FttSrZqGrRkB2+s/xbLM1YbnnNEzAeeXfe+HpsUV7IL+BapazDE+/pRdv1YHWCPy4bzjjx356gRjHoDA27qE73RvMJxa8tvtA4cpAV8u44TpYl/2RomuKFG8MWJLrwrHKTL6J3dZArlMEHybNZQcnGK/OLzqHgto1y1IQ0Ic2m/KC/KN+pyYHMk7aroEwqibQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nWpqODx8a3PsndcMwJK2Hg/wSakdBFskh21+hmURKro=; b=BDAFN31VmF45aQDQnmZZkGfzG6e4d1uxSKiZTTIEQCbhDYNSfHxAz/6JC9qSOASZU2ggruEWxpfywHrSt8hJ+GEhTr/HR3Ezgoeq4GdehVqz4TAeOPgEzCII4OLulgsPbRnGsVuoHrpS9fs2r8VlZzaHytNayNRFhQx1iZOLDXIvgPKmDz/MGq9uFxoa+y7R3fzc6jb088tI14Q139afU+cB50jG33kEmvmjI+2x2ZGru79Y/9wGQczHxgAqJ9ICk+RF7P2Zp5GdPQHdXvpwDq4Zv3tbR3sWGo3xFRNX2GNllHCmG45yr4r0F4G9KsyWXjocmpC75I7QTVS3dGE07Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nWpqODx8a3PsndcMwJK2Hg/wSakdBFskh21+hmURKro=; b=YjRLGxXxgoiy4naP/0KgpiVqHJIRAoY5tP7YB15G6xh+Yq6kczYZK3lKYtacDD3SbbYuBpnXFoD0EjxYsyn4/u5lOYB8cQHHqNwhj4z3xqe9ShJJpW+MaK7l8kmP2ZFGDAkgt1ZUQT3CRO4OTSrRqQZm/QTYUwkAGfRvnx/kwrUFWWE/HEzk1w7XheIrpoqjHbRDbMK6VKgGOpw2x+jocJ+0Qk7+vYnGG4XBMQgoYwedhkMeKz09aWb3n4oI7vwKPl2VL78mknsqY5EOJLgu1ptXA7tDn2XATbR02HCmRHjKCGEW1GfbwiJUKAhBkVlbAxuUdNenoVW9wmnRrH0KRw== Received: from TYAPR03MB3085.apcprd03.prod.outlook.com (2603:1096:404:1d::10) by PSAPR03MB5398.apcprd03.prod.outlook.com (2603:1096:301:43::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.22; Fri, 14 Oct 2022 08:32:06 +0000 Received: from TYAPR03MB3085.apcprd03.prod.outlook.com ([fe80::3e1b:cc07:6f81:d850]) by TYAPR03MB3085.apcprd03.prod.outlook.com ([fe80::3e1b:cc07:6f81:d850%6]) with mapi id 15.20.5676.007; Fri, 14 Oct 2022 08:32:05 +0000 From: Ken Lin <ken_lin5@hotmail.com> To: LKML <linux-kernel@vger.kernel.org> Cc: michael.jao@quanta.corp-partner.google.com, derekhuang@google.com, chi-jen.chen@quanta.corp-partner.google.com, dianders@chromium.org, Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@fb.com>, Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>, linux-nvme@lists.infradead.org Subject: [PATCH 1/1] nvme-pci: disable write zeros support on WD SSDs Date: Fri, 14 Oct 2022 16:30:57 +0800 Message-ID: <TYAPR03MB3085DD9F15177F126E9DF7C6AE249@TYAPR03MB3085.apcprd03.prod.outlook.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014083058.1451914-1-ken_lin5@hotmail.com> References: <20221014083058.1451914-1-ken_lin5@hotmail.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [4wzVApcEQhO3366baQxtt3FbKqLGyWVz] X-ClientProxiedBy: TYWP286CA0020.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::7) To TYAPR03MB3085.apcprd03.prod.outlook.com (2603:1096:404:1d::10) X-Microsoft-Original-Message-ID: <20221014162956.1.I03357816df3d182ee791a7cd804742110f347bb0@changeid> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYAPR03MB3085:EE_|PSAPR03MB5398:EE_ X-MS-Office365-Filtering-Correlation-Id: 9339d024-23bf-4f4f-2d71-08daadbe936b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UU95ZgazOPcseHi5zNXDYV0W5CKPoi5bn2SIWySXgpauy7uDCAI7kSsHwsmbzYozL4T9Yl5CajvCcgq5cZAaMTMZgs2G5lrXn1sxO18dHwDEKOiQYulguHKXfdkjVNOFKlae/JWLdDGbclH0B/CbMX3SrCmXOMkJ4H8wlgZrPpuTiQdVVwGyyQV79JcoET9o0sI1FVAQbSH1bjw3pFMbHRGhL/DvQnoTzmV8IjbXy7kYlhunOwgwjiZAk62jzylHHRCtYB1veYBh4aMtpx5NDqFBqRmH7QU9WGWOT6axHOQChquTlRDhTH0p8IfmIdvb26PlDHNboo617I/n3imaIwbwFNCoh15exZqTND3sr6dv89E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O7zkeAqC92NSl6U4XB/Xn6gTspD+jU+y314fsgRS4StqIQIs1mWanWQFb4rRnpbw4PIhbiUflTHuRycWgYvCSQmjhTTZriNMXanrlIq3vslrInHVn7sqruPbSV4MJjSZq4lhai77Z8jQ375juzGOvKSdACs4c3q8Ji8IJW/3m0PuIMhAwf9F3LT0dodDEDjLbSGIid7w/+IAlplh9JZGWWpZADEman3/1kAFizxo6ZLaq3VqjKIRVoEYQAad5onbYCCZJB0F/oDZz1ekZ8wZvKsYwKfpUz9HtgBZ7PhW+YoQeS3QgyMlYUwF2Nuaj+DuB359GjXPs7jTiDJaxwZF2jC0j5QupqoGn4JxLnTVmvvkzQti/Yh+bAQ+LjUpfSv69xsa901eXOMLyIcpP+PdhIEv6xEhUQIWZTvAPc6LUoOqp/MUFdMQVlrbpjUeVuR0tjyVomtHFPX7Jnosdn8gtF82Lb0VuA2TVqXAXerAsUzAXB/W2QnUuUFYWhtQOc7i4bmaGOFs0DQAneVs8rUbSRCI8Zo9mUnnVMDaqqsiT0I7BoA8A7GRlsL+yE6yRfpA== X-OriginatorOrg: sct-15-20-4734-24-msonline-outlook-c0b75.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 9339d024-23bf-4f4f-2d71-08daadbe936b X-MS-Exchange-CrossTenant-AuthSource: TYAPR03MB3085.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 08:32:05.8606 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR03MB5398 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746652131887219292?= X-GMAIL-MSGID: =?utf-8?q?1746652131887219292?= |
Series |
This patch disable write zeros support on WD SSDs.
|
|
Commit Message
Ken Lin
Oct. 14, 2022, 8:30 a.m. UTC
Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using
Write Zeroes command"), Western Digital has the same issue:
[ 6305.633887] blk_update_request: operation not supported error,
dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES)
flags 0x0 phys_seg 0 prio class 0
So also disable Write Zeroes command on Western Digital.
Signed-off-by: Ken Lin <ken_lin5@hotmail.com>
---
drivers/nvme/host/pci.c | 2 ++
1 file changed, 2 insertions(+)
Comments
Hi, On Fri, Oct 14, 2022 at 1:32 AM Ken Lin <ken_lin5@hotmail.com> wrote: > > Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using > Write Zeroes command"), Western Digital has the same issue: > [ 6305.633887] blk_update_request: operation not supported error, > dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) > flags 0x0 phys_seg 0 prio class 0 > > So also disable Write Zeroes command on Western Digital. > > Signed-off-by: Ken Lin <ken_lin5@hotmail.com> > --- > > drivers/nvme/host/pci.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > index 3a1c37f32f30..5c1b812a3c2b 100644 > --- a/drivers/nvme/host/pci.c > +++ b/drivers/nvme/host/pci.c > @@ -3517,6 +3517,8 @@ static const struct pci_device_id nvme_id_table[] = { > .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, > { PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */ > .driver_data = NVME_QUIRK_BOGUS_NID, }, > + { PCI_DEVICE(0x15b7, 0x501e), /* Sandisk 2280 NVMe SSD */ > + .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, So I'm not really an expert and don't really have the context, but you CCed me and so I took a quick glance. Something smells a little fishy. ${SUBJECT} talks about disabling "write zeros". The patch description talks about disabling "Write Zeroes". The patch you reference seems to disable "write zeros" by setting the quirk NVME_QUIRK_DISABLE_WRITE_ZEROES. ...but the contents of your patch doesn't seem to match. Instead it adds the quirk NVME_QUIRK_NO_DEEPEST_PS. As I said, I'm not an expert and maybe everyone will tell me that it all makes sense, but it seems weird. -Doug
On Thu, Oct 20, 2022 at 10:15:56AM -0700, Doug Anderson wrote: > On Fri, Oct 14, 2022 at 1:32 AM Ken Lin <ken_lin5@hotmail.com> wrote: > > > > Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using > > Write Zeroes command"), Western Digital has the same issue: > > [ 6305.633887] blk_update_request: operation not supported error, > > dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) > > flags 0x0 phys_seg 0 prio class 0 > > > > So also disable Write Zeroes command on Western Digital. > > > > Signed-off-by: Ken Lin <ken_lin5@hotmail.com> > > --- > > > > drivers/nvme/host/pci.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > > index 3a1c37f32f30..5c1b812a3c2b 100644 > > --- a/drivers/nvme/host/pci.c > > +++ b/drivers/nvme/host/pci.c > > @@ -3517,6 +3517,8 @@ static const struct pci_device_id nvme_id_table[] = { > > .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, > > { PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */ > > .driver_data = NVME_QUIRK_BOGUS_NID, }, > > + { PCI_DEVICE(0x15b7, 0x501e), /* Sandisk 2280 NVMe SSD */ > > + .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, > > So I'm not really an expert and don't really have the context, but you > CCed me and so I took a quick glance. > > Something smells a little fishy. ${SUBJECT} talks about disabling > "write zeros". The patch description talks about disabling "Write > Zeroes". The patch you reference seems to disable "write zeros" by > setting the quirk NVME_QUIRK_DISABLE_WRITE_ZEROES. ...but the contents > of your patch doesn't seem to match. Instead it adds the quirk > NVME_QUIRK_NO_DEEPEST_PS. > > As I said, I'm not an expert and maybe everyone will tell me that it > all makes sense, but it seems weird. You're right: this patch does not make sense with the subject!
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 3a1c37f32f30..5c1b812a3c2b 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3517,6 +3517,8 @@ static const struct pci_device_id nvme_id_table[] = { .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, { PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */ .driver_data = NVME_QUIRK_BOGUS_NID, }, + { PCI_DEVICE(0x15b7, 0x501e), /* Sandisk 2280 NVMe SSD */ + .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061), .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, }, { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),