Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3419535pxf; Mon, 29 Mar 2021 01:30:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgZWJ8w0mMrz0A06ZMKBY3SxpNNWgoWh3wfXhsup2WbItvxFR0jU0cuIYYDg5F6mxOI2eX X-Received: by 2002:a05:6402:3487:: with SMTP id v7mr27291672edc.302.1617006646556; Mon, 29 Mar 2021 01:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006646; cv=none; d=google.com; s=arc-20160816; b=SF6by3Y1BGcQc6MihtXJyUaD1iA2UFUlnSdsjiSIrzbgkHxteCyRFq4td9mTez86La Dg0/1wkW/QL7nOT6v1Sa7WJPp1/a/XF2Aq+Q6u3D37ZOGOUTVQNz2njb8PFaMyY+UH4A piZSwQaKhYcdxr2zKPPkkHkVLRSskzJ9HzYgjVbVbQr9D6rF6GQ/4yyHaZ1GCiV+fOoX KpSf22BuOEMF0nXsjKcTblnhZEwbFe/CEBhC7xc8sIKSwNA/46vlwL68rzs0NPig7BqB qmdIoQUqRqNkIKRYwuZ3c5yKbkkOVlnzdxEgEYukIV1KQbdIBAfYeXRg2WM8eO02YfFl NY1w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dK3tK+CTwjmhcYQe0F+Olos56xRkrOidfRrtQorasZk=; b=Imr7LzZdUYWKEgHqvLXHLo+dsT0Tr0nmnGmAThB8CEegh9nZ1v90ftg+0T2TK8sv8p Fr4X5+KipvDwLW+kbtQQA1h6MIT6kDfEUwbyNo7jcltQSMIDe2hh4nA25Cp0Qdp9/PeJ PneUA9rqlm1RsFNhXj9ctE5pKFDiqV0RrChk4YqlsYjfbum6kZEoo8XTgGaaOufH/Q5f 8mxBU5MrNR6ja7UiSdyWsIZyIiXBeAbrzk42cRyt0bjxptgBTHC9VH1pVYbxFNG0OjYX HIkjMHQCZAxIyG31Ltve6Hv7u92LkEuFxaDnIZoQobiGcicD+krHC88tI2Cvphy2WrlE EnFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xuWIyDNU; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si12990554eja.587.2021.03.29.01.30.23; Mon, 29 Mar 2021 01:30:46 -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=@linuxfoundation.org header.s=korg header.b=xuWIyDNU; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234719AbhC2I25 (ORCPT + 99 others); Mon, 29 Mar 2021 04:28:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:34208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233490AbhC2ISk (ORCPT ); Mon, 29 Mar 2021 04:18:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3988761613; Mon, 29 Mar 2021 08:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617005917; bh=MO9y2X2TYpmHs9c6mM9dk0a2itziTJp6h7Xq2GG3gms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xuWIyDNUPq9susyq+Qa0pzoUVk6kj3xTtFeG18EjTbcjXQ3Co5yEFmUExE2ZJiHmc H/RbVHaAlyEZCKLpV6uhYR5nhrqGI8XDgpPRga0G33JUtXN91KJBua7VWubgxKFNxl uy/Ynbk3e2NuoQSNpitR8fFqDuFeS6gE9RDsKoQE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Monakhov , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.10 051/221] nvme-pci: add the DISABLE_WRITE_ZEROES quirk for a Samsung PM1725a Date: Mon, 29 Mar 2021 09:56:22 +0200 Message-Id: <20210329075630.886469856@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Monakhov [ Upstream commit abbb5f5929ec6c52574c430c5475c158a65c2a8c ] This adds a quirk for Samsung PM1725a drive which fixes timeouts and I/O errors due to the fact that the controller does not properly handle the Write Zeroes command, dmesg log: nvme nvme0: I/O 528 QID 10 timeout, aborting nvme nvme0: I/O 529 QID 10 timeout, aborting nvme nvme0: I/O 530 QID 10 timeout, aborting nvme nvme0: I/O 531 QID 10 timeout, aborting nvme nvme0: I/O 532 QID 10 timeout, aborting nvme nvme0: I/O 533 QID 10 timeout, aborting nvme nvme0: I/O 534 QID 10 timeout, aborting nvme nvme0: I/O 535 QID 10 timeout, aborting nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: I/O 528 QID 10 timeout, reset controller nvme nvme0: controller is down; will reset: CSTS=0x3, PCI_STATUS=0x10 nvme nvme0: Device not ready; aborting reset, CSTS=0x3 nvme nvme0: Device not ready; aborting reset, CSTS=0x3 nvme nvme0: Removing after probe failure status: -19 nvme0n1: detected capacity change from 6251233968 to 0 blk_update_request: I/O error, dev nvme0n1, sector 32776 op 0x1:(WRITE) flags 0x3000 phys_seg 6 prio class 0 blk_update_request: I/O error, dev nvme0n1, sector 113319936 op 0x9:(WRITE_ZEROES) flags 0x800 phys_seg 0 prio class 0 Buffer I/O error on dev nvme0n1p2, logical block 1, lost async page write blk_update_request: I/O error, dev nvme0n1, sector 113319680 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 Buffer I/O error on dev nvme0n1p2, logical block 2, lost async page write blk_update_request: I/O error, dev nvme0n1, sector 113319424 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 Buffer I/O error on dev nvme0n1p2, logical block 3, lost async page write blk_update_request: I/O error, dev nvme0n1, sector 113319168 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 Buffer I/O error on dev nvme0n1p2, logical block 4, lost async page write blk_update_request: I/O error, dev nvme0n1, sector 113318912 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 Buffer I/O error on dev nvme0n1p2, logical block 5, lost async page write blk_update_request: I/O error, dev nvme0n1, sector 113318656 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 Buffer I/O error on dev nvme0n1p2, logical block 6, lost async page write blk_update_request: I/O error, dev nvme0n1, sector 113318400 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 blk_update_request: I/O error, dev nvme0n1, sector 113318144 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 blk_update_request: I/O error, dev nvme0n1, sector 113317888 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 Signed-off-by: Dmitry Monakhov Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 99c59f93a064..4dca58f4afdf 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3247,6 +3247,7 @@ static const struct pci_device_id nvme_id_table[] = { .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, }, { PCI_DEVICE(0x144d, 0xa822), /* Samsung PM1725a */ .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY | + NVME_QUIRK_DISABLE_WRITE_ZEROES| NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */ .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, }, -- 2.30.1