Lines Matching full:words
29 /* Switching to words (sr_size contains power of 2KB) */ in i40e_init_nvm()
211 * @module_pointer: module pointer location in words from the NVM beginning
212 * @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
217 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
221 u16 words, void *data, in i40e_read_nvm_aq() argument
235 if ((offset + words) > hw->nvm.sr_size) in i40e_read_nvm_aq()
238 (offset + words), hw->nvm.sr_size); in i40e_read_nvm_aq()
239 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_read_nvm_aq()
242 "NVM write fail error: tried to write %d words, limit is %d.\n", in i40e_read_nvm_aq()
243 words, I40E_SR_SECTOR_SIZE_IN_WORDS); in i40e_read_nvm_aq()
244 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_read_nvm_aq()
248 "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n", in i40e_read_nvm_aq()
249 offset, words); in i40e_read_nvm_aq()
253 2 * words, /*bytes*/ in i40e_read_nvm_aq()
327 * @module_ptr: Pointer to module in words with respect to NVM beginning
328 * @module_offset: Offset in words from module start
329 * @data_offset: Offset in words from reading data area start
330 * @words_data_size: Words to read from NVM
402 * @words: (in) number of words to read; (out) number of words actually read
403 * @data: words read from the Shadow RAM
405 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
410 u16 *words, u16 *data) in i40e_read_nvm_buffer_srctl() argument
416 for (word = 0; word < *words; word++) { in i40e_read_nvm_buffer_srctl()
423 /* Update the number of words read from the Shadow RAM */ in i40e_read_nvm_buffer_srctl()
424 *words = word; in i40e_read_nvm_buffer_srctl()
433 * @words: (in) number of words to read; (out) number of words actually read
434 * @data: words read from the Shadow RAM
436 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_aq()
441 u16 *words, u16 *data) in i40e_read_nvm_buffer_aq() argument
455 read_size = min(*words, in i40e_read_nvm_buffer_aq()
459 read_size = min((*words - words_read), in i40e_read_nvm_buffer_aq()
463 if ((words_read + read_size) >= *words) in i40e_read_nvm_buffer_aq()
471 /* Increment counter for words already read and move offset to in i40e_read_nvm_buffer_aq()
476 } while (words_read < *words); in i40e_read_nvm_buffer_aq()
478 for (i = 0; i < *words; i++) in i40e_read_nvm_buffer_aq()
482 *words = words_read; in i40e_read_nvm_buffer_aq()
490 * @words: (in) number of words to read; (out) number of words actually read
491 * @data: words read from the Shadow RAM
493 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
497 u16 offset, u16 *words, in __i40e_read_nvm_buffer() argument
501 return i40e_read_nvm_buffer_aq(hw, offset, words, data); in __i40e_read_nvm_buffer()
503 return i40e_read_nvm_buffer_srctl(hw, offset, words, data); in __i40e_read_nvm_buffer()
510 * @words: (in) number of words to read; (out) number of words actually read
511 * @data: words read from the Shadow RAM
513 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
518 u16 *words, u16 *data) in i40e_read_nvm_buffer() argument
525 ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, in i40e_read_nvm_buffer()
530 ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data); in i40e_read_nvm_buffer()
539 * @module_pointer: module pointer location in words from the NVM beginning
540 * @offset: offset in words from module start
541 * @words: number of words to write
542 * @data: buffer with words to write to the Shadow RAM
545 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
548 u32 offset, u16 words, void *data, in i40e_write_nvm_aq() argument
562 if ((offset + words) > hw->nvm.sr_size) in i40e_write_nvm_aq()
565 (offset + words), hw->nvm.sr_size); in i40e_write_nvm_aq()
566 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_write_nvm_aq()
569 "NVM write fail error: tried to write %d words, limit is %d.\n", in i40e_write_nvm_aq()
570 words, I40E_SR_SECTOR_SIZE_IN_WORDS); in i40e_write_nvm_aq()
571 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_write_nvm_aq()
575 "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n", in i40e_write_nvm_aq()
576 offset, words); in i40e_write_nvm_aq()
580 2 * words, /*bytes*/ in i40e_write_nvm_aq()
635 u16 words = I40E_SR_SECTOR_SIZE_IN_WORDS; in i40e_calc_nvm_checksum() local
637 ret_code = __i40e_read_nvm_buffer(hw, i, &words, data); in i40e_calc_nvm_checksum()