53c7xx_d.h_shipped
来自「Linux Kernel 2.6.9 for OMAP1710」· H_SHIPPED 代码 · 共 2,875 行 · 第 1/5 页
H_SHIPPED
2,875 行
; Calculate the address of the next pointer within the DSA ; structure of the command that is currently disconnecting; ; Read what should be the current DSA from memory - actual DSA ; register is probably corrupt MOVE MEMORY 4, saved_dsa, addr_scratchat 0x0000005e : */ 0xc0000004,0x00000000,0x00000000,/* MOVE SCRATCH0 + dsa_next TO SCRATCH0at 0x00000061 : */ 0x7e343000,0x00000000,/* MOVE SCRATCH1 + 0 TO SCRATCH1 WITH CARRYat 0x00000063 : */ 0x7f350000,0x00000000,/* MOVE SCRATCH2 + 0 TO SCRATCH2 WITH CARRYat 0x00000065 : */ 0x7f360000,0x00000000,/* MOVE SCRATCH3 + 0 TO SCRATCH3 WITH CARRYat 0x00000067 : */ 0x7f370000,0x00000000,/*; Point the next field of this DSA structure at the current disconnected ; list MOVE MEMORY 4, addr_scratch, dsa_schedule_insert + 8at 0x00000069 : */ 0xc0000004,0x00000000,0x000001b8,/* dsa_schedule_insert: MOVE MEMORY 4, reconnect_dsa_head, 0 at 0x0000006c : */ 0xc0000004,0x00000000,0x00000000,/*; And update the head pointer. ; Read what should be the current DSA from memory - actual DSA ; register is probably corrupt MOVE MEMORY 4, saved_dsa, addr_scratchat 0x0000006f : */ 0xc0000004,0x00000000,0x00000000,/* MOVE MEMORY 4, addr_scratch, reconnect_dsa_headat 0x00000072 : */ 0xc0000004,0x00000000,0x00000000,/* CLEAR ACKat 0x00000075 : */ 0x60000040,0x00000000,/* ; Time to correct DSA following memory move MOVE MEMORY 4, saved_dsa, addr_dsaat 0x00000077 : */ 0xc0000004,0x00000000,0x00000000,/* WAIT DISCONNECTat 0x0000007a : */ 0x48000000,0x00000000,/* JUMP scheduleat 0x0000007c : */ 0x80080000,0x00000000,/*;; select;; PURPOSE : establish a nexus for the SCSI command referenced by DSA.; On success, the current DSA structure is removed from the issue ; queue. Usually, this is entered as a fall-through from schedule,; although the contingent allegiance handling code will write; the select entry address to the DSP to restart a command as a ; REQUEST SENSE. A message is sent (usually IDENTIFY, although; additional SDTR or WDTR messages may be sent). COMMAND OUT; is handled.;; INPUTS : DSA - SCSI command, issue_dsa_head;; CALLS : NOT OK;; MODIFIES : SCRATCH, issue_dsa_head;; EXITS : on reselection or selection, go to select_failed; otherwise, RETURN so control is passed back to ; dsa_begin.;ENTRY selectselect: CLEAR TARGETat 0x0000007e : */ 0x60000200,0x00000000,/*; XXX;; In effect, SELECTION operations are backgrounded, with execution; continuing until code which waits for REQ or a fatal interrupt is ; encountered.;; So, for more performance, we could overlap the code which removes ; the command from the NCRs issue queue with the selection, but ; at this point I don't want to deal with the error recovery.; ; Enable selection timer MOVE CTEST7 & 0xef TO CTEST7at 0x00000080 : */ 0x7c1bef00,0x00000000,/* SELECT ATN FROM dsa_select, select_failedat 0x00000082 : */ 0x4300003c,0x00000828,/* JUMP select_msgout, WHEN MSG_OUTat 0x00000084 : */ 0x860b0000,0x00000218,/*ENTRY select_msgoutselect_msgout: ; Disable selection timer MOVE CTEST7 | 0x10 TO CTEST7at 0x00000086 : */ 0x7a1b1000,0x00000000,/* MOVE FROM dsa_msgout, WHEN MSG_OUTat 0x00000088 : */ 0x1e000000,0x00000040,/* RETURNat 0x0000008a : */ 0x90080000,0x00000000,/*; ; select_done; ; PURPOSE: continue on to normal data transfer; called as the exit ; point from dsa_begin.;; INPUTS: dsa;; CALLS: OK;;select_done:; NOTE DSA is corrupt when we arrive here! MOVE MEMORY 4, saved_dsa, addr_dsaat 0x0000008c : */ 0xc0000004,0x00000000,0x00000000,/*; After a successful selection, we should get either a CMD phase or ; some transfer request negotiation message. JUMP cmdout, WHEN CMDat 0x0000008f : */ 0x820b0000,0x0000025c,/* INT int_err_unexpected_phase, WHEN NOT MSG_IN at 0x00000091 : */ 0x9f030000,0x00000000,/*select_msg_in: CALL msg_in, WHEN MSG_INat 0x00000093 : */ 0x8f0b0000,0x0000041c,/* JUMP select_msg_in, WHEN MSG_INat 0x00000095 : */ 0x870b0000,0x0000024c,/*cmdout: INT int_err_unexpected_phase, WHEN NOT CMDat 0x00000097 : */ 0x9a030000,0x00000000,/*ENTRY cmdout_cmdoutcmdout_cmdout: MOVE FROM dsa_cmdout, WHEN CMDat 0x00000099 : */ 0x1a000000,0x00000048,/*;; data_transfer ; other_out; other_in; other_transfer;; PURPOSE : handle the main data transfer for a SCSI command in ; several parts. In the first part, data_transfer, DATA_IN; and DATA_OUT phases are allowed, with the user provided; code (usually dynamically generated based on the scatter/gather; list associated with a SCSI command) called to handle these ; phases.;; After control has passed to one of the user provided ; DATA_IN or DATA_OUT routines, back calls are made to ; other_transfer_in or other_transfer_out to handle non-DATA IN; and DATA OUT phases respectively, with the state of the active; data pointer being preserved in TEMP.;; On completion, the user code passes control to other_transfer; which causes DATA_IN and DATA_OUT to result in unexpected_phase; interrupts so that data overruns may be trapped.;; INPUTS : DSA - SCSI command;; CALLS : OK in data_transfer_start, not ok in other_out and other_in, ok in; other_transfer;; MODIFIES : SCRATCH;; EXITS : if STATUS IN is detected, signifying command completion,; the NCR jumps to command_complete. If MSG IN occurs, a ; CALL is made to msg_in. Otherwise, other_transfer runs in ; an infinite loop.; ENTRY data_transferdata_transfer: JUMP cmdout_cmdout, WHEN CMDat 0x0000009b : */ 0x820b0000,0x00000264,/* CALL msg_in, WHEN MSG_INat 0x0000009d : */ 0x8f0b0000,0x0000041c,/* INT int_err_unexpected_phase, WHEN MSG_OUTat 0x0000009f : */ 0x9e0b0000,0x00000000,/* JUMP do_dataout, WHEN DATA_OUTat 0x000000a1 : */ 0x800b0000,0x000002a4,/* JUMP do_datain, WHEN DATA_INat 0x000000a3 : */ 0x810b0000,0x000002fc,/* JUMP command_complete, WHEN STATUSat 0x000000a5 : */ 0x830b0000,0x0000065c,/* JUMP data_transferat 0x000000a7 : */ 0x80080000,0x0000026c,/*ENTRY end_data_transferend_data_transfer:;; FIXME: On NCR53c700 and NCR53c700-66 chips, do_dataout/do_datain ; should be fixed up whenever the nexus changes so it can point to the ; correct routine for that command.;; Nasty jump to dsa->dataoutdo_dataout: MOVE MEMORY 4, saved_dsa, addr_scratchat 0x000000a9 : */ 0xc0000004,0x00000000,0x00000000,/* MOVE SCRATCH0 + dsa_dataout TO SCRATCH0 at 0x000000ac : */ 0x7e345000,0x00000000,/* MOVE SCRATCH1 + 0 TO SCRATCH1 WITH CARRY at 0x000000ae : */ 0x7f350000,0x00000000,/* MOVE SCRATCH2 + 0 TO SCRATCH2 WITH CARRY at 0x000000b0 : */ 0x7f360000,0x00000000,/* MOVE SCRATCH3 + 0 TO SCRATCH3 WITH CARRY at 0x000000b2 : */ 0x7f370000,0x00000000,/* MOVE MEMORY 4, addr_scratch, dataout_to_jump + 4at 0x000000b4 : */ 0xc0000004,0x00000000,0x000002e0,/* dataout_to_jump: MOVE MEMORY 4, 0, dataout_jump + 4 at 0x000000b7 : */ 0xc0000004,0x00000000,0x000002f8,/* ; Time to correct DSA following memory move MOVE MEMORY 4, saved_dsa, addr_dsaat 0x000000ba : */ 0xc0000004,0x00000000,0x00000000,/*dataout_jump: JUMP 0at 0x000000bd : */ 0x80080000,0x00000000,/*; Nasty jump to dsa->dsaindo_datain: MOVE MEMORY 4, saved_dsa, addr_scratchat 0x000000bf : */ 0xc0000004,0x00000000,0x00000000,/* MOVE SCRATCH0 + dsa_datain TO SCRATCH0 at 0x000000c2 : */ 0x7e345400,0x00000000,/* MOVE SCRATCH1 + 0 TO SCRATCH1 WITH CARRY at 0x000000c4 : */ 0x7f350000,0x00000000,/* MOVE SCRATCH2 + 0 TO SCRATCH2 WITH CARRY at 0x000000c6 : */ 0x7f360000,0x00000000,/* MOVE SCRATCH3 + 0 TO SCRATCH3 WITH CARRY at 0x000000c8 : */ 0x7f370000,0x00000000,/* MOVE MEMORY 4, addr_scratch, datain_to_jump + 4at 0x000000ca : */ 0xc0000004,0x00000000,0x00000338,/* ENTRY datain_to_jumpdatain_to_jump: MOVE MEMORY 4, 0, datain_jump + 4at 0x000000cd : */ 0xc0000004,0x00000000,0x00000350,/* ; Time to correct DSA following memory move MOVE MEMORY 4, saved_dsa, addr_dsaat 0x000000d0 : */ 0xc0000004,0x00000000,0x00000000,/*datain_jump: JUMP 0at 0x000000d3 : */ 0x80080000,0x00000000,/*; Note that other_out and other_in loop until a non-data phase; is discovered, so we only execute return statements when we; can go on to the next data phase block move statement.ENTRY other_outother_out: INT int_err_unexpected_phase, WHEN CMDat 0x000000d5 : */ 0x9a0b0000,0x00000000,/* JUMP msg_in_restart, WHEN MSG_IN at 0x000000d7 : */ 0x870b0000,0x000003fc,/* INT int_err_unexpected_phase, WHEN MSG_OUTat 0x000000d9 : */ 0x9e0b0000,0x00000000,/* INT int_err_unexpected_phase, WHEN DATA_INat 0x000000db : */ 0x990b0000,0x00000000,/* JUMP command_complete, WHEN STATUSat 0x000000dd : */ 0x830b0000,0x0000065c,/* JUMP other_out, WHEN NOT DATA_OUTat 0x000000df : */ 0x80030000,0x00000354,/*; TEMP should be OK, as we got here from a call in the user dataout code. RETURNat 0x000000e1 : */ 0x90080000,0x00000000,/*ENTRY other_inother_in: INT int_err_unexpected_phase, WHEN CMDat 0x000000e3 : */ 0x9a0b0000,0x00000000,/* JUMP msg_in_restart, WHEN MSG_IN at 0x000000e5 : */ 0x870b0000,0x000003fc,/* INT int_err_unexpected_phase, WHEN MSG_OUTat 0x000000e7 : */ 0x9e0b0000,0x00000000,/* INT int_err_unexpected_phase, WHEN DATA_OUTat 0x000000e9 : */ 0x980b0000,0x00000000,/* JUMP command_complete, WHEN STATUSat 0x000000eb : */ 0x830b0000,0x0000065c,/* JUMP other_in, WHEN NOT DATA_INat 0x000000ed : */ 0x81030000,0x0000038c,/*; TEMP should be OK, as we got here from a call in the user datain code. RETURNat 0x000000ef : */ 0x90080000,0x00000000,/*ENTRY other_transferother_transfer: INT int_err_unexpected_phase, WHEN CMDat 0x000000f1 : */ 0x9a0b0000,0x00000000,/* CALL msg_in, WHEN MSG_INat 0x000000f3 : */ 0x8f0b0000,0x0000041c,/* INT int_err_unexpected_phase, WHEN MSG_OUTat 0x000000f5 : */ 0x9e0b0000,0x00000000,/* INT int_err_unexpected_phase, WHEN DATA_OUTat 0x000000f7 : */ 0x980b0000,0x00000000,/* INT int_err_unexpected_phase, WHEN DATA_INat 0x000000f9 : */ 0x990b0000,0x00000000,/* JUMP command_complete, WHEN STATUSat 0x000000fb : */ 0x830b0000,0x0000065c,/* JUMP other_transferat 0x000000fd : */ 0x80080000,0x000003c4,/*;; msg_in_restart; msg_in; munge_msg;; PURPOSE : process messages from a target. msg_in is called when the ; caller hasn't read the first byte of the message. munge_message; is called when the caller has read the first byte of the message,; and left it in SFBR. msg_in_restart is called when the caller ; hasn't read the first byte of the message, and wishes RETURN; to transfer control back to the address of the conditional; CALL instruction rather than to the instruction after it.;; Various int_* interrupts are generated when the host system; needs to intervene, as is the case with SDTR, WDTR, and; INITIATE RECOVERY messages.;; When the host system handles one of these interrupts,; it can respond by reentering at reject_message, ; which rejects the message and returns control to; the caller of msg_in or munge_msg, accept_message; which clears ACK and returns control, or reply_message; which sends the message pointed to by the DSA ; msgout_other table indirect field.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?