Commit 4e8cbe30 authored by Kai Germaschewski's avatar Kai Germaschewski Committed by Kai Germaschewski

[PATCH] 2.5.3 ISDN hisax_fcpcipnp driver fix

the appended patch fixes a problem where the ->rcvidx variable was not
initialized properly.
parent 5f960151
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* *
* o POWER PC * o POWER PC
* o clean up debugging * o clean up debugging
* o tx_skb at PH_DEACTIVATE time
*/ */
#include <linux/version.h> #include <linux/version.h>
...@@ -368,10 +369,7 @@ static void hdlc_fill_fifo(struct fritz_bcs *bcs) ...@@ -368,10 +369,7 @@ static void hdlc_fill_fifo(struct fritz_bcs *bcs)
unsigned long flags; unsigned long flags;
unsigned char *p; unsigned char *p;
DBG(0x40, "hdlc_fill_fifo"); DBG(0x40, "");
if (!skb)
BUG();
if (skb->len == 0) if (skb->len == 0)
BUG(); BUG();
...@@ -581,14 +579,14 @@ static void modehdlc(struct fritz_bcs *bcs, int mode) ...@@ -581,14 +579,14 @@ static void modehdlc(struct fritz_bcs *bcs, int mode)
adapter->write_ctrl(bcs, 5); adapter->write_ctrl(bcs, 5);
break; break;
case L1_MODE_TRANS: case L1_MODE_TRANS:
bcs->ctrl.sr.mode = HDLC_MODE_TRANS;
adapter->write_ctrl(bcs, 5);
bcs->ctrl.sr.cmd = HDLC_CMD_XRS;
adapter->write_ctrl(bcs, 1);
bcs->ctrl.sr.cmd = 0;
break;
case L1_MODE_HDLC: case L1_MODE_HDLC:
bcs->ctrl.sr.mode = HDLC_MODE_ITF_FLG; bcs->rcvidx = 0;
bcs->tx_cnt = 0;
bcs->tx_skb = NULL;
if (mode == L1_MODE_TRANS)
bcs->ctrl.sr.mode = HDLC_MODE_TRANS;
else
bcs->ctrl.sr.mode = HDLC_MODE_ITF_FLG;
adapter->write_ctrl(bcs, 5); adapter->write_ctrl(bcs, 5);
bcs->ctrl.sr.cmd = HDLC_CMD_XRS; bcs->ctrl.sr.cmd = HDLC_CMD_XRS;
adapter->write_ctrl(bcs, 1); adapter->write_ctrl(bcs, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment