]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Check eeprom config partition validity
authorJan Sokolowski <jan.sokolowski@intel.com>
Tue, 26 Sep 2017 13:06:09 +0000 (06:06 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 27 Sep 2017 15:10:36 +0000 (11:10 -0400)
commita71939bb9e28726cb5a31a6fcd1ce345452e44ba
tree5f1f7ebbd3cd91247f9e7e70d6d43bf51cb10424
parent0a4ff98c3342224ace749baf2b554e461c51a295
IB/hfi1: Check eeprom config partition validity

Relying on a trailing magic value is incorrect. There are instances where
this is not present as trailing magic value has a specific purpose which is
not partition validation. Instead use the header magic value which is
present in all variants of the platform configuration and is intended for
validation. This is also used in other locations in the driver.

Fixes: e4e89b99a97b (IB/hfi1: Handle missing magic values in config file)
Reviewed-by: Jakub Byczkowski <jakub.byczkowski@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/eprom.c