]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nfp: update the old flash error message
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 12 Jun 2019 23:59:02 +0000 (16:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Jun 2019 02:18:27 +0000 (19:18 -0700)
Apparently there are still cards in the wild with a very old
management FW.  Let's make the error message in that case
indicate more clearly that management firmware has to be
updated.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c

index 42cf4fd875eacf34a4e287180b63a57192a1ea48..9a08623c325dfd4357825b48a580eb4a77d2b430 100644 (file)
@@ -241,11 +241,16 @@ static int nfp_nsp_check(struct nfp_nsp *state)
        state->ver.major = FIELD_GET(NSP_STATUS_MAJOR, reg);
        state->ver.minor = FIELD_GET(NSP_STATUS_MINOR, reg);
 
-       if (state->ver.major != NSP_MAJOR || state->ver.minor < NSP_MINOR) {
+       if (state->ver.major != NSP_MAJOR) {
                nfp_err(cpp, "Unsupported ABI %hu.%hu\n",
                        state->ver.major, state->ver.minor);
                return -EINVAL;
        }
+       if (state->ver.minor < NSP_MINOR) {
+               nfp_err(cpp, "ABI too old to support NIC operation (%u.%hu < %u.%u), please update the management FW on the flash\n",
+                       NSP_MAJOR, state->ver.minor, NSP_MAJOR, NSP_MINOR);
+               return -EINVAL;
+       }
 
        if (reg & NSP_STATUS_BUSY) {
                nfp_err(cpp, "Service processor busy!\n");