Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235655
b: refs/heads/master
c: 1b5b4e1
h: refs/heads/master
i:
  235653: 19b5efc
  235651: 0faa8f5
  235647: 0736a8e
v: v3
  • Loading branch information
Javier Martinez Canillas authored and Greg Kroah-Hartman committed Jan 21, 2011
1 parent 6d32850 commit dc19f1e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2591418bb18ea597dc34cc369899e11c3d4ecc87
refs/heads/master: 1b5b4e17e58a0c8ddfd5ad60e65f924fb00b60ef
50 changes: 18 additions & 32 deletions trunk/drivers/staging/keucr/smilsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,54 +1482,40 @@ BYTE _Check_D_DevCode(BYTE dcode)
//----- Check_D_ReadError() ----------------------------------------------
int Check_D_ReadError(BYTE *redundant)
{
// Driver 不做 ECC Check
return(SUCCESS);
if (!StringCmp((char *)(redundant+0x0D),(char *)EccBuf,3))
if (!StringCmp((char *)(redundant+0x08),(char *)(EccBuf+0x03),3))
return(SUCCESS);

return(ERROR);
return SUCCESS;
}

//----- Check_D_Correct() ----------------------------------------------
int Check_D_Correct(BYTE *buf,BYTE *redundant)
{
// Driver 不做 ECC Check
return(SUCCESS);
if (StringCmp((char *)(redundant+0x0D),(char *)EccBuf,3))
if (_Correct_D_SwECC(buf,redundant+0x0D,EccBuf))
return(ERROR);

buf+=0x100;
if (StringCmp((char *)(redundant+0x08),(char *)(EccBuf+0x03),3))
if (_Correct_D_SwECC(buf,redundant+0x08,EccBuf+0x03))
return(ERROR);

return(SUCCESS);
return SUCCESS;
}

//----- Check_D_CISdata() ----------------------------------------------
int Check_D_CISdata(BYTE *buf, BYTE *redundant)
{
BYTE cis[]={0x01,0x03,0xD9,0x01,0xFF,0x18,0x02,0xDF,0x01,0x20};
BYTE cis[] = {0x01, 0x03, 0xD9, 0x01, 0xFF, 0x18, 0x02,
0xDF, 0x01, 0x20};

int cis_len = sizeof(cis);

if (!IsSSFDCCompliance && !IsXDCompliance)
return(SUCCESS); // 目前為強制 SUCCESS [Arnold 02-08-23] SSFDC 測試, 不能強制 SUCCESS
if (!IsSSFDCCompliance && !IsXDCompliance)
return SUCCESS;

if (!StringCmp((char *)(redundant+0x0D),(char *)EccBuf,3))
return(StringCmp((char *)buf,(char *)cis,10));
if (!memcmp(redundant + 0x0D, EccBuf, 3))
return memcmp(buf, cis, cis_len);

if (!_Correct_D_SwECC(buf,redundant+0x0D,EccBuf))
return(StringCmp((char *)buf,(char *)cis,10));
if (!_Correct_D_SwECC(buf, redundant + 0x0D, EccBuf))
return memcmp(buf, cis, cis_len);

buf+=0x100;
if (!StringCmp((char *)(redundant+0x08),(char *)(EccBuf+0x03),3))
return(StringCmp((char *)buf,(char *)cis,10));
buf += 0x100;
if (!memcmp(redundant + 0x08, EccBuf + 0x03, 3))
return memcmp(buf, cis, cis_len);

if (!_Correct_D_SwECC(buf,redundant+0x08,EccBuf+0x03))
return(StringCmp((char *)buf,(char *)cis,10));
if (!_Correct_D_SwECC(buf, redundant + 0x08, EccBuf + 0x03))
return memcmp(buf, cis, cis_len);

return(ERROR);
return ERROR;
}

//----- Set_D_RightECC() ----------------------------------------------
Expand Down

0 comments on commit dc19f1e

Please sign in to comment.