From patchwork Mon Oct 24 11:27:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10191 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp641664wru; Mon, 24 Oct 2022 13:36:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vowttqgO/2LpsxlgEIbnWq0ZjHPXgprSo+47Y7rPFaSJm3M86wxsZ8uZbLMFMYpaMNlql X-Received: by 2002:a17:90b:4f4d:b0:20d:2225:4275 with SMTP id pj13-20020a17090b4f4d00b0020d22254275mr41189362pjb.191.1666643764239; Mon, 24 Oct 2022 13:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666643764; cv=none; d=google.com; s=arc-20160816; b=IaRqPoPVzsDF3G3UmTLEKbCUpsZXBdVxGQaXIFCt7WWnRWCrApgPNgaqkZ4OOwITf2 UAAwJN7q+EtFU/5lmEvUzfx5gXt9djavpm8A25Y6RX7gnG29PMSEYySEKyvnAoUMhZ7m Z1+zQbZ/koATXzrmZnEFjC6qIrdb+hGPeaVu12zizKwSBIhAA+hM+lGLAqzwr3ftRNUr nL9IwhQlQoApvy6hlghNpIIBKHBboddjuTdGHBUTYlDOCdHv6m6mFZq4TMAd67okWc/F iPd3J0ghggGgGVIoM+UWuBwNNB8aBXEVKUSdjAu0LnIbIpUzgkPQt1FIYxJAlL2SzR3T hMig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ijfGelvjzcojUuIMQUB0fg1bR2GTIsDcRepXOTxdN28=; b=GBhAA7yyH9Mx9cJza9HFwSQdvUf2vfCEljn83lFFO0DONYHpiwOm6MJXs7oVF7zb42 qlsSCwN7fVtGGyW/yL0hYu4s3uSb3zICbl9kM/IfoPON2olE7kbRXvftKh7fSb25lzP+ MdQhKZKDpOjkVOGfMr0fdTjvmZLvrA9ngSglHeVsXMrHlACvhG8tcDKPhIpmHfmub6ZZ b+yyEanP5nPtR0/CvVSeubQOlwocg/5q6PT4nCwsrQnRPggq6vLAANkIVeZpV6Yg/cyB Bs8tQ7q4mnlg/UoVvfb2szTbu2udRdENU/3uPTJWFNGLx3t2patlQV5Z9EnUUi/sa31P QQdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Aq3zO1Q2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a056a00084c00b0056183db44afsi800716pfk.102.2022.10.24.13.35.45; Mon, 24 Oct 2022 13:36:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Aq3zO1Q2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233619AbiJXU0F (ORCPT + 99 others); Mon, 24 Oct 2022 16:26:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234420AbiJXUYh (ORCPT ); Mon, 24 Oct 2022 16:24:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ADE55B53F; Mon, 24 Oct 2022 11:39:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5F4FAB81644; Mon, 24 Oct 2022 12:19:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5764C433D7; Mon, 24 Oct 2022 12:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613982; bh=2yfSzVrbOONMv0fjShFNQd3PpV2azSYsA/H7JtJyXRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aq3zO1Q2tSUb/hJwnAwKxbVPL56rJiBYRaveoe75WjaUXKKaJftxo/11yyxqEXy42 OvB9Pes/MbMNRg8NINCbhEzIZBTJ/m5lbEBTWE+gjM6cHOBJlUtJYiEeow+XuDljSa vcPPubkbDBxJ0gb1jG1sY9Bp6N8/ZOlGhWKXsAH0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guangwu Zhang , John Meneghini , Saurav Kashyap , Nilesh Javali , "Martin K. Petersen" Subject: [PATCH 5.10 047/390] scsi: qedf: Populate sysfs attributes for vport Date: Mon, 24 Oct 2022 13:27:24 +0200 Message-Id: <20221024113024.629144741@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747602652057935202?= X-GMAIL-MSGID: =?utf-8?q?1747602652057935202?= From: Saurav Kashyap commit 592642e6b11e620e4b43189f8072752429fc8dc3 upstream. Few vport parameters were displayed by systool as 'Unknown' or 'NULL'. Copy speed, supported_speed, frame_size and update port_type for NPIV port. Link: https://lore.kernel.org/r/20220919134434.3513-1-njavali@marvell.com Cc: stable@vger.kernel.org Tested-by: Guangwu Zhang Reviewed-by: John Meneghini Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qedf/qedf_main.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -1917,6 +1917,27 @@ static int qedf_vport_create(struct fc_v fc_vport_setlink(vn_port); } + /* Set symbolic node name */ + if (base_qedf->pdev->device == QL45xxx) + snprintf(fc_host_symbolic_name(vn_port->host), 256, + "Marvell FastLinQ 45xxx FCoE v%s", QEDF_VERSION); + + if (base_qedf->pdev->device == QL41xxx) + snprintf(fc_host_symbolic_name(vn_port->host), 256, + "Marvell FastLinQ 41xxx FCoE v%s", QEDF_VERSION); + + /* Set supported speed */ + fc_host_supported_speeds(vn_port->host) = n_port->link_supported_speeds; + + /* Set speed */ + vn_port->link_speed = n_port->link_speed; + + /* Set port type */ + fc_host_port_type(vn_port->host) = FC_PORTTYPE_NPIV; + + /* Set maxframe size */ + fc_host_maxframe_size(vn_port->host) = n_port->mfs; + QEDF_INFO(&(base_qedf->dbg_ctx), QEDF_LOG_NPIV, "vn_port=%p.\n", vn_port);