Lines Matching refs:CURRENT_SC
513 #define CURRENT_SC (HOSTDATA(shpnt)->current_SC) macro
540 #define SYNCRATE (HOSTDATA(shpnt)->syncrate[CURRENT_SC->device->id])
541 #define SYNCNEG (HOSTDATA(shpnt)->syncneg[CURRENT_SC->device->id])
877 if(CURRENT_SC) { in setup_expected_interrupts()
878 CURRENT_SC->SCp.phase |= 1 << 16; in setup_expected_interrupts()
880 if(CURRENT_SC->SCp.phase & selecting) { in setup_expected_interrupts()
885 SETPORT(SIMODE0, (CURRENT_SC->SCp.phase & spiordy) ? ENSPIORDY : 0); in setup_expected_interrupts()
1054 if(CURRENT_SC==SCpnt) { in aha152x_device_reset()
1276 if (CURRENT_SC) { in done()
1278 scmd_printk(KERN_ERR, CURRENT_SC, in done()
1282 DONE_SC = CURRENT_SC; in done()
1283 CURRENT_SC = NULL; in done()
1371 if(CURRENT_SC) { in busfree_run()
1375 CURRENT_SC->SCp.phase &= ~syncneg; in busfree_run()
1377 if(CURRENT_SC->SCp.phase & completed) { in busfree_run()
1379 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_OK <<… in busfree_run()
1381 } else if(CURRENT_SC->SCp.phase & aborted) { in busfree_run()
1382 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_ABORT… in busfree_run()
1384 } else if(CURRENT_SC->SCp.phase & resetted) { in busfree_run()
1385 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_RESET… in busfree_run()
1387 } else if(CURRENT_SC->SCp.phase & disconnected) { in busfree_run()
1392 append_SC(&DISCONNECTED_SC, CURRENT_SC); in busfree_run()
1393 CURRENT_SC->SCp.phase |= 1 << 16; in busfree_run()
1394 CURRENT_SC = NULL; in busfree_run()
1471 CURRENT_SC = remove_first_SC(&ISSUE_SC); in busfree_run()
1475 if(CURRENT_SC) { in busfree_run()
1479 CURRENT_SC->SCp.phase |= selecting; in busfree_run()
1484 SETPORT(SCSIID, (shpnt->this_id << OID_) | CURRENT_SC->device->id); in busfree_run()
1511 CURRENT_SC->SCp.phase &= ~(selecting|not_issued); in seldo_run()
1516 scmd_printk(KERN_ERR, CURRENT_SC, in seldo_run()
1524 ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); in seldo_run()
1526 if (CURRENT_SC->SCp.phase & aborting) { in seldo_run()
1528 } else if (CURRENT_SC->SCp.phase & resetting) { in seldo_run()
1531 CURRENT_SC->SCp.phase |= syncneg; in seldo_run()
1549 if (!CURRENT_SC) in selto_run()
1552 CURRENT_SC->SCp.phase &= ~selecting; in selto_run()
1554 if (CURRENT_SC->SCp.phase & aborted) in selto_run()
1581 if(CURRENT_SC) { in seldi_run()
1582 if(!(CURRENT_SC->SCp.phase & not_issued)) in seldi_run()
1583 scmd_printk(KERN_ERR, CURRENT_SC, in seldi_run()
1587 append_SC(&ISSUE_SC, CURRENT_SC); in seldi_run()
1590 CURRENT_SC = NULL; in seldi_run()
1649 if(!CURRENT_SC) { in msgi_run()
1665 CURRENT_SC = remove_lun_SC(&DISCONNECTED_SC, RECONN_TARGET, MSGI(0) & 0x3f); in msgi_run()
1667 if (!CURRENT_SC) { in msgi_run()
1676 CURRENT_SC->SCp.Message = MSGI(0); in msgi_run()
1677 CURRENT_SC->SCp.phase &= ~disconnected; in msgi_run()
1685 CURRENT_SC->SCp.Message = MSGI(0); in msgi_run()
1690 scmd_printk(KERN_WARNING, CURRENT_SC, in msgi_run()
1693 CURRENT_SC->SCp.phase |= disconnected; in msgi_run()
1697 CURRENT_SC->SCp.phase |= completed; in msgi_run()
1702 scmd_printk(KERN_INFO, CURRENT_SC, in msgi_run()
1707 scmd_printk(KERN_INFO, CURRENT_SC, in msgi_run()
1729 scmd_printk(KERN_ERR, CURRENT_SC, in msgi_run()
1737 printk(INFO_LEAD, CMDINFO(CURRENT_SC)); in msgi_run()
1748 CURRENT_SC, in msgi_run()
1773 CURRENT_SC, in msgi_run()
1813 scmd_printk(KERN_WARNING, CURRENT_SC, in msgi_end()
1828 if((CURRENT_SC->SCp.phase & syncneg) && SYNCNEG==2 && SYNCRATE==0) { in msgo_init()
1829 ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); in msgo_init()
1831 scmd_printk(KERN_INFO, CURRENT_SC, in msgo_init()
1856 CURRENT_SC->SCp.phase |= identified; in msgo_run()
1859 CURRENT_SC->SCp.phase |= aborted; in msgo_run()
1862 CURRENT_SC->SCp.phase |= resetted; in msgo_run()
1871 scmd_printk(KERN_ERR, CURRENT_SC, in msgo_end()
1875 scmd_printk(KERN_INFO, CURRENT_SC, in msgo_end()
1891 if (CURRENT_SC->SCp.sent_command) { in cmd_init()
1892 scmd_printk(KERN_ERR, CURRENT_SC, in cmd_init()
1907 while(CMD_I<CURRENT_SC->cmd_len) { in cmd_run()
1911 SETPORT(SCSIDAT, CURRENT_SC->cmnd[CMD_I++]); in cmd_run()
1917 if(CMD_I<CURRENT_SC->cmd_len) in cmd_end()
1918 scmd_printk(KERN_ERR, CURRENT_SC, in cmd_end()
1920 CMD_I, CURRENT_SC->cmd_len); in cmd_end()
1922 CURRENT_SC->SCp.sent_command++; in cmd_end()
1934 CURRENT_SC->SCp.Status = GETPORT(SCSIDAT); in status_run()
1975 scmd_printk(KERN_ERR, CURRENT_SC, "datai timeout\n"); in datai_run()
1987 scmd_printk(KERN_ERR, CURRENT_SC, in datai_run()
1995 if(CURRENT_SC->SCp.this_residual>0) { in datai_run()
1996 while(fifodata>0 && CURRENT_SC->SCp.this_residual>0) { in datai_run()
1997 data_count = fifodata > CURRENT_SC->SCp.this_residual ? in datai_run()
1998 CURRENT_SC->SCp.this_residual : in datai_run()
2004 *CURRENT_SC->SCp.ptr++ = GETPORT(DATAPORT); in datai_run()
2005 CURRENT_SC->SCp.this_residual--; in datai_run()
2012 insw(DATAPORT, CURRENT_SC->SCp.ptr, data_count); in datai_run()
2013 CURRENT_SC->SCp.ptr += 2 * data_count; in datai_run()
2014 CURRENT_SC->SCp.this_residual -= 2 * data_count; in datai_run()
2018 if (CURRENT_SC->SCp.this_residual == 0 && in datai_run()
2019 !sg_is_last(CURRENT_SC->SCp.buffer)) { in datai_run()
2021 CURRENT_SC->SCp.buffer = sg_next(CURRENT_SC->SCp.buffer); in datai_run()
2022 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer); in datai_run()
2023 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length; in datai_run()
2027 scmd_printk(KERN_ERR, CURRENT_SC, in datai_run()
2050 scmd_printk(KERN_ERR, CURRENT_SC, in datai_run()
2055 scmd_printk(KERN_ERR, CURRENT_SC, in datai_run()
2066 CMD_INC_RESID(CURRENT_SC, -GETSTCNT()); in datai_end()
2087 DATA_LEN = scsi_get_resid(CURRENT_SC); in datao_init()
2096 while(TESTLO(DMASTAT, INTSTAT) && CURRENT_SC->SCp.this_residual>0) { in datao_run()
2098 if(data_count > CURRENT_SC->SCp.this_residual) in datao_run()
2099 data_count=CURRENT_SC->SCp.this_residual; in datao_run()
2102 scmd_printk(KERN_ERR, CURRENT_SC, in datao_run()
2110 SETPORT(DATAPORT, *CURRENT_SC->SCp.ptr++); in datao_run()
2111 CURRENT_SC->SCp.this_residual--; in datao_run()
2112 CMD_INC_RESID(CURRENT_SC, -1); in datao_run()
2118 outsw(DATAPORT, CURRENT_SC->SCp.ptr, data_count); in datao_run()
2119 CURRENT_SC->SCp.ptr += 2 * data_count; in datao_run()
2120 CURRENT_SC->SCp.this_residual -= 2 * data_count; in datao_run()
2121 CMD_INC_RESID(CURRENT_SC, -2 * data_count); in datao_run()
2124 if (CURRENT_SC->SCp.this_residual == 0 && in datao_run()
2125 !sg_is_last(CURRENT_SC->SCp.buffer)) { in datao_run()
2127 CURRENT_SC->SCp.buffer = sg_next(CURRENT_SC->SCp.buffer); in datao_run()
2128 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer); in datao_run()
2129 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length; in datao_run()
2137 scmd_printk(KERN_ERR, CURRENT_SC, "dataout timeout\n"); in datao_run()
2147 int datao_out = DATA_LEN - scsi_get_resid(CURRENT_SC); in datao_end()
2149 struct scatterlist *sg = scsi_sglist(CURRENT_SC); in datao_end()
2151 CMD_INC_RESID(CURRENT_SC, datao_out - datao_cnt); in datao_end()
2153 done = scsi_bufflen(CURRENT_SC) - scsi_get_resid(CURRENT_SC); in datao_end()
2162 CURRENT_SC->SCp.buffer = sg; in datao_end()
2163 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer) + done; in datao_end()
2164 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length - in datao_end()
2193 } else if(stat0 & SELDO && CURRENT_SC && (CURRENT_SC->SCp.phase & selecting)) { in update_state()
2216 scmd_printk(KERN_INFO, CURRENT_SC, "reselection missed?"); in update_state()
2234 scmd_printk(KERN_ERR, CURRENT_SC, "parity error\n"); in parerr_run()
2265 if(CURRENT_SC && !CURRENT_SC->device->soft_reset) in rsti_run()
2324 if(CURRENT_SC) in is_complete()
2325 CURRENT_SC->SCp.phase &= ~spiordy; in is_complete()
2346 if(CURRENT_SC) in is_complete()
2347 CURRENT_SC->SCp.phase |= spiordy; in is_complete()
2364 scmd_printk(KERN_ERR, CURRENT_SC, in is_complete()
2469 if (CURRENT_SC) in show_queues()
2470 show_command(CURRENT_SC); in show_queues()
2518 …seq_printf(m, "\n%s: %s(%s) ", CURRENT_SC ? "on bus" : "waiting", states[STATE].name, states[PREVS… in get_ports()
2846 if (CURRENT_SC) { in aha152x_show_info()
2848 get_command(m, CURRENT_SC); in aha152x_show_info()