Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 2017 14:04:32 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r318273 - stable/10/sys/sparc64/pci
Message-ID:  <201705141404.v4EE4WHq059916@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Sun May 14 14:04:32 2017
New Revision: 318273
URL: https://svnweb.freebsd.org/changeset/base/318273

Log:
  MFC: r317578
  
  Fix a bug introduced as part of r287726 (MFCed to stable/10 in
  r292789); 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/10/sys/sparc64/pci/psycho.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sparc64/pci/psycho.c
==============================================================================
--- stable/10/sys/sparc64/pci/psycho.c	Sun May 14 14:04:25 2017	(r318272)
+++ stable/10/sys/sparc64/pci/psycho.c	Sun May 14 14:04:32 2017	(r318273)
@@ -943,14 +943,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705141404.v4EE4WHq059916>