From: Wenzhuo Lu Date: Fri, 16 Oct 2015 02:50:59 +0000 (+0800) Subject: e1000/base: support inverted format ETrackId X-Git-Tag: spdx-start~8326 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=849651f863c37c9a8d4a6934b4ccba1868b5a97f;p=dpdk.git e1000/base: support inverted format ETrackId There are some images which contain ETrackID in inverted format. This patch allows reading this format. Signed-off-by: Wenzhuo Lu --- diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c index 01be9e4de9..762acd1633 100644 --- a/drivers/net/e1000/base/e1000_nvm.c +++ b/drivers/net/e1000/base/e1000_nvm.c @@ -1373,8 +1373,12 @@ etrack_id: hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verh); fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) | eeprom_verl; + } else if ((etrack_test & NVM_ETRACK_VALID) == 0) { + hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verh); + hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verl); + fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) | + eeprom_verl; } - return; }