nvme: pad struct spdk_nvme_intel_marketing_description_page
Spec says this should be 512 bytes, but there's a FW bug with older Fultondale versions that writes 516 bytes instead. Just pad this out to 4096 bytes to be safe. There's really no harm - this structure is barely used. Fixes issue #780. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I7b4b560845fb40edb4a0ecf4dfa8924ee161ce41 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456880 Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
31607f3f9e
commit
c81fc6c161
@ -202,8 +202,14 @@ SPDK_STATIC_ASSERT(sizeof(union spdk_nvme_intel_feat_latency_tracking) == 4, "In
|
||||
|
||||
struct spdk_nvme_intel_marketing_description_page {
|
||||
uint8_t marketing_product[512];
|
||||
/* Spec says this log page will only write 512 bytes, but there are some older FW
|
||||
* versions that accidentally write 516 instead. So just pad this out to 4096 bytes
|
||||
* to make sure users of this structure never end up overwriting unintended parts of
|
||||
* memory.
|
||||
*/
|
||||
uint8_t reserved[3584];
|
||||
};
|
||||
SPDK_STATIC_ASSERT(sizeof(struct spdk_nvme_intel_marketing_description_page) == 512,
|
||||
SPDK_STATIC_ASSERT(sizeof(struct spdk_nvme_intel_marketing_description_page) == 4096,
|
||||
"Incorrect size");
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user