All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
	devesh.sharma-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org,
	faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH V1 01/13] IB/core: Add get FW version string to the core
Date: Wed, 15 Jun 2016 09:40:08 +0300	[thread overview]
Message-ID: <20160615064008.GS5408@leon.nu> (raw)
In-Reply-To: <1465971728-24104-2-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]

On Wed, Jun 15, 2016 at 02:21:56AM -0400, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> Allow for a common core function to get firmware version strings
> from the individual devices.
> 
> In later patches this format can then then be used to pass a
> properly formated version string through the IPoIB layer.
> 
> The problem with the current code in the IPoIB layer is that it is
> specific to certain hardware types.
> 
> Furthermore, this gives us a common function through which the core
> can provide a common sysfs entry.  Eventually we may want to
> remove the sysfs export but this provides for user space backwards
> compatibility.
> 
> Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> ---
> Changes from V0:
> 	Add parameter names to function signature
> 	change default string assignment
> 
>  drivers/infiniband/core/device.c | 9 +++++++++
>  include/rdma/ib_verbs.h          | 3 +++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> index 5c155fa91eec..760ef603a468 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -311,6 +311,15 @@ static int read_port_immutable(struct ib_device *device)
>  	return 0;
>  }
>  
> +void ib_get_device_fw_str(struct ib_device *dev, char *str, size_t str_len)
> +{
> +	if (dev->get_dev_fw_str)
> +		dev->get_dev_fw_str(dev, str, str_len);
> +	else
> +		str[0] = '\0';

Interesting point, what is better for the caller to get as a version?
You chose empty string, but it can be all Fs or all 0s.

> +}
> +EXPORT_SYMBOL(ib_get_device_fw_str);

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-06-15  6:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15  6:21 [PATCH V1 00/13] Create device FW version call back ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1465971728-24104-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-15  6:21   ` [PATCH V1 01/13] IB/core: Add get FW version string to the core ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1465971728-24104-2-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-15  6:40       ` Leon Romanovsky [this message]
     [not found]         ` <20160615064008.GS5408-2ukJVAZIZ/Y@public.gmane.org>
2016-06-15 15:20           ` ira.weiny
     [not found]             ` <20160615152048.GB8690-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-06-15 16:51               ` Jason Gunthorpe
     [not found]                 ` <20160615165106.GA10256-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-06-15 23:26                   ` ira.weiny
     [not found]                     ` <20160615232602.GA4034-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-06-16  9:46                       ` Leon Romanovsky
2016-06-15  6:21   ` [PATCH V1 02/13] IB/cxgb3: Support device FW version string ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1465971728-24104-3-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-15 14:21       ` Steve Wise
2016-06-15 14:25         ` Weiny, Ira
2016-06-15  6:21   ` [PATCH V1 03/13] IB/cxgb4: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:21   ` [PATCH V1 04/13] IB/i40iw: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 05/13] IB/mlx4: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 06/13] IB/mlx5: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 07/13] IB/mthca: Supprot " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 08/13] IB/nes: Support " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 09/13] IB/ocrdma: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 10/13] IB/usnic: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 11/13] IB/ipoib: Use new " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 12/13] IB/core: Export a common fw_ver sysfs entry ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15  6:22   ` [PATCH V1 13/13] IB/hfi1: Add device FW version string ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-06-15 10:55   ` [PATCH V1 00/13] Create device FW version call back Leon Romanovsky
2016-06-23 16:11   ` Doug Ledford

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=20160615064008.GS5408@leon.nu \
    --to=leonro-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=devesh.sharma-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org \
    --cc=dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.