Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1453930ybh; Thu, 23 Jul 2020 09:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTX6drFzXcM4ubgsResLatikZs5yHxEpZ81eeX8h/ns240utg92veOx9CND9g2XAKQTNgU X-Received: by 2002:a17:906:2e50:: with SMTP id r16mr5263176eji.371.1595520841594; Thu, 23 Jul 2020 09:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595520841; cv=none; d=google.com; s=arc-20160816; b=WPYjal/x6t9R8v9TrkHCGHDHohS4AmFxaIHjHYybA8OvscLBz0rRzR3be0obVHsMW5 1EdB1+c11ZUgibNqrrvk+EZJXqX/dDRBhfA92h8GxmbHk6Agr/KDHpEsOhclCZCjYkJx UwzmOT1FQoVxHtYDlFKhnHsd3C7GRafDSXKnKYVGmTy2A5uwfNpY9Ja8L0Q+D98ANrVe D83Zr1gg+Bry0eOWNJ4YsmVoMVsfxMGbCKrGUTSS65i9I2Rt6u5bsG0fSKJhn17gRKjG ZeS0aoyjsY1BY22eniucq1DWYzqY5zTE005aUQdTPPY5HurQYPtsSK/laugMKfhp7pdr ZE7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=Iu9jHjlgO8cSOza+nzWx+QMtA5v/xpJWI7XSlKofCkM=; b=xmHaPquKc7IaBshQqbWVnPpW9YTM2QO/MixHpIIDKGsuY66C68ouTmJVO1zT60ueCf kNKFwk/Cdzf4RqS6xqIiyKX2XRHzgYwWB2fNqRtRBca6sGj11gFkG3t0UYjuVCZp5Rtf V9pStDxrQbUqKkDtqf64zyoNMIyLmHc9DVSUFVv7TKrK2Cwipmr5VZ0s0N+py+WkQMWE YU9xCwGDAKH4JZHiPvIlXlkb8Hs2tvZE/AqvIe/DmUiL1mWewjwJWQF2no8c8MMv6NVc Erg0AD4nbxnK0Pd5OQd3YHBJz6ENgWh26wyi6oTPrWVHjxemZQ5c4A5BRZ2mOYo+JwV/ 6Zkw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lv11si2027486ejb.106.2020.07.23.09.13.38; Thu, 23 Jul 2020 09:14:01 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729636AbgGWQKv convert rfc822-to-8bit (ORCPT + 99 others); Thu, 23 Jul 2020 12:10:51 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54077 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbgGWQKv (ORCPT ); Thu, 23 Jul 2020 12:10:51 -0400 Received: from mail-pj1-f71.google.com ([209.85.216.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jydo0-0003Al-OX for linux-kernel@vger.kernel.org; Thu, 23 Jul 2020 16:10:48 +0000 Received: by mail-pj1-f71.google.com with SMTP id g16so4180928pjz.3 for ; Thu, 23 Jul 2020 09:10:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mloZu1UH6qYYfFGV+CjNmoEgB8w841kwWHgyCLqHBnk=; b=KVVggFj4lcfsbAkLPJaQA9KPl72Tymm7eJ5lgQkmjzIyT9HWQOKSjyGFFK15KeU5Kw S9aDsfc+alx+kOtauHAZ7rBIsP2bru6Ga88LIqUuB3fJp4phuGh8hr6gOWbU6w1rN7T0 bPOfdkg/0QOceE+CPKEjQiDmwWlAears5as7XCyqiQRh/3TlfF7swsuewtucIdxzwLnd VWR6ra5bQnTgTjbwIMZuTvI5TpCDcGWXHLw5Vybuz7dBMK4fOrMzHzo8hGGBIVMBcIuc fUKRNiQRrdot2VucZ4VTBzEra0+HhETMikDVojsUD8Zp6Im2nbMWtkwqB20wJkC30oAc fZRA== X-Gm-Message-State: AOAM530YQJpHwy4JeltHc+q2X4Pb0h8w/SM5mUBYJGPZc+2QwiYogY6i IgsEEEbEfMemEHGOSIp0ot6HOHpQ3trT9dRuFipCUBDGdb0EtOIFxTCj6Ru5KcTQIr5dTbwP0BZ o06DgSeUzTw6N9mFqbKnqa0Bg4fwkyj35o63rZ6Si1w== X-Received: by 2002:a17:902:b7c8:: with SMTP id v8mr4419446plz.201.1595520647032; Thu, 23 Jul 2020 09:10:47 -0700 (PDT) X-Received: by 2002:a17:902:b7c8:: with SMTP id v8mr4419410plz.201.1595520646672; Thu, 23 Jul 2020 09:10:46 -0700 (PDT) Received: from [192.168.1.208] (220-133-187-190.HINET-IP.hinet.net. [220.133.187.190]) by smtp.gmail.com with ESMTPSA id z11sm3393823pfk.46.2020.07.23.09.10.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jul 2020 09:10:42 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug From: Kai-Heng Feng In-Reply-To: <20200723160325.GA17996@lst.de> Date: Fri, 24 Jul 2020 00:10:39 +0800 Cc: kbusch@kernel.org, axboe@fb.com, sagi@grimberg.me, kyounghwan sohn , "open list:NVM EXPRESS DRIVER" , open list Content-Transfer-Encoding: 8BIT Message-Id: <45DFD291-E6BF-48DE-A447-6FA4086D40A5@canonical.com> References: <20200417083641.28205-1-kai.heng.feng@canonical.com> <20200723155731.22313-1-kai.heng.feng@canonical.com> <20200723160325.GA17996@lst.de> To: Christoph Hellwig X-Mailer: Apple Mail (2.3608.120.23.2.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jul 24, 2020, at 00:03, Christoph Hellwig wrote: > > 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. Ok, will send a new version based on your suggestion. > >> >> 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.. Well, because it took some time for the vendor to find the root cause... Here's the v1: https://lkml.org/lkml/2020/4/17/169 Kai-Heng