From patchwork Fri Nov 3 16:33:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10040689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3AB9602D8 for ; Fri, 3 Nov 2017 16:33:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D477220246 for ; Fri, 3 Nov 2017 16:33:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C991E29682; Fri, 3 Nov 2017 16:33:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C445020246 for ; Fri, 3 Nov 2017 16:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756113AbdKCQdl (ORCPT ); Fri, 3 Nov 2017 12:33:41 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:46921 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751385AbdKCQdj (ORCPT ); Fri, 3 Nov 2017 12:33:39 -0400 Received: by mail-qk0-f196.google.com with SMTP id k123so3909936qke.3 for ; Fri, 03 Nov 2017 09:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Mz+8HuCns+olTDBJdDh4HsKKQOei93r9ZZDKMyn0JEs=; b=PG0ndbwYlxXWmIkHfYLI7uixUbkCDN6jJB7lnmXQoytRutZ6zg9DpSk49uupWOjBi8 TxSciolqEQ8Gt/5Dv/EUC19gx8INFZjUmz5lXtAbU1aUzY55/MMAl82CXSXP9zLI8Qko /xtJYLI3FgQyvH/wY0W2XlQc5WHsYVLwG0UYJFWfO+IJ7Wal7YDBh+hIdzisOVIld5Sb nLYY3Km7mxA2sHyuik7wVn677JA0ph9kJUAQxhoa9qEn0t/CdpzK4j2wQzp6Q7PbtxBm 5DUNOXrnHJHELMtun9igQ582R0BpD78wpbu0r0Rb0bN2KOSAtPdJkohqsFUx1kH2VEUY yUPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Mz+8HuCns+olTDBJdDh4HsKKQOei93r9ZZDKMyn0JEs=; b=cl98XHoK7IKCXQBVZ32lV/wT5DeOkmOZv5ABhizcLHQgeG89qbPE3QvJxFpxujV0u9 i8xzrohY4/K7AT+Y025mVidESmPHKG278rBGIuWwMizy+swfoTx0sTC/k+7D8gErpPY0 mbyaQiecj+7WOosFV0QCpouijVF4mwCtl8FIda3d3F79J1cbUeN0QNv0AuJRBXNcSkRZ y72HsafDn0WyPrXjy31klFVHkn+AK0yO7ATa1a367vCWgvP0YqF9f5G+/yzkGd8DATJS kYqsOUSmW59HrMXAtwlJTna3s91tlpikBC8h3FpvnGL7Xz2k3RFkHs5oUoN00r02ukV/ YeEw== X-Gm-Message-State: AMCzsaXOsURka/lqKILHaXqa09Xofm1r42z4scH322gxrJysZL1s0pv0 1zZTFZxc3gHT5xwI14eBnurPl/KZ X-Google-Smtp-Source: ABhQp+Q6ltvenxgmjNNfE6U1Ju7seIu7ZnEinp8ui3wpco6AdtjEyPlWIHV3WiUJcUqwENz6dnqNBQ== X-Received: by 10.55.79.129 with SMTP id d123mr10677087qkb.247.1509726818323; Fri, 03 Nov 2017 09:33:38 -0700 (PDT) Received: from pallmd1.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id n83sm3978224qkl.2.2017.11.03.09.33.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Nov 2017 09:33:37 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org Cc: James Smart , James Smart Subject: [PATCH v3] lpfc: Tie in to new dev_loss_tmo interface in nvme transport Date: Fri, 3 Nov 2017 09:33:30 -0700 Message-Id: <20171103163330.28659-1-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch calls the new nvme transport routine for dev_loss_tmo whenever the SCSI fc transport calls the lldd to make a dynamic change to a remote ports dev_loss_tmo. Signed-off-by: James Smart --- This lpfc patch, as dependent upon the new nvme transport nvme_fc_set_remoteport_devloss() call, should enter via nvme-4.15 v2/v3: Ensure nvme_fc is enabled for compilation --- drivers/scsi/lpfc/lpfc_attr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index c17677f494af..3e02bc3a7c3f 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -3246,6 +3246,11 @@ lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport) continue; if (ndlp->rport) ndlp->rport->dev_loss_tmo = vport->cfg_devloss_tmo; +#if (IS_ENABLED(CONFIG_NVME_FC)) + if (ndlp->nrport) + nvme_fc_set_remoteport_devloss(ndlp->nrport->remoteport, + vport->cfg_devloss_tmo); +#endif } spin_unlock_irq(shost->host_lock); }