• Home
  • Raw
  • Download

Lines Matching refs:scsi

143 	unsigned int off = reg << info->scsi.io_shift;  in fas216_readb()
144 return readb(info->scsi.io_base + off); in fas216_readb()
149 unsigned int off = reg << info->scsi.io_shift; in fas216_writeb()
150 writeb(val, info->scsi.io_base + off); in fas216_writeb()
195 info->scsi.io_shift, info->scsi.irq, in fas216_dumpinfo()
196 info->scsi.cfg[0], info->scsi.cfg[1], info->scsi.cfg[2], in fas216_dumpinfo()
197 info->scsi.cfg[3]); in fas216_dumpinfo()
199 info->scsi.type, info->scsi.phase); in fas216_dumpinfo()
200 print_SCp(&info->scsi.SCp, " SCp={ ", " }\n"); in fas216_dumpinfo()
202 info->scsi.async_stp, in fas216_dumpinfo()
203 info->scsi.disconnectable, info->scsi.aborting); in fas216_dumpinfo()
275 if (info->scsi.phase < ARRAY_SIZE(phases) && in fas216_drv_phase()
276 phases[info->scsi.phase]) in fas216_drv_phase()
277 return phases[info->scsi.phase]; in fas216_drv_phase()
418 while ((msg = msgqueue_getmsg(&info->scsi.msgs, msgnr++)) != NULL) { in fas216_get_last_msg()
475 cntl3 = info->scsi.cfg[2]; in fas216_set_sync()
560 msgqueue_flush(&info->scsi.msgs); in fas216_handlesync()
561 msgqueue_addmsg(&info->scsi.msgs, 5, in fas216_handlesync()
564 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_handlesync()
603 msgqueue_flush(&info->scsi.msgs); in fas216_handlesync()
604 msgqueue_addmsg(&info->scsi.msgs, 1, MESSAGE_REJECT); in fas216_handlesync()
605 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_handlesync()
611 dev->stp = info->scsi.async_stp; in fas216_handlesync()
629 struct scsi_pointer *SCp = &info->scsi.SCp; in fas216_updateptrs()
669 struct scsi_pointer *SCp = &info->scsi.SCp; in fas216_pio()
717 total = info->scsi.SCp.phase; in fas216_cleanuptransfer()
719 total = info->scsi.SCp.this_residual; in fas216_cleanuptransfer()
735 if (info->scsi.phase == PHASE_DATAOUT) in fas216_cleanuptransfer()
754 info->scsi.SCp.ptr, info->scsi.SCp.this_residual, in fas216_transfer()
755 info->scsi.SCp.phase); in fas216_transfer()
757 if (!info->scsi.SCp.ptr) { in fas216_transfer()
760 print_SCp(&info->scsi.SCp, "SCp: ", "\n"); in fas216_transfer()
775 if (info->scsi.phase == PHASE_DATAOUT) in fas216_transfer()
781 dmatype = info->dma.setup(info->host, &info->scsi.SCp, in fas216_transfer()
786 fas216_set_stc(info, info->scsi.SCp.phase); in fas216_transfer()
788 fas216_set_stc(info, info->scsi.SCp.this_residual); in fas216_transfer()
794 fas216_writeb(info, REG_STP, info->scsi.async_stp); in fas216_transfer()
802 info->dma.pseudo(info->host, &info->scsi.SCp, in fas216_transfer()
835 info->dma.stop(info->host, &info->scsi.SCp); in fas216_stoptransfer()
839 if (info->scsi.phase == PHASE_DATAIN) { in fas216_stoptransfer()
848 while (fifo && info->scsi.SCp.ptr) { in fas216_stoptransfer()
849 *info->scsi.SCp.ptr = fas216_readb(info, REG_FF); in fas216_stoptransfer()
868 info->dma.stop(info->host, &info->scsi.SCp); in fas216_aborttransfer()
889 info->scsi.phase); in fas216_disconnect_intr()
891 msgqueue_flush(&info->scsi.msgs); in fas216_disconnect_intr()
893 switch (info->scsi.phase) { in fas216_disconnect_intr()
900 info->scsi.disconnectable = 1; in fas216_disconnect_intr()
901 info->scsi.phase = PHASE_IDLE; in fas216_disconnect_intr()
904 if (info->scsi.phase == PHASE_IDLE) in fas216_disconnect_intr()
914 if (fas216_get_last_msg(info, info->scsi.msgin_fifo) == ABORT) { in fas216_disconnect_intr()
915 info->scsi.aborting = 0; in fas216_disconnect_intr()
946 WARN_ON(info->scsi.phase == PHASE_SELECTION || in fas216_reselected_intr()
947 info->scsi.phase == PHASE_SELSTEPS); in fas216_reselected_intr()
952 info->scsi.phase, cfis); in fas216_reselected_intr()
984 msgqueue_flush(&info->scsi.msgs); in fas216_reselected_intr()
989 if (info->scsi.disconnectable && info->SCpnt) { in fas216_reselected_intr()
990 info->scsi.disconnectable = 0; in fas216_reselected_intr()
1011 info->scsi.SCp = info->SCpnt->SCp; in fas216_reselected_intr()
1014 info->scsi.SCp.ptr, info->scsi.SCp.this_residual); in fas216_reselected_intr()
1015 info->scsi.phase = PHASE_MSGIN; in fas216_reselected_intr()
1027 msgqueue_addmsg(&info->scsi.msgs, 2, ABORT_TAG, tag); in fas216_reselected_intr()
1030 msgqueue_addmsg(&info->scsi.msgs, 1, ABORT); in fas216_reselected_intr()
1031 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_reselected_intr()
1032 info->scsi.aborting = 1; in fas216_reselected_intr()
1046 msgqueue_flush(&info->scsi.msgs); in fas216_reselected_intr()
1047 msgqueue_addmsg(&info->scsi.msgs, 1, INITIATOR_ERROR); in fas216_reselected_intr()
1048 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_reselected_intr()
1078 info->SCpnt->SCp = info->scsi.SCp; in fas216_parse_message()
1082 info->scsi.SCp.ptr, info->scsi.SCp.this_residual); in fas216_parse_message()
1092 info->scsi.SCp = info->SCpnt->SCp; in fas216_parse_message()
1095 info->scsi.SCp.ptr, info->scsi.SCp.this_residual); in fas216_parse_message()
1102 info->scsi.phase = PHASE_MSGIN_DISCONNECT; in fas216_parse_message()
1109 switch (fas216_get_last_msg(info, info->scsi.msgin_fifo)) { in fas216_parse_message()
1116 fas216_get_last_msg(info, info->scsi.msgin_fifo)); in fas216_parse_message()
1157 msgqueue_flush(&info->scsi.msgs); in fas216_parse_message()
1158 msgqueue_addmsg(&info->scsi.msgs, 1, MESSAGE_REJECT); in fas216_parse_message()
1159 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_parse_message()
1228 unsigned char *message = info->scsi.message; in fas216_message()
1274 msgqueue_flush(&info->scsi.msgs); in fas216_message()
1275 msgqueue_addmsg(&info->scsi.msgs, 1, MSG_PARITY_ERROR); in fas216_message()
1276 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_message()
1297 for (i = info->scsi.SCp.sent_command; i < info->SCpnt->cmd_len; i++) in fas216_send_command()
1302 info->scsi.phase = PHASE_COMMAND; in fas216_send_command()
1314 unsigned int tot_msglen = msgqueue_msglength(&info->scsi.msgs); in fas216_send_messageout()
1324 while ((msg = msgqueue_getmsg(&info->scsi.msgs, msgnr++)) != NULL) { in fas216_send_messageout()
1338 info->scsi.phase = PHASE_MSGOUT; in fas216_send_messageout()
1355 stat, is, info->scsi.phase); in fas216_busservice_intr()
1357 switch (info->scsi.phase) { in fas216_busservice_intr()
1389 switch (STATE(stat & STAT_BUSMASK, info->scsi.phase)) { in fas216_busservice_intr()
1394 info->scsi.phase = PHASE_DATAIN; in fas216_busservice_intr()
1409 info->scsi.phase = PHASE_DATAOUT; in fas216_busservice_intr()
1423 info->scsi.phase = PHASE_STATUS; in fas216_busservice_intr()
1434 info->scsi.msgin_fifo = fas216_readb(info, REG_CFIS) & CFIS_CF; in fas216_busservice_intr()
1437 info->scsi.phase = PHASE_MSGIN; in fas216_busservice_intr()
1441 info->scsi.msgin_fifo = fas216_readb(info, REG_CFIS) & CFIS_CF; in fas216_busservice_intr()
1448 info->scsi.phase = PHASE_COMMAND; in fas216_busservice_intr()
1477 fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0]); in fas216_busservice_intr()
1480 if (msgqueue_msglength(&info->scsi.msgs) > 1) in fas216_busservice_intr()
1508 msgqueue_flush(&info->scsi.msgs); in fas216_busservice_intr()
1509 msgqueue_addmsg(&info->scsi.msgs, 1, INITIATOR_ERROR); in fas216_busservice_intr()
1510 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_busservice_intr()
1514 if (info->scsi.phase == PHASE_MSGIN_DISCONNECT) { in fas216_busservice_intr()
1518 msgqueue_flush(&info->scsi.msgs); in fas216_busservice_intr()
1520 msgqueue_addmsg(&info->scsi.msgs, 1, INITIATOR_ERROR); in fas216_busservice_intr()
1521 info->scsi.phase = PHASE_MSGOUT_EXPECT; in fas216_busservice_intr()
1522 info->scsi.aborting = 1; in fas216_busservice_intr()
1557 stat, is, info->scsi.phase); in fas216_funcdone_intr()
1559 switch (info->scsi.phase) { in fas216_funcdone_intr()
1567 info->scsi.SCp.Status = fas216_readb(info, REG_FF); in fas216_funcdone_intr()
1568 info->scsi.SCp.Message = fas216_readb(info, REG_FF); in fas216_funcdone_intr()
1569 info->scsi.phase = PHASE_DONE; in fas216_funcdone_intr()
1580 info->scsi.msgin_fifo = fifo_len; in fas216_funcdone_intr()
1598 msgqueue_flush(&info->scsi.msgs); in fas216_bus_reset()
1607 info->scsi.phase = PHASE_IDLE; in fas216_bus_reset()
1609 memset(&info->scsi.SCp, 0, sizeof(info->scsi.SCp)); in fas216_bus_reset()
1615 info->device[i].stp = info->scsi.async_stp; in fas216_bus_reset()
1641 add_debug_list(stat, is, inst, info->scsi.phase); in fas216_intr()
1687 tot_msglen = msgqueue_msglength(&info->scsi.msgs); in __fas216_start_command()
1696 while ((msg = msgqueue_getmsg(&info->scsi.msgs, msgnr++)) != NULL) { in __fas216_start_command()
1713 info->scsi.phase = PHASE_SELSTEPS; in __fas216_start_command()
1716 while ((msg = msgqueue_getmsg(&info->scsi.msgs, msgnr++)) != NULL) { in __fas216_start_command()
1736 struct message *msg = msgqueue_getmsg(&info->scsi.msgs, 0); in __fas216_start_command()
1768 info->scsi.phase = PHASE_SELECTION; in fas216_start_command()
1769 info->scsi.SCp = SCpnt->SCp; in fas216_start_command()
1774 fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0] | CNTL1_PTE); in fas216_start_command()
1776 fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0]); in fas216_start_command()
1787 msgqueue_flush(&info->scsi.msgs); in fas216_start_command()
1788 msgqueue_addmsg(&info->scsi.msgs, 1, IDENTIFY(disconnect_ok, SCpnt->device->lun)); in fas216_start_command()
1794 msgqueue_addmsg(&info->scsi.msgs, 2, SIMPLE_QUEUE_TAG, SCpnt->tag); in fas216_start_command()
1803 msgqueue_addmsg(&info->scsi.msgs, 5, in fas216_start_command()
1858 info->scsi.phase = PHASE_SELECTION; in fas216_do_bus_device_reset()
1859 info->scsi.SCp = SCpnt->SCp; in fas216_do_bus_device_reset()
1865 msgqueue_flush(&info->scsi.msgs); in fas216_do_bus_device_reset()
1866 msgqueue_addmsg(&info->scsi.msgs, 1, BUS_DEVICE_RESET); in fas216_do_bus_device_reset()
1882 msg = msgqueue_getmsg(&info->scsi.msgs, 0); in fas216_do_bus_device_reset()
1952 if (info->scsi.disconnectable && info->SCpnt) { in fas216_kick()
1957 info->scsi.disconnectable = 0; in fas216_kick()
1977 info->scsi.SCp.ptr, info->scsi.SCp.this_residual); in fas216_kick()
2045 SCpnt->result = result << 16 | info->scsi.SCp.Message << 8 | in fas216_std_done()
2046 info->scsi.SCp.Status; in fas216_std_done()
2080 if (info->scsi.SCp.ptr) { in fas216_std_done()
2090 SCpnt->result, info->scsi.SCp.ptr, in fas216_std_done()
2091 info->scsi.SCp.this_residual); in fas216_std_done()
2152 info->scsi.phase = PHASE_IDLE; in fas216_done()
2154 if (info->scsi.aborting) { in fas216_done()
2157 info->scsi.aborting = 0; in fas216_done()
2164 if (info->scsi.SCp.ptr && info->scsi.SCp.this_residual == 0) { in fas216_done()
2167 info->scsi.SCp.ptr, info->scsi.SCp.this_residual); in fas216_done()
2168 info->scsi.SCp.ptr = NULL; in fas216_done()
2184 if (info->scsi.irq) { in fas216_done()
2186 if (info->scsi.phase == PHASE_IDLE) in fas216_done()
2238 if (result == 0 && info->scsi.phase == PHASE_IDLE) in fas216_queue_command_lck()
2284 BUG_ON(info->scsi.irq); in fas216_noqueue_command_lck()
2382 switch (info->scsi.phase) { in fas216_find_command()
2388 if (info->scsi.disconnectable) { in fas216_find_command()
2389 info->scsi.disconnectable = 0; in fas216_find_command()
2494 if (info->SCpnt && !info->scsi.disconnectable && in fas216_eh_device_reset()
2522 if (info->scsi.phase == PHASE_IDLE) in fas216_eh_device_reset()
2575 fas216_writeb(info, REG_CNTL3, info->scsi.cfg[2]); in fas216_eh_bus_reset()
2608 info->scsi.phase = PHASE_IDLE; in fas216_eh_bus_reset()
2641 fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0]); in fas216_init_chip()
2642 fas216_writeb(info, REG_CNTL2, info->scsi.cfg[1]); in fas216_init_chip()
2643 fas216_writeb(info, REG_CNTL3, info->scsi.cfg[2]); in fas216_init_chip()
2646 fas216_writeb(info, REG_STP, info->scsi.async_stp); in fas216_init_chip()
2647 fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0]); in fas216_init_chip()
2812 info->scsi.disconnectable = 0; in fas216_reset_state()
2813 info->scsi.aborting = 0; in fas216_reset_state()
2848 info->scsi.cfg[0] = host->this_id | CNTL1_PERE; in fas216_init()
2849 info->scsi.cfg[1] = CNTL2_ENF | CNTL2_S2FE; in fas216_init()
2850 info->scsi.cfg[2] = info->ifcfg.cntl3 | in fas216_init()
2852 info->scsi.async_stp = fas216_syncperiod(info, info->ifcfg.asyncperiod); in fas216_init()
2863 msgqueue_initialise(&info->scsi.msgs); in fas216_init()
2897 info->scsi.type = chip_types[type]; in fas216_add()
2911 fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0] | CNTL1_DISR); in fas216_add()
2921 fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0]); in fas216_add()
2968 info->scsi.type, info->scsi.io_base, in fas216_print_host()
2969 info->scsi.irq, info->scsi.dma); in fas216_print_host()