diff options
author | Stephan Brodkorb <stephan-linuxdev@brodkorb.com> | 2005-10-17 19:43:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-17 20:03:57 -0400 |
commit | 9ac0b9c1927228a38a71216536176af8811a435a (patch) | |
tree | aafbbc2150f7d6a232889db711832b61f28de916 | |
parent | b65574fec5db1211bce7fc8bec7a2b32486e0670 (diff) |
[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>
-rw-r--r-- | drivers/char/n_r3964.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c index 97d6dc24b800..853c98cee64f 100644 --- a/drivers/char/n_r3964.c +++ b/drivers/char/n_r3964.c | |||
@@ -695,7 +695,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c) | |||
695 | { | 695 | { |
696 | TRACE_PE("IDLE - got STX but no space in rx_queue!"); | 696 | TRACE_PE("IDLE - got STX but no space in rx_queue!"); |
697 | pInfo->state=R3964_WAIT_FOR_RX_BUF; | 697 | pInfo->state=R3964_WAIT_FOR_RX_BUF; |
698 | mod_timer(&pInfo->tmr, R3964_TO_NO_BUF); | 698 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_NO_BUF); |
699 | break; | 699 | break; |
700 | } | 700 | } |
701 | start_receiving: | 701 | start_receiving: |
@@ -705,7 +705,7 @@ start_receiving: | |||
705 | pInfo->last_rx = 0; | 705 | pInfo->last_rx = 0; |
706 | pInfo->flags &= ~R3964_ERROR; | 706 | pInfo->flags &= ~R3964_ERROR; |
707 | pInfo->state=R3964_RECEIVING; | 707 | pInfo->state=R3964_RECEIVING; |
708 | mod_timer(&pInfo->tmr, R3964_TO_ZVZ); | 708 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); |
709 | pInfo->nRetry = 0; | 709 | pInfo->nRetry = 0; |
710 | put_char(pInfo, DLE); | 710 | put_char(pInfo, DLE); |
711 | flush(pInfo); | 711 | flush(pInfo); |
@@ -732,7 +732,7 @@ start_receiving: | |||
732 | if(pInfo->flags & R3964_BCC) | 732 | if(pInfo->flags & R3964_BCC) |
733 | { | 733 | { |
734 | pInfo->state = R3964_WAIT_FOR_BCC; | 734 | pInfo->state = R3964_WAIT_FOR_BCC; |
735 | mod_timer(&pInfo->tmr, R3964_TO_ZVZ); | 735 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); |
736 | } | 736 | } |
737 | else | 737 | else |
738 | { | 738 | { |
@@ -744,7 +744,7 @@ start_receiving: | |||
744 | pInfo->last_rx = c; | 744 | pInfo->last_rx = c; |
745 | char_to_buf: | 745 | char_to_buf: |
746 | pInfo->rx_buf[pInfo->rx_position++] = c; | 746 | pInfo->rx_buf[pInfo->rx_position++] = c; |
747 | mod_timer(&pInfo->tmr, R3964_TO_ZVZ); | 747 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); |
748 | } | 748 | } |
749 | } | 749 | } |
750 | /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */ | 750 | /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */ |