Received: by 10.213.65.68 with SMTP id h4csp2113483imn; Sun, 8 Apr 2018 20:03:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx48NbL9qdPrSq0UKPU4M/mrH0ZgwLDs5ZXkYgAB5m/YQGzytsALueTxfop9NhUv65huKGRQU X-Received: by 10.101.78.134 with SMTP id b6mr13291420pgs.392.1523243009910; Sun, 08 Apr 2018 20:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243009; cv=none; d=google.com; s=arc-20160816; b=TQq//agAIK5VYPwKFp+G32nQlWL2Owv6dD8lsjYn7otb06tSw/FCLJ3K6ASTmyDPsR kt7ESJSzlTfHXdJPQO06gCzS0IbGd93NpGZ684U12QkMJF6QWxp8Z90ImsaygA8NvFFH Ix7aOHv5AF+n1VXA4W7TNyog75ZfYgdc0KzZDzAGh+IStPwvJrimx55QZmicAsYxsOIs Zs41wI+ilLisC7ZOeGzfNlQIheGA5b31h5qO2M8MCeIF574xLpjCPKTp6JFe0oTgB4Fx bVP43xtxMKpojFm2gZDC+G1FdD7DvDm1S+v5pD6DJoHy+O9JHJ2KPaZqZrC6uCHvlJ97 +Q+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=6Bo7AzbCORAc5N9/iUUD/TV2g9TYI3IVCHb1yliATHo=; b=qe3PjZgYaSvxXQwzntZqlwXBlVmUvb7JGSSW53K2sjupklftI+jpZz51PcSRQlmHIu 1AZE/VYIt8lbLmcRiDmybr0A+D5YmgvqWSscbQhOxS021ACDvI66JeA8izGdTXpjRaVh JXKzGPkBFcSmRolLRAfbwiAORcC8+D9Yv0UejjLTkyBEwjOvmquGGGbva8gScSoeFubk URAT9OHbR0P+y6wAn0FadFCXyXqfXtSB/a2b0zxQYSrfWNrD+oHi8Pj2ELbTlolP3vg4 lfLz1S7dMW7MjFzStHKLM6NMcaehpCUJB6slRnG1sGXRdArnUN0LFkW/4MsHr9BU5MXt cd5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ctv07NeJ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33-v6si13295201plb.429.2018.04.08.20.02.53; Sun, 08 Apr 2018 20:03:29 -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=@microsoft.com header.s=selector1 header.b=ctv07NeJ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755717AbeDIA1w (ORCPT + 99 others); Sun, 8 Apr 2018 20:27:52 -0400 Received: from mail-cys01nam02on0094.outbound.protection.outlook.com ([104.47.37.94]:22752 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755641AbeDIA1i (ORCPT ); Sun, 8 Apr 2018 20:27:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6Bo7AzbCORAc5N9/iUUD/TV2g9TYI3IVCHb1yliATHo=; b=ctv07NeJsiubQhMxm5V3WSBR+Q+Q8zbbdEjw6/8xD1b1Gn7uxXx8z4h52lyoC0P1Nfb+dd0dwwlOZgnwRjNb829hhc0EugLjnRtV34+e7gaYXZm3twBth3wZgSE1apnJK0/LN0MoWCe60w4xuj57rb5FhhqMwrcRPS9T5mCqj8g= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:27:31 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:27:31 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: James Smart , Dick Kennedy , James Smart , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 052/293] scsi: lpfc: Fix return value of board_mode store routine in case of online failure Thread-Topic: [PATCH AUTOSEL for 4.9 052/293] scsi: lpfc: Fix return value of board_mode store routine in case of online failure Thread-Index: AQHTz5j8mqGqoRvWMEC7RjQpNg0SfQ== Date: Mon, 9 Apr 2018 00:23:30 +0000 Message-ID: <20180409002239.163177-52-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1031;7:/zAa2KMnN68IP+Pn54kxrc0KiHoeZu87PUMa0KzernpLzJXa33wwMcwRlgab9lLSkb4TkdiNH8ERkWD2BzC9fZXa7rxdeE05tlJqZOJha7fCufwbSH//FtiSiAObn3XMu6BoTpCBXr9AoPilNhGIB/jjOr297tpdnbLrmHk9dndEWoBMxe/rpxBJs0ZJU+FOjNksL6vr66si122r5dQoLdVqzh8aN7qBAXqh7h7xA+NFh8+fh6GaHxIlCqclE+wU;20:kQFIuKmc5TW5iSq85AuxtJeBoLCyp1FOjSvfK3Hi3TK7a486C6xKqRwmLwKoI8Ug5hgk8nAhMgirc1zN+jYmnfNObOs8zyuEru0ZRureujB0chPzgFWYzkuYCxu7PUCWFVGocjo5H9PG3lqlRlYFD5h0hnOu+wIqk3JbK7Irp6k= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: bbe73bb1-2c1f-41b8-37bd-08d59db0aea8 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(209352067349851)(85827821059158)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1031;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1031; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(366004)(39380400002)(346002)(39860400002)(189003)(199004)(2900100001)(10290500003)(99286004)(76176011)(14454004)(7736002)(11346002)(26005)(86612001)(72206003)(478600001)(36756003)(106356001)(66066001)(2616005)(186003)(22452003)(86362001)(68736007)(305945005)(54906003)(102836004)(486006)(59450400001)(110136005)(316002)(6506007)(446003)(107886003)(53936002)(4326008)(105586002)(6436002)(6486002)(476003)(6512007)(39060400002)(5660300001)(5250100002)(25786009)(3846002)(6116002)(1076002)(97736004)(3280700002)(2501003)(2906002)(81156014)(8676002)(10090500001)(81166006)(8936002)(3660700001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1031;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: M2L+fwsC5OLePkqbDwHjI0NmEH6JrXErr1sKukDVqbDKh9BOlk8h9IIt83WXx0CWnBhFMjscxsZ52wnhIQnnH4SKUGZlz/7SXNa/UF+KnfvN/cM+TFiLaLyvQihuahhXQkVWRrJj9fd1xBjY0xVw2v19F3/4pOS9jlsXLrK/CYSTwf6ssQnnrFF8bM2FiiCAuyjeYMevx40AXwDOB4KheniLrKZ57WzRrpZakhkvnKQVKCdTla0YT6t6A7QY3Dnc+wqlEh5A6kfTYJBravmWmlfDXDoVPCm5LO4Mu2niBODQDptmAmjUG/2HM3TbFCJYXaYX23H93WuNXmC6gdDghN9rOoel2wYMyJCaJHeVq82/Pl+9nbVnWyvwl1ZGWPlHLUaIdri4HG/blOIgzFDVY6HE1Z1V777r9ZeUezaBod4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbe73bb1-2c1f-41b8-37bd-08d59db0aea8 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:23:30.5342 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit 522dceeb62ded1a7b538d2f1f61cc69a1402537d ] On hbacmd reset failure, observing wrong string "nline" in kernel log. On failure, non negative value (1) is returned from sysfs store routine. It is interpreted as count by kernel and store routine is called again with the remaining characters as input. Fix: Return negative error code (-EIO) in case of failure. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_attr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 453299095847..94982fc5f2c4 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -1091,6 +1091,8 @@ lpfc_board_mode_store(struct device *dev, struct devi= ce_attribute *attr, goto board_mode_out; } wait_for_completion(&online_compl); + if (status) + status =3D -EIO; } else if (strncmp(buf, "offline", sizeof("offline") - 1) =3D=3D 0) status =3D lpfc_do_offline(phba, LPFC_EVT_OFFLINE); else if (strncmp(buf, "warm", sizeof("warm") - 1) =3D=3D 0) --=20 2.15.1