Lines Matching refs:scsi

3  *  linux/drivers/acorn/scsi/acornscsi.c
16 * state not scsi state. Should be easier to debug.
18 * Updated proc/scsi reporting.
53 * cating (eg) /proc/scsi/acornscsi/0 and see if the SCSI revision is reported
129 #include <scsi/scsi.h>
130 #include <scsi/scsi_cmnd.h>
131 #include <scsi/scsi_dbg.h>
132 #include <scsi/scsi_device.h>
133 #include <scsi/scsi_eh.h>
134 #include <scsi/scsi_host.h>
135 #include <scsi/scsi_tcq.h>
136 #include <scsi/scsi_transport_spi.h>
141 #include <scsi/scsicam.h>
232 printk("scsi%d: %s: DMAC %02x @%06x+%04x msk %02x, ",
238 printk("BH @%p +%04x, ", host->scsi.SCp.ptr,
239 host->scsi.SCp.this_residual);
241 host->scsi.SCp.scsi_xferred);
272 printk("scsi%d: timeout while %s\n", host->host->host_no, msg);
329 printk("scsi%d: timeout while resetting card\n",
350 printk("scsi%d: timeout while resetting card\n",
355 printk(KERN_CRIT "scsi%d: WD33C93A didn't give enhanced reset interrupt\n",
376 host->scsi.phase = PHASE_IDLE;
377 host->scsi.disconnectable = 0;
479 printk("scsi: ");
483 printk("sbic: %02X scsi: %X:%X ph: %02X\n",
707 if (host->scsi.disconnectable && host->SCpnt) {
709 host->scsi.disconnectable = 0;
711 DBG(host->SCpnt, printk("scsi%d.%c: moved command to disconnected queue\n",
730 host->scsi.phase = PHASE_CONNECTING;
732 host->scsi.SCp = *arm_scsi_pointer(SCpnt);
738 DBG(SCpnt,printk("scsi%d.%c: starting cmd %02X\n",
788 scsi_msg_to_host_byte(SCpnt, host->scsi.SCp.Message);
789 set_status_byte(SCpnt, host->scsi.SCp.Status);
803 if (host->scsi.SCp.ptr &&
807 if (host->scsi.SCp.scsi_xferred < SCpnt->underflow ||
808 host->scsi.SCp.scsi_xferred != host->dma.transferred)
853 printk("scsi%d: null command in acornscsi_done", host->host->host_no);
855 host->scsi.phase = PHASE_IDLE;
1007 printk(KERN_CRIT "scsi%d.%c: I can't handle DMA_OUT!\n",
1019 length = min_t(unsigned int, host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2);
1029 acornscsi_data_write(host, host->scsi.SCp.ptr, host->dma.start_addr,
1050 * Purpose : ensure that all DMA transfers are up-to-date & host->scsi.SCp is correct
1091 acornscsi_data_read(host, host->scsi.SCp.ptr,
1097 acornscsi_data_updateptr(host, &host->scsi.SCp, transferred);
1138 host->dma.xfer_ptr = host->scsi.SCp.ptr;
1142 acornscsi_data_updateptr(host, &host->scsi.SCp, transferred);
1147 length = min_t(unsigned int, host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2);
1157 acornscsi_data_write(host, host->scsi.SCp.ptr, host->dma.start_addr,
1226 * host->scsi.SCp.scsi_xferred is the number of bytes
1231 * real_dma_addr = host->dma.start_addr + host->scsi.SCp.scsi_xferred
1234 transferred = host->scsi.SCp.scsi_xferred - host->dma.transferred;
1236 printk("scsi%d.%c: Ack! DMA write correction %ld < 0!\n",
1293 sbic_arm_writenext(host, SCpnt->cmd_len - host->scsi.SCp.sent_command);
1298 (int *)&host->scsi.SCp.sent_command, SCpnt->cmd_len, 1000000))
1299 printk("scsi%d: timeout while sending command\n", host->host->host_no);
1301 host->scsi.phase = PHASE_COMMAND;
1307 unsigned int message_length = msgqueue_msglength(&host->scsi.msgs);
1312 printk("scsi%d.%c: sending message ",
1324 host->scsi.last_message = NOP;
1332 msg = msgqueue_getmsg(&host->scsi.msgs, 0);
1338 host->scsi.last_message = msg->msg[0];
1359 while ((msg = msgqueue_getmsg(&host->scsi.msgs, msgnr++)) != NULL) {
1366 printk("scsi%d: timeout while sending message\n", host->host->host_no);
1368 host->scsi.last_message = msg->msg[0];
1370 host->scsi.last_message |= msg->msg[2] << 8;
1392 host->scsi.SCp.Status = sbic_arm_read(host, SBIC_DATA);
1457 printk("scsi%d.%c: message in: ",
1463 if (host->scsi.phase == PHASE_RECONNECTED) {
1471 host->scsi.reconnected.tag = message[1];
1473 host->scsi.phase = PHASE_MSGIN;
1480 if (host->scsi.phase != PHASE_STATUSIN) {
1481 printk(KERN_ERR "scsi%d.%c: command complete following non-status in phase?\n",
1485 host->scsi.phase = PHASE_DONE;
1486 host->scsi.SCp.Message = message[0];
1498 *scsi_pointer = host->scsi.SCp;
1500 host->scsi.phase = PHASE_MSGIN;
1514 host->scsi.SCp = *arm_scsi_pointer(host->SCpnt);
1515 host->scsi.phase = PHASE_MSGIN;
1529 host->scsi.phase = PHASE_DISCONNECT;
1547 if (msgqueue_msglength(&host->scsi.msgs))
1550 switch (host->scsi.last_message) {
1555 printk(KERN_NOTICE "scsi%d.%c: Using asynchronous transfer\n",
1569 printk("scsi%d.%c: reconnect queue tag %02X\n",
1586 printk(KERN_NOTICE "scsi%d.%c: Using synchronous transfer, offset %d, %d ns\n",
1600 msgqueue_addmsg(&host->scsi.msgs, 5, EXTENDED_MESSAGE, 3,
1619 msgqueue_flush(&host->scsi.msgs);
1620 msgqueue_addmsg(&host->scsi.msgs, 1, MESSAGE_REJECT);
1626 printk(KERN_ERR "scsi%d.%c: unrecognised message %02X, rejecting\n",
1630 msgqueue_flush(&host->scsi.msgs);
1631 msgqueue_addmsg(&host->scsi.msgs, 1, MESSAGE_REJECT);
1632 host->scsi.phase = PHASE_MSGIN;
1649 msgqueue_addmsg(&host->scsi.msgs, 1, BUS_DEVICE_RESET);
1654 msgqueue_addmsg(&host->scsi.msgs, 1,
1670 msgqueue_addmsg(&host->scsi.msgs, 5,
1688 if (!host->scsi.SCp.ptr /*&& host->scsi.SCp.this_residual*/) {
1689 printk(KERN_ERR "scsi%d.%c: null buffer passed to acornscsi_starttransfer\n",
1694 residual = scsi_bufflen(host->SCpnt) - host->scsi.SCp.scsi_xferred;
1723 printk(KERN_ERR "scsi%d: invalid source id after reselection "
1729 if (host->SCpnt && !host->scsi.disconnectable) {
1730 printk(KERN_ERR "scsi%d.%d: reconnected while command in "
1738 host->scsi.reconnected.target = target;
1739 host->scsi.reconnected.lun = lun;
1740 host->scsi.reconnected.tag = 0;
1742 if (host->scsi.disconnectable && host->SCpnt &&
1749 ADD_STATUS(target, 0x81, host->scsi.phase, 0);
1752 host->scsi.phase = PHASE_RECONNECTED;
1755 printk(KERN_ERR "scsi%d.%c: reselected with no command "
1778 if (host->scsi.disconnectable && host->SCpnt) {
1779 host->scsi.disconnectable = 0;
1780 if (host->SCpnt->device->id == host->scsi.reconnected.target &&
1781 host->SCpnt->device->lun == host->scsi.reconnected.lun &&
1782 scsi_cmd_to_rq(host->SCpnt)->tag == host->scsi.reconnected.tag) {
1784 DBG(host->SCpnt, printk("scsi%d.%c: reconnected",
1790 DBG(host->SCpnt, printk("scsi%d.%c: had to move command "
1799 host->scsi.reconnected.target,
1800 host->scsi.reconnected.lun,
1801 host->scsi.reconnected.tag);
1803 DBG(host->SCpnt, printk("scsi%d.%c: had to get command",
1814 host->scsi.SCp = *arm_scsi_pointer(host->SCpnt);
1817 host->scsi.SCp.ptr, host->scsi.SCp.this_residual);
1824 host->dma.transferred = host->scsi.SCp.scsi_xferred;
1837 printk(KERN_ERR "scsi%d.%c: unexpected disconnect\n",
1854 host->scsi.phase = PHASE_ABORTED;
1857 msgqueue_flush(&host->scsi.msgs);
1858 msgqueue_addmsg(&host->scsi.msgs, 1, ABORT);
1884 print_sbic_status(asr, ssr, host->scsi.phase);
1887 ADD_STATUS(8, ssr, host->scsi.phase, in_irq);
1889 if (host->SCpnt && !host->scsi.disconnectable)
1890 ADD_STATUS(host->SCpnt->device->id, ssr, host->scsi.phase, in_irq);
1894 printk(KERN_ERR "scsi%d: reset in standard mode but wanted advanced mode.\n",
1906 msgqueue_flush(&host->scsi.msgs);
1914 switch (host->scsi.phase) {
1919 host->scsi.phase = PHASE_CONNECTED;
1920 msgqueue_flush(&host->scsi.msgs);
1921 host->dma.transferred = host->scsi.SCp.scsi_xferred;
1927 ADD_STATUS(8, ssr, host->scsi.phase, 1);
1928 ADD_STATUS(host->SCpnt->device->id, ssr, host->scsi.phase, 1);
1940 msgqueue_flush(&host->scsi.msgs);
1945 printk(KERN_ERR "scsi%d.%c: PHASE_CONNECTING, SSR %02X?\n",
1964 host->scsi.phase = PHASE_STATUSIN;
1970 host->scsi.phase = PHASE_MSGOUT;
1981 printk(KERN_ERR "scsi%d.%c: PHASE_CONNECTED, SSR %02X?\n",
2004 host->scsi.phase = PHASE_STATUSIN;
2019 printk(KERN_ERR "scsi%d.%c: PHASE_MSGOUT, SSR %02X?\n",
2029 if (host->scsi.SCp.sent_command != host->SCpnt->cmd_len)
2034 host->scsi.phase = PHASE_DATAOUT;
2039 if (host->scsi.SCp.sent_command != host->SCpnt->cmd_len)
2044 host->scsi.phase = PHASE_DATAIN;
2050 host->scsi.phase = PHASE_STATUSIN;
2064 printk(KERN_ERR "scsi%d.%c: PHASE_COMMAND, SSR %02X?\n",
2072 host->scsi.disconnectable = 1;
2073 host->scsi.reconnected.tag = 0;
2074 host->scsi.phase = PHASE_IDLE;
2077 printk(KERN_ERR "scsi%d.%c: PHASE_DISCONNECT, SSR %02X instead of disconnect?\n",
2087 printk(KERN_ERR "scsi%d.%c: PHASE_IDLE, SSR %02X while idle?\n",
2104 ADD_STATUS(host->SCpnt->device->id, ssr, host->scsi.phase, in_irq);
2112 host->scsi.phase = PHASE_DATAOUT;
2121 host->scsi.phase = PHASE_DATAIN;
2133 host->scsi.phase = PHASE_STATUSIN;
2147 printk(KERN_ERR "scsi%d.%c: PHASE_RECONNECTED, SSR %02X after reconnect?\n",
2168 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) -
2172 host->scsi.phase = PHASE_STATUSIN;
2179 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) -
2189 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) -
2196 printk(KERN_ERR "scsi%d.%c: PHASE_DATAIN, SSR %02X?\n",
2217 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) -
2222 host->scsi.phase = PHASE_STATUSIN;
2229 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) -
2240 host->scsi.SCp.scsi_xferred = scsi_bufflen(host->SCpnt) -
2248 printk(KERN_ERR "scsi%d.%c: PHASE_DATAOUT, SSR %02X?\n",
2269 printk(KERN_ERR "scsi%d.%c: PHASE_STATUSIN, SSR %02X instead of MESSAGE_IN?\n",
2292 printk("scsi%d.%c: strange message in disconnection\n",
2299 printk(KERN_ERR "scsi%d.%c: PHASE_MSGIN, SSR %02X after message in?\n",
2317 printk(KERN_ERR "scsi%d.%c: PHASE_DONE, SSR %02X instead of disconnect?\n",
2329 clear_bit(host->scsi.reconnected.target * 8 + host->scsi.reconnected.lun,
2331 host->scsi.phase = PHASE_IDLE;
2343 printk(KERN_ERR "scsi%d.%c: PHASE_ABORTED, SSR %02X?\n",
2350 printk(KERN_ERR "scsi%d.%c: unknown driver phase %d\n",
2402 * Interfaces between interrupt handler and rest of scsi code
2419 printk(KERN_CRIT "scsi%d.%c: WRITE attempted with NO_WRITE flag set\n",
2446 if (host->scsi.phase == PHASE_IDLE)
2498 switch (host->scsi.phase) {
2508 if (host->scsi.disconnectable) {
2509 host->scsi.disconnectable = 0;
2569 print_sbic_status(asr, ssr, host->scsi.phase);
2574 printk("scsi%d: ", host->host->host_no);
2652 print_sbic_status(asr, ssr, host->scsi.phase);
2719 host->base + SBIC_REGIDX, host->scsi.irq);
2722 host->base + DMAC_OFFSET, host->scsi.irq);
2827 ashost->scsi.irq = host->irq;
2834 printk(KERN_CRIT "scsi%d: IRQ%d not free: %d\n",
2835 host->host_no, ashost->scsi.irq, ret);
2842 msgqueue_initialise(&ashost->scsi.msgs);
2855 msgqueue_free(&ashost->scsi.msgs);
2883 msgqueue_free(&ashost->scsi.msgs);