Lines Matching refs:words

62 	/* Switching to words (sr_size contains power of 2KB) */
251 * @module_pointer: module pointer location in words from the NVM beginning
252 * @offset: offset in words from module start
253 * @words: number of words to write
254 * @data: buffer with words to write to the Shadow RAM
257 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
261 u16 words, void *data,
277 if ((offset + words) > hw->nvm.sr_size)
280 (offset + words), hw->nvm.sr_size);
281 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS)
284 "NVM write fail error: tried to write %d words, limit is %d.\n",
285 words, I40E_SR_SECTOR_SIZE_IN_WORDS);
286 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS)
290 "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n",
291 offset, words);
295 2 * words, /*bytes*/
372 * @module_ptr: Pointer to module in words with respect to NVM beginning
373 * @module_offset: Offset in words from module start
374 * @data_offset: Offset in words from reading data area start
444 * @words: (in) number of words to read; (out) number of words actually read
445 * @data: words read from the Shadow RAM
447 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
452 u16 *words, u16 *data)
460 for (word = 0; word < *words; word++) {
467 /* Update the number of words read from the Shadow RAM */
468 *words = word;
477 * @words: (in) number of words to read; (out) number of words actually read
478 * @data: words read from the Shadow RAM
480 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_aq()
485 u16 *words, u16 *data)
488 u16 read_size = *words;
501 read_size = min(*words,
505 read_size = min((*words - words_read),
509 if ((words_read + read_size) >= *words)
517 /* Increment counter for words already read and move offset to
522 } while (words_read < *words);
524 for (i = 0; i < *words; i++)
528 *words = words_read;
536 * @words: (in) number of words to read; (out) number of words actually read
537 * @data: words read from the Shadow RAM
539 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
544 u16 *words, u16 *data)
547 return i40e_read_nvm_buffer_aq(hw, offset, words, data);
549 return i40e_read_nvm_buffer_srctl(hw, offset, words, data);
556 * @words: (in) number of words to read; (out) number of words actually read
557 * @data: words read from the Shadow RAM
559 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
564 u16 *words, u16 *data)
571 ret_code = i40e_read_nvm_buffer_aq(hw, offset, words,
576 ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
585 * @module_pointer: module pointer location in words from the NVM beginning
586 * @offset: offset in words from module start
587 * @words: number of words to write
588 * @data: buffer with words to write to the Shadow RAM
591 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
594 u32 offset, u16 words, void *data,
610 if ((offset + words) > hw->nvm.sr_size)
612 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS)
615 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS)
622 2 * words, /*bytes*/
654 * @module_pointer: module pointer location in words from the NVM beginning
656 * @words: number of words to write
657 * @data: words to write to the Shadow RAM
659 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
666 u16 words, void *data)
674 for (i = 0; i < words; i++)
680 return i40e_write_nvm_aq(hw, module_pointer, offset, words,
733 u16 words = I40E_SR_SECTOR_SIZE_IN_WORDS;
735 ret_code = __i40e_read_nvm_buffer(hw, i, &words, data);