From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 1 05:20:51 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 876C1106679C for ; Fri, 1 Jul 2011 05:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E206D8FC16 for ; Fri, 1 Jul 2011 05:20:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p615K8TS092923 for ; Fri, 1 Jul 2011 05:20:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p615K8tx092922; Fri, 1 Jul 2011 05:20:08 GMT (envelope-from gnats) Date: Fri, 1 Jul 2011 05:20:08 GMT Message-Id: <201107010520.p615K8tx092922@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Peter Jeremy Cc: Subject: Re: kern/158086: [digi] [patch] Update digi(4) to work with TTYng X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Jeremy List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2011 05:20:51 -0000 The following reply was made to PR kern/158086; it has been noted by GNATS. From: Peter Jeremy To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/158086: [digi] [patch] Update digi(4) to work with TTYng Date: Fri, 1 Jul 2011 15:06:31 +1000 --lrvsYIebpInmECXG Content-Type: multipart/mixed; boundary="jt0yj30bxbg11sci" Content-Disposition: inline --jt0yj30bxbg11sci Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I've discovered that my initial patch was still susceptable to interrupt storms (which has been an issue with digi(4) for a long time) and offer the attached patch. Note that this patch should be applied on top of the patch in the initial PR. I am happy to supply a single patch if anyone wants it but, given the size of the complete patch, this is more efficient. Note that I've also successfully tested multiple Ports/16em units on a single PCI/Xem card (which didn't work with the previous driver) as well as multiple PCI/Xem cards in one system. --=20 Peter Jeremy --jt0yj30bxbg11sci Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="intr.fix" Content-Transfer-Encoding: quoted-printable --- sys/dev/digi/digi.c.158086 2011-06-21 08:43:51.000000000 +1000 +++ sys/dev/digi/digi.c 2011-07-01 14:48:04.000000000 +1000 @@ -1143,11 +1143,7 @@ =20 if (sc->status !=3D DIGI_STATUS_ENABLED) { DLOG(DIGIDB_IRQ, (sc->dev, "interrupt on disabled board !\n")); -#ifdef DIGI_INTERRUPT - if (!islocked) - mtx_unlock(&sc->dg_mutex); -#endif - return; + goto eoi2; } =20 #ifdef DIGI_INTERRUPT @@ -1330,16 +1326,18 @@ ehead =3D sc->gdata->ein; etail =3D sc->gdata->eout; } + eoi: - /* Ack any interrupt */ #ifdef DIGI_ISA - if (sc->pcibus) + digi_towin(sc, window); #endif - (void)sc->vmem[0x200002]; =20 +eoi2: + /* Ack any interrupt */ #ifdef DIGI_ISA - digi_towin(sc, window); + if (sc->pcibus) #endif + (void)sc->vmem[0x200002]; #ifdef DIGI_INTERRUPT if (!islocked) mtx_unlock(&sc->dg_mutex); --jt0yj30bxbg11sci-- --lrvsYIebpInmECXG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk4NVdcACgkQ/opHv/APuIe9qwCeI3ZbMAMEE8f7niJnWWE0C/m2 P5IAnArb4nh2tK+kMJXNCImI4Vjaodle =+lSG -----END PGP SIGNATURE----- --lrvsYIebpInmECXG--