From: Hannes Reinecke <hare@suse.de>
To: Daniel Wagner <dwagner@suse.de>, QLogic-Storage-Upstream@cavium.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] scsi: qedf: Add port_id getter
Date: Tue, 24 Sep 2019 14:03:54 +0200 [thread overview]
Message-ID: <0a2a270e-0d33-05c8-6109-6eba81fc10b9@suse.de> (raw)
In-Reply-To: <20190924072906.23737-1-dwagner@suse.de>
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 <dwagner@suse.de>
> ---
>
> 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 <hare@suse.com>
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
next prev parent reply other threads:[~2019-09-24 12:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 10:37 [PATCH] " Daniel Wagner
2019-09-24 6:08 ` Saurav Kashyap
2019-09-24 7:11 ` Daniel Wagner
2019-09-24 7:23 ` Daniel Wagner
2019-09-24 9:10 ` [EXT] " Saurav Kashyap
2019-09-24 7:29 ` [PATCH v2] " Daniel Wagner
2019-09-24 9:06 ` Saurav Kashyap
2019-09-24 12:03 ` Hannes Reinecke [this message]
2019-10-01 3:05 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a2a270e-0d33-05c8-6109-6eba81fc10b9@suse.de \
--to=hare@suse.de \
--cc=QLogic-Storage-Upstream@cavium.com \
--cc=dwagner@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®