Lines Matching +full:0 +full:x40a0

117 	for (i = 0; i < array->n_rows; i++) {  in ocs_array_alloc()
144 for (i = 0; i < array->n_rows; i++) { in ocs_array_free()
247 va->next_index = 0; in ocs_varray_alloc()
286 * @return returns 0 if entry was added, -1 if there is no more space in the array
296 rc = 0; in ocs_varray_add()
316 va->next_index = 0; in ocs_varray_iter_reset()
362 va->next_index = 0; in _ocs_varray_iter_next()
451 cbuf->pidx = 0; in ocs_cbuf_alloc()
452 cbuf->cidx = 0; in ocs_cbuf_alloc()
456 ocs_sem_init(&cbuf->cbuf_csem, 0, "cbuf:%p", cbuf); in ocs_cbuf_alloc()
505 if (likely(ocs_sem_p(&cbuf->cbuf_csem, timeout_usec) == 0)) { in ocs_cbuf_get()
509 cbuf->cidx = 0; in ocs_cbuf_get()
525 * @return returns 0 for success, a negative error code value for failure.
530 int32_t rc = 0; in ocs_cbuf_put()
532 if (likely(ocs_sem_p(&cbuf->cbuf_psem, -1) == 0)) { in ocs_cbuf_put()
536 cbuf->pidx = 0; in ocs_cbuf_put()
554 * @return returns 0 for success, a negative error code value for failure.
562 for (i = 0; i < count; i++) { in ocs_cbuf_prime()
565 return 0; in ocs_cbuf_prime()
683 if (count == 0) { in ocs_ddump_buffer()
690 for (i = 0; i < count; i++) { in ocs_ddump_buffer()
724 uint32_t entry_count = 0; in ocs_ddump_queue_entries()
730 index = 0; in ocs_ddump_queue_entries()
735 if (index < 0) { in ocs_ddump_queue_entries()
741 for (i = 0; i < entry_count; i++){ in ocs_ddump_queue_entries()
747 for (j = 0; j < entry_words; j++) { in ocs_ddump_queue_entries()
760 index = 0; in ocs_ddump_queue_entries()
766 #define OCS_DEBUG_ENABLE(x) (x ? ~0 : 0)
770 (OCS_DEBUG_ENABLE(0) & OCS_DEBUG_ENABLE_MQ_DUMP) | \
771 (OCS_DEBUG_ENABLE(0) & OCS_DEBUG_ENABLE_CQ_DUMP) | \
772 (OCS_DEBUG_ENABLE(0) & OCS_DEBUG_ENABLE_WQ_DUMP) | \
773 (OCS_DEBUG_ENABLE(0) & OCS_DEBUG_ENABLE_EQ_DUMP) | \
774 (OCS_DEBUG_ENABLE(0) & OCS_DEBUG_ENABLE_SPARAM_DUMP)
857 uint32_t addr = 0; in ocs_dump32()
868 while (word_count > 0) { in ocs_dump32()
876 for (i = 0; i < n; i ++) in ocs_dump32()
884 for (i = 0; i < n*sizeof(uint32_t); i ++) in ocs_dump32()
904 #define OCS_Q_HIST_WCQE_WORD_MASK (BIT(0) | BIT(3))
905 #define OCS_Q_HIST_WCQE_WORD_MASK_ERR (BIT(0) | BIT(1) | BIT(2) | BIT(3))
906 #define OCS_Q_HIST_CQXABT_WORD_MASK (BIT(0) | BIT(1) | BIT(2) | BIT(3))
909 #define OCS_Q_HIST_ENABLE_Q_INFO 0
916 #define OCS_Q_HIST_ENABLE_TIMESTAMPS 0
941 for (i = 0; i < ARRAY_SIZE(ocs_q_hist_wqe_masks); i++) { in ocs_q_hist_get_wqe_mask()
977 q_hist->q_hist_index = 0; in ocs_queue_history_init()
1018 q_hist->q_hist[q_hist->q_hist_index] = ((tsc_value >> 32 ) & 0xFFFFFFFF); in ocs_queue_history_add_timestamp()
1021 q_hist->q_hist[q_hist->q_hist_index] = (tsc_value & 0xFFFFFFFF); in ocs_queue_history_add_timestamp()
1050 ftr.word = 0; in ocs_queue_history_wq()
1054 for (i = ((sizeof(wqe_word_mask)*8) - 1); i >= 0; i--){ in ocs_queue_history_wq()
1091 uint32_t mask = 0; in ocs_queue_history_misc()
1098 ftr.word = 0; in ocs_queue_history_misc()
1102 for (i = num_words-1; i >= 0; i--) { in ocs_queue_history_misc()
1141 uint32_t cqe_word_mask = 0; in ocs_queue_history_cqe()
1149 ftr.word = 0; in ocs_queue_history_cqe()
1150 for (j = 0; j < ARRAY_SIZE(ocs_q_hist_cqe_masks); j++) { in ocs_queue_history_cqe()
1153 if (status != 0) { in ocs_queue_history_cqe()
1162 for (i = ((sizeof(cqe_word_mask)*8) - 1); i >= 0; i--){ in ocs_queue_history_cqe()
1191 if (index == 0) { in ocs_queue_history_prev_index()
1207 * @param dest destination 0=ocs_log, 1=textbuf
1224 case 0: in ocs_display_sparams()
1234 ocs_ddump_buffer((ocs_textbuf_t*) textbuf, reqlabel, 0, sparams, sizeof(fc_plogi_payload_t)); in ocs_display_sparams()
1244 * @param crc Previously-calculated CRC, or 0 for a new block.
1279 intermediate = 0; in ocs_scsi_dif_calc_checksum()
1280 for (j = 0; j < addrlen_count; j++) { in ocs_scsi_dif_calc_checksum()
1283 for (i=0; i < count; i++) { in ocs_scsi_dif_calc_checksum()
1289 intermediate += ((intermediate & 0xffff0000) >> 16); in ocs_scsi_dif_calc_checksum()
1307 * @return returns block size, or 0 if SCSI API DIF blocksize is invalid
1313 uint32_t blocksize = 0; in ocs_scsi_dif_blocksize()
1338 * @return returns 0 for success, a negative error code value for failure.
1344 int32_t rc = 0; in ocs_scsi_dif_set_blocksize()
1368 * @param wiretomem Transfer direction, 1 is wire to memory, 0 is memory to wire
1381 0, /* OCS_SCSI_DIF_OPER_DISABLED, */ in ocs_scsi_dif_mem_blocksize()
1383 0, /* OCS_SCSI_DIF_OPER_IN_CRC_OUT_NODIF, */ in ocs_scsi_dif_mem_blocksize()
1385 0, /* OCS_SCSI_DIF_OPER_IN_CHKSUM_OUT_NODIF, */ in ocs_scsi_dif_mem_blocksize()
1392 0, /* OCS_SCSI_DIF_OPER_DISABLED, */ in ocs_scsi_dif_mem_blocksize()
1393 0, /* OCS_SCSI_DIF_OPER_IN_NODIF_OUT_CRC, */ in ocs_scsi_dif_mem_blocksize()
1395 0, /* OCS_SCSI_DIF_OPER_IN_NODIF_OUT_CHKSUM, */ in ocs_scsi_dif_mem_blocksize()
1404 if (blocksize == 0) { in ocs_scsi_dif_mem_blocksize()
1409 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(wiretomem_adj), 0); in ocs_scsi_dif_mem_blocksize()
1412 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(memtowire_adj), 0); in ocs_scsi_dif_mem_blocksize()
1425 * @param wiretomem Transfer direction, 1 is wire to memory, 0 is memory to wire
1438 0, /* OCS_SCSI_DIF_OPER_DISABLED, */ in ocs_scsi_dif_wire_blocksize()
1439 0, /* OCS_SCSI_DIF_OPER_IN_NODIF_OUT_CRC, */ in ocs_scsi_dif_wire_blocksize()
1441 0, /* OCS_SCSI_DIF_OPER_IN_NODIF_OUT_CHKSUM, */ in ocs_scsi_dif_wire_blocksize()
1449 0, /* OCS_SCSI_DIF_OPER_DISABLED, */ in ocs_scsi_dif_wire_blocksize()
1451 0, /* OCS_SCSI_DIF_OPER_IN_CRC_OUT_NODIF, */ in ocs_scsi_dif_wire_blocksize()
1453 0, /* OCS_SCSI_DIF_OPER_IN_CHKSUM_OUT_NODIF, */ in ocs_scsi_dif_wire_blocksize()
1461 if (blocksize == 0) { in ocs_scsi_dif_wire_blocksize()
1466 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(wiretomem_adj), 0); in ocs_scsi_dif_wire_blocksize()
1469 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(memtowire_adj), 0); in ocs_scsi_dif_wire_blocksize()
1483 * @return returns block size, or 0 if HW API DIF blocksize is invalid
1489 uint32_t blocksize = 0; in ocs_hw_dif_blocksize()
1512 * @param wiretomem Transfer direction, 1 is wire to memory, 0 is memory to wire
1525 0, /* OCS_HW_DIF_OPER_DISABLED, */ in ocs_hw_dif_mem_blocksize()
1527 0, /* OCS_HW_DIF_OPER_IN_CRC_OUT_NODIF, */ in ocs_hw_dif_mem_blocksize()
1529 0, /* OCS_HW_DIF_OPER_IN_CHKSUM_OUT_NODIF, */ in ocs_hw_dif_mem_blocksize()
1536 0, /* OCS_HW_DIF_OPER_DISABLED, */ in ocs_hw_dif_mem_blocksize()
1537 0, /* OCS_HW_DIF_OPER_IN_NODIF_OUT_CRC, */ in ocs_hw_dif_mem_blocksize()
1539 0, /* OCS_HW_DIF_OPER_IN_NODIF_OUT_CHKSUM, */ in ocs_hw_dif_mem_blocksize()
1548 if (blocksize == 0) { in ocs_hw_dif_mem_blocksize()
1553 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(wiretomem_adj), 0); in ocs_hw_dif_mem_blocksize()
1556 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(memtowire_adj), 0); in ocs_hw_dif_mem_blocksize()
1569 * @param wiretomem Transfer direction, 1 is wire to memory, 0 is memory to wire
1582 0, /* OCS_HW_DIF_OPER_DISABLED, */ in ocs_hw_dif_wire_blocksize()
1583 0, /* OCS_HW_DIF_OPER_IN_NODIF_OUT_CRC, */ in ocs_hw_dif_wire_blocksize()
1585 0, /* OCS_HW_DIF_OPER_IN_NODIF_OUT_CHKSUM, */ in ocs_hw_dif_wire_blocksize()
1593 0, /* OCS_HW_DIF_OPER_DISABLED, */ in ocs_hw_dif_wire_blocksize()
1595 0, /* OCS_HW_DIF_OPER_IN_CRC_OUT_NODIF, */ in ocs_hw_dif_wire_blocksize()
1597 0, /* OCS_HW_DIF_OPER_IN_CHKSUM_OUT_NODIF, */ in ocs_hw_dif_wire_blocksize()
1605 if (blocksize == 0) { in ocs_hw_dif_wire_blocksize()
1610 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(wiretomem_adj), 0); in ocs_hw_dif_wire_blocksize()
1613 ocs_assert(dif_info->dif_oper < ARRAY_SIZE(memtowire_adj), 0); in ocs_hw_dif_wire_blocksize()
1628 return ocs_textbuf_ext_get_buffer(textbuf, 0); in ocs_textbuf_get_buffer()
1634 return ocs_textbuf_ext_get_length(textbuf, 0); in ocs_textbuf_get_length()
1642 int32_t total = 0; in ocs_textbuf_get_written()
1644 for (idx = 0; (n = ocs_textbuf_ext_get_written(textbuf, idx)) >= 0; idx++) { in ocs_textbuf_get_written()
1686 ocs_memset(textbuf, 0, sizeof(*textbuf)); in ocs_textbuf_alloc()
1704 return (ocs_textbuf_segment_alloc(textbuf) == NULL) ? -1 : 0; in ocs_textbuf_alloc()
1718 segment->buffer_written = 0; in ocs_textbuf_segment_alloc()
1724 textbuf->extendable = 0; in ocs_textbuf_segment_alloc()
1754 i = 0; in ocs_textbuf_get_segment()
1771 ocs_memset(textbuf, 0, sizeof(*textbuf)); in ocs_textbuf_init()
1779 segment->buffer_written = 0; in ocs_textbuf_init()
1782 rc = 0; in ocs_textbuf_init()
1800 ocs_memset(textbuf, 0, sizeof(*textbuf)); in ocs_textbuf_free()
1834 if (avail == 0) { in ocs_textbuf_vprintf()
1849 *(segment->buffer + segment->buffer_written) = 0; in ocs_textbuf_vprintf()
1879 if (ocs_segment_remaining(segment) == 0) { in ocs_textbuf_putc()
1951 return 0; in ocs_textbuf_remaining()
1964 uint32_t i = 0; in ocs_textbuf_reset()
1971 if (i++ == 0) { in ocs_textbuf_reset()
1972 segment->buffer_written = 0; in ocs_textbuf_reset()
2036 for (i = 0; i < n; i ++) { in _spv_del()
2087 for (i = 0; i < SPV_DIM; i ++) { in spv_new()
2112 uint32_t a = (idx >> 16) & 0xff; in spv_new_cell()
2113 uint32_t b = (idx >> 8) & 0xff; in spv_new_cell()
2114 uint32_t c = (idx >> 0) & 0xff; in spv_new_cell()
2196 /* Program V1.0 using the following model parameters: */
2199 /* Poly : 0x8BB7 */
2221 0x0000, 0x8BB7, 0x9CD9, 0x176E, 0xB205, 0x39B2, 0x2EDC, 0xA56B,
2222 0xEFBD, 0x640A, 0x7364, 0xF8D3, 0x5DB8, 0xD60F, 0xC161, 0x4AD6,
2223 0x54CD, 0xDF7A, 0xC814, 0x43A3, 0xE6C8, 0x6D7F, 0x7A11, 0xF1A6,
2224 0xBB70, 0x30C7, 0x27A9, 0xAC1E, 0x0975, 0x82C2, 0x95AC, 0x1E1B,
2225 0xA99A, 0x222D, 0x3543, 0xBEF4, 0x1B9F, 0x9028, 0x8746, 0x0CF1,
2226 0x4627, 0xCD90, 0xDAFE, 0x5149, 0xF422, 0x7F95, 0x68FB, 0xE34C,
2227 0xFD57, 0x76E0, 0x618E, 0xEA39, 0x4F52, 0xC4E5, 0xD38B, 0x583C,
2228 0x12EA, 0x995D, 0x8E33, 0x0584, 0xA0EF, 0x2B58, 0x3C36, 0xB781,
2229 0xD883, 0x5334, 0x445A, 0xCFED, 0x6A86, 0xE131, 0xF65F, 0x7DE8,
2230 0x373E, 0xBC89, 0xABE7, 0x2050, 0x853B, 0x0E8C, 0x19E2, 0x9255,
2231 0x8C4E, 0x07F9, 0x1097, 0x9B20, 0x3E4B, 0xB5FC, 0xA292, 0x2925,
2232 0x63F3, 0xE844, 0xFF2A, 0x749D, 0xD1F6, 0x5A41, 0x4D2F, 0xC698,
2233 0x7119, 0xFAAE, 0xEDC0, 0x6677, 0xC31C, 0x48AB, 0x5FC5, 0xD472,
2234 0x9EA4, 0x1513, 0x027D, 0x89CA, 0x2CA1, 0xA716, 0xB078, 0x3BCF,
2235 0x25D4, 0xAE63, 0xB90D, 0x32BA, 0x97D1, 0x1C66, 0x0B08, 0x80BF,
2236 0xCA69, 0x41DE, 0x56B0, 0xDD07, 0x786C, 0xF3DB, 0xE4B5, 0x6F02,
2237 0x3AB1, 0xB106, 0xA668, 0x2DDF, 0x88B4, 0x0303, 0x146D, 0x9FDA,
2238 0xD50C, 0x5EBB, 0x49D5, 0xC262, 0x6709, 0xECBE, 0xFBD0, 0x7067,
2239 0x6E7C, 0xE5CB, 0xF2A5, 0x7912, 0xDC79, 0x57CE, 0x40A0, 0xCB17,
2240 0x81C1, 0x0A76, 0x1D18, 0x96AF, 0x33C4, 0xB873, 0xAF1D, 0x24AA,
2241 0x932B, 0x189C, 0x0FF2, 0x8445, 0x212E, 0xAA99, 0xBDF7, 0x3640,
2242 0x7C96, 0xF721, 0xE04F, 0x6BF8, 0xCE93, 0x4524, 0x524A, 0xD9FD,
2243 0xC7E6, 0x4C51, 0x5B3F, 0xD088, 0x75E3, 0xFE54, 0xE93A, 0x628D,
2244 0x285B, 0xA3EC, 0xB482, 0x3F35, 0x9A5E, 0x11E9, 0x0687, 0x8D30,
2245 0xE232, 0x6985, 0x7EEB, 0xF55C, 0x5037, 0xDB80, 0xCCEE, 0x4759,
2246 0x0D8F, 0x8638, 0x9156, 0x1AE1, 0xBF8A, 0x343D, 0x2353, 0xA8E4,
2247 0xB6FF, 0x3D48, 0x2A26, 0xA191, 0x04FA, 0x8F4D, 0x9823, 0x1394,
2248 0x5942, 0xD2F5, 0xC59B, 0x4E2C, 0xEB47, 0x60F0, 0x779E, 0xFC29,
2249 0x4BA8, 0xC01F, 0xD771, 0x5CC6, 0xF9AD, 0x721A, 0x6574, 0xEEC3,
2250 0xA415, 0x2FA2, 0x38CC, 0xB37B, 0x1610, 0x9DA7, 0x8AC9, 0x017E,
2251 0x1F65, 0x94D2, 0x83BC, 0x080B, 0xAD60, 0x26D7, 0x31B9, 0xBA0E,
2252 0xF0D8, 0x7B6F, 0x6C01, 0xE7B6, 0x42DD, 0xC96A, 0xDE04, 0x55B3
2277 if (blk_len > 0) { in t10crc16()
2279 crc = crctable[((crc>>8) ^ *blk_adr++) & 0xFFL] ^ (crc << 8); in t10crc16()
2330 for (i = 0; i < buffer_count; i ++) { in ocs_ramlog_init()
2339 ramlog->cur_textbuf_idx = 0; in ocs_ramlog_init()
2341 ramlog->cur_textbuf = &ramlog->textbufs[0]; in ocs_ramlog_init()
2366 for (i = 0; i < ramlog->textbuf_count; i ++) { in ocs_ramlog_free()
2402 ocs_textbuf_reset(&ramlog->textbufs[0]); in ocs_ramlog_clear()
2403 /* Set textbuf_base to 0, so that all buffers are available for in ocs_ramlog_clear()
2406 ramlog->textbuf_base = 0; in ocs_ramlog_clear()
2418 * @return Returns 0 on success, or a negative error code value on failure.
2448 * @return Returns 0 on success, or a negative error code value on failure.
2471 return 0; in ocs_ramlog_vprintf()
2505 * @return Returns 0 on success, or a negative error code value on failure.
2519 ocs_ddump_section(textbuf, "driver-log", 0); in ocs_ddump_ramlog()
2522 ocs_ddump_section(textbuf, "startofday", 0); in ocs_ddump_ramlog()
2523 /* If textbuf_base is 0, then all buffers are used for recent */ in ocs_ddump_ramlog()
2525 rltextbuf = &ramlog->textbufs[0]; in ocs_ddump_ramlog()
2528 ocs_ddump_endsection(textbuf, "startofday", 0); in ocs_ddump_ramlog()
2531 ocs_ddump_section(textbuf, "recent", 0); in ocs_ddump_ramlog()
2541 ocs_ddump_endsection(textbuf, "recent", 0); in ocs_ddump_ramlog()
2542 ocs_ddump_endsection(textbuf, "driver-log", 0); in ocs_ddump_ramlog()
2544 return 0; in ocs_ddump_ramlog()
2595 for (i = 0; i < count; i++) { in ocs_pool_alloc()
2638 for (i = 0; i < count; i++) { in ocs_pool_reset()
2639 ocs_memset(ocs_pool_get_instance(pool, i), 0, size - sizeof(pool_hdr_t)); in ocs_pool_reset()
2792 uint32_t count = 0; in ocs_pool_get_freelist_count()