Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2013833imm; Thu, 24 May 2018 04:31:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpOU3QgAK8LvbhqeZ6r/fMNjXnB+YSMLQ++obiTj79Fcmu5ZPzRQTJvbbd+mO8kaGKBfcZ5 X-Received: by 2002:a63:6fc8:: with SMTP id k191-v6mr5580438pgc.153.1527161501535; Thu, 24 May 2018 04:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527161501; cv=none; d=google.com; s=arc-20160816; b=TFZF3jZP3l3nYgP2h1FXVm/d5izyz/rDjZY3nJcsc+zT70LUTHtkxWk0Rc1+9ml5W4 xuM4c4jHGWfOqP00o8e8lL27Zzb4iMMfbR+O/krvbbQCHYE0Q0tMdrnP7fwNWJFi0vc/ ErRp9LbH8d785UVpoKOBazBXfFO6Ox4bCBstUzHyB/Ju9pRPMGxNSlF1lTG4LIzY4WGZ Qxpq2GAZqOD3V3BQ+teEs6OrErkiTL7J/Zv8/rqgzOKI4pHEEvhXTqbRzaiN8W3cJiNH 05unwLMR1j7NY1JXUrbdTnzUa3bzaEEYhskQhYze86t7JOnLRe6ihILCI/KMwgMUkVMC cOQQ== 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=Dqeh+8JD4nODMJBeMBDvOL8ZFdDHxy7xysyf90PUjJI=; b=ImYFZvJJjK+bOB7Run+1oMb/auYFclJelmTm5DK0YLYT3YBr7U1Z9Lug4kowcT1Mmj Kw9PMoalvX1GzrjaBu4ywcmaBuDeUXP/4Xon7sF3T65RoXuoEpjv9CHt5L1R1Pfua05z 55FXOZKmcuDEn4JrvYG2fbOlTt6dGXzyPCtv6q3g8YuXQHnxEg6AGIOG6nw71PzMFa7d ZtYbd0TAKd9jkiOWe9HIS0hClL2+qEY5IN6FnOifv0Y7gJjxx2hJClpGy+XFnLfJXZZb T0keSeWE5QXF0+kDk56So1ZbxXCeREjCwowad7dKNPtIoSggDB702b5uCXkIayVvHwoW b2AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f6nHhe7Y; 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 z6-v6si5808278pgp.102.2018.05.24.04.31.27; Thu, 24 May 2018 04:31:41 -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=f6nHhe7Y; 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 S968917AbeEXL3f (ORCPT + 99 others); Thu, 24 May 2018 07:29:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:45856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967662AbeEXJvQ (ORCPT ); Thu, 24 May 2018 05:51:16 -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 903C520891; Thu, 24 May 2018 09:51:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155476; bh=oTCl/hkSCN0J33QzOYHOK1tfAfMVfBMoRKJZQhU7Dgk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f6nHhe7YufUYn545HrXiKOyX4NKCD9I+9aboV54D3kLhvh0yVgoLsBMB6Ns7/TwVV nP95VV5IdEeluUwIdx1ai3Hh/71+gvHXv62Ytq0o/UNb+4FqtqYc7btqAjsHj39qPU 2CaQSonGSbLTgxnYmCabEzdCw5tYoNjqZSowSK9Y= 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.9 64/96] scsi: lpfc: Fix issue_lip if link is disabled Date: Thu, 24 May 2018 11:38:47 +0200 Message-Id: <20180524093609.138725997@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093605.602125311@linuxfoundation.org> References: <20180524093605.602125311@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.9-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 @@ -635,7 +635,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;