Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1441277img; Tue, 19 Mar 2019 07:44:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbDA4OjVgu4UKKv6wOy+S4qEgztYgzBftGGDq/75vkRTZ9IIRdNmhxT9fyLSdaLnYGChAu X-Received: by 2002:a17:902:bb94:: with SMTP id m20mr2550011pls.255.1553006648052; Tue, 19 Mar 2019 07:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553006648; cv=none; d=google.com; s=arc-20160816; b=NKYU0m54AtYTp3ysCZ1sS16IJEP3T70RM3ZbysdLW57aTiixFa7YDd2+mTkIFMRcwF kqLd+N9V+NFyd0Lcqg2YIfduSsZj5T3+dCwbTJ+87j58RIabosmF9n/v0P39otg7dubP w1bA/km2gKPNX6ZzvYdzD5QRX5rQgLu0XMJ8Z81cD5ijoyg9eY0no8Ji8aepS0fsMZCz 6O/rBy1U5K7dkH9LCzlxwiXs52HJrhhre2iMUtrB94A/Wc6L9khSppMYGjs80M3ZBxjq O+7KbMUrGkrCN83ZN8VYjNAGpc+x1swhYNN1eOBmkpptORqUPi+iU5WGTF/YIeucptHd JfUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=8vPHpfOeP2Dh+Tv19TN5L+1OdGxVK3rZmfpngkr5R64=; b=WCo9DfT1McueN5XYfNPbh/1hFg6hzHlRXtS7Y+/s815QoyX759iqCv9ew8BeUWE3Si Z9KOmlSaiC52cLs6Z6sqPMsYWOha4gpZEr62Of4c1KBgoZbudoPLQ64jqwfbCoiJpxkw QVmn4rwNTmXfMfbTpO/05InYClCJeHFt24COvamOMyCv5A8WNU0Vyr2JyWWZBVLlx0hb YEHszBeukQLxLWp8MYcXNluV/nGZDhnVUQlP0z6LdArWbctukmsqzeilsmNMcLK9aElX l8BJc0a30sg8Owx3+HAqyKVoLsrUcINHJxlT2yceIDO+NwniV5z/Fk9b1NyuLNGtV5/k nxgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si8105354plr.246.2019.03.19.07.43.53; Tue, 19 Mar 2019 07:44:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbfCSOmq (ORCPT + 99 others); Tue, 19 Mar 2019 10:42:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44846 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727831AbfCSOmp (ORCPT ); Tue, 19 Mar 2019 10:42:45 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A60630833C5; Tue, 19 Mar 2019 14:42:45 +0000 (UTC) Received: from maximlenovopc.usersys.redhat.com (dhcp-4-67.tlv.redhat.com [10.35.4.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 245095C219; Tue, 19 Mar 2019 14:42:37 +0000 (UTC) From: Maxim Levitsky To: linux-nvme@lists.infradead.org Cc: Maxim Levitsky , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Jens Axboe , Alex Williamson , Keith Busch , Christoph Hellwig , Sagi Grimberg , Kirti Wankhede , "David S . Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Wolfram Sang , Nicolas Ferre , "Paul E . McKenney " , Paolo Bonzini , Liang Cunming , Liu Changpeng , Fam Zheng , Amnon Ilan , John Ferlan Subject: [PATCH 6/9] nvme/pci: init shadow doorbell after each reset Date: Tue, 19 Mar 2019 16:41:13 +0200 Message-Id: <20190319144116.400-7-mlevitsk@redhat.com> In-Reply-To: <20190319144116.400-1-mlevitsk@redhat.com> References: <20190319144116.400-1-mlevitsk@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 19 Mar 2019 14:42:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The spec states "The settings are not retained across a Controller Level Reset" Therefore the driver must enable the shadow doorbell, after each reset. This was caught while testing the nvme driver over upcoming nvme-mdev device Signed-off-by: Maxim Levitsky --- drivers/nvme/host/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index a188ab6ffaf8..806b551d3582 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2347,8 +2347,6 @@ static int nvme_dev_add(struct nvme_dev *dev) return ret; } dev->ctrl.tagset = &dev->tagset; - - nvme_dbbuf_set(dev); } else { blk_mq_update_nr_hw_queues(&dev->tagset, dev->online_queues - 1); @@ -2356,6 +2354,7 @@ static int nvme_dev_add(struct nvme_dev *dev) nvme_free_queues(dev, dev->online_queues); } + nvme_dbbuf_set(dev); return 0; } -- 2.17.2