From: Felix Manlunas <felix.manlunas@cavium.com>
To: Shannon Nelson <shannon.nelson@oracle.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
raghu.vatsavayi@cavium.com, derek.chickles@cavium.com,
satananda.burla@cavium.com, ricardo.farrington@cavium.com
Subject: Re: [PATCH net-next] liquidio: fix kernel panic when NIC firmware is older than 1.7.2
Date: Wed, 27 Jun 2018 22:18:56 -0700 [thread overview]
Message-ID: <20180628051856.GA8145@felix-thinkpad.cavium.com> (raw)
In-Reply-To: <5670609b-5056-305d-ee0f-8fed471d8381@oracle.com>
On Tue, Jun 26, 2018 at 09:03:25AM -0700, Shannon Nelson wrote:
> On 6/26/2018 4:58 AM, Felix Manlunas wrote:
> > From: Rick Farrington <ricardo.farrington@cavium.com>
> >
> > Pre-1.7.2 NIC firmware does not support (and does not respond to) the "get
> > speed" command which is sent by the 1.7.2 driver during modprobe. Due to a
> > bug in older firmware (with respect to unknown commands), this unsupported
> > command causes a cascade of errors that ends in a kernel panic.
> >
> > Fix it by making the sending of the "get speed" command conditional on the
> > firmware version.
> >
> > Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
> > Acked-by: Derek Chickles <derek.chickles@cavium.com>
> > Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> > ---
> > Note: To avoid checkpatch.pl "WARNING: line over 80 characters", the comma
> > that separates the arguments in the call to strcmp() was placed one
> > line below the usual spot.
> >
> > drivers/net/ethernet/cavium/liquidio/lio_main.c | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
> > index 7cb4e75..f83f884 100644
> > --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
> > +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
> > @@ -3671,7 +3671,16 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
> > OCTEON_CN2350_25GB_SUBSYS_ID ||
> > octeon_dev->subsystem_id ==
> > OCTEON_CN2360_25GB_SUBSYS_ID) {
> > - liquidio_get_speed(lio);
> > + /* speed control unsupported in f/w older than 1.7.2 */
> > + if (strcmp(octeon_dev->fw_info.liquidio_firmware_version
> > + , "1.7.2") < 0) {
>
> Will the liquidio_firmware_version ever end up something like 1.7.10?
> If so, this strcmp() may not do what you want.
>
> sln
Yes, it's possible that the liquidio_firmware_version will reach 1.7.10.
We agree that using strcmp() will not give the correct result for that case,
so please disregard this patch.
We will submit a V2 patch.
Felix
prev parent reply other threads:[~2018-06-27 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 11:58 [PATCH net-next] liquidio: fix kernel panic when NIC firmware is older than 1.7.2 Felix Manlunas
2018-06-26 16:03 ` Shannon Nelson
2018-06-28 5:18 ` Felix Manlunas [this message]
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=20180628051856.GA8145@felix-thinkpad.cavium.com \
--to=felix.manlunas@cavium.com \
--cc=davem@davemloft.net \
--cc=derek.chickles@cavium.com \
--cc=netdev@vger.kernel.org \
--cc=raghu.vatsavayi@cavium.com \
--cc=ricardo.farrington@cavium.com \
--cc=satananda.burla@cavium.com \
--cc=shannon.nelson@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox