Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 767
b: refs/heads/master
c: 6cb2875
h: refs/heads/master
i:
  765: e3b766c
  763: d1a3414
  759: 762fedf
  751: 0262af0
  735: 07b8a37
  703: ba53a08
  639: 013b7b9
  511: a4ccb14
v: v3
  • Loading branch information
Patrick Gefre authored and Linus Torvalds committed May 1, 2005
1 parent b100bcd commit 5686ca0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 149733d4e274ce1add3399cabdb243116ebfdf79
refs/heads/master: 6cb2875f8d7e392982229094ad3b6d2f213f48da
11 changes: 7 additions & 4 deletions trunk/drivers/serial/ioc4_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,9 @@ static inline int set_rx_timeout(struct ioc4_port *port, int timeout)
* and set the rx threshold to that amount. There are 4 chars
* per ring entry, so we'll divide the number of chars that will
* arrive in timeout by 4.
* So .... timeout * baud / 10 / HZ / 4, with HZ = 100.
*/
threshold = timeout * port->ip_baud / 10 / HZ / 4;
threshold = timeout * port->ip_baud / 4000;
if (threshold == 0)
threshold = 1; /* otherwise we'll intr all the time! */

Expand All @@ -1285,8 +1286,10 @@ static inline int set_rx_timeout(struct ioc4_port *port, int timeout)

writel(port->ip_sscr, &port->ip_serial_regs->sscr);

/* Now set the rx timeout to the given value */
timeout = timeout * IOC4_SRTR_HZ / HZ;
/* Now set the rx timeout to the given value
* again timeout * IOC4_SRTR_HZ / HZ
*/
timeout = timeout * IOC4_SRTR_HZ / 100;
if (timeout > IOC4_SRTR_CNT)
timeout = IOC4_SRTR_CNT;

Expand Down Expand Up @@ -1380,7 +1383,7 @@ config_port(struct ioc4_port *port,
if (port->ip_tx_lowat == 0)
port->ip_tx_lowat = 1;

set_rx_timeout(port, port->ip_rx_timeout);
set_rx_timeout(port, 2);

return 0;
}
Expand Down

0 comments on commit 5686ca0

Please sign in to comment.