Lines Matching refs:scsi

238 	printk("BH @%p +%04x, ", host->scsi.SCp.ptr,  in acornscsi_dumpdma()
239 host->scsi.SCp.this_residual); in acornscsi_dumpdma()
241 host->scsi.SCp.scsi_xferred); in acornscsi_dumpdma()
376 host->scsi.phase = PHASE_IDLE; in acornscsi_resetcard()
377 host->scsi.disconnectable = 0; in acornscsi_resetcard()
707 if (host->scsi.disconnectable && host->SCpnt) { in acornscsi_kick()
709 host->scsi.disconnectable = 0; in acornscsi_kick()
730 host->scsi.phase = PHASE_CONNECTING; in acornscsi_kick()
732 host->scsi.SCp = *arm_scsi_pointer(SCpnt); in acornscsi_kick()
788 scsi_msg_to_host_byte(SCpnt, host->scsi.SCp.Message); in acornscsi_done()
789 set_status_byte(SCpnt, host->scsi.SCp.Status); in acornscsi_done()
803 if (host->scsi.SCp.ptr && in acornscsi_done()
807 if (host->scsi.SCp.scsi_xferred < SCpnt->underflow || in acornscsi_done()
808 host->scsi.SCp.scsi_xferred != host->dma.transferred) in acornscsi_done()
855 host->scsi.phase = PHASE_IDLE; in acornscsi_done()
1019 length = min_t(unsigned int, host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2); in acornscsi_dma_setup()
1029 acornscsi_data_write(host, host->scsi.SCp.ptr, host->dma.start_addr, in acornscsi_dma_setup()
1091 acornscsi_data_read(host, host->scsi.SCp.ptr, in acornscsi_dma_cleanup()
1097 acornscsi_data_updateptr(host, &host->scsi.SCp, transferred); in acornscsi_dma_cleanup()
1138 host->dma.xfer_ptr = host->scsi.SCp.ptr; in acornscsi_dma_intr()
1142 acornscsi_data_updateptr(host, &host->scsi.SCp, transferred); in acornscsi_dma_intr()
1147 length = min_t(unsigned int, host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2); in acornscsi_dma_intr()
1157 acornscsi_data_write(host, host->scsi.SCp.ptr, host->dma.start_addr, in acornscsi_dma_intr()
1234 transferred = host->scsi.SCp.scsi_xferred - host->dma.transferred; in acornscsi_dma_adjust()
1293 sbic_arm_writenext(host, SCpnt->cmd_len - host->scsi.SCp.sent_command); in acornscsi_sendcommand()
1298 (int *)&host->scsi.SCp.sent_command, SCpnt->cmd_len, 1000000)) in acornscsi_sendcommand()
1301 host->scsi.phase = PHASE_COMMAND; in acornscsi_sendcommand()
1307 unsigned int message_length = msgqueue_msglength(&host->scsi.msgs); in acornscsi_sendmessage()
1324 host->scsi.last_message = NOP; in acornscsi_sendmessage()
1332 msg = msgqueue_getmsg(&host->scsi.msgs, 0); in acornscsi_sendmessage()
1338 host->scsi.last_message = msg->msg[0]; in acornscsi_sendmessage()
1359 while ((msg = msgqueue_getmsg(&host->scsi.msgs, msgnr++)) != NULL) { in acornscsi_sendmessage()
1368 host->scsi.last_message = msg->msg[0]; in acornscsi_sendmessage()
1370 host->scsi.last_message |= msg->msg[2] << 8; in acornscsi_sendmessage()
1392 host->scsi.SCp.Status = sbic_arm_read(host, SBIC_DATA); in acornscsi_readstatusbyte()
1463 if (host->scsi.phase == PHASE_RECONNECTED) { in acornscsi_message()
1471 host->scsi.reconnected.tag = message[1]; in acornscsi_message()
1473 host->scsi.phase = PHASE_MSGIN; in acornscsi_message()
1480 if (host->scsi.phase != PHASE_STATUSIN) { in acornscsi_message()
1485 host->scsi.phase = PHASE_DONE; in acornscsi_message()
1486 host->scsi.SCp.Message = message[0]; in acornscsi_message()
1498 *scsi_pointer = host->scsi.SCp; in acornscsi_message()
1500 host->scsi.phase = PHASE_MSGIN; in acornscsi_message()
1514 host->scsi.SCp = *arm_scsi_pointer(host->SCpnt); in acornscsi_message()
1515 host->scsi.phase = PHASE_MSGIN; in acornscsi_message()
1529 host->scsi.phase = PHASE_DISCONNECT; in acornscsi_message()
1547 if (msgqueue_msglength(&host->scsi.msgs)) in acornscsi_message()
1550 switch (host->scsi.last_message) { in acornscsi_message()
1600 msgqueue_addmsg(&host->scsi.msgs, 5, EXTENDED_MESSAGE, 3, in acornscsi_message()
1619 msgqueue_flush(&host->scsi.msgs); in acornscsi_message()
1620 msgqueue_addmsg(&host->scsi.msgs, 1, MESSAGE_REJECT); in acornscsi_message()
1630 msgqueue_flush(&host->scsi.msgs); in acornscsi_message()
1631 msgqueue_addmsg(&host->scsi.msgs, 1, MESSAGE_REJECT); in acornscsi_message()
1632 host->scsi.phase = PHASE_MSGIN; in acornscsi_message()
1649 msgqueue_addmsg(&host->scsi.msgs, 1, BUS_DEVICE_RESET); in acornscsi_buildmessages()
1654 msgqueue_addmsg(&host->scsi.msgs, 1, in acornscsi_buildmessages()
1670 msgqueue_addmsg(&host->scsi.msgs, 5, in acornscsi_buildmessages()
1688 if (!host->scsi.SCp.ptr /*&& host->scsi.SCp.this_residual*/) { in acornscsi_starttransfer()
1694 residual = scsi_bufflen(host->SCpnt) - host->scsi.SCp.scsi_xferred; in acornscsi_starttransfer()
1729 if (host->SCpnt && !host->scsi.disconnectable) { in acornscsi_reconnect()
1738 host->scsi.reconnected.target = target; in acornscsi_reconnect()
1739 host->scsi.reconnected.lun = lun; in acornscsi_reconnect()
1740 host->scsi.reconnected.tag = 0; in acornscsi_reconnect()
1742 if (host->scsi.disconnectable && host->SCpnt && in acornscsi_reconnect()
1749 ADD_STATUS(target, 0x81, host->scsi.phase, 0); in acornscsi_reconnect()
1752 host->scsi.phase = PHASE_RECONNECTED; in acornscsi_reconnect()
1778 if (host->scsi.disconnectable && host->SCpnt) { in acornscsi_reconnect_finish()
1779 host->scsi.disconnectable = 0; in acornscsi_reconnect_finish()
1780 if (host->SCpnt->device->id == host->scsi.reconnected.target && in acornscsi_reconnect_finish()
1781 host->SCpnt->device->lun == host->scsi.reconnected.lun && in acornscsi_reconnect_finish()
1782 scsi_cmd_to_rq(host->SCpnt)->tag == host->scsi.reconnected.tag) { in acornscsi_reconnect_finish()
1799 host->scsi.reconnected.target, in acornscsi_reconnect_finish()
1800 host->scsi.reconnected.lun, in acornscsi_reconnect_finish()
1801 host->scsi.reconnected.tag); in acornscsi_reconnect_finish()
1814 host->scsi.SCp = *arm_scsi_pointer(host->SCpnt); in acornscsi_reconnect_finish()
1817 host->scsi.SCp.ptr, host->scsi.SCp.this_residual); in acornscsi_reconnect_finish()
1824 host->dma.transferred = host->scsi.SCp.scsi_xferred; in acornscsi_reconnect_finish()
1854 host->scsi.phase = PHASE_ABORTED; in acornscsi_abortcmd()
1857 msgqueue_flush(&host->scsi.msgs); in acornscsi_abortcmd()
1858 msgqueue_addmsg(&host->scsi.msgs, 1, ABORT); in acornscsi_abortcmd()
1884 print_sbic_status(asr, ssr, host->scsi.phase); in acornscsi_sbicintr()
1887 ADD_STATUS(8, ssr, host->scsi.phase, in_irq); in acornscsi_sbicintr()
1889 if (host->SCpnt && !host->scsi.disconnectable) in acornscsi_sbicintr()
1890 ADD_STATUS(host->SCpnt->device->id, ssr, host->scsi.phase, in_irq); in acornscsi_sbicintr()
1906 msgqueue_flush(&host->scsi.msgs); in acornscsi_sbicintr()
1914 switch (host->scsi.phase) { in acornscsi_sbicintr()
1919 host->scsi.phase = PHASE_CONNECTED; in acornscsi_sbicintr()
1920 msgqueue_flush(&host->scsi.msgs); in acornscsi_sbicintr()
1921 host->dma.transferred = host->scsi.SCp.scsi_xferred; in acornscsi_sbicintr()
1927 ADD_STATUS(8, ssr, host->scsi.phase, 1); in acornscsi_sbicintr()
1928 ADD_STATUS(host->SCpnt->device->id, ssr, host->scsi.phase, 1); in acornscsi_sbicintr()
1940 msgqueue_flush(&host->scsi.msgs); in acornscsi_sbicintr()
1964 host->scsi.phase = PHASE_STATUSIN; in acornscsi_sbicintr()
1970 host->scsi.phase = PHASE_MSGOUT; in acornscsi_sbicintr()
2004 host->scsi.phase = PHASE_STATUSIN; in acornscsi_sbicintr()
2029 if (host->scsi.SCp.sent_command != host->SCpnt->cmd_len) in acornscsi_sbicintr()
2034 host->scsi.phase = PHASE_DATAOUT; in acornscsi_sbicintr()
2039 if (host->scsi.SCp.sent_command != host->SCpnt->cmd_len) in acornscsi_sbicintr()
2044 host->scsi.phase = PHASE_DATAIN; in acornscsi_sbicintr()
2050 host->scsi.phase = PHASE_STATUSIN; in acornscsi_sbicintr()
2072 host->scsi.disconnectable = 1; in acornscsi_sbicintr()
2073 host->scsi.reconnected.tag = 0; in acornscsi_sbicintr()
2074 host->scsi.phase = PHASE_IDLE; in acornscsi_sbicintr()
2104 ADD_STATUS(host->SCpnt->device->id, ssr, host->scsi.phase, in_irq); in acornscsi_sbicintr()
2112 host->scsi.phase = PHASE_DATAOUT; in acornscsi_sbicintr()
2121 host->scsi.phase = PHASE_DATAIN; in acornscsi_sbicintr()
2133 host->scsi.phase = PHASE_STATUSIN; in acornscsi_sbicintr()
2168 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) - in acornscsi_sbicintr()
2172 host->scsi.phase = PHASE_STATUSIN; in acornscsi_sbicintr()
2179 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) - in acornscsi_sbicintr()
2189 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) - in acornscsi_sbicintr()
2217 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) - in acornscsi_sbicintr()
2222 host->scsi.phase = PHASE_STATUSIN; in acornscsi_sbicintr()
2229 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) - in acornscsi_sbicintr()
2240 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) - in acornscsi_sbicintr()
2329 clear_bit(host->scsi.reconnected.target * 8 + host->scsi.reconnected.lun, in acornscsi_sbicintr()
2331 host->scsi.phase = PHASE_IDLE; in acornscsi_sbicintr()
2446 if (host->scsi.phase == PHASE_IDLE) in acornscsi_queuecmd_lck()
2498 switch (host->scsi.phase) { in acornscsi_do_abort()
2508 if (host->scsi.disconnectable) { in acornscsi_do_abort()
2509 host->scsi.disconnectable = 0; in acornscsi_do_abort()
2569 print_sbic_status(asr, ssr, host->scsi.phase); in acornscsi_abort()
2652 print_sbic_status(asr, ssr, host->scsi.phase); in acornscsi_host_reset()
2719 host->base + SBIC_REGIDX, host->scsi.irq); in acornscsi_show_info()
2722 host->base + DMAC_OFFSET, host->scsi.irq); in acornscsi_show_info()
2827 ashost->scsi.irq = host->irq; in acornscsi_probe()
2835 host->host_no, ashost->scsi.irq, ret); in acornscsi_probe()
2842 msgqueue_initialise(&ashost->scsi.msgs); in acornscsi_probe()
2855 msgqueue_free(&ashost->scsi.msgs); in acornscsi_probe()
2883 msgqueue_free(&ashost->scsi.msgs); in acornscsi_remove()