Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1967266imm; Thu, 24 May 2018 03:44:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr6XHFfuOAIDHfvyKCse4gE7HHAGv3l4FDLp9DaJPKyFw5jcCbr0XMZGkEa6Vvn4UkCpT6t X-Received: by 2002:a65:6489:: with SMTP id e9-v6mr5451554pgv.44.1527158692684; Thu, 24 May 2018 03:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527158692; cv=none; d=google.com; s=arc-20160816; b=QJ+x3it5nlLg0kx9zAaRmjrMldNjK9RWH38GMI6Mf44GZpSbZiQ77bseBRRZi5XgFi M/Vwuhre5y8PoTAP33zp6eeORntflOJzFLY6BXHA6RhZ+Me2gxQZBK/clkjuXtYJeiM7 bt+NWdsClO4c2hmPhQhJq7Xs+eeSbYH1YvUy0w3NKdKMxq7LvhbP4+n4CGtd/HsDBT3X gftYKh4f8nPWh9j5AcyljtoJyxdJmatlmVEDixI0RFax5EeNfQkVdv51Ugc+SlkC4xQo MMGwOtmKtEiRIF0QC9GjDtOfBQ0KkrHzJSM3c9IoNka6x4WuX+ROeS/Xh1/yYpbsbHYl 8t8A== 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=1krwRBpShX4TyfJij/LLOEHKF0SDMRhp5SsTOieGcG0=; b=MPWxNs7NZGUecnYQ+5bPwniCwhYkhG/fcBw3NiZ2wOHPMBAB6Sno3HzFSkUiAo92Q9 DRyQs3ZcWiUPCmEyRYq1YW06nF8FkYxp8tnbbtVA4/j5a//cwKtpc+5/975SG07LwMou 06wDronPzUf6ryp+XBWye1brDvLD77fAdOs/SJqsZQp7y6iNFv5rERX3UIogju9JcF23 DaizpSKp5W+S1uOpw4w6Hp84HlxsimS9cflSwx9AFhwxjO+Y8epmitABoLaMPYP2YEry Bd/8W0GYCEyWoGHS38VLZKlf3BE6Fbgp4zlVrUuEzMFobkz2stFzpN520jTKa9QJm1Ug YBTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nHWId+4U; 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 34-v6si21115696plp.409.2018.05.24.03.44.37; Thu, 24 May 2018 03:44:52 -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=nHWId+4U; 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 S1032371AbeEXKoD (ORCPT + 99 others); Thu, 24 May 2018 06:44:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:37848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030553AbeEXJ6F (ORCPT ); Thu, 24 May 2018 05:58:05 -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 5C1A720891; Thu, 24 May 2018 09:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155884; bh=7L5Dv7UMmQbeC+1k79HXjlwPFmCj6js2No9GJdToQ34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nHWId+4UquDFe7DLKHY6OOvNDN0q7HvSus+jRUyVhqaHlYADDXvFtMpWiVl+7Mbtb By/s0M/tmQ4OqP0vvmoxEAkWNMgtWIXRWSPMiEn8d0IwWI7U4LrksM53m1PiyKdToK JjCKNCuMdcO7tJo6zfDE4Q9+yvgC4fPO8YVMcmG4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dick Kennedy , James Smart , Hannes Reinecke , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 118/165] scsi: lpfc: Fix issue_lip if link is disabled Date: Thu, 24 May 2018 11:38:44 +0200 Message-Id: <20180524093626.788030794@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: James Smart [ Upstream commit 2289e9598dde9705400559ca2606fb8c145c34f0 ] The driver ignored checks on whether the link should be kept administratively down after a link bounce. Correct the checks. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/lpfc/lpfc_attr.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -871,7 +871,12 @@ lpfc_issue_lip(struct Scsi_Host *shost) LPFC_MBOXQ_t *pmboxq; int mbxstatus = MBXERR_ERROR; + /* + * If the link is offline, disabled or BLOCK_MGMT_IO + * it doesn't make any sense to allow issue_lip + */ if ((vport->fc_flag & FC_OFFLINE_MODE) || + (phba->hba_flag & LINK_DISABLED) || (phba->sli.sli_flag & LPFC_BLOCK_MGMT_IO)) return -EPERM;