Re: [PATCH] backup timer for UARTs that lose interrupts (updated spinlocking)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On So 21-01-06 11:53:06, Alex Williamson wrote:
> 
>    This is an update to the following patch current found in the -mm
> tree:
> 
> backup-timer-for-uarts-that-lose-interrupts-take-3.patch
> 
> The only change is that the spinlocks around 8250_handle_port() have
> been removed to be consistent with changes to upstream.  Original submit
> message below.  Thanks

is this going to cause increased timer activity on non-buggy systems?

> +	if (is_real_interrupt(up->port.irq))
> +		serial_out(up, UART_IER, ier);
> +
> +	timeout = timeout > 6 ? (timeout / 2 - 2) : 1;

Eh? What units is timeout in, anyway?

> +	mod_timer(&up->timer, jiffies + (timeout * 100));

Does this work in HZ!=100 situations?

> +	/* Wait up to 1s for flow control if necessary */
> +	if (up->port.flags & UPF_CONS_FLOW) {
> +		tmout = 1000000;
> +		while (--tmout &&
> +		       ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
> +			udelay(1);

Could you s/tmout/timeout/ while you are modifying this?

> +		if (iir & UART_IIR_NO_INT) {
> +			unsigned int timeout = up->port.timeout;
> +
> +			pr_debug("ttyS%d - using backup timer\n", port->line);
> +			timeout = timeout > 6 ? (timeout / 2 - 2) : 1;

Same strange computation, again. Inline function?
							Pavel
-- 
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux