Date: Fri, 1 Jul 2011 05:20:08 GMT From: Peter Jeremy <peter.jeremy@alcatel-lucent.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/158086: [digi] [patch] Update digi(4) to work with TTYng Message-ID: <201107010520.p615K8tx092922@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/158086; it has been noted by GNATS. From: Peter Jeremy <peter.jeremy@alcatel-lucent.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107010520.p615K8tx092922>