[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450949192-4574-6-git-send-email-sathya.perla@avagotech.com>
Date: Thu, 24 Dec 2015 04:26:27 -0500
From: Sathya Perla <sathya.perla@...gotech.com>
To: netdev@...r.kernel.org
Subject: [net-next PATCH 05/10] be2net: log digital signature errors while flashing FW image
From: Suresh Reddy <suresh.reddy@...gotech.com>
>From FW version 11.0 onwards, the FW supports a new "secure mode" feature
(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@...gotech.com>
Signed-off-by: Sathya Perla <sathya.perla@...gotech.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 11 +++++++++++
drivers/net/ethernet/emulex/benet/be_cmds.h | 4 +++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index da3b398..6fb7873 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -2959,6 +2959,17 @@ flash:
} else if (status) {
dev_err(dev, "Flashing section type 0x%x failed\n",
img_type);
+ if (addl_status(status) ==
+ MCC_ADDL_STATUS_MISSING_SIGNATURE) {
+ dev_err(dev,
+ "Digital signature missing in FW\n");
+ return -EINVAL;
+ } else if (addl_status(status) ==
+ MCC_ADDL_STATUS_INVALID_SIGNATURE) {
+ dev_err(dev,
+ "Invalid digital signature in FW\n");
+ return -EINVAL;
+ }
return -EFAULT;
}
}
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h
index 4b0ca99..16415ca 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.h
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.h
@@ -66,7 +66,9 @@ enum mcc_addl_status {
MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES = 0x16,
MCC_ADDL_STATUS_FLASH_IMAGE_CRC_MISMATCH = 0x4d,
MCC_ADDL_STATUS_TOO_MANY_INTERFACES = 0x4a,
- MCC_ADDL_STATUS_INSUFFICIENT_VLANS = 0xab
+ MCC_ADDL_STATUS_INSUFFICIENT_VLANS = 0xab,
+ MCC_ADDL_STATUS_INVALID_SIGNATURE = 0x56,
+ MCC_ADDL_STATUS_MISSING_SIGNATURE = 0x57
};
#define CQE_BASE_STATUS_MASK 0xFFFF
--
2.4.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists