From owner-cvs-src@FreeBSD.ORG Sun Jan 30 09:00:50 2005 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 D866E16A4CF; Sun, 30 Jan 2005 09:00:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB3A643D1F; Sun, 30 Jan 2005 09:00:50 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0U90om9008008; Sun, 30 Jan 2005 09:00:50 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0U90opE008007; Sun, 30 Jan 2005 09:00:50 GMT (envelope-from marcel) Message-Id: <200501300900.j0U90opE008007@repoman.freebsd.org> From: Marcel Moolenaar Date: Sun, 30 Jan 2005 09:00:50 +0000 (UTC) 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_z8530.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: Sun, 30 Jan 2005 09:00:51 -0000 marcel 2005-01-30 09:00:50 UTC FreeBSD src repository Modified files: sys/dev/uart uart_dev_z8530.c Log: o Fix the various interrupt related problems caused by reverse engineering the pending interrupt sources from the current state of the controller. For channel A we can always read the interrupt pending register (RR3). For channel B we can read the interrupt vector register (RR2) because it contains the modified vector and thus includes the interrupt source. Since we currently need puc(4) for the Z8530, we know that the interrupt handler for both channels will be called and thus that RR3 will always be read at least once, even if ch A has no pending interrupt. NOTE: The modified interrupt vector has no value that represent a lack of pending interrupt for channel B. That is, the value read when no interrupts are pending is the same as the value for the special receive condition. Fortunately, we don't actually have to depend on that interrupt source. This does mean that we need to properly handle the overflow condition, when we read received character from the chip. o The DSR signal is represented by the SYNC bit in the external status register (RR0). We now properly track DSR. o It's save to enable the external/status interrupt source. We now get interrupts when line signals (DSR, DCD or CTS) change. Problems fixes: o interrupt storms. o blocked open(2). o lack of (hardware) flow control. o unable to report DSR. MFC after: 5 days Revision Changes Path 1.11 +69 -31 src/sys/dev/uart/uart_dev_z8530.c