From 5686ca0dc6cc523e8fabb3ca70e570b027c6d4b0 Mon Sep 17 00:00:00 2001 From: Patrick Gefre Date: Sun, 1 May 2005 08:59:21 -0700 Subject: [PATCH] --- yaml --- r: 767 b: refs/heads/master c: 6cb2875f8d7e392982229094ad3b6d2f213f48da h: refs/heads/master i: 765: e3b766ce2dcad4398a4fc0bc8d2941250377d000 763: d1a34143b6efe8dfc65776d83222e31f506b48d5 759: 762fedfc1108356560cf760c4d2d323bb33b8889 751: 0262af0a48d51cc06271381dc987d4dd47bcbb0c 735: 07b8a370473178725b4e84bf4cfc10fef0afcb9e 703: ba53a08f499bd8ef777207c4f2fa1b5b563ff648 639: 013b7b966859cda477703ee758f8269e25830d9b 511: a4ccb142a09ad69976cf727ba97be442de09b822 v: v3 --- [refs] | 2 +- trunk/drivers/serial/ioc4_serial.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a7a59ecd33e0..ff7c03d146c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 149733d4e274ce1add3399cabdb243116ebfdf79 +refs/heads/master: 6cb2875f8d7e392982229094ad3b6d2f213f48da diff --git a/trunk/drivers/serial/ioc4_serial.c b/trunk/drivers/serial/ioc4_serial.c index f94d2e712cad..d3f4542616c6 100644 --- a/trunk/drivers/serial/ioc4_serial.c +++ b/trunk/drivers/serial/ioc4_serial.c @@ -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! */ @@ -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; @@ -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; }