Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1458206ybn; Wed, 25 Sep 2019 18:59:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9rdMdXdgBgRUxhQrHVSwBQOBHHZJTz1wEbo3yg0/zFy3RD8fWPH/UVyhRajaq6N5iLx+S X-Received: by 2002:a50:eb41:: with SMTP id z1mr1065355edp.261.1569463148230; Wed, 25 Sep 2019 18:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569463148; cv=none; d=google.com; s=arc-20160816; b=npmc3XRCzelXB2e7H+kvW3fvE9URM1tB0BDzaLUTzgprwYt6KfB98OZhvkaCyW78AT ORNPUgTYys8sQUd9GYnFTlbf9WFsGSs/WWP3o+oCF1kTk1h87rnIsWhAAWYAWYOlbCya c3BeVdIZIh9h5cq6n70BA2hAPxgwlqj03+2bhsJpEANk7KTHrnV1SdWn1emghLmP4dep gPOW2dJr6USfPCoNyVZFHD9g1GtVl2nTPH4A/FBA0w1d7KruQOCNylLKnRTf+nBNQmdC lccEr9lI5x7FS7OQH9rBqF+OC/RtaY5QyWeCvAAzcXjCIHWL+ClKDYIVUOcG9utkkLWE sqjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=bjWSyDj24kfamDL1zaoE43y8/b2XcBx6H/1PJ0NtFU8=; b=zuKtyF8fZLPqU0Kcl/Zd42J7q6fEl+zG9RyytSjEoVh/JHZc7MQsXyWQfmNLPLVMvW fb4hA+oxgh8NYPzmYa0gxPlPmd+Lbi9nnYx2SMcffr78bDfM9mS7735a0k2w7oydIsRw GRI6/pnXq2KJgsWKWX+9OTTcmqLYES2zrIYAX0FHdrwstJkbjQFEXT0oOJhj8o9+9AFG 0f7a1qvD3j+jiTnxJJkD347nDTuKa9BMq1ZWwN4tOZ1Vq/v1bJeBXXfRpUGmX2zTLbG3 UJeUd3dA9BPi63yC7t45AtrFdjTp8rOQ0k5Ig47PBBfw9LWBnPZvk6kicJ4VB1VS5hM4 tzrQ== ARC-Authentication-Results: i=1; mx.google.com; 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 s9si284012eju.298.2019.09.25.18.58.44; Wed, 25 Sep 2019 18:59:08 -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; 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 S2504849AbfIXMD5 (ORCPT + 99 others); Tue, 24 Sep 2019 08:03:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:41750 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2439102AbfIXMD4 (ORCPT ); Tue, 24 Sep 2019 08:03:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A421CACC3; Tue, 24 Sep 2019 12:03:54 +0000 (UTC) Subject: Re: [PATCH v2] scsi: qedf: Add port_id getter To: Daniel Wagner , QLogic-Storage-Upstream@cavium.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190924072906.23737-1-dwagner@suse.de> From: Hannes Reinecke Openpgp: preference=signencrypt Autocrypt: addr=hare@suse.de; prefer-encrypt=mutual; keydata= mQINBE6KyREBEACwRN6XKClPtxPiABx5GW+Yr1snfhjzExxkTYaINHsWHlsLg13kiems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ARAQABiQIlBBgBAgAPBQJOiskRAhsMBQkSzAMAAAoJEGz4yi9OyKjPgEwQAIP/gy/Xqc1q OpzfFScswk3CEoZWSqHxn/fZasa4IzkwhTUmukuIvRew+BzwvrTxhHcz9qQ8hX7iDPTZBcUt ovWPxz+3XfbGqE+q0JunlIsP4N+K/I10nyoGdoFpMFMfDnAiMUiUatHRf9Wsif/nT6oRiPNJ T0EbbeSyIYe+ZOMFfZBVGPqBCbe8YMI+JiZeez8L9JtegxQ6O3EMQ//1eoPJ5mv5lWXLFQfx f4rAcKseM8DE6xs1+1AIsSIG6H+EE3tVm+GdCkBaVAZo2VMVapx9k8RMSlW7vlGEQsHtI0FT c1XNOCGjaP4ITYUiOpfkh+N0nUZVRTxWnJqVPGZ2Nt7xCk7eoJWTSMWmodFlsKSgfblXVfdM 9qoNScM3u0b9iYYuw/ijZ7VtYXFuQdh0XMM/V6zFrLnnhNmg0pnK6hO1LUgZlrxHwLZk5X8F uD/0MCbPmsYUMHPuJd5dSLUFTlejVXIbKTSAMd0tDSP5Ms8Ds84z5eHreiy1ijatqRFWFJRp ZtWlhGRERnDH17PUXDglsOA08HCls0PHx8itYsjYCAyETlxlLApXWdVl9YVwbQpQ+i693t/Y PGu8jotn0++P19d3JwXW8t6TVvBIQ1dRZHx1IxGLMn+CkDJMOmHAUMWTAXX2rf5tUjas8/v2 azzYF4VRJsdl+d0MCaSy8mUh Message-ID: <0a2a270e-0d33-05c8-6109-6eba81fc10b9@suse.de> Date: Tue, 24 Sep 2019 14:03:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190924072906.23737-1-dwagner@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/24/19 9:29 AM, Daniel Wagner wrote: > Add qedf_get_host_port_id() to the transport template. > > The fc_transport_template initializes the port_id member to the > default value of -1. The new getter ensures that the sysfs entry shows > the current value and not the default one, e.g by using 'lsscsi -H -t' > > Signed-off-by: Daniel Wagner > --- > > changes v2: > - place closing brace on new line, fix whitespace damage > > drivers/scsi/qedf/qedf_main.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c > index 9c24f3834d70..8fe8c3fdde1b 100644 > --- a/drivers/scsi/qedf/qedf_main.c > +++ b/drivers/scsi/qedf/qedf_main.c > @@ -1926,6 +1926,13 @@ static int qedf_fcoe_reset(struct Scsi_Host *shost) > return 0; > } > > +static void qedf_get_host_port_id(struct Scsi_Host *shost) > +{ > + struct fc_lport *lport = shost_priv(shost); > + > + fc_host_port_id(shost) = lport->port_id; > +} > + > static struct fc_host_statistics *qedf_fc_get_host_stats(struct Scsi_Host > *shost) > { > @@ -1996,6 +2003,7 @@ static struct fc_function_template qedf_fc_transport_fn = { > .show_host_active_fc4s = 1, > .show_host_maxframe_size = 1, > > + .get_host_port_id = qedf_get_host_port_id, > .show_host_port_id = 1, > .show_host_supported_speeds = 1, > .get_host_speed = fc_get_host_speed, > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 247165 (AG München), GF: Felix Imendörffer