beautypg.com

Avago Technologies LSI53C1010 User Manual

Page 213

background image

Byte Recovery on Target Disconnect

9-15

CHMOV FROM rw_data_buf10, WHEN DATA_IN
CHMOV FROM rw_data_buf11, WHEN DATA_IN
CHMOV FROM rw_data_buf12, WHEN DATA_IN
CHMOV FROM rw_data_buf13, WHEN DATA_IN
CHMOV FROM rw_data_buf14, WHEN DATA_IN
CHMOV FROM rw_data_buf15, WHEN DATA_IN
CHMOV FROM rw_data_buf16, WHEN DATA_IN

; Check to see if we need more SG list entries
MOVE SBR & RW_NEED_MORE_SG_ENTRIES to SFBR
INT RW_Need_More_SG, if not 0
; If we are here then all the data was transferred
; so we set a flag to indicate that
MOVE SBR | RW_ALL_DATA_TRANSFERRED to DWT
JUMP REL(RW_Handle_Phase)
; *** Script move SWIDE byte ENTRY
RW_Move_swide_byte:
CHMOV 1, RW_Last_di_byte_buf, WHEN DATA_IN
INT RW_SWIDE_byte_moved

Figure 9.8

Example Function for Handling DATA IN Phase Mismatch Interrupts

/***********************************************************

Function: HandleDataInPM

Purpose : To handle clean up after a Phase Mismatch (PM)

during Data In phase

Input: The IO Base address of the SCSI chip

A pointer to a variable which will indicate the
Scatter Gather entry that was executing when the
PM occurred, this is needed by the upper function
if there was a byte in the SWIDE register.

Output: Current_SG_Entry is filled in with the SG

entry that was being serviced.

Assumptions:

That a phase mismatch has actually

occurred during data in.

Restrictions: None
Other functions called: IORead32 to read chip info

iowrite32 to start the script

Global Variables Used:FirstDIMove_paddr is the

physical address of the first Data In
block move in the scatter/gather
list. This is needed to get the
location of the scatter/gather entry
that was being serviced when the
phase mismatch occurred.

dsa_table is the table indirect table

that is being used for this IO

script is the actual script that was

being executed when the phase
mismatch occurred.

DATA_BUF1 is the offset into the Table

Indirect entries for the first Data
In table entry.

******************************************************/

This manual is related to the following products: