Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1445110ybh; Thu, 23 Jul 2020 09:04:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCH30i3NTupKDZUBWUJZ+1SwFr8lk1nJMCEYagTft6WXX4Z/tS2SyRf0+FdoSrgJE+VO/K X-Received: by 2002:a17:906:2dd2:: with SMTP id h18mr4932777eji.504.1595520293977; Thu, 23 Jul 2020 09:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595520293; cv=none; d=google.com; s=arc-20160816; b=I2oLAcUF+5lHl9yPjqEgdz+X2Ya8ahr8FYnoh5V7OBbqsbuCj5VLVPQ5n66ajO0uIO EfdsVm8MNWH3TQYdplwuq5SiBTi+X51/DLw7Lx5gUqydo2N36RrhPrFX6T/WUL0Oq4yt qvfr2eY7mvkBongr3guAbk3FJmL5wOPDgvBrHVREQFbmvexbwBXKTZMb7u7d59dbKxbq G+zbor8QkBpBMSTeBgPQfYf1kjnpMnbiXU1p5jV3EXNQbHjpCAF7GNHu0wUi+fCdii14 fY7XmF8wW3PFt55rTIhyi8MhQQ5/n8T7zQ/8YHfSIwKP0YdWVjQpdUsTh3/2yQ46mjwo QfaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nq69Sj4EiXRimwz48N4u841tmS1wZj1LAVnSCSHf1Ww=; b=Ry9t46dqMgnX2RsVFE6mhlcqT2XcVaFdnUb9X3IRtFnCtQnjwnJ3dF27bNPr/8fP9p APODhcmbCDtrWv3/pSfqQsyTRl0cwFAzcTVsrtaJd+/ZBroHNf8lANU6UeKRF5PdiuQQ lIK1DRf/gRHugr90Bo/3xDhcQleX6MAkFh5bvW7TtqRck/3ODPw6rQxipqOEiwrshFPU 1QSSA69IeJ0/28qn4MTonQeBp0QxzNTq/+NHqC5IYh0OripUJA6lvvUaHB6ukfOZd2uC n9VQ1ccHvAeFqd/G3sib/1uO7+ff7AB4T8/xkQP+BvSQ5kHaCHbE6xk+GKKeYtLUt5ok nI6w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg26si2245002ejb.128.2020.07.23.09.04.28; Thu, 23 Jul 2020 09:04:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727916AbgGWQD3 (ORCPT + 99 others); Thu, 23 Jul 2020 12:03:29 -0400 Received: from verein.lst.de ([213.95.11.211]:60762 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbgGWQD2 (ORCPT ); Thu, 23 Jul 2020 12:03:28 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 071B168AFE; Thu, 23 Jul 2020 18:03:25 +0200 (CEST) Date: Thu, 23 Jul 2020 18:03:25 +0200 From: Christoph Hellwig To: Kai-Heng Feng Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de, sagi@grimberg.me, kyounghwan sohn , "open list:NVM EXPRESS DRIVER" , open list Subject: Re: [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug Message-ID: <20200723160325.GA17996@lst.de> References: <20200417083641.28205-1-kai.heng.feng@canonical.com> <20200723155731.22313-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200723155731.22313-1-kai.heng.feng@canonical.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 23, 2020 at 11:57:31PM +0800, Kai-Heng Feng wrote: > After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes > command"), SK hynix PC400 becomes very slow with the following error > message: > [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0] > > SK Hynix PC400 has a buggy firmware that treats NLB as max value instead > of a range, so the NLB passed isn't a valid value to the firmware. > > According to SK hynix there are three commands are affected: > - Write Zeroes > - Compare > - Write Uncorrectable > > Write Uncorrectable isn't implemented yet, so add a new quirk to > workaround the former two commands. compare isn't implemented either in the kernel, and we certainly aren't going to do these quirks for passthrough. So I think we really want a "write zeroes is buggy" quirk and just disable issuing that command from the driver. > > BugLink: https://bugs.launchpad.net/bugs/1872383 > Cc: kyounghwan sohn > Signed-off-by: Kai-Heng Feng > --- > v2: > - SK hynix found the root cause so change the approach accordingly. > - lspci is wrong, the device is PC400 instead of SC300. I don't remember seing a v1..