From owner-freebsd-current Fri Feb 28 14: 2: 8 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8D3037B401 for ; Fri, 28 Feb 2003 14:02:06 -0800 (PST) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3218B43FA3 for ; Fri, 28 Feb 2003 14:02:06 -0800 (PST) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Feb 2003 17:02:05 -0500 Message-ID: From: Don Bowman To: "'freebsd-current@freebsd.org'" Subject: problem with if_em and polling with RXSEQ interrupt? (and patch) Date: Fri, 28 Feb 2003 17:02:01 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the if_em driver, it appears there is a possibility of a system crash when POLLING is enabled in conjunction with a link change. em_disable_intr leaves the RXSEQ interrupt enabled (which occurs when a link goes up or down). THe em_intr routine, when in polling mode, just returns (with the interrupt still active), which then re-enters it. the kern_poll will never get a chance to do its POLL_AND_CHECK_STATUS in this case. I'm proposing to add to em_intr a call to em_poll with POLL_AND_CHECK_STATUS if there is an interrupt pending and we are in polling mode: 1086c1086,1087 < if (ifp->if_ipending & IFF_POLLING) --- > if (ifp->if_ipending & IFF_POLLING) { > em_poll(ifp, POLL_AND_CHECK_STATUS, 1); 1087a1089 > } I also propose to enable the link status change interrupt in em_disable_intr(): 2259c2261 < (0xffffffff & ~E1000_IMC_RXSEQ)); --- > (0xffffffff & ~(E1000_IMC_RXSEQ | E1000_ICR_LSC))); Does anybody have any comments on this? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message