lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR18MB25273EBD439B3458D6088610D2840@MN2PR18MB2527.namprd18.prod.outlook.com>
Date:   Tue, 24 Sep 2019 06:08:09 +0000
From:   Saurav Kashyap <skashyap@...vell.com>
To:     Daniel Wagner <dwagner@...e.de>,
        "QLogic-Storage-Upstream@...ium.com" 
        <QLogic-Storage-Upstream@...ium.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: qedf: Add port_id getter


> -----Original Message-----
> From: linux-scsi-owner@...r.kernel.org <linux-scsi-owner@...r.kernel.org> On
> Behalf Of Daniel Wagner
> Sent: Monday, September 23, 2019 4:08 PM
> To: QLogic-Storage-Upstream@...ium.com
> Cc: linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org; Daniel Wagner
> <dwagner@...e.de>
> Subject: [PATCH] scsi: qedf: Add port_id getter
> 
> 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@...e.de>
> ---
>  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; }

Minor stuff, the closing brace should be in next line. Please submit v2.

Thanks,
~Saurav
> +
>  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,
> --
> 2.16.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ