Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1941485imm; Thu, 24 May 2018 03:18:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoWgCfZG44GPhN8p+poherC5kZnzPcevpHAbPCWN2GP7sp57CZbsK6JdtRCqf1gsloCD/3B X-Received: by 2002:a65:5c09:: with SMTP id u9-v6mr5369790pgr.304.1527157125876; Thu, 24 May 2018 03:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157125; cv=none; d=google.com; s=arc-20160816; b=jyryBuKfIBxQmdpMQPo5pErjw8y8o1YLYNPh5wjCXctJ/7CJNGfRa1OjmPdNI42SPS jmXT6m0lUsZD3l0JjIROiIaFYspcTNQ7PtD0a/itg4tyCafD4JaE6sud02XRzDYCliKq t51YFBVEH2AXcuHLEFddeoZHR85zjK3vKEkbfxnNDkov+JuPEGrcRRDX2RGcrl+ad9vX QRtaeR/UzPLIJ4URg6w01QN/Ujv+6YWCK/CdBnMq8H0LtEoqRdZrviYVm1eWWG24j6lB ilXfQ9RS6dZP2InnMR8uPhzDPbmWT5TvNKGuN5opHcvdkf7+Wb+Ia3fE5sdgMxd+fWmN ZQqA== 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=IJrPS/Vjf5XsiUiYBUFluq+SNoZlrwe7MnJTH2ZYobM=; b=xVbXA6knM4f7yBKqMj0RlL+kmwbr0/xy5nFc8fx4IFWPzOKiohlKa3dJTgj6zJUU2R V2JFVxL9yucTYaNVvH7YtEsBGwdC/1EwnEVyxMLUpCZqA35ZqGZj9q61q9FX/kZsatdQ CoPtON+aJQg+GbLa/HacH9B5uAO/uwknNo2MfkWDKBzrY6xFU3mH/bG8inwik/QgzKA6 5jdFz0bqWX0OUnfPZLH7DOlBURbyL5HIGDrbEDUkrjh+1duqs3I14dHXCT9CXoq2fnH7 cFPLw78UjnJ6YCMX+XTEveOgzGFMCwLTyEIBXEJbJENbupSPCWHJ9rrNdMk/wuV6O9H3 4TIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GlKQRh7F; 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 z9-v6si23095407plk.94.2018.05.24.03.18.30; Thu, 24 May 2018 03:18:45 -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=GlKQRh7F; 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 S1031621AbeEXKRr (ORCPT + 99 others); Thu, 24 May 2018 06:17:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:53192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031330AbeEXKDv (ORCPT ); Thu, 24 May 2018 06:03:51 -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 AA56720891; Thu, 24 May 2018 10:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156231; bh=8f1CVGCWW3Y8fW9gwfcGYqYjf6YN2epX7p/JBJkUA7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GlKQRh7FK+aciCWPuRPmvup5bFXcUYz9wfTLVBGT7AE29s43AmN4vX7rSX7Hfkxvs 7ayc4izLYlr7IZKqnVOySu0XlG5HPdMxPLIXTot0zwPTpjtbXNw1OVD8zedrZMYCot OG1kaJiATDPWPweynt5NSsgUdzAvwKdOu+lO/1T8= 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.16 112/161] scsi: lpfc: Fix issue_lip if link is disabled Date: Thu, 24 May 2018 11:38:57 +0200 Message-Id: <20180524093031.762194177@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-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 @@ -905,7 +905,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;