Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b525782 authored by Suresh Reddy's avatar Suresh Reddy Committed by David S. Miller
Browse files

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: default avatarSuresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: default avatarSathya Perla <sathya.perla@avagotech.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a23113b5
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -2959,9 +2959,21 @@ static int be_flash_skyhawk(struct be_adapter *adapter,
		} else if (status) {
			dev_err(dev, "Flashing section type 0x%x failed\n",
				img_type);

			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;
}

+3 −1
Original line number Diff line number Diff line
@@ -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