Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5256666yba; Mon, 13 May 2019 07:56:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwc9QT3MbECN6Oy0xp8AS3wXjKEWkE+QdG92SduQOay6CdmSv44Q4WLIq+fNII/Zkuc27Jq X-Received: by 2002:a63:7c55:: with SMTP id l21mr7399254pgn.121.1557759407702; Mon, 13 May 2019 07:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557759407; cv=none; d=google.com; s=arc-20160816; b=grOnEpdj9OLOpy6wvFSFtfwILRhQxxHw2RyATtLCQLEGvm6mwwvm5kHLjKTULD0U+V Uo2sKCrUvGMf0PCzkYZBFsPedt97mXYh/k1UM2Rw+0ZhpVkDJA3FvzatDLVHWPTeOav7 0qdMPbdYgE/49S4zNWshhHEbYNC9B0pWd4TV6D1C5doPQ3Q4Fc5YuTOJzBa/8W+JpS2Z XyeHw+AW265vQRUVSzDyzL66ds06qvvoeLxg9pun+NV4TT7FtwzWrfTW2VJx0Nx7IJc+ hwF4Fm2FfbgnfGM3WnXFsiuF0xKAoLdzTeQX4jAyQojWcDkmGFnVbx/EbQksehafM1Zb +HbA== 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=dFiOgbxHmMm5iF0SnQjJnfwVf3IOZU9JbMqwKxDCQUA=; b=LYjCJKK/nx5l/NPL3AZYlZGP2bLO0BGYph0xdNi8xbjVGhITe3bckMXWwo5qPIXPQa 5Ji9Sku5XsnF0nLDdAMGaZBWKNZT7l5/ZCiLuLJPrRcLVqVDVVTbye2zB/Xl5iNr76dP +EfKDzh/BwdSwquRcI6y/7tPo2qCoFbdIA5DBgtyOTcwRCYRRFZDBbg0fX1RglDMDNk3 rUEcxRqaO+7OpUoVeWd5nzJ7UDW3rvS6Ig5ltdHSnnmGDY3b+f7MQrp0n1iM9hXWJt8M s6ZoJnM5SpwcjLGScRtLFwXhUxQaOh1e/Qoyiq8MgJQ/OVRTNiHC+PXxGjpBLmiEW+lz iCjQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si16690354plp.223.2019.05.13.07.56.30; Mon, 13 May 2019 07:56:47 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729979AbfEMNzy (ORCPT + 99 others); Mon, 13 May 2019 09:55:54 -0400 Received: from mga02.intel.com ([134.134.136.20]:32384 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729710AbfEMNzy (ORCPT ); Mon, 13 May 2019 09:55:54 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 06:55:53 -0700 X-ExtLoop1: 1 Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga004.jf.intel.com with ESMTP; 13 May 2019 06:55:53 -0700 Date: Mon, 13 May 2019 07:50:31 -0600 From: Keith Busch To: Akinobu Mita Cc: "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Johannes Berg , "Busch, Keith" , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Minwoo Im , "Heitke, Kenneth" Subject: Re: [PATCH v3 5/7] nvme-pci: add device coredump infrastructure Message-ID: <20190513135031.GC15318@localhost.localdomain> References: <1557676457-4195-1-git-send-email-akinobu.mita@gmail.com> <1557676457-4195-6-git-send-email-akinobu.mita@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1557676457-4195-6-git-send-email-akinobu.mita@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 12, 2019 at 08:54:15AM -0700, Akinobu Mita wrote: > +static void nvme_coredump_logs(struct nvme_dev *dev) > +{ > + struct dev_coredumpm_bulk_data *bulk_data; > + > + if (!dev->dumps) > + return; > + > + bulk_data = nvme_coredump_alloc(dev, 1); > + if (!bulk_data) > + return; > + > + if (nvme_coredump_telemetry_log(bulk_data, &dev->ctrl)) > + dev->num_dumps--; > +} You'll need this function to return the same 'int' value from nvme_coredump_telemetry_log. A negative value here means that the device didn't produce a response, and that's important to check from the reset work since you'll need to abort the reset if that happens.