liquidio: fix kernel panic when NIC firmware is older than 1.7.2
authorRick Farrington <ricardo.farrington@cavium.com>
Fri, 6 Jul 2018 18:27:07 +0000 (11:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 02:10:35 +0000 (11:10 +0900)
commit4fed38cf26278e6597b506e62a9156e45cbcec49
tree91b7875feb8ddd5807db2a60c50bceeb4e7c4135
parent9ebcb397aaaf6a18d35db0168375e183e9170f53
liquidio: fix kernel panic when NIC firmware is older than 1.7.2

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 (for CN23XX-225 cards
only) 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>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/cavium/liquidio/octeon_device.h