From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 02:46:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5A3106564A; Wed, 25 Apr 2012 02:46:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37CE78FC1D; Wed, 25 Apr 2012 02:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P2kErd075987; Wed, 25 Apr 2012 02:46:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P2kE8f075985; Wed, 25 Apr 2012 02:46:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201204250246.q3P2kE8f075985@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 25 Apr 2012 02:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234666 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 02:46:14 -0000 Author: yongari Date: Wed Apr 25 02:46:13 2012 New Revision: 234666 URL: http://svn.freebsd.org/changeset/base/234666 Log: For Yukon II controllers that implement optional temperature sensor and voltage sensor, TWSI is used to get sensor data. msk(4) does not monitor these sensors and interrupt for TWSI completion is disabled by default. However, due to unknown reason, the TWSI completion interrupt fires and it resulted in interrupt storm. To fix it, acknowledges the TWSI completion interrupt if driver see the event. Given that not all Yukon II controllers show the issue it could be a silicon bug which does not honor interrupt masking. Probably the right way to address the issue is disabling automatic TWSI cycle initiation against these sensors. It would be even better to implement reading voltage/temperature from the NIC but it requires access to National LM80 through TWSI and documentation to do that is not available yet(probably will never happen). Reported by: jhb Tested by: jhb MFC after: 2 weeks Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Wed Apr 25 02:05:14 2012 (r234665) +++ head/sys/dev/msk/if_msk.c Wed Apr 25 02:46:13 2012 (r234666) @@ -3734,6 +3734,9 @@ msk_intr(void *xsc) if ((status & Y2_IS_STAT_BMU) != 0 && domore == 0) CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ); + /* Clear TWSI IRQ. */ + if ((status & Y2_IS_TWSI_RDY) != 0) + CSR_WRITE_4(sc, B2_I2C_IRQ, 1); /* Reenable interrupts. */ CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2);