Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222844
b: refs/heads/master
c: f36d83a
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and Greg Kroah-Hartman committed Nov 16, 2010
1 parent 625ed29 commit de2fb91
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 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: 61838261edaf621d1e8ee4ea9d7c052f7d783ca4
refs/heads/master: f36d83a8cb7224f45fdfa1129a616dff56479a09
30 changes: 22 additions & 8 deletions trunk/drivers/staging/rtl8187se/r8185b_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,12 @@ HwHSSIThreeWire(

udelay(10);
}
if (TryCnt == TC_3W_POLL_MAX_TRY_CNT)
panic("HwThreeWire(): CmdReg: %#X RE|WE bits are not clear!!\n", u1bTmp);
if (TryCnt == TC_3W_POLL_MAX_TRY_CNT) {
printk(KERN_ERR "rtl8187se: HwThreeWire(): CmdReg:"
" %#X RE|WE bits are not clear!!\n", u1bTmp);
dump_stack();
return 0;
}

/* RTL8187S HSSI Read/Write Function */
u1bTmp = read_nic_byte(dev, RF_SW_CONFIG);
Expand Down Expand Up @@ -298,13 +302,23 @@ HwHSSIThreeWire(
int idx;
int ByteCnt = nDataBufBitCnt / 8;
/* printk("%d\n",nDataBufBitCnt); */
if ((nDataBufBitCnt % 8) != 0)
panic("HwThreeWire(): nDataBufBitCnt(%d) should be multiple of 8!!!\n",
nDataBufBitCnt);
if ((nDataBufBitCnt % 8) != 0) {
printk(KERN_ERR "rtl8187se: "
"HwThreeWire(): nDataBufBitCnt(%d)"
" should be multiple of 8!!!\n",
nDataBufBitCnt);
dump_stack();
nDataBufBitCnt += 8;
nDataBufBitCnt &= ~7;
}

if (nDataBufBitCnt > 64)
panic("HwThreeWire(): nDataBufBitCnt(%d) should <= 64!!!\n",
nDataBufBitCnt);
if (nDataBufBitCnt > 64) {
printk(KERN_ERR "rtl8187se: HwThreeWire():"
" nDataBufBitCnt(%d) should <= 64!!!\n",
nDataBufBitCnt);
dump_stack();
nDataBufBitCnt = 64;
}

for (idx = 0; idx < ByteCnt; idx++)
write_nic_byte(dev, (SW_3W_DB0+idx), *(pDataBuf+idx));
Expand Down

0 comments on commit de2fb91

Please sign in to comment.