Module Name: src
Committed By: snj
Date: Sun Mar 28 17:07:26 UTC 2010
Modified Files:
src/sys/arch/xen/xen [netbsd-5]: if_xennet.c
Log Message:
Apply patch (requested by bad in ticket #1347):
Make it possible to use netbsd-5 domUs running on a Xen2 hypervisor.
This changes two panics to printfs.
To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.60.2.1 src/sys/arch/xen/xen/if_xennet.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/arch/xen/xen/if_xennet.c
diff -u src/sys/arch/xen/xen/if_xennet.c:1.60 src/sys/arch/xen/xen/if_xennet.c:1.60.2.1
--- src/sys/arch/xen/xen/if_xennet.c:1.60 Mon Oct 27 10:58:22 2008
+++ src/sys/arch/xen/xen/if_xennet.c Sun Mar 28 17:07:26 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xennet.c,v 1.60 2008/10/27 10:58:22 cegger Exp $ */
+/* $NetBSD: if_xennet.c,v 1.60.2.1 2010/03/28 17:07:26 snj Exp $ */
/*
*
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet.c,v 1.60 2008/10/27 10:58:22 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet.c,v 1.60.2.1 2010/03/28 17:07:26 snj Exp $");
#include "opt_inet.h"
#include "opt_nfs_boot.h"
@@ -657,8 +657,10 @@
(void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
/* Check return status of HYPERVISOR_dom_mem_op(). */
- if ( rx_mcl[nr_pfns].args[5] != nr_pfns )
- panic("Unable to reduce memory reservation\n");
+ if ( rx_mcl[nr_pfns].args[5] != nr_pfns ) {
+ printf("xennet_rx_push_buffer: unable to reduce memory "
+ "reservation (%lu != %d)\n", rx_mcl[nr_pfns].args[5], nr_pfns);
+ }
/* Above is a suitable barrier to ensure backend will see requests. */
sc->sc_rx->req_prod = ringidx;
@@ -994,8 +996,10 @@
(void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
/* Check return status of HYPERVISOR_dom_mem_op(). */
- if (rx_mcl[nr_pfns].args[5] != nr_pfns)
- panic("Unable to reduce memory reservation\n");
+ if (rx_mcl[nr_pfns].args[5] != nr_pfns) {
+ printf("xennet_alloc_rx_buffers: unable to reduce memory "
+ "reservation (%lu != %d)\n", rx_mcl[nr_pfns].args[5], nr_pfns);
+ }
/* Above is a suitable barrier to ensure backend will see requests. */
sc->sc_rx->req_prod = ringidx;