Received: by 10.223.176.5 with SMTP id f5csp2115003wra; Thu, 8 Feb 2018 08:40:21 -0800 (PST) X-Google-Smtp-Source: AH8x224xv9ziQw/TpmZeGYyEXK1B+J5nbepXa+bDrOi64bPyaNOPczSptk/yrED2O8vEqZBeD5rX X-Received: by 10.98.80.20 with SMTP id e20mr1281217pfb.148.1518108021405; Thu, 08 Feb 2018 08:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518108021; cv=none; d=google.com; s=arc-20160816; b=uvzaXmFy3/aCWrfPBxeSc2yiiyes4UvCfE8AN4tDxKAgiCh1syEOaYalp+MwzwEiiV 11wKN0mEauvhKkCTGhd7gqAGJrLCa3olKneKu0R7ZchvQ6UuTFWYmcAs8/HEhlmgNsgh Hs3GpO4P+S7QBaQ1sJU+PqOfvFsjp0WabCYvD7bEcB+mAL+N699RxsnSfCOzjQYv/EqK 9krBMTgmFwWwjQJwfFK1TWzOV6pa6kasOCN+VrfOEYQaUcwnfbvKFoEO4cvuJvIcSf19 kw2n80xVLcKOAcQdMvhyVlVuUfMe33ONi/iU+QFEG9Dpv1l8wkNkKyVlH/3hL6ZwX9vk npKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=s6JpwrbGpvIs2K6QuFBTtv3s0tXKAoBYFrKb0aVWvYs=; b=iTF2HTY2JNQ2f9aDhz1vIRSpiU7eMwdcc/8ld4+3yrfBzfIkXifrvs2L5uVOoZlsj8 NDpo+Vl2/+llELwZ/hKai8+URdbozoankLmZ/gWiQKOnNip0IjvIOo1RGDCnhh/9kaYX bgJDMkCU7p0IQeRyYROMsmTWPbdNYYayuuBFcF3wLA26PZ06TyTntszf6ERMF05581F4 IwFCUdIqzFpgy2TuFtE1jN+x3QWZnxC+LL+us8TGantb7/iMfHjEELiW5HaRVxBr62DW orMMmtkVHxkLo9zal53CETh2BS6Cv9pCYgQpXazh6VBFEA6yMfNnUSddpv55uvb5Hro9 jRfQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si208708pfi.93.2018.02.08.08.40.05; Thu, 08 Feb 2018 08:40:21 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbeBHQjP (ORCPT + 99 others); Thu, 8 Feb 2018 11:39:15 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:37056 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbeBHQjO (ORCPT ); Thu, 8 Feb 2018 11:39:14 -0500 Received: by mail-wm0-f65.google.com with SMTP id v71so11164549wmv.2 for ; Thu, 08 Feb 2018 08:39:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s6JpwrbGpvIs2K6QuFBTtv3s0tXKAoBYFrKb0aVWvYs=; b=p+fqR5HNLDCf9VdZThNasrBq9K1hRRalR5doF2FvAFypEYFWOSv5ez3AypM7VEOh1P BMt8s+A0qskoGDeRmdTr5q6Kiup46axrqT1nQ2hdnqLN4I8zUFBCcxHDjKZ6cuhnMGhd 3bnL0RR2C6ZUxx6GTWSxyysyhdpkc+6zI4sc+cV2RYROjIqcGXv5Os8pH1LGooMLpFVi jRP86UgyeopZQdlAomlL/RMHicRHuzgANqABZZ/ooPfCitruMQIsx4KDVozSne6E17Rk DXCypK1XGIGyhnXp6yI+9InTixm1QAhU90+OsQMehYQ+tqC6LAY3RMhApM45m2o6o3iP /bQQ== X-Gm-Message-State: APf1xPAm7iOo/+yCgLgkQmOtBEels0NFjEYOREg1NKhWBoQS/vvguQjB oEDRWzqswkLPx0rK9Nk4P+o= X-Received: by 10.28.156.81 with SMTP id f78mr1616591wme.131.1518107953025; Thu, 08 Feb 2018 08:39:13 -0800 (PST) Received: from [192.168.64.117] (bzq-219-42-90.isdn.bezeqint.net. [62.219.42.90]) by smtp.gmail.com with ESMTPSA id t141sm358559wmd.34.2018.02.08.08.39.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 08:39:12 -0800 (PST) Subject: Re: [PATCH V2]nvme-pci: Fixes EEH failure on ppc To: Keith Busch , wenxiong@linux.vnet.ibm.com Cc: axboe@fb.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, wenxiong@us.ibm.com References: <1518034178-26176-1-git-send-email-wenxiong@linux.vnet.ibm.com> <20180207211202.GD1337@localhost.localdomain> From: Sagi Grimberg Message-ID: <75ec663f-1598-7ad8-a23a-0524edc6e575@grimberg.me> Date: Thu, 8 Feb 2018 18:39:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180207211202.GD1337@localhost.localdomain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> @@ -1189,6 +1183,12 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) >> struct nvme_command cmd; >> u32 csts = readl(dev->bar + NVME_REG_CSTS); >> >> + /* If PCI error recovery process is happening, we cannot reset or >> + * the recovery mechanism will surely fail. >> + */ >> + if (pci_channel_offline(to_pci_dev(dev->dev))) >> + return BLK_EH_RESET_TIMER; > > So reading csts is what triggers EEH to be detected and get the channel > set offline? If so, don't we need a memory barrier before calling > pci_channel_offline? Otherwise it looks like the compiler optimization > could reorder these. I think you're right.