//----- Release_D_WriteBlock() ----------------------------------------- int Release_D_WriteBlock(struct us_data *us) { //SSFDCTYPE_T aa = (SSFDCTYPE_T ) &Ssfdc; //ADDRESS_T bb = (ADDRESS_T) &Media; SectCopyMode=COMPLETED; Media.PhyBlock=WriteBlock; if (MarkFail_D_PhyOneBlock(us)) return(ERROR); Media.PhyBlock=ReadBlock; return(SMSUCCESS); }
int Release_D_WriteBlock(struct us_data *us) { SectCopyMode=COMPLETED; Media.PhyBlock=WriteBlock; if (MarkFail_D_PhyOneBlock(us)) return(ERROR); Media.PhyBlock=ReadBlock; return(SMSUCCESS); }
//----- Release_D_ReadBlock() ------------------------------------------ int Release_D_ReadBlock(struct us_data *us) { DWORD mode; //SSFDCTYPE_T aa = (SSFDCTYPE_T ) &Ssfdc; //ADDRESS_T bb = (ADDRESS_T) &Media; mode=SectCopyMode; SectCopyMode=COMPLETED; if (mode==COMPLETED) return(SMSUCCESS); Log2Phy[Media.Zone][Media.LogBlock]=WriteBlock; Media.PhyBlock=ReadBlock; if (Media.PhyBlock==NO_ASSIGN) { Media.PhyBlock=WriteBlock; return(SMSUCCESS); } if (mode==REQ_ERASE) { if (Erase_D_PhyOneBlock(us)) { if (ErrCode==ERR_HwError) return(ERROR); if (MarkFail_D_PhyOneBlock(us)) return(ERROR); } else Clr_D_Bit(Assign[Media.Zone],Media.PhyBlock); } else if (MarkFail_D_PhyOneBlock(us)) return(ERROR); Media.PhyBlock=WriteBlock; return(SMSUCCESS); }