Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2507685imm; Mon, 28 May 2018 09:23:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrftXJ4P/DgmdE9qMxXeEuD7wTKx1gklQ06KQTan22Xfp2BGdBXoKkKn3oR1ySSrHRd+qsc X-Received: by 2002:a17:902:7082:: with SMTP id z2-v6mr14030630plk.373.1527524590471; Mon, 28 May 2018 09:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527524590; cv=none; d=google.com; s=arc-20160816; b=ctouxxbV1q82+mCR/uAamMouEeHcZXA/kcbzOY679ks5mDf+iAUqWH8kJWVpldP3hk f2ld9KoT5HLpFY9BZi8MHi2WAt2VJFTuSdnBID+tcYWpUopkmEPtZejCKSB9V/nortNe GvzTcW1eV8j4c12SG89CxJCVJJlVv8neLwesIAhDmC2ektRM0KaLnM7cPJj55Um3trsX yAmdsnDarDANjfptLM5c/+sBtSxyU1Qe82cn47cl1KeLzbxd56D0w82nHlg7dsiQDZnF iW+VK/Eff1FCPmQtxug3pY2iw0A+1yKit4AXy5dSJEh95+yXS5MX7kkx4phXwxpv0rbG H4qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=6D/8JrIMrkGBMM5e1iUW0TV5zX/lZoc1IXxufp8+Nv8=; b=pHDgGd4eJatpNBOfZNxDrWyvtY7V5vUeOYU2QKBW2zvckUZQrHXoJSs1glDXcXNxHD YO+e1GLUoDel+Y6NKVuLS/0LInNBWgncGEbJgIKcuWHemb9g9PL6gTa66/K2kUpxKnZe eXVq8TuyYGM13hwtTg+8q+LlVps+2++x8UG+ANf+vYSjaxU/CtmX3q8y/a23//I/epKf nBbXqauTqipP3Q4MLILT6TSM2/Dz8A/mwyW0vmFHhfXAocaMn7QQw6HicmEzhwAw9vtM Gnr3U6oPNHE+BnVbylSC+Xm+1CBB1yigbbd/Jujech2W/m7zK8Ji3BIjLb1vbIyYrjMr WEiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qu0ddyB5; 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 r59-v6si30005959plb.314.2018.05.28.09.22.55; Mon, 28 May 2018 09:23:10 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Qu0ddyB5; 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 S1425266AbeE1QWZ (ORCPT + 99 others); Mon, 28 May 2018 12:22:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:59708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933961AbeE1KLb (ORCPT ); Mon, 28 May 2018 06:11:31 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 914EA2086D; Mon, 28 May 2018 10:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502291; bh=cY9o0ziOfZqKfJGeqQTOyTeaix/ZqLdnPMn22bz7PuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qu0ddyB5lslQmW6W3IAK2zJ8ZwWqp8nD2IoUFf1RQwfSE4SeFcb//2yBiDtJxmeJg zJPX0pjroHenSg5cto68hnFC1qdan8LqFML8F9Y+cxyp422k2gHk62Gg5xGvnTToif rYRtt9fMI2alyanz6Df1koc9vg1WZInLrRE07uqQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Carlo Pisani , Kyle McMartin , Grant Grundler , Helge Deller , Sasha Levin Subject: [PATCH 3.18 131/185] parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode Date: Mon, 28 May 2018 12:02:52 +0200 Message-Id: <20180528100104.528728026@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Helge Deller [ Upstream commit b845f66f78bf42a4ce98e5cfe0e94fab41dd0742 ] Carlo Pisani noticed that his C3600 workstation behaved unstable during heavy I/O on the PCI bus with a VIA VT6421 IDE/SATA PCI card. To avoid such instability, this patch switches the LBA PCI bus from Hard Fail mode into Soft Fail mode. In this mode the bus will return -1UL for timed out MMIO transactions, which is exactly how the x86 (and most other architectures) PCI busses behave. This patch is based on a proposal by Grant Grundler and Kyle McMartin 10 years ago: https://www.spinics.net/lists/linux-parisc/msg01027.html Cc: Carlo Pisani Cc: Kyle McMartin Reviewed-by: Grant Grundler Signed-off-by: Helge Deller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/parisc/lba_pci.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c @@ -1366,9 +1366,27 @@ lba_hw_init(struct lba_device *d) WRITE_REG32(stat, d->hba.base_addr + LBA_ERROR_CONFIG); } - /* Set HF mode as the default (vs. -1 mode). */ + + /* + * Hard Fail vs. Soft Fail on PCI "Master Abort". + * + * "Master Abort" means the MMIO transaction timed out - usually due to + * the device not responding to an MMIO read. We would like HF to be + * enabled to find driver problems, though it means the system will + * crash with a HPMC. + * + * In SoftFail mode "~0L" is returned as a result of a timeout on the + * pci bus. This is like how PCI busses on x86 and most other + * architectures behave. In order to increase compatibility with + * existing (x86) PCI hardware and existing Linux drivers we enable + * Soft Faul mode on PA-RISC now too. + */ stat = READ_REG32(d->hba.base_addr + LBA_STAT_CTL); +#if defined(ENABLE_HARDFAIL) WRITE_REG32(stat | HF_ENABLE, d->hba.base_addr + LBA_STAT_CTL); +#else + WRITE_REG32(stat & ~HF_ENABLE, d->hba.base_addr + LBA_STAT_CTL); +#endif /* ** Writing a zero to STAT_CTL.rf (bit 0) will clear reset signal