Lines Matching full:words

31 	/* Switching to words (sr_size contains power of 2KB) */  in i40e_init_nvm()
212 * @module_pointer: module pointer location in words from the NVM beginning
213 * @offset: offset in words from module start
214 * @words: number of words to read
215 * @data: buffer with words to read to the Shadow RAM
218 * Reads a 16 bit words buffer to the Shadow RAM using the admin command.
222 u16 words, void *data, in i40e_read_nvm_aq() argument
236 if ((offset + words) > hw->nvm.sr_size) in i40e_read_nvm_aq()
239 (offset + words), hw->nvm.sr_size); in i40e_read_nvm_aq()
240 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_read_nvm_aq()
243 "NVM read fail error: tried to read %d words, limit is %d.\n", in i40e_read_nvm_aq()
244 words, I40E_SR_SECTOR_SIZE_IN_WORDS); in i40e_read_nvm_aq()
245 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_read_nvm_aq()
249 "NVM read error: cannot spread over two sectors in a single read offset=%d words=%d\n", in i40e_read_nvm_aq()
250 offset, words); in i40e_read_nvm_aq()
254 2 * words, /*bytes*/ in i40e_read_nvm_aq()
328 * @module_ptr: Pointer to module in words with respect to NVM beginning
329 * @module_offset: Offset in words from module start
330 * @data_offset: Offset in words from reading data area start
331 * @words_data_size: Words to read from NVM
403 * @words: (in) number of words to read; (out) number of words actually read
404 * @data: words read from the Shadow RAM
406 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
411 u16 *words, u16 *data) in i40e_read_nvm_buffer_srctl() argument
417 for (word = 0; word < *words; word++) { in i40e_read_nvm_buffer_srctl()
424 /* Update the number of words read from the Shadow RAM */ in i40e_read_nvm_buffer_srctl()
425 *words = word; in i40e_read_nvm_buffer_srctl()
434 * @words: (in) number of words to read; (out) number of words actually read
435 * @data: words read from the Shadow RAM
437 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_aq()
442 u16 *words, u16 *data) in i40e_read_nvm_buffer_aq() argument
456 read_size = min(*words, in i40e_read_nvm_buffer_aq()
460 read_size = min((*words - words_read), in i40e_read_nvm_buffer_aq()
464 if ((words_read + read_size) >= *words) in i40e_read_nvm_buffer_aq()
472 /* Increment counter for words already read and move offset to in i40e_read_nvm_buffer_aq()
477 } while (words_read < *words); in i40e_read_nvm_buffer_aq()
479 for (i = 0; i < *words; i++) in i40e_read_nvm_buffer_aq()
483 *words = words_read; in i40e_read_nvm_buffer_aq()
491 * @words: (in) number of words to read; (out) number of words actually read
492 * @data: words read from the Shadow RAM
494 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
498 u16 offset, u16 *words, in __i40e_read_nvm_buffer() argument
502 return i40e_read_nvm_buffer_aq(hw, offset, words, data); in __i40e_read_nvm_buffer()
504 return i40e_read_nvm_buffer_srctl(hw, offset, words, data); in __i40e_read_nvm_buffer()
511 * @words: (in) number of words to read; (out) number of words actually read
512 * @data: words read from the Shadow RAM
514 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
519 u16 *words, u16 *data) in i40e_read_nvm_buffer() argument
526 ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, in i40e_read_nvm_buffer()
531 ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data); in i40e_read_nvm_buffer()
540 * @module_pointer: module pointer location in words from the NVM beginning
541 * @offset: offset in words from module start
542 * @words: number of words to write
543 * @data: buffer with words to write to the Shadow RAM
546 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
549 u32 offset, u16 words, void *data, in i40e_write_nvm_aq() argument
563 if ((offset + words) > hw->nvm.sr_size) in i40e_write_nvm_aq()
566 (offset + words), hw->nvm.sr_size); in i40e_write_nvm_aq()
567 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_write_nvm_aq()
570 "NVM write fail error: tried to write %d words, limit is %d.\n", in i40e_write_nvm_aq()
571 words, I40E_SR_SECTOR_SIZE_IN_WORDS); in i40e_write_nvm_aq()
572 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_write_nvm_aq()
576 "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n", in i40e_write_nvm_aq()
577 offset, words); in i40e_write_nvm_aq()
581 2 * words, /*bytes*/ in i40e_write_nvm_aq()
636 u16 words = I40E_SR_SECTOR_SIZE_IN_WORDS; in i40e_calc_nvm_checksum() local
638 ret_code = __i40e_read_nvm_buffer(hw, i, &words, data); in i40e_calc_nvm_checksum()