Lines Matching full:words

61 	/* Switching to words (sr_size contains power of 2KB) */  in i40e_init_nvm()
252 * @module_pointer: module pointer location in words from the NVM beginning
253 * @offset: offset in words from module start
254 * @words: number of words to write
255 * @data: buffer with words to write to the Shadow RAM
258 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
262 u16 words, void *data, in i40e_read_nvm_aq() argument
278 if ((offset + words) > hw->nvm.sr_size) in i40e_read_nvm_aq()
281 (offset + words), hw->nvm.sr_size); in i40e_read_nvm_aq()
282 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_read_nvm_aq()
285 "NVM write fail error: tried to write %d words, limit is %d.\n", in i40e_read_nvm_aq()
286 words, I40E_SR_SECTOR_SIZE_IN_WORDS); in i40e_read_nvm_aq()
287 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_read_nvm_aq()
291 "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n", in i40e_read_nvm_aq()
292 offset, words); in i40e_read_nvm_aq()
296 2 * words, /*bytes*/ in i40e_read_nvm_aq()
373 * @module_ptr: Pointer to module in words with respect to NVM beginning
374 * @module_offset: Offset in words from module start
375 * @data_offset: Offset in words from reading data area start
376 * @words_data_size: Words to read from NVM
445 * @words: (in) number of words to read; (out) number of words actually read
446 * @data: words read from the Shadow RAM
448 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
453 u16 *words, u16 *data) in i40e_read_nvm_buffer_srctl() argument
461 for (word = 0; word < *words; word++) { in i40e_read_nvm_buffer_srctl()
468 /* Update the number of words read from the Shadow RAM */ in i40e_read_nvm_buffer_srctl()
469 *words = word; in i40e_read_nvm_buffer_srctl()
478 * @words: (in) number of words to read; (out) number of words actually read
479 * @data: words read from the Shadow RAM
481 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_aq()
486 u16 *words, u16 *data) in i40e_read_nvm_buffer_aq() argument
489 u16 read_size = *words; in i40e_read_nvm_buffer_aq()
502 read_size = min(*words, in i40e_read_nvm_buffer_aq()
506 read_size = min((*words - words_read), in i40e_read_nvm_buffer_aq()
510 if ((words_read + read_size) >= *words) in i40e_read_nvm_buffer_aq()
518 /* Increment counter for words already read and move offset to in i40e_read_nvm_buffer_aq()
523 } while (words_read < *words); in i40e_read_nvm_buffer_aq()
525 for (i = 0; i < *words; i++) in i40e_read_nvm_buffer_aq()
529 *words = words_read; in i40e_read_nvm_buffer_aq()
537 * @words: (in) number of words to read; (out) number of words actually read
538 * @data: words read from the Shadow RAM
540 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
545 u16 *words, u16 *data) in __i40e_read_nvm_buffer() argument
548 return i40e_read_nvm_buffer_aq(hw, offset, words, data); in __i40e_read_nvm_buffer()
550 return i40e_read_nvm_buffer_srctl(hw, offset, words, data); in __i40e_read_nvm_buffer()
557 * @words: (in) number of words to read; (out) number of words actually read
558 * @data: words read from the Shadow RAM
560 * Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
565 u16 *words, u16 *data) in i40e_read_nvm_buffer() argument
572 ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, in i40e_read_nvm_buffer()
577 ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data); in i40e_read_nvm_buffer()
586 * @module_pointer: module pointer location in words from the NVM beginning
587 * @offset: offset in words from module start
588 * @words: number of words to write
589 * @data: buffer with words to write to the Shadow RAM
592 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
595 u32 offset, u16 words, void *data, in i40e_write_nvm_aq() argument
611 if ((offset + words) > hw->nvm.sr_size) in i40e_write_nvm_aq()
613 else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_write_nvm_aq()
616 else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS) in i40e_write_nvm_aq()
623 2 * words, /*bytes*/ in i40e_write_nvm_aq()
655 * @module_pointer: module pointer location in words from the NVM beginning
657 * @words: number of words to write
658 * @data: words to write to the Shadow RAM
660 * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
667 u16 words, void *data) in __i40e_write_nvm_buffer() argument
675 for (i = 0; i < words; i++) in __i40e_write_nvm_buffer()
681 return i40e_write_nvm_aq(hw, module_pointer, offset, words, in __i40e_write_nvm_buffer()
734 u16 words = I40E_SR_SECTOR_SIZE_IN_WORDS; in i40e_calc_nvm_checksum() local
736 ret_code = __i40e_read_nvm_buffer(hw, i, &words, data); in i40e_calc_nvm_checksum()