From owner-cvs-src@FreeBSD.ORG Wed May 26 14:59:29 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6461016A4CE; Wed, 26 May 2004 14:59:29 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D84743D3F; Wed, 26 May 2004 14:59:29 -0700 (PDT) (envelope-from tmm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4QLx1cI072335; Wed, 26 May 2004 14:59:01 -0700 (PDT) (envelope-from tmm@repoman.freebsd.org) Received: (from tmm@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4QLx1cQ072334; Wed, 26 May 2004 14:59:01 -0700 (PDT) (envelope-from tmm) Message-Id: <200405262159.i4QLx1cQ072334@repoman.freebsd.org> From: Thomas Moestl Date: Wed, 26 May 2004 14:59:01 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/uart uart_dev_ns8250.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2004 21:59:29 -0000 tmm 2004/05/26 14:59:01 PDT FreeBSD src repository Modified files: sys/dev/uart uart_dev_ns8250.c Log: It seems that clearing the MCR_IE bit in the modem control register does not reliably prevent the triggering of interrupts for all supported configurations. Thus, the FIFO size probe could cause an interrupt, which could lead to an interrupt storm in the shared interrupt case. To prevent this, change ns8250_bus_probe() to use the overflow bit in the line status register instead of the RX ready bit in the interrupt identification register to detect whether the FIFO has filled up. This allows us to clear all bits in the interrupt enable register during the probe, which should prevent interrupts reliably. Additionally, the detected FIFO size may be a bit more accurate, because the overflow bit is only set when the FIFO did actually fill up, while interrupts would trigger a bit early. Reviewed and tested on a lot of hardware by: marcel Revision Changes Path 1.7 +23 -22 src/sys/dev/uart/uart_dev_ns8250.c