Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2237715ybg; Sun, 27 Oct 2019 14:06:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvMnsPyMXT/kXLH282hyky9baQi7mRaITjHxijJjQQf4SyN1PliHfI1lDJDoNhBQCehSlj X-Received: by 2002:a17:906:4813:: with SMTP id w19mr13874240ejq.258.1572210416888; Sun, 27 Oct 2019 14:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572210416; cv=none; d=google.com; s=arc-20160816; b=af+srCW19rmBF0no3Hr+eqjvwU6/42KTef2TSt2ssOtoMyBg650PcTU1g315FfQYNx fHbr/szdBo9f70uH6eAE3MXJFJ+vMn/22dLCJga+NLQo3YgABuHQAFbNwyGLWR2KWUlj JfNt7u5Ujk8z+kFaoHzQq8v7j49hTAd/45C7DT/leWDA8vwrCu7Rv22tu0LwzCn8ARXZ BIWA2zfIGaovIxCEfwESNlPPtZvuw+advekeUtX31P7DCZYnoNiqESRvN0tlJ/g4LPW8 uMpnAWd4dkRoR6owt79hiu7okbS+5SQzLRzwWdzKNu+H2vandgWIQgJdv06Otz3u59DG rPQA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=URR4cjarhfaRHAu6vK03j0BuzisQHzYgqkaVpIuF4gA=; b=jpGC1IOH2evBzeR4AqBlgv52l1u1I5wxh/9cSAZr77uS0WYLHwMDrwBZOHF6A1wKw2 KTEiiswarhVBLA937JT3Mea5g2jRdSUT9LlzvAWAEgJN8qq8d6WVxw+lEwE9idOqmhjh V7w440cQfApvpoXgdk3PmUqCK7Jd92ALC4O/tl7S1Ab8yM/+VYuA5kvsfVxqWKoVc9y0 Its0egas5AEzgSZbhk/J1rehlhl3c+lyFLDiz1Kwm81xMMwjOwfB8EX8fq7gvTZaBfPn HdKVDjEFoUCj00cjbwQ3b7IdjZw/BMhu1Sk2JNCMY8G6kRJoSBBM8PqBFt6ypv9Yyn/R Avdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qga2Tknh; 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 i11si5337546ejy.184.2019.10.27.14.06.33; Sun, 27 Oct 2019 14:06:56 -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=qga2Tknh; 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 S1728597AbfJ0VES (ORCPT + 99 others); Sun, 27 Oct 2019 17:04:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:49908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728581AbfJ0VEQ (ORCPT ); Sun, 27 Oct 2019 17:04:16 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (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 31C92208C0; Sun, 27 Oct 2019 21:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572210254; bh=EOMqGP89HMO72EZHVQn2nCw3b52ThsOy/IPuIyp2Pug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qga2Tknh+Pf1g9N+BHIBZRUxcR2w97nKCHRBIJEFj7tJDYbLJvyDjMizp6Kwffoh5 oaceelJfOctmWD4837xf0/B/Gip1u3B95jCN/7RV3AIF+e5bFlwOM7ivXs7aGr+W2N T5ec9oNJDlUrT6SbmQrfyVyy8Eg8OehtvWtERKcM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jens Remus , Benjamin Block , Steffen Maier , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.4 30/41] scsi: zfcp: fix reaction on bit error threshold notification Date: Sun, 27 Oct 2019 22:01:08 +0100 Message-Id: <20191027203125.040101070@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203056.220821342@linuxfoundation.org> References: <20191027203056.220821342@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steffen Maier [ Upstream commit 2190168aaea42c31bff7b9a967e7b045f07df095 ] On excessive bit errors for the FCP channel ingress fibre path, the channel notifies us. Previously, we only emitted a kernel message and a trace record. Since performance can become suboptimal with I/O timeouts due to bit errors, we now stop using an FCP device by default on channel notification so multipath on top can timely failover to other paths. A new module parameter zfcp.ber_stop can be used to get zfcp old behavior. User explanation of new kernel message: * Description: * The FCP channel reported that its bit error threshold has been exceeded. * These errors might result from a problem with the physical components * of the local fibre link into the FCP channel. * The problem might be damage or malfunction of the cable or * cable connection between the FCP channel and * the adjacent fabric switch port or the point-to-point peer. * Find details about the errors in the HBA trace for the FCP device. * The zfcp device driver closed down the FCP device * to limit the performance impact from possible I/O command timeouts. * User action: * Check for problems on the local fibre link, ensure that fibre optics are * clean and functional, and all cables are properly plugged. * After the repair action, you can manually recover the FCP device by * writing "0" into its "failed" sysfs attribute. * If recovery through sysfs is not possible, set the CHPID of the device * offline and back online on the service element. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: #2.6.30+ Link: https://lore.kernel.org/r/20191001104949.42810-1-maier@linux.ibm.com Reviewed-by: Jens Remus Reviewed-by: Benjamin Block Signed-off-by: Steffen Maier Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/s390/scsi/zfcp_fsf.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 1964391db9047..a3aaef4c53a3c 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -20,6 +20,11 @@ struct kmem_cache *zfcp_fsf_qtcb_cache; +static bool ber_stop = true; +module_param(ber_stop, bool, 0600); +MODULE_PARM_DESC(ber_stop, + "Shuts down FCP devices for FCP channels that report a bit-error count in excess of its threshold (default on)"); + static void zfcp_fsf_request_timeout_handler(unsigned long data) { struct zfcp_adapter *adapter = (struct zfcp_adapter *) data; @@ -231,10 +236,15 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req) case FSF_STATUS_READ_SENSE_DATA_AVAIL: break; case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: - dev_warn(&adapter->ccw_device->dev, - "The error threshold for checksum statistics " - "has been exceeded\n"); zfcp_dbf_hba_bit_err("fssrh_3", req); + if (ber_stop) { + dev_warn(&adapter->ccw_device->dev, + "All paths over this FCP device are disused because of excessive bit errors\n"); + zfcp_erp_adapter_shutdown(adapter, 0, "fssrh_b"); + } else { + dev_warn(&adapter->ccw_device->dev, + "The error threshold for checksum statistics has been exceeded\n"); + } break; case FSF_STATUS_READ_LINK_DOWN: zfcp_fsf_status_read_link_down(req); -- 2.20.1