All of lore.kernel.org
 help / color / mirror / Atom feed
From: "ira.weiny" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	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 19:26:03 -0400	[thread overview]
Message-ID: <20160615232602.GA4034@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <20160615165106.GA10256-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On Wed, Jun 15, 2016 at 10:51:06AM -0600, Jason Gunthorpe wrote:
> On Wed, Jun 15, 2016 at 11:20:49AM -0400, ira.weiny wrote:
> > The default here is that a device does not provide a firmware string.  In that
> > case the assumption is that there is no firmware.  Hence the empty string.  I
> > don't think that reporting 0's or F's are appropriate if a device does not have
> > firmware.
> > 
> > In the cases you speak of I would expect the device to supply the firmware
> > function and report all 0s or all Fs for whatever version that may represent.
> > (I'm assuming that would be some sort of debug or unreleased firmware...)
> > 
> > I could just as well done something like.
> > 
> > snprintf(str, str_len, "<none>");
> 
> Just don't provide a 'fw' sysfs file at all if the driver cannot
> support it.

This function is supporting both sysfs and ethtool.

ethtool_drvinfo->fw_version is normally up to the device.  I've just provided a
default.

For example I see "N/A", "n/a", and "none" all used in the network stack.

./ethernet/freescale/gianfar_ethtool.c: strlcpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));

./rionet.c:     strlcpy(info->fw_version, "n/a", sizeof(info->fw_version));

./fjes/fjes_ethtool.c:  strlcpy(drvinfo->fw_version, "none", sizeof(drvinfo->fw_version));

I really think we are in the weeds here and are fine to leave it blank.

But if you wish, I can force all drivers to provide the string and then they can
put something in like the above.

Ira

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-06-15 23:26 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
     [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 [this message]
     [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=20160615232602.GA4034@phlsvsds.ph.intel.com \
    --to=ira.weiny-ral2jqcrhueavxtiumwx3w@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=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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.