mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
[PATCH] n_r3964 mod_timer() fix
Since Revision 1.10 was released the n_r3964 module wasn't able to receive any data. The reason for that behavior is because there were some wrong calls of mod_timer(...) in the function receive_char (...). This patch should fix this problem and was successfully tested with talking to some kuka industrial robots. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
b65574fec5
commit
9ac0b9c192
1 changed files with 4 additions and 4 deletions
|
@ -695,7 +695,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c)
|
||||||
{
|
{
|
||||||
TRACE_PE("IDLE - got STX but no space in rx_queue!");
|
TRACE_PE("IDLE - got STX but no space in rx_queue!");
|
||||||
pInfo->state=R3964_WAIT_FOR_RX_BUF;
|
pInfo->state=R3964_WAIT_FOR_RX_BUF;
|
||||||
mod_timer(&pInfo->tmr, R3964_TO_NO_BUF);
|
mod_timer(&pInfo->tmr, jiffies + R3964_TO_NO_BUF);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
start_receiving:
|
start_receiving:
|
||||||
|
@ -705,7 +705,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c)
|
||||||
pInfo->last_rx = 0;
|
pInfo->last_rx = 0;
|
||||||
pInfo->flags &= ~R3964_ERROR;
|
pInfo->flags &= ~R3964_ERROR;
|
||||||
pInfo->state=R3964_RECEIVING;
|
pInfo->state=R3964_RECEIVING;
|
||||||
mod_timer(&pInfo->tmr, R3964_TO_ZVZ);
|
mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
|
||||||
pInfo->nRetry = 0;
|
pInfo->nRetry = 0;
|
||||||
put_char(pInfo, DLE);
|
put_char(pInfo, DLE);
|
||||||
flush(pInfo);
|
flush(pInfo);
|
||||||
|
@ -732,7 +732,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c)
|
||||||
if(pInfo->flags & R3964_BCC)
|
if(pInfo->flags & R3964_BCC)
|
||||||
{
|
{
|
||||||
pInfo->state = R3964_WAIT_FOR_BCC;
|
pInfo->state = R3964_WAIT_FOR_BCC;
|
||||||
mod_timer(&pInfo->tmr, R3964_TO_ZVZ);
|
mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -744,7 +744,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c)
|
||||||
pInfo->last_rx = c;
|
pInfo->last_rx = c;
|
||||||
char_to_buf:
|
char_to_buf:
|
||||||
pInfo->rx_buf[pInfo->rx_position++] = c;
|
pInfo->rx_buf[pInfo->rx_position++] = c;
|
||||||
mod_timer(&pInfo->tmr, R3964_TO_ZVZ);
|
mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* else: overflow-msg? BUF_SIZE>MTU; should not happen? */
|
/* else: overflow-msg? BUF_SIZE>MTU; should not happen? */
|
||||||
|
|
Loading…
Reference in a new issue