⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sym_fw1.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 4 页
字号:
	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< INIT >-----------------------------*/,{	/*	 *  Wait for the SCSI RESET signal to be 	 *  inactive before restarting operations, 	 *  since the chip may hang on SEL_ATN 	 *  if SCSI RESET is active.	 */	SCR_FROM_REG (sstat0),		0,	SCR_JUMPR ^ IFTRUE (MASK (IRST, IRST)),		-16,	SCR_JUMP,		PADDR_A (start),}/*-------------------------< CLRACK >---------------------------*/,{	/*	 *  Terminate possible pending message phase.	 */	SCR_CLR (SCR_ACK),		0,	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< DATAI_DONE >-----------------------*/,{	/*	 *  Save current pointer to LASTP.	 */	SCR_COPY (4),		RADDR_1 (temp),		HADDR_1 (ccb_head.lastp),	/*	 *  If the SWIDE is not full, jump to dispatcher.	 *  We anticipate a STATUS phase.	 */	SCR_FROM_REG (scntl2),		0,	SCR_JUMP ^ IFTRUE (MASK (WSR, WSR)),		PADDR_A (datai_done_wsr),	SCR_JUMP ^ IFTRUE (WHEN (SCR_STATUS)),		PADDR_A (status),	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< DATAI_DONE_WSR >-------------------*/,{	/*	 *  The SWIDE is full.	 *  Clear this condition.	 */	SCR_REG_REG (scntl2, SCR_OR, WSR),		0,	/*	 *  We are expecting an IGNORE RESIDUE message 	 *  from the device, otherwise we are in data 	 *  overrun condition. Check against MSG_IN phase.	 */	SCR_INT ^ IFFALSE (WHEN (SCR_MSG_IN)),		SIR_SWIDE_OVERRUN,	SCR_JUMP ^ IFFALSE (WHEN (SCR_MSG_IN)),		PADDR_A (dispatch),	/*	 *  We are in MSG_IN phase,	 *  Read the first byte of the message.	 *  If it is not an IGNORE RESIDUE message,	 *  signal overrun and jump to message 	 *  processing.	 */	SCR_MOVE_ABS (1) ^ SCR_MSG_IN,		HADDR_1 (msgin[0]),	SCR_INT ^ IFFALSE (DATA (M_IGN_RESIDUE)),		SIR_SWIDE_OVERRUN,	SCR_JUMP ^ IFFALSE (DATA (M_IGN_RESIDUE)),		PADDR_A (msg_in2),	/*	 *  We got the message we expected.	 *  Read the 2nd byte, and jump to dispatcher.	 */	SCR_CLR (SCR_ACK),		0,	SCR_MOVE_ABS (1) ^ SCR_MSG_IN,		HADDR_1 (msgin[1]),	SCR_CLR (SCR_ACK),		0,	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< DATAO_DONE >-----------------------*/,{	/*	 *  Save current pointer to LASTP.	 */	SCR_COPY (4),		RADDR_1 (temp),		HADDR_1 (ccb_head.lastp),	/*	 *  If the SODL is not full jump to dispatcher.	 *  We anticipate a STATUS phase.	 */	SCR_FROM_REG (scntl2),		0,	SCR_JUMP ^ IFTRUE (MASK (WSS, WSS)),		PADDR_A (datao_done_wss),	SCR_JUMP ^ IFTRUE (WHEN (SCR_STATUS)),		PADDR_A (status),	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< DATAO_DONE_WSS >-------------------*/,{	/*	 *  The SODL is full, clear this condition.	 */	SCR_REG_REG (scntl2, SCR_OR, WSS),		0,	/*	 *  And signal a DATA UNDERRUN condition 	 *  to the C code.	 */	SCR_INT,		SIR_SODL_UNDERRUN,	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< DATAI_PHASE >----------------------*/,{	/*	 *  Jump to current pointer.	 */	SCR_COPY (4),		HADDR_1 (ccb_head.lastp),		RADDR_1 (temp),	SCR_RETURN,		0,}/*-------------------------< DATAO_PHASE >----------------------*/,{	/*	 *  Jump to current pointer.	 */	SCR_COPY (4),		HADDR_1 (ccb_head.lastp),		RADDR_1 (temp),	SCR_RETURN,		0,}/*-------------------------< MSG_IN >---------------------------*/,{	/*	 *  Get the first byte of the message.	 *	 *  The script processor doesn't negate the	 *  ACK signal after this transfer.	 */	SCR_MOVE_ABS (1) ^ SCR_MSG_IN,		HADDR_1 (msgin[0]),}/*-------------------------< MSG_IN2 >--------------------------*/,{	/*	 *  Check first against 1 byte messages 	 *  that we handle from SCRIPTS.	 */	SCR_JUMP ^ IFTRUE (DATA (M_COMPLETE)),		PADDR_A (complete),	SCR_JUMP ^ IFTRUE (DATA (M_DISCONNECT)),		PADDR_A (disconnect),	SCR_JUMP ^ IFTRUE (DATA (M_SAVE_DP)),		PADDR_A (save_dp),	SCR_JUMP ^ IFTRUE (DATA (M_RESTORE_DP)),		PADDR_A (restore_dp),	/*	 *  We handle all other messages from the 	 *  C code, so no need to waste on-chip RAM 	 *  for those ones.	 */	SCR_JUMP,		PADDR_B (msg_in_etc),}/*-------------------------< STATUS >---------------------------*/,{	/*	 *  get the status	 */	SCR_MOVE_ABS (1) ^ SCR_STATUS,		HADDR_1 (scratch),#ifdef SYM_CONF_IARB_SUPPORT	/*	 *  If STATUS is not GOOD, clear IMMEDIATE ARBITRATION, 	 *  since we may have to tamper the start queue from 	 *  the C code.	 */	SCR_JUMPR ^ IFTRUE (DATA (S_GOOD)),		8,	SCR_REG_REG (scntl1, SCR_AND, ~IARB),		0,#endif	/*	 *  save status to scsi_status.	 *  mark as complete.	 */	SCR_TO_REG (SS_REG),		0,	SCR_LOAD_REG (HS_REG, HS_COMPLETE),		0,	/*	 *  Anticipate the MESSAGE PHASE for 	 *  the TASK COMPLETE message.	 */	SCR_JUMP ^ IFTRUE (WHEN (SCR_MSG_IN)),		PADDR_A (msg_in),	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< COMPLETE >-------------------------*/,{	/*	 *  Complete message.	 *	 *  When we terminate the cycle by clearing ACK,	 *  the target may disconnect immediately.	 *	 *  We don't want to be told of an "unexpected disconnect",	 *  so we disable this feature.	 */	SCR_REG_REG (scntl2, SCR_AND, 0x7f),		0,	/*	 *  Terminate cycle ...	 */	SCR_CLR (SCR_ACK|SCR_ATN),		0,	/*	 *  ... and wait for the disconnect.	 */	SCR_WAIT_DISC,		0,}/*-------------------------< COMPLETE2 >------------------------*/,{	/*	 *  Save host status.	 */	SCR_COPY (4),		RADDR_1 (scr0),		HADDR_1 (ccb_head.status),	/*	 *  Move back the CCB header using self-modifying 	 *  SCRIPTS.	 */	SCR_COPY (4),		RADDR_1 (dsa),		PADDR_A (_sms_a40),	SCR_COPY (sizeof(struct sym_ccbh)),		HADDR_1 (ccb_head),}/*-------------------------< _SMS_A40 >-------------------------*/,{		0,	/*	 *  Some bridges may reorder DMA writes to memory.	 *  We donnot want the CPU to deal with completions  	 *  without all the posted write having been flushed 	 *  to memory. This DUMMY READ should flush posted 	 *  buffers prior to the CPU having to deal with 	 *  completions.	 */	SCR_COPY (4),			/* DUMMY READ */		HADDR_1 (ccb_head.status),		RADDR_1 (scr0),	/*	 *  If command resulted in not GOOD status,	 *  call the C code if needed.	 */	SCR_FROM_REG (SS_REG),		0,	SCR_CALL ^ IFFALSE (DATA (S_GOOD)),		PADDR_B (bad_status),	/*	 *  If we performed an auto-sense, call 	 *  the C code to synchronyze task aborts 	 *  with UNIT ATTENTION conditions.	 */	SCR_FROM_REG (HF_REG),		0,	SCR_JUMP ^ IFFALSE (MASK (0 ,(HF_SENSE|HF_EXT_ERR))),		PADDR_A (complete_error),}/*-------------------------< DONE >-----------------------------*/,{	/*	 *  Copy the DSA to the DONE QUEUE and 	 *  signal completion to the host.	 *  If we are interrupted between DONE 	 *  and DONE_END, we must reset, otherwise 	 *  the completed CCB may be lost.	 */	SCR_COPY (4),		PADDR_B (done_pos),		PADDR_A (_sms_a50),	SCR_COPY (4),		RADDR_1 (dsa),}/*-------------------------< _SMS_A50 >-------------------------*/,{		0,	SCR_COPY (4),		PADDR_B (done_pos),		PADDR_A (_sms_a60),	/*	 *  The instruction below reads the DONE QUEUE next 	 *  free position from memory.	 *  In addition it ensures that all PCI posted writes  	 *  are flushed and so the DSA value of the done 	 *  CCB is visible by the CPU before INTFLY is raised.	 */	SCR_COPY (8),}/*-------------------------< _SMS_A60 >-------------------------*/,{		0,		PADDR_B (prev_done),}/*-------------------------< DONE_END >-------------------------*/,{	SCR_INT_FLY,		0,	SCR_JUMP,		PADDR_A (start),}/*-------------------------< COMPLETE_ERROR >-------------------*/,{	SCR_COPY (4),		PADDR_B (startpos),		RADDR_1 (scratcha),	SCR_INT,		SIR_COMPLETE_ERROR,}/*-------------------------< SAVE_DP >--------------------------*/,{	/*	 *  Clear ACK immediately.	 *  No need to delay it.	 */	SCR_CLR (SCR_ACK),		0,	/*	 *  Keep track we received a SAVE DP, so 	 *  we will switch to the other PM context 	 *  on the next PM since the DP may point 	 *  to the current PM context.	 */	SCR_REG_REG (HF_REG, SCR_OR, HF_DP_SAVED),		0,	/*	 *  SAVE_DP message:	 *  Copy LASTP to SAVEP.	 */	SCR_COPY (4),		HADDR_1 (ccb_head.lastp),		HADDR_1 (ccb_head.savep),	/*	 *  Anticipate the MESSAGE PHASE for 	 *  the DISCONNECT message.	 */	SCR_JUMP ^ IFTRUE (WHEN (SCR_MSG_IN)),		PADDR_A (msg_in),	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< RESTORE_DP >-----------------------*/,{	/*	 *  Clear ACK immediately.	 *  No need to delay it.	 */	SCR_CLR (SCR_ACK),		0,	/*	 *  Copy SAVEP to LASTP.	 */	SCR_COPY (4),		HADDR_1 (ccb_head.savep),		HADDR_1 (ccb_head.lastp),	SCR_JUMP,		PADDR_A (dispatch),}/*-------------------------< DISCONNECT >-----------------------*/,{	/*	 *  DISCONNECTing  ...	 *	 *  disable the "unexpected disconnect" feature,	 *  and remove the ACK signal.	 */	SCR_REG_REG (scntl2, SCR_AND, 0x7f),		0,	SCR_CLR (SCR_ACK|SCR_ATN),		0,	/*	 *  Wait for the disconnect.	 */	SCR_WAIT_DISC,		0,	/*	 *  Status is: DISCONNECTED.	 */	SCR_LOAD_REG (HS_REG, HS_DISCONNECT),		0,	/*	 *  Save host status.	 */	SCR_COPY (4),		RADDR_1 (scr0),		HADDR_1 (ccb_head.status),}/*-------------------------< DISCONNECT2 >----------------------*/,{	/*	 *  Move back the CCB header using self-modifying 	 *  SCRIPTS.	 */	SCR_COPY (4),		RADDR_1 (dsa),		PADDR_A (_sms_a65),	SCR_COPY (sizeof(struct sym_ccbh)),		HADDR_1 (ccb_head),}/*-------------------------< _SMS_A65 >-------------------------*/,{		0,	SCR_JUMP,		PADDR_A (start),}/*-------------------------< IDLE >-----------------------------*/,{	/*	 *  Nothing to do?	 *  Switch the LED off and wait for reselect.	 *  Will be patched with a NO_OP if LED	 *  not needed or not desired.	 */	SCR_REG_REG (gpreg, SCR_OR, 0x01),		0,#ifdef SYM_CONF_IARB_SUPPORT	SCR_JUMPR,		8,#endif}/*-------------------------< UNGETJOB >-------------------------*/,{#ifdef SYM_CONF_IARB_SUPPORT	/*	 *  Set IMMEDIATE ARBITRATION, for the next time.	 *  This will give us better chance to win arbitration 	 *  for the job we just wanted to do.	 */	SCR_REG_REG (scntl1, SCR_OR, IARB),		0,#endif	/*	 *  We are not able to restart the SCRIPTS if we are 	 *  interrupted and these instruction haven't been 	 *  all executed. BTW, this is very unlikely to 	 *  happen, but we check that from the C code.	 */	SCR_LOAD_REG (dsa, 0xff),		0,	SCR_COPY (4),		RADDR_1 (scratcha),		PADDR_B (startpos),}/*-------------------------< RESELECT >-------------------------*/,{#ifdef SYM_CONF_TARGET_ROLE_SUPPORT	/*	 *  Make sure we are in initiator mode.	 */	SCR_CLR (SCR_TRG),		0,#endif	/*	 *  Sleep waiting for a reselection.	 */	SCR_WAIT_RESEL,		PADDR_A(start),}/*-------------------------< RESELECTED >-----------------------*/,{	/*	 *  Switch the LED on.	 *  Will be patched with a NO_OP if LED	 *  not needed or not desired.	 */	SCR_REG_REG (gpreg, SCR_AND, 0xfe),		0,	/*	 *  load the target id into the sdid	 */	SCR_REG_SFBR (ssid, SCR_AND, 0x8F),		0,	SCR_TO_REG (sdid),		0,	/*	 *  Load the target control block address	 */	SCR_COPY (4),		PADDR_B (targtbl),		RADDR_1 (dsa),	SCR_SFBR_REG (dsa, SCR_SHL, 0),		0,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -