diff options
author | Suresh Reddy <suresh.reddy@avagotech.com> | 2015-12-30 01:29:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-30 16:33:35 -0500 |
commit | 6b525782820f49079a0848f72d7a379f0c101cf8 (patch) | |
tree | 671dfe297b3ff4206e80e74b7cb9587c1dda0ddd /drivers/net/ethernet/emulex/benet/be_cmds.c | |
parent | a23113b5f6db9804da185bab4137dfad5dab9dc8 (diff) | |
download | talos-obmc-linux-6b525782820f49079a0848f72d7a379f0c101cf8.tar.gz talos-obmc-linux-6b525782820f49079a0848f72d7a379f0c101cf8.zip |
be2net: log digital signature errors while flashing FW image
(based on a jumper setting on the adapter.) In this mode, the FW image when
flashed is authenticated with a digital signature. This patch logs
appropriate error messages and return a status to ethtool when errors
relating to FW image authentication occur.
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_cmds.c')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index da3b39873470..451f9eaa27a2 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -2959,7 +2959,19 @@ flash: } else if (status) { dev_err(dev, "Flashing section type 0x%x failed\n", img_type); - return -EFAULT; + + switch (addl_status(status)) { + case MCC_ADDL_STATUS_MISSING_SIGNATURE: + dev_err(dev, + "Digital signature missing in FW\n"); + return -EINVAL; + case MCC_ADDL_STATUS_INVALID_SIGNATURE: + dev_err(dev, + "Invalid digital signature in FW\n"); + return -EINVAL; + default: + return -EFAULT; + } } } return 0; |