From owner-svn-src-stable-11@freebsd.org Sun May 14 14:04:27 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F1BAD6CD65; Sun, 14 May 2017 14:04:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE53ACC0; Sun, 14 May 2017 14:04:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EE4PwP059856; Sun, 14 May 2017 14:04:25 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EE4PJ0059855; Sun, 14 May 2017 14:04:25 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141404.v4EE4PJ0059855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318272 - stable/11/sys/sparc64/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:04:27 -0000 Author: marius Date: Sun May 14 14:04:25 2017 New Revision: 318272 URL: https://svnweb.freebsd.org/changeset/base/318272 Log: MFC: r317578 Fix a bug introduced as part of r287726; use the right device_t for determining the softc of the bridge in psycho_route_interrupt(). [1] While at it, update the corresponding comment that the code in question is also necessary for U30s in addition to E450s (a fact that has been known for ages). PR: 218478 [1] Submitted by: Yoshihiko Iwama [1] Modified: stable/11/sys/sparc64/pci/psycho.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sparc64/pci/psycho.c ============================================================================== --- stable/11/sys/sparc64/pci/psycho.c Sun May 14 13:59:40 2017 (r318271) +++ stable/11/sys/sparc64/pci/psycho.c Sun May 14 14:04:25 2017 (r318272) @@ -942,14 +942,14 @@ psycho_route_interrupt(device_t bridge, if (pin > 4) return (pin); /* - * Guess the INO; we always assume that this is a non-OBIO - * device, and that pin is a "real" intpin number. Determine - * the mapping register to be used by the slot number. - * We only need to do this on E450s, it seems; here, the slot numbers - * for bus A are one-based, while those for bus B seemingly have an - * offset of 2 (hence the factor of 3 below). + * Guess the INO; we always assume that this is a non-OBIO device, + * and that pin is a "real" intpin number. Determine the mapping + * register to be used by the slot number. + * We only need to do this on E450s and U30s, though; here, the + * slot numbers for bus A are one-based, while those for bus B + * seemingly have an offset of 2 (hence the factor of 3 below). */ - sc = device_get_softc(dev); + sc = device_get_softc(bridge); intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1;