All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: Somnath Kotur <somnath.kotur@emulex.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH net v3] be2net: Warn users of possible broken functionality on BE2 cards with very old FW versions with latest driver
Date: Thu, 24 Oct 2013 10:37:06 +0200	[thread overview]
Message-ID: <5268DC32.8090306@redhat.com> (raw)
In-Reply-To: <6e195c58-1709-45de-a2e6-59cd40c0e591@CMEXHTCAS2.ad.emulex.com>

Hi Som,
see my inline comment below...

Ivan
On 10/23/2013 01:29 PM, Somnath Kotur wrote:
> On very old FW versions < 4.0, the mailbox command to set interrupts
> on the card succeeds even though it is not supported and should have
> failed, leading to a scenario where interrupts do not work.
> Hence warn users to upgrade to a suitable FW version to avoid seeing
> broken functionality.
>
> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
> ---
> v3: Incorporated comments from Ben Hutchings, Joe Perches and Ivan Vercera
>
>   drivers/net/ethernet/emulex/benet/be.h      |    9 +++++++++
>   drivers/net/ethernet/emulex/benet/be_main.c |    6 ++++++
>   2 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
> index db02023..da9c04b 100644
> --- a/drivers/net/ethernet/emulex/benet/be.h
> +++ b/drivers/net/ethernet/emulex/benet/be.h
> @@ -696,6 +696,15 @@ static inline int qnq_async_evt_rcvd(struct be_adapter *adapter)
>   	return adapter->flags & BE_FLAGS_QNQ_ASYNC_EVT_RCVD;
>   }
>
> +static inline u32 fw_major_num(const char *fw_ver)
> +{
> +	int fw_major = 0;
> +
> +	sscanf(fw_ver, "%d.", &fw_major);
> +
> +	return fw_major;
> +}
> +
You changed fw_major as I mentioned in our private discussion but the 
return type should be also 'int' and not 'u32'.

>   extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
>   		u16 num_popped);
>   extern void be_link_status_update(struct be_adapter *adapter, u8 link_status);
> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> index 2c38cc4..53ed58b 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -3247,6 +3247,12 @@ static int be_setup(struct be_adapter *adapter)
>
>   	be_cmd_get_fw_ver(adapter, adapter->fw_ver, adapter->fw_on_flash);
>
> +	if (BE2_chip(adapter) && fw_major_num(adapter->fw_ver) < 4) {
> +		dev_err(dev, "Firmware on card is old(%s), IRQs may not work",
> +			adapter->fw_ver);
> +		dev_err(dev, "Please upgrade firmware to version >= 4.0\n");
> +	}
> +
>   	if (adapter->vlans_added)
>   		be_vid_config(adapter);
>
>

  reply	other threads:[~2013-10-24  8:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 11:29 [PATCH net v3] be2net: Warn users of possible broken functionality on BE2 cards with very old FW versions with latest driver Somnath Kotur
2013-10-24  8:37 ` Ivan Vecera [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-10-23  8:19 Somnath Kotur
2013-10-23 11:29 ` Somnath Kotur

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=5268DC32.8090306@redhat.com \
    --to=ivecera@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=somnath.kotur@emulex.com \
    /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.