Skip to content

Commit 2f2beb8

Browse files
CuriousPanCakeanguy11
authored andcommitted
i40e: fix misleading debug logs
Change "write" into the actual "read" word. Change parameters description. Fixes: 7073f46 ("i40e: Add AQ commands for NVM Update for X722") Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Andrii Staikov <andrii.staikov@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 751969e commit 2f2beb8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/net/ethernet/intel/i40e/i40e_nvm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ static int i40e_read_nvm_word_srctl(struct i40e_hw *hw, u16 offset,
210210
* @hw: pointer to the HW structure.
211211
* @module_pointer: module pointer location in words from the NVM beginning
212212
* @offset: offset in words from module start
213-
* @words: number of words to write
214-
* @data: buffer with words to write to the Shadow RAM
213+
* @words: number of words to read
214+
* @data: buffer with words to read to the Shadow RAM
215215
* @last_command: tells the AdminQ that this is the last command
216216
*
217-
* Writes a 16 bit words buffer to the Shadow RAM using the admin command.
217+
* Reads a 16 bit words buffer to the Shadow RAM using the admin command.
218218
**/
219219
static int i40e_read_nvm_aq(struct i40e_hw *hw,
220220
u8 module_pointer, u32 offset,
@@ -234,18 +234,18 @@ static int i40e_read_nvm_aq(struct i40e_hw *hw,
234234
*/
235235
if ((offset + words) > hw->nvm.sr_size)
236236
i40e_debug(hw, I40E_DEBUG_NVM,
237-
"NVM write error: offset %d beyond Shadow RAM limit %d\n",
237+
"NVM read error: offset %d beyond Shadow RAM limit %d\n",
238238
(offset + words), hw->nvm.sr_size);
239239
else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS)
240-
/* We can write only up to 4KB (one sector), in one AQ write */
240+
/* We can read only up to 4KB (one sector), in one AQ write */
241241
i40e_debug(hw, I40E_DEBUG_NVM,
242-
"NVM write fail error: tried to write %d words, limit is %d.\n",
242+
"NVM read fail error: tried to read %d words, limit is %d.\n",
243243
words, I40E_SR_SECTOR_SIZE_IN_WORDS);
244244
else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS)
245245
!= (offset / I40E_SR_SECTOR_SIZE_IN_WORDS))
246-
/* A single write cannot spread over two sectors */
246+
/* A single read cannot spread over two sectors */
247247
i40e_debug(hw, I40E_DEBUG_NVM,
248-
"NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n",
248+
"NVM read error: cannot spread over two sectors in a single read offset=%d words=%d\n",
249249
offset, words);
250250
else
251251
ret_code = i40e_aq_read_nvm(hw, module_pointer,

0 commit comments

Comments
 (0)