Lines Matching refs:k
1515 unsigned int addr, k; in add_pci_ports() local
1518 for (k = 0; k < MAX_PCI; k++) { in add_pci_ports()
1537 driver_name, k, dev->bus->number, dev->devfn, addr); in add_pci_ports()
1541 io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] = in add_pci_ports()
1551 unsigned int j = 0, k; in eata2x_detect() local
1566 for (k = MAX_INT_PARAM; io_port[k]; k++) in eata2x_detect()
1567 if (io_port[k] == SKIP) in eata2x_detect()
1569 else if (io_port[k] <= MAX_ISA_ADDR) { in eata2x_detect()
1571 io_port[k] = SKIP; in eata2x_detect()
1572 } else if (io_port[k] >= MIN_EISA_ADDR in eata2x_detect()
1573 && io_port[k] <= MAX_EISA_ADDR) { in eata2x_detect()
1575 io_port[k] = SKIP; in eata2x_detect()
1585 for (k = 0; io_port[k]; k++) { in eata2x_detect()
1587 if (io_port[k] == SKIP) in eata2x_detect()
1590 if (j < MAX_BOARDS && port_detect(io_port[k], j, tpnt)) in eata2x_detect()
1600 unsigned int k, pci_dir; in map_dma() local
1626 scsi_for_each_sg(SCpnt, sg, count, k) { in map_dma()
1627 cpp->sglist[k].address = H2DEV(sg_dma_address(sg)); in map_dma()
1628 cpp->sglist[k].num_bytes = H2DEV(sg_dma_len(sg)); in map_dma()
1695 unsigned int k; in scsi_to_dev_dir() local
1733 for (k = 0; k < ARRAY_SIZE(data_out_cmds); k++) in scsi_to_dev_dir()
1734 if (SCpnt->cmnd[0] == data_out_cmds[k]) { in scsi_to_dev_dir()
1740 for (k = 0; k < ARRAY_SIZE(data_none_cmds); k++) in scsi_to_dev_dir()
1741 if (SCpnt->cmnd[0] == data_none_cmds[k]) { in scsi_to_dev_dir()
1753 unsigned int i, k; in eata2x_queuecommand_lck() local
1764 for (k = 0; k < shost->can_queue; k++, i++) { in eata2x_queuecommand_lck()
1773 if (k == shost->can_queue) { in eata2x_queuecommand_lck()
1901 unsigned int i, time, k, c, limit = 0; in eata2x_eh_host_reset() local
1929 for (k = 0; k < shost->max_id; k++) { in eata2x_eh_host_reset()
1930 ha->target_redo[k][c] = 1; in eata2x_eh_host_reset()
1931 ha->target_to[k][c] = 0; in eata2x_eh_host_reset()
2070 unsigned int i, j, k, y; in sort() local
2074 k = i; in sort()
2076 for (j = k + 1; j < n; j++) in sort()
2078 if (sk[j] > sk[k]) in sort()
2079 k = j; in sort()
2081 if (sk[j] < sk[k]) in sort()
2082 k = j; in sort()
2085 if (k != i) { in sort()
2086 x = sk[k]; in sort()
2087 sk[k] = sk[i]; in sort()
2089 y = da[k]; in sort()
2090 da[k] = da[i]; in sort()
2103 unsigned int k, n; in reorder() local
2126 k = il[n]; in reorder()
2127 cpp = &ha->cp[k]; in reorder()
2176 k = il[n]; in reorder()
2177 cpp = &ha->cp[k]; in reorder()
2221 k = il[n]; in reorder()
2222 cpp = &ha->cp[k]; in reorder()
2228 k, flushcount, in reorder()
2243 unsigned int k, n, n_ready = 0, il[MAX_MAILBOXES]; in flush_dev() local
2245 for (k = 0; k < dev->host->can_queue; k++) { in flush_dev()
2247 if (ha->cp_stat[k] != READY && ha->cp_stat[k] != IN_USE) in flush_dev()
2250 cpp = &ha->cp[k]; in flush_dev()
2256 if (ha->cp_stat[k] == IN_USE) in flush_dev()
2259 il[n_ready++] = k; in flush_dev()
2266 k = il[n]; in flush_dev()
2267 cpp = &ha->cp[k]; in flush_dev()
2275 k); in flush_dev()
2276 ha->cp_stat[k] = ABORTING; in flush_dev()
2280 ha->cp_stat[k] = IN_USE; in flush_dev()
2287 unsigned int i, k, c, status, tstatus, reg; in ihdlr() local
2467 for (k = 0; k < shost->max_id; k++) in ihdlr()
2468 ha->target_redo[k][c] = 1; in ihdlr()