-
-typedef struct _SCCB *PSCCB;
-typedef void (*CALL_BK_FN)(PSCCB);
+struct sccb;
+typedef void (*CALL_BK_FN)(struct sccb *);
typedef struct SCCBMgr_info {
#pragma pack(1)
-typedef struct _SCCB {
+struct sccb {
unsigned char OperationCode;
unsigned char ControlByte;
unsigned char CdbLength;
unsigned char Sccb_tag;
unsigned char Sccb_scsistat;
unsigned char Sccb_idmsg; /* image of last msg in */
- PSCCB Sccb_forwardlink;
- PSCCB Sccb_backlink;
+ struct sccb * Sccb_forwardlink;
+ struct sccb * Sccb_backlink;
unsigned long Sccb_savedATC;
unsigned char Save_Cdb[6];
unsigned char Save_CdbLen;
unsigned char Sccb_XferState;
unsigned long Sccb_SGoffset;
- } SCCB;
+ };
#pragma pack()
typedef struct SCCBMgr_tar_info {
- PSCCB TarSelQ_Head;
- PSCCB TarSelQ_Tail;
+ struct sccb * TarSelQ_Head;
+ struct sccb * TarSelQ_Tail;
unsigned char TarLUN_CA; /*Contingent Allgiance */
unsigned char TarTagQ_Cnt;
unsigned char TarSelQ_Cnt;
typedef struct SCCBcard {
- PSCCB currentSCCB;
+ struct sccb * currentSCCB;
PSCCBMGR_INFO cardInfo;
unsigned long ioPort;
unsigned char globalFlags;
unsigned char ourId;
PNVRamInfo pNvRamInfo;
- PSCCB discQ_Tbl[QUEUE_DEPTH];
+ struct sccb * discQ_Tbl[QUEUE_DEPTH];
}SCCBCARD;
static unsigned char FPT_sisyncn(unsigned long port, unsigned char p_card, unsigned char syncFlag);
static void FPT_ssel(unsigned long port, unsigned char p_card);
static void FPT_sres(unsigned long port, unsigned char p_card, PSCCBcard pCurrCard);
-static void FPT_shandem(unsigned long port, unsigned char p_card,PSCCB pCurrSCCB);
+static void FPT_shandem(unsigned long port, unsigned char p_card,struct sccb * pCurrSCCB);
static void FPT_stsyncn(unsigned long port, unsigned char p_card);
static void FPT_sisyncr(unsigned long port,unsigned char sync_pulse, unsigned char offset);
static void FPT_sssyncv(unsigned long p_port, unsigned char p_id, unsigned char p_sync_value,
static void FPT_queueFlushTargSccb(unsigned char p_card, unsigned char thisTarg,
unsigned char error_code);
-static void FPT_sinits(PSCCB p_sccb, unsigned char p_card);
+static void FPT_sinits(struct sccb * p_sccb, unsigned char p_card);
static void FPT_RNVRamData(PNVRamInfo pNvRamInfo);
static unsigned char FPT_siwidn(unsigned long port, unsigned char p_card);
static void FPT_queueSelectFail(PSCCBcard pCurrCard, unsigned char p_card);
-static void FPT_queueDisconnect(PSCCB p_SCCB, unsigned char p_card);
-static void FPT_queueCmdComplete(PSCCBcard pCurrCard, PSCCB p_SCCB,
+static void FPT_queueDisconnect(struct sccb * p_SCCB, unsigned char p_card);
+static void FPT_queueCmdComplete(PSCCBcard pCurrCard, struct sccb * p_SCCB,
unsigned char p_card);
static void FPT_queueSearchSelect(PSCCBcard pCurrCard, unsigned char p_card);
static void FPT_queueFlushSccb(unsigned char p_card, unsigned char error_code);
-static void FPT_queueAddSccb(PSCCB p_SCCB, unsigned char card);
-static unsigned char FPT_queueFindSccb(PSCCB p_SCCB, unsigned char p_card);
-static void FPT_utilUpdateResidual(PSCCB p_SCCB);
+static void FPT_queueAddSccb(struct sccb * p_SCCB, unsigned char card);
+static unsigned char FPT_queueFindSccb(struct sccb * p_SCCB, unsigned char p_card);
+static void FPT_utilUpdateResidual(struct sccb * p_SCCB);
static unsigned short FPT_CalcCrc16(unsigned char buffer[]);
static unsigned char FPT_CalcLrc(unsigned char buffer[]);
static void FPT_dataXferProcessor(unsigned long port, PSCCBcard pCurrCard);
-static void FPT_busMstrSGDataXferStart(unsigned long port, PSCCB pCurrSCCB);
-static void FPT_busMstrDataXferStart(unsigned long port, PSCCB pCurrSCCB);
-static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, PSCCB pCurrSCCB);
-static void FPT_hostDataXferRestart(PSCCB currSCCB);
+static void FPT_busMstrSGDataXferStart(unsigned long port, struct sccb * pCurrSCCB);
+static void FPT_busMstrDataXferStart(unsigned long port, struct sccb * pCurrSCCB);
+static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, struct sccb * pCurrSCCB);
+static void FPT_hostDataXferRestart(struct sccb * currSCCB);
static unsigned char FPT_SccbMgr_bad_isr(unsigned long p_port, unsigned char p_card,
* callback function.
*
*---------------------------------------------------------------------*/
-static void FlashPoint_StartCCB(unsigned long pCurrCard, PSCCB p_Sccb)
+static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
{
unsigned long ioport;
unsigned char thisCard, lun;
- PSCCB pSaveSccb;
+ struct sccb * pSaveSccb;
CALL_BK_FN callback;
thisCard = ((PSCCBcard) pCurrCard)->cardIndex;
* callback function.
*
*---------------------------------------------------------------------*/
-static int FlashPoint_AbortCCB(unsigned long pCurrCard, PSCCB p_Sccb)
+static int FlashPoint_AbortCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
{
unsigned long ioport;
unsigned char thisCard;
CALL_BK_FN callback;
unsigned char TID;
- PSCCB pSaveSCCB;
+ struct sccb * pSaveSCCB;
PSCCBMgr_tar_info currTar_Info;
*---------------------------------------------------------------------*/
static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
unsigned char thisCard,result,bm_status, bm_int_st;
unsigned short hp_int;
unsigned char i, target;
*
*---------------------------------------------------------------------*/
-static unsigned char FPT_sfm(unsigned long port, PSCCB pCurrSCCB)
+static unsigned char FPT_sfm(unsigned long port, struct sccb * pCurrSCCB)
{
unsigned char message;
unsigned short TimeOutLoop;
unsigned long cdb_reg;
PSCCBcard CurrCard;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBMgr_tar_info currTar_Info;
unsigned char lastTag, lun;
PSCCBMgr_tar_info currTar_Info;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
*---------------------------------------------------------------------*/
static void FPT_sdecm(unsigned char message, unsigned long port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBcard CurrCard;
PSCCBMgr_tar_info currTar_Info;
* Description: Decide what to do with the extended message.
*
*---------------------------------------------------------------------*/
-static void FPT_shandem(unsigned long port, unsigned char p_card, PSCCB pCurrSCCB)
+static void FPT_shandem(unsigned long port, unsigned char p_card, struct sccb * pCurrSCCB)
{
unsigned char length,message;
static unsigned char FPT_sisyncn(unsigned long port, unsigned char p_card, unsigned char syncFlag)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBMgr_tar_info currTar_Info;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_stsyncn(unsigned long port, unsigned char p_card)
{
unsigned char sync_msg,offset,sync_reg,our_sync_msg;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBMgr_tar_info currTar_Info;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static unsigned char FPT_siwidn(unsigned long port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBMgr_tar_info currTar_Info;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_stwidn(unsigned long port, unsigned char p_card)
{
unsigned char width;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBMgr_tar_info currTar_Info;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_ssenss(PSCCBcard pCurrCard)
{
unsigned char i;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = pCurrCard->currentSCCB;
unsigned short TimeOutLoop;
unsigned char sPhase;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
*
*---------------------------------------------------------------------*/
-static void FPT_sinits(PSCCB p_sccb, unsigned char p_card)
+static void FPT_sinits(struct sccb * p_sccb, unsigned char p_card)
{
PSCCBMgr_tar_info currTar_Info;
static void FPT_phaseDataOut(unsigned long port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
if (currSCCB == NULL)
static void FPT_phaseDataIn(unsigned long port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_phaseCommand(unsigned long p_port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
unsigned long cdb_reg;
unsigned char i;
static void FPT_phaseMsgOut(unsigned long port, unsigned char p_card)
{
unsigned char message,scsiID;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBMgr_tar_info currTar_Info;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_phaseMsgIn(unsigned long port, unsigned char p_card)
{
unsigned char message;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_phaseIllegal(unsigned long port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_phaseChkFifo(unsigned long port, unsigned char p_card)
{
unsigned long xfercnt;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
*---------------------------------------------------------------------*/
static void FPT_phaseBusFree(unsigned long port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_autoCmdCmplt(unsigned long p_port, unsigned char p_card)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
unsigned char status_byte;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
static void FPT_dataXferProcessor(unsigned long port, PSCCBcard pCurrCard)
{
- PSCCB currSCCB;
+ struct sccb * currSCCB;
currSCCB = pCurrCard->currentSCCB;
* Description:
*
*---------------------------------------------------------------------*/
-static void FPT_busMstrSGDataXferStart(unsigned long p_port, PSCCB pcurrSCCB)
+static void FPT_busMstrSGDataXferStart(unsigned long p_port, struct sccb * pcurrSCCB)
{
unsigned long count,addr,tmpSGCnt;
unsigned int sg_index;
* Description:
*
*---------------------------------------------------------------------*/
-static void FPT_busMstrDataXferStart(unsigned long p_port, PSCCB pcurrSCCB)
+static void FPT_busMstrDataXferStart(unsigned long p_port, struct sccb * pcurrSCCB)
{
unsigned long addr,count;
* Description: Abort any in progress transfer.
*
*---------------------------------------------------------------------*/
-static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, PSCCB pCurrSCCB)
+static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, struct sccb * pCurrSCCB)
{
unsigned long timeout;
* pointers message.
*
*---------------------------------------------------------------------*/
-static void FPT_hostDataXferRestart(PSCCB currSCCB)
+static void FPT_hostDataXferRestart(struct sccb * currSCCB)
{
unsigned long data_count;
unsigned int sg_index;
{
unsigned char scan_ptr, lun;
PSCCBMgr_tar_info currTar_Info;
- PSCCB pOldSccb;
+ struct sccb * pOldSccb;
scan_ptr = pCurrCard->scanIndex;
do
(lun != pCurrCard->currentSCCB->Lun))
{
pOldSccb = pCurrCard->currentSCCB;
- pCurrCard->currentSCCB = (PSCCB)(pCurrCard->currentSCCB)->
+ pCurrCard->currentSCCB = (struct sccb *)(pCurrCard->currentSCCB)->
Sccb_forwardlink;
}
if(pCurrCard->currentSCCB == NULL)
continue;
if(pOldSccb != NULL)
{
- pOldSccb->Sccb_forwardlink = (PSCCB)(pCurrCard->currentSCCB)->
+ pOldSccb->Sccb_forwardlink = (struct sccb *)(pCurrCard->currentSCCB)->
Sccb_forwardlink;
- pOldSccb->Sccb_backlink = (PSCCB)(pCurrCard->currentSCCB)->
+ pOldSccb->Sccb_backlink = (struct sccb *)(pCurrCard->currentSCCB)->
Sccb_backlink;
currTar_Info->TarSelQ_Cnt--;
}
else
{
- currTar_Info->TarSelQ_Head = (PSCCB)(pCurrCard->currentSCCB)->Sccb_forwardlink;
+ currTar_Info->TarSelQ_Head = (struct sccb *)(pCurrCard->currentSCCB)->Sccb_forwardlink;
if (currTar_Info->TarSelQ_Head == NULL)
{
else
{
currTar_Info->TarSelQ_Cnt--;
- currTar_Info->TarSelQ_Head->Sccb_backlink = (PSCCB)NULL;
+ currTar_Info->TarSelQ_Head->Sccb_backlink = (struct sccb *)NULL;
}
}
pCurrCard->scanIndex = scan_ptr;
pCurrCard->currentSCCB = currTar_Info->TarSelQ_Head;
- currTar_Info->TarSelQ_Head = (PSCCB)(pCurrCard->currentSCCB)->Sccb_forwardlink;
+ currTar_Info->TarSelQ_Head = (struct sccb *)(pCurrCard->currentSCCB)->Sccb_forwardlink;
if (currTar_Info->TarSelQ_Head == NULL)
{
else
{
currTar_Info->TarSelQ_Cnt--;
- currTar_Info->TarSelQ_Head->Sccb_backlink = (PSCCB)NULL;
+ currTar_Info->TarSelQ_Head->Sccb_backlink = (struct sccb *)NULL;
}
scan_ptr++;
if (pCurrCard->currentSCCB != NULL)
{
- thisTarg = (unsigned char)(((PSCCB)(pCurrCard->currentSCCB))->TargID);
+ thisTarg = (unsigned char)(((struct sccb *)(pCurrCard->currentSCCB))->TargID);
currTar_Info = &FPT_sccbMgrTbl[p_card][thisTarg];
- pCurrCard->currentSCCB->Sccb_backlink = (PSCCB)NULL;
+ pCurrCard->currentSCCB->Sccb_backlink = (struct sccb *)NULL;
pCurrCard->currentSCCB->Sccb_forwardlink = currTar_Info->TarSelQ_Head;
*
*---------------------------------------------------------------------*/
-static void FPT_queueCmdComplete(PSCCBcard pCurrCard, PSCCB p_sccb,
+static void FPT_queueCmdComplete(PSCCBcard pCurrCard, struct sccb * p_sccb,
unsigned char p_card)
{
* Description: Add SCCB to our disconnect array.
*
*---------------------------------------------------------------------*/
-static void FPT_queueDisconnect(PSCCB p_sccb, unsigned char p_card)
+static void FPT_queueDisconnect(struct sccb * p_sccb, unsigned char p_card)
{
PSCCBMgr_tar_info currTar_Info;
static void FPT_queueFlushSccb(unsigned char p_card, unsigned char error_code)
{
unsigned char qtag,thisTarg;
- PSCCB currSCCB;
+ struct sccb * currSCCB;
PSCCBMgr_tar_info currTar_Info;
currSCCB = FPT_BL_Card[p_card].currentSCCB;
-static void FPT_queueAddSccb(PSCCB p_SCCB, unsigned char p_card)
+static void FPT_queueAddSccb(struct sccb * p_SCCB, unsigned char p_card)
{
PSCCBMgr_tar_info currTar_Info;
currTar_Info = &FPT_sccbMgrTbl[p_card][p_SCCB->TargID];
*
*---------------------------------------------------------------------*/
-static unsigned char FPT_queueFindSccb(PSCCB p_SCCB, unsigned char p_card)
+static unsigned char FPT_queueFindSccb(struct sccb * p_SCCB, unsigned char p_card)
{
- PSCCB q_ptr;
+ struct sccb * q_ptr;
PSCCBMgr_tar_info currTar_Info;
currTar_Info = &FPT_sccbMgrTbl[p_card][p_SCCB->TargID];
*
*---------------------------------------------------------------------*/
-static void FPT_utilUpdateResidual(PSCCB p_SCCB)
+static void FPT_utilUpdateResidual(struct sccb * p_SCCB)
{
unsigned long partial_cnt;
unsigned int sg_index;
static inline void
FlashPoint__StartCCB(FlashPoint_CardHandle_T CardHandle, struct BusLogic_CCB *CCB)
{
- FlashPoint_StartCCB(CardHandle, (PSCCB) CCB);
+ FlashPoint_StartCCB(CardHandle, (struct sccb *) CCB);
}
static inline void
FlashPoint__AbortCCB(FlashPoint_CardHandle_T CardHandle, struct BusLogic_CCB *CCB)
{
- FlashPoint_AbortCCB(CardHandle, (PSCCB) CCB);
+ FlashPoint_AbortCCB(CardHandle, (struct sccb *) CCB);
}