From patchwork Wed Oct 19 08:23:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp212394wrs; Wed, 19 Oct 2022 02:07:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6E0e2HO5ymE31uzCXBcVdCdKqrBxEpdo0s/0ePS8E1KK53vF1m5Y6D2lXGJYIAX27Jyvag X-Received: by 2002:a50:fc0a:0:b0:458:73c0:7e04 with SMTP id i10-20020a50fc0a000000b0045873c07e04mr6270013edr.270.1666170445345; Wed, 19 Oct 2022 02:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170445; cv=none; d=google.com; s=arc-20160816; b=jM0ABseYj2+wHfNkD7pLmvco2q0xDH2aXe/Na5ldO3VhDXIYEDpRWFlQ3751c6dhXm 9GxHxItULp2dSuEXQwUJTtkoLcd24h6ox3/lCeMj8uxex+n8+w8eNxTm3WosQxkZcKgO lBSClAoa/15SDuuPa9oAkThTP1QHgmxRjI56XU+lZGvlQ7Sp8koeLxN5qkVW7BHOYZVm 5PHYHGJ6HEV8vYRHjhS6SSkMtIgUR93ncN0lR5hp0aIjFDjljAewg1O6HXCLMoEcKcur 5a5mqnm6wRAFVx04UEj2bAJTZRjVki5AIIUP5LHhN7f7WzurhBgfDMBKPQAzpVGo0iZj D3Ww== 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=xbWFnVdfcRb1cJD3rnOVH8DRP9Br9FivapKRK+dudZyi5g5GrxP2X0lEAUsImb0tNg bMyn3kPdVY93EdjgmW0wIFXDdi1TxQuakF7yeItcyJcWcXEDaQMIqZVBC6SxW9OCzewa 4nnPatetMDtzz8g8ZvlbaJmSq57hT1pJKCKRfzVNOzO3HU9uUMDxZw7Gms4RBxhjf4eW pdbrpRF7YHadsdVk2KwkEE2cC5wWKz2YcVOkddY88/7aeLi3DyruI/BfUkaPE7fj3UFY QJH4dp2wO2wsRZafHLSTIxi5K8YVIdKgeLMsAn3XqUNO9KRL/vB1+Bb7dDskogz/Lic9 HUmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dBSAjtXw; 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 tb8-20020a1709078b8800b00781df71dbc1si12538913ejc.174.2022.10.19.02.06.53; Wed, 19 Oct 2022 02:07:25 -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=dBSAjtXw; 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 S231967AbiJSJAL (ORCPT + 99 others); Wed, 19 Oct 2022 05:00:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231995AbiJSI6d (ORCPT ); Wed, 19 Oct 2022 04:58:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F69EA0268; Wed, 19 Oct 2022 01:53:57 -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 DD966617EC; Wed, 19 Oct 2022 08:42:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0D43C433B5; Wed, 19 Oct 2022 08:42:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666168953; bh=5dmX0BxH8ERt9C6w6xHEfRy2uRICDLXXIjsgURNzIo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dBSAjtXwCfUsqoM+ozvppfcJb6m2lQpHKC0UDJx0SDdn1wQ7YHlsVswUEOEHm8h7r Otd7Sp5Wnj9s/qlt8k1HRJFjVXhItSA1uyLE9rqLgERmQJn/ey/bKc4Ooux4UTrC7o H5RwW7SknEb0Skw/auhWYl19MKMGpr2X6HjPQvq4= 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 6.0 107/862] scsi: qedf: Populate sysfs attributes for vport Date: Wed, 19 Oct 2022 10:23:14 +0200 Message-Id: <20221019083254.650883140@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747106341372080744?= X-GMAIL-MSGID: =?utf-8?q?1747106341372080744?= 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);