Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jun 2016 14:07:38 GMT
From:      vincenzo@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r304511 - soc2016/vincenzo/head/sys/dev/netmap
Message-ID:  <201606031407.u53E7cSZ058404@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vincenzo
Date: Fri Jun  3 14:07:37 2016
New Revision: 304511
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=304511

Log:
   freebsd: ptnet IRQ: add missing accesses to PTNET_IO_CTRL register

Modified:
  soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c

Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c
==============================================================================
--- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c	Fri Jun  3 14:07:23 2016	(r304510)
+++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c	Fri Jun  3 14:07:37 2016	(r304511)
@@ -482,6 +482,10 @@
 
 	device_printf(dev, "Allocated %d MSI-X vectors\n", nvecs);
 
+	/* Tell the hypervisor that we have allocated the MSI-X vectors,
+	 * so that it can do its own setup. */
+	bus_write_4(sc->iomem, PTNET_IO_CTRL, PTNET_CTRL_IRQINIT);
+
 	return 0;
 err_path:
 	ptnet_irqs_fini(sc);
@@ -494,6 +498,10 @@
 	device_t dev = sc->dev;
 	int i;
 
+	/* Tell the hypervisor that we are going to deallocate the
+	 * MSI-X vectors, so that it can do its own cleanup. */
+	bus_write_4(sc->iomem, PTNET_IO_CTRL, PTNET_CTRL_IRQFINI);
+
 	for (i = 0; i < sc->num_rings; i++) {
 		struct ptnet_queue *pq = sc->queues + i;
 



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