Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ixl/i40e_nvm.c
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | |||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF) | * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF) | ||||
* @data: word read from the Shadow RAM | * @data: word read from the Shadow RAM | ||||
* | * | ||||
* Reads one 16 bit word from the Shadow RAM using the GLNVM_SRCTL register. | * Reads one 16 bit word from the Shadow RAM using the GLNVM_SRCTL register. | ||||
**/ | **/ | ||||
enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset, | enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset, | ||||
u16 *data) | u16 *data) | ||||
{ | { | ||||
#ifdef X722_SUPPORT | |||||
if (hw->mac.type == I40E_MAC_X722) | |||||
return i40e_read_nvm_word_aq(hw, offset, data); | |||||
#endif | |||||
return i40e_read_nvm_word_srctl(hw, offset, data); | return i40e_read_nvm_word_srctl(hw, offset, data); | ||||
} | } | ||||
/** | /** | ||||
* i40e_read_nvm_word_srctl - Reads Shadow RAM via SRCTL register | * i40e_read_nvm_word_srctl - Reads Shadow RAM via SRCTL register | ||||
* @hw: pointer to the HW structure | * @hw: pointer to the HW structure | ||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF) | * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF) | ||||
* @data: word read from the Shadow RAM | * @data: word read from the Shadow RAM | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd() | * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd() | ||||
* method. The buffer read is preceded by the NVM ownership take | * method. The buffer read is preceded by the NVM ownership take | ||||
* and followed by the release. | * and followed by the release. | ||||
**/ | **/ | ||||
enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset, | enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset, | ||||
u16 *words, u16 *data) | u16 *words, u16 *data) | ||||
{ | { | ||||
#ifdef X722_SUPPORT | |||||
if (hw->mac.type == I40E_MAC_X722) | |||||
return i40e_read_nvm_buffer_aq(hw, offset, words, data); | |||||
#endif | |||||
return i40e_read_nvm_buffer_srctl(hw, offset, words, data); | return i40e_read_nvm_buffer_srctl(hw, offset, words, data); | ||||
} | } | ||||
/** | /** | ||||
* i40e_read_nvm_buffer_srctl - Reads Shadow RAM buffer via SRCTL register | * i40e_read_nvm_buffer_srctl - Reads Shadow RAM buffer via SRCTL register | ||||
* @hw: pointer to the HW structure | * @hw: pointer to the HW structure | ||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF). | * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF). | ||||
* @words: (in) number of words to read; (out) number of words actually read | * @words: (in) number of words to read; (out) number of words actually read | ||||
▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines |