Lines Matching refs:cnt
612 int cnt, i; in qla1280_read_nvram() local
625 for (cnt = 0; cnt < 3; cnt++) { in qla1280_read_nvram()
626 *wptr = qla1280_get_nvram_word(ha, cnt); in qla1280_read_nvram()
637 for (; cnt < sizeof(struct nvram); cnt++) { in qla1280_read_nvram()
638 *wptr = qla1280_get_nvram_word(ha, cnt); in qla1280_read_nvram()
1544 int cnt; in qla1280_chip_diag() local
1565 for (cnt = 1000000; cnt && data & ISP_RESET; cnt--) { in qla1280_chip_diag()
1570 if (!cnt) in qla1280_chip_diag()
1589 for (cnt = 1000000; cnt && data == MBS_BUSY; cnt--) { in qla1280_chip_diag()
1594 if (!cnt) in qla1280_chip_diag()
1681 uint16_t mb[MAILBOX_REGISTER_COUNT], cnt; in qla1280_load_firmware_dma() local
1704 cnt = 2000 >> 1; in qla1280_load_firmware_dma()
1706 if (cnt > risc_code_size) in qla1280_load_firmware_dma()
1707 cnt = risc_code_size; in qla1280_load_firmware_dma()
1711 risc_code_address, cnt, num, risc_address); in qla1280_load_firmware_dma()
1712 for(i = 0; i < cnt; i++) in qla1280_load_firmware_dma()
1718 mb[4] = cnt; in qla1280_load_firmware_dma()
1738 mb[4] = cnt; in qla1280_load_firmware_dma()
1752 for (i = 0; i < (cnt << 1); i++) { in qla1280_load_firmware_dma()
1764 risc_address += cnt; in qla1280_load_firmware_dma()
1765 risc_code_size = risc_code_size - cnt; in qla1280_load_firmware_dma()
1766 risc_code_address = risc_code_address + cnt; in qla1280_load_firmware_dma()
2315 int cnt; in qla1280_nvram_request() local
2322 for (cnt = 0; cnt < 11; cnt++) { in qla1280_nvram_request()
2332 for (cnt = 0; cnt < 16; cnt++) { in qla1280_nvram_request()
2393 int cnt; in qla1280_mailbox_command() local
2414 for (cnt = 0; cnt < MAILBOX_REGISTER_COUNT; cnt++) { in qla1280_mailbox_command()
2769 int cnt; in qla1280_64bit_start_scsi() local
2792 cnt = RD_REG_WORD(®->mailbox4); in qla1280_64bit_start_scsi()
2793 if (ha->req_ring_index < cnt) in qla1280_64bit_start_scsi()
2794 ha->req_q_cnt = cnt - ha->req_ring_index; in qla1280_64bit_start_scsi()
2797 REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); in qla1280_64bit_start_scsi()
2813 for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS && in qla1280_64bit_start_scsi()
2814 ha->outstanding_cmds[cnt] != NULL; cnt++); in qla1280_64bit_start_scsi()
2816 if (cnt >= MAX_OUTSTANDING_COMMANDS) { in qla1280_64bit_start_scsi()
2823 ha->outstanding_cmds[cnt] = sp; in qla1280_64bit_start_scsi()
2825 CMD_HANDLE(sp->cmd) = (unsigned char *)(unsigned long)(cnt + 1); in qla1280_64bit_start_scsi()
2842 pkt->handle = cpu_to_le32(cnt); in qla1280_64bit_start_scsi()
2884 for_each_sg(sg, s, seg_cnt, cnt) { in qla1280_64bit_start_scsi()
2885 if (cnt == 2) in qla1280_64bit_start_scsi()
2947 for_each_sg(sg, s, remseg, cnt) { in qla1280_64bit_start_scsi()
2948 if (cnt == 5) in qla1280_64bit_start_scsi()
2968 remseg -= cnt; in qla1280_64bit_start_scsi()
3036 int cnt; in qla1280_32bit_start_scsi() local
3068 cnt = RD_REG_WORD(®->mailbox4); in qla1280_32bit_start_scsi()
3069 if (ha->req_ring_index < cnt) in qla1280_32bit_start_scsi()
3070 ha->req_q_cnt = cnt - ha->req_ring_index; in qla1280_32bit_start_scsi()
3073 REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); in qla1280_32bit_start_scsi()
3088 for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS && in qla1280_32bit_start_scsi()
3089 (ha->outstanding_cmds[cnt] != 0); cnt++) ; in qla1280_32bit_start_scsi()
3091 if (cnt >= MAX_OUTSTANDING_COMMANDS) { in qla1280_32bit_start_scsi()
3098 CMD_HANDLE(sp->cmd) = (unsigned char *) (unsigned long)(cnt + 1); in qla1280_32bit_start_scsi()
3099 ha->outstanding_cmds[cnt] = sp; in qla1280_32bit_start_scsi()
3111 pkt->handle = cpu_to_le32(cnt); in qla1280_32bit_start_scsi()
3156 for_each_sg(sg, s, seg_cnt, cnt) { in qla1280_32bit_start_scsi()
3157 if (cnt == 4) in qla1280_32bit_start_scsi()
3202 for_each_sg(sg, s, remseg, cnt) { in qla1280_32bit_start_scsi()
3203 if (cnt == 7) in qla1280_32bit_start_scsi()
3215 remseg -= cnt; in qla1280_32bit_start_scsi()
3275 int cnt; in qla1280_req_pkt() local
3287 cnt = RD_REG_WORD(®->mailbox4); in qla1280_req_pkt()
3288 if (ha->req_ring_index < cnt) in qla1280_req_pkt()
3289 ha->req_q_cnt = cnt - ha->req_ring_index; in qla1280_req_pkt()
3292 REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); in qla1280_req_pkt()
3808 int cnt; in qla1280_abort_isp() local
3826 for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { in qla1280_abort_isp()
3828 sp = ha->outstanding_cmds[cnt]; in qla1280_abort_isp()
3835 ha->outstanding_cmds[cnt] = NULL; in qla1280_abort_isp()
3983 int cnt; in __qla1280_dump_buffer() local
3991 for (cnt = 0; cnt < size;) { in __qla1280_dump_buffer()
3995 cnt++; in __qla1280_dump_buffer()
3996 if (!(cnt % 16)) in __qla1280_dump_buffer()
4001 if (cnt % 16) in __qla1280_dump_buffer()