From patchwork Mon Oct 24 11:26:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9261 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp462218wru; Mon, 24 Oct 2022 06:45:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4sb4mMhuuJjfDmdI0EjZ9BUebwIIybego46s9Io9j+EFtHmKI1c2yrAo3+8T+ZxD6WFKCY X-Received: by 2002:a50:bb06:0:b0:461:4acc:4540 with SMTP id y6-20020a50bb06000000b004614acc4540mr16623218ede.307.1666619133804; Mon, 24 Oct 2022 06:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666619133; cv=none; d=google.com; s=arc-20160816; b=msGShet8e8tYelzyob6SSNjoyFUO1rTnOFmaDrIS+nM399eOah2FIeHqR80pWWc02O riRcUnDD7KBy5jrVFRlH+K+LkjH27z77ovH3lQZucFM0c62irWlxULHrjGxc1o5H9cGw 7pM0dZ7wgqIjpc5eqdaLVP0HbOSzOR2Prwk0kgeosu7AZEVjK+OEwiEB+GXTtoB2EOGL dIkrKSx/dxgxHn/jawMCEy9ssFVY3xGKbboLkPPdW2GJ++uNhVzjYBy4UCiwUx7w92vH TFGsZ7fb0JR1lHFymWxxjs5IQwJ9PXA6mhm7LA6yV0a4C91XheS6PT6mqFhjOzm5/zDH uD4A== 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=1unh5gNOM//0lURzWdG+dqOhsOfQoCT5wRTk73W49Es=; b=GQczSS8+RnkKwr36sfhm5fngfKovG8pN+qzIwI/8NUUd9yIeH6AYqcxKeEirvMR6qr +uebcMIpqrXcVnfRsnAHfbfM/oblAUamrRRN2PthPUI3pWt4sopzP6p1Gs1PolsqYbu9 UBGREEtubG6/9iZO+Zw9r4q3yeKCpMa2qeLsVUP90oHnNdTcJZkyZeNFRwRt9+NcpKH3 uvHZzJhLMBu6dDwiOMg9pRYyXBebcZqMwJ7R6XGj6FYgQ9zk3zGBuXPmWWiLrcXlCo4/ lOJ9uIH12271kq+GfIgMWVhuQqQxv8zzQgZoC7zilquAjTa1LmCUwSFlhLkFGW0RmfZr XYOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1pkM60fY; 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 h3-20020a0564020e8300b00461c852af19si2722454eda.633.2022.10.24.06.45.09; Mon, 24 Oct 2022 06:45:33 -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=1pkM60fY; 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 S236216AbiJXNnB (ORCPT + 99 others); Mon, 24 Oct 2022 09:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236622AbiJXNkt (ORCPT ); Mon, 24 Oct 2022 09:40:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 258CFB3B3A; Mon, 24 Oct 2022 05:37:54 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 98D2E61328; Mon, 24 Oct 2022 12:37:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAA9EC433D6; Mon, 24 Oct 2022 12:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615044; bh=5dmX0BxH8ERt9C6w6xHEfRy2uRICDLXXIjsgURNzIo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1pkM60fYqMVeRjX9mYrYx1ZBL3tvjKAKjHOdziqYQWdZiXYAGggm5CQCOjtbXXHqt ooY5q6xL63ueg7QG4IRlIggjkDyzVzkwgytkzGOM84lriPH4ixmswmDtqnJiLghqHJ WWs4XVqBx7w7MuOeGUp7UW9x4qF+fSogP9CTjNW8= 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.15 071/530] scsi: qedf: Populate sysfs attributes for vport Date: Mon, 24 Oct 2022 13:26:55 +0200 Message-Id: <20221024113048.229359103@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@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?1747576824505305204?= X-GMAIL-MSGID: =?utf-8?q?1747576824505305204?= 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 @@ -1921,6 +1921,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);