Module Name:    src
Committed By:   jdolecek
Date:           Thu Oct 13 20:05:06 UTC 2016

Modified Files:
        src/sys/dev/pci: ehci_pci.c ichsmb.c xhci_pci.c
        src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
provide intr xname


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/ehci_pci.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/ichsmb.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/xhci_pci.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.63 src/sys/dev/pci/ehci_pci.c:1.64
--- src/sys/dev/pci/ehci_pci.c:1.63	Sat Apr 23 10:15:31 2016
+++ src/sys/dev/pci/ehci_pci.c	Thu Oct 13 20:05:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.63 2016/04/23 10:15:31 skrll Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.64 2016/10/13 20:05:06 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.63 2016/04/23 10:15:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.64 2016/10/13 20:05:06 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -176,7 +176,8 @@ ehci_pci_attach(device_t parent, device_
 	 * Allocate IRQ
 	 */
 	intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
-	sc->sc_ih = pci_intr_establish(pc, ih, IPL_USB, ehci_intr, sc);
+	sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_USB, ehci_intr, sc,
+	    device_xname(self));
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "couldn't establish interrupt");
 		if (intrstr != NULL)

Index: src/sys/dev/pci/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.46 src/sys/dev/pci/ichsmb.c:1.47
--- src/sys/dev/pci/ichsmb.c:1.46	Thu Jul  7 06:55:41 2016
+++ src/sys/dev/pci/ichsmb.c	Thu Oct 13 20:05:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.46 2016/07/07 06:55:41 msaitoh Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.47 2016/10/13 20:05:06 jdolecek Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.46 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.47 2016/10/13 20:05:06 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -175,8 +175,8 @@ ichsmb_attach(device_t parent, device_t 
 		if (pci_intr_map(pa, &ih) == 0) {
 			intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf,
 			    sizeof(intrbuf));
-			sc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_BIO,
-			    ichsmb_intr, sc);
+			sc->sc_ih = pci_intr_establish_xname(pa->pa_pc, ih,
+			    IPL_BIO, ichsmb_intr, sc, device_xname(sc->sc_dev));
 			if (sc->sc_ih != NULL) {
 				aprint_normal_dev(self, "interrupting at %s\n",
 				    intrstr);

Index: src/sys/dev/pci/xhci_pci.c
diff -u src/sys/dev/pci/xhci_pci.c:1.6 src/sys/dev/pci/xhci_pci.c:1.7
--- src/sys/dev/pci/xhci_pci.c:1.6	Tue May  3 13:14:44 2016
+++ src/sys/dev/pci/xhci_pci.c	Thu Oct 13 20:05:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci_pci.c,v 1.6 2016/05/03 13:14:44 skrll Exp $	*/
+/*	$NetBSD: xhci_pci.c,v 1.7 2016/10/13 20:05:06 jdolecek Exp $	*/
 /*	OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.6 2016/05/03 13:14:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.7 2016/10/13 20:05:06 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -181,8 +181,8 @@ xhci_pci_attach(device_t parent, device_
 	}
 	intrstr = pci_intr_string(pc, psc->sc_pihp[0], intrbuf,
 	    sizeof(intrbuf));
-	psc->sc_ih = pci_intr_establish(pc, psc->sc_pihp[0], IPL_USB,
-	    xhci_intr, sc);
+	psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pihp[0], IPL_USB,
+	    xhci_intr, sc, device_xname(sc->sc_dev));
 	if (psc->sc_ih == NULL) {
 		aprint_error_dev(self, "couldn't establish interrupt");
 		if (intrstr != NULL)

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.39 src/sys/dev/pci/ixgbe/ixgbe.c:1.40
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.39	Mon Jul 11 06:14:51 2016
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Oct 13 20:05:06 2016
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.c 279805 2015-03-09 10:29:15Z araujo $*/
-/*$NetBSD: ixgbe.c,v 1.39 2016/07/11 06:14:51 knakahara Exp $*/
+/*$NetBSD: ixgbe.c,v 1.40 2016/10/13 20:05:06 jdolecek Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -2516,8 +2516,8 @@ ixgbe_allocate_legacy(struct adapter *ad
 		intrstr = pci_intr_string(adapter->osdep.pc, ih, intrbuf,
 		    sizeof(intrbuf));
 	}
-	adapter->osdep.ihs[0] = pci_intr_establish(adapter->osdep.pc, ih,
-	    IPL_NET, ixgbe_legacy_irq, que);
+	adapter->osdep.ihs[0] = pci_intr_establish_xname(adapter->osdep.pc, ih,
+	    IPL_NET, ixgbe_legacy_irq, que, device_xname(dev));
 #else
 	/* Allocation settings */
 	max_type = PCI_INTR_TYPE_MSI;
@@ -2533,8 +2533,9 @@ alloc_retry:
 	adapter->osdep.nintrs = 1;
 	intrstr = pci_intr_string(adapter->osdep.pc, adapter->osdep.intrs[0],
 	    intrbuf, sizeof(intrbuf));
-	adapter->osdep.ihs[0] = pci_intr_establish(adapter->osdep.pc,
-	    adapter->osdep.intrs[0], IPL_NET, ixgbe_legacy_irq, que);
+	adapter->osdep.ihs[0] = pci_intr_establish_xname(adapter->osdep.pc,
+	    adapter->osdep.intrs[0], IPL_NET, ixgbe_legacy_irq, que,
+	    device_xname(dev));
 	if (adapter->osdep.ihs[0] == NULL) {
 		intr_type = pci_intr_type(adapter->osdep.pc,
 		    adapter->osdep.intrs[0]);
@@ -2621,6 +2622,7 @@ ixgbe_allocate_msix(struct adapter *adap
 	struct  	tx_ring *txr = adapter->tx_rings;
 	pci_chipset_tag_t pc;
 	char		intrbuf[PCI_INTRSTR_LEN];
+	char		intr_xname[32];
 	const char	*intrstr = NULL;
 	int 		error, vector = 0;
 	int		cpu_id = 0;
@@ -2660,6 +2662,8 @@ ixgbe_allocate_msix(struct adapter *adap
 
 	kcpuset_create(&affinity, false);
 	for (int i = 0; i < adapter->num_queues; i++, vector++, que++, txr++) {
+		snprintf(intr_xname, sizeof(intr_xname), "%s TX/RX",
+		    device_xname(dev));
 		intrstr = pci_intr_string(pc, adapter->osdep.intrs[i], intrbuf,
 		    sizeof(intrbuf));
 #ifdef IXG_MPSAFE
@@ -2667,8 +2671,9 @@ ixgbe_allocate_msix(struct adapter *adap
 		    true);
 #endif
 		/* Set the handler function */
-		que->res = adapter->osdep.ihs[i] = pci_intr_establish(pc,
-		    adapter->osdep.intrs[i], IPL_NET, ixgbe_msix_que, que);
+		que->res = adapter->osdep.ihs[i] = pci_intr_establish_xname(pc,
+		    adapter->osdep.intrs[i], IPL_NET, ixgbe_msix_que, que,
+		    intr_xname);
 		if (que->res == NULL) {
 			pci_intr_release(pc, adapter->osdep.intrs,
 			    adapter->osdep.nintrs);
@@ -2729,6 +2734,7 @@ ixgbe_allocate_msix(struct adapter *adap
 
 	/* and Link */
 	cpu_id++;
+	snprintf(intr_xname, sizeof(intr_xname), "%s link", device_xname(dev));
 	intrstr = pci_intr_string(pc, adapter->osdep.intrs[vector], intrbuf,
 	    sizeof(intrbuf));
 #ifdef IXG_MPSAFE
@@ -2736,8 +2742,9 @@ ixgbe_allocate_msix(struct adapter *adap
 	    true);
 #endif
 	/* Set the link handler function */
-	adapter->osdep.ihs[vector] = pci_intr_establish(pc,
-	    adapter->osdep.intrs[vector], IPL_NET, ixgbe_msix_link, adapter);
+	adapter->osdep.ihs[vector] = pci_intr_establish_xname(pc,
+	    adapter->osdep.intrs[vector], IPL_NET, ixgbe_msix_link, adapter,
+	    intr_xname);
 	if (adapter->osdep.ihs[vector] == NULL) {
 		adapter->res = NULL;
 		aprint_error_dev(dev, "Failed to register LINK handler\n");

Reply via email to