From owner-freebsd-xen@FreeBSD.ORG Mon Jan 17 10:21:50 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C68091065670 for ; Mon, 17 Jan 2011 10:21:50 +0000 (UTC) (envelope-from snabb@epipe.com) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8B6688FC08 for ; Mon, 17 Jan 2011 10:21:50 +0000 (UTC) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by tiktik.epipe.com (8.14.4/8.14.4) with ESMTP id p0HALnNj023793 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 17 Jan 2011 10:21:49 GMT (envelope-from snabb@epipe.com) X-DKIM: Sendmail DKIM Filter v2.8.3 tiktik.epipe.com p0HALnNj023793 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=epipe.com; s=default; t=1295259709; x=1295864509; bh=JpXW2hb97ls2PLwsdM9CowdRj4Ma2qVH88r6mxggyGA=; h=Date:From:To:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=ob4CrdDKMN2239H8hj5t7OZ7oKi2Gszfhxo5F7nBxdzTdNH+DdCHZJnf7ekrrocEm vF4uBf/uKswjY19lXF+kGuwNYL62DgX3raAH/WfqUY/ZW/cWna12yKfiA3PLhXkowV c4NxIoODPNzuH4bKlykKe1q6+KhlmiVUDF7virvA= Date: Mon, 17 Jan 2011 10:21:49 +0000 (UTC) From: Janne Snabb To: freebsd-xen@freebsd.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.6 (tiktik.epipe.com [IPv6:2001:1828:0:3::2]); Mon, 17 Jan 2011 10:21:49 +0000 (UTC) Subject: Re: xn0: Error 2 parsing device/vif/0/mac [PATCH] X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2011 10:21:50 -0000 On Sat, 15 Jan 2011, Janne Snabb wrote: > On Sat, 15 Jan 2011, Janne Snabb wrote: > > > It appears that that the netfront driver fails to get the vif mac > > address which leads to panic shortly afterwards. > > The patch at the bottom of this message solves the problem for me. This patch might be a bit neater. I found out about xenbus_get_otherend_path(). Best Regards, -- Janne Snabb / EPIPE Communications snabb@epipe.com - http://epipe.com/ --- sys/dev/xen/netfront/netfront.c.orig 2010-12-21 17:09:25.000000000 +0000 +++ sys/dev/xen/netfront/netfront.c 2011-01-17 10:11:06.000000000 +0000 @@ -401,13 +401,14 @@ xen_net_read_mac(device_t dev, uint8_t mac[]) { int error, i; char *s, *e, *macstr; - error = xs_read(XST_NIL, xenbus_get_node(dev), "mac", NULL, - (void **) &macstr); - if (error) + if ((error = xs_read(XST_NIL, xenbus_get_node(dev), "mac", NULL, + (void **) &macstr)) != 0 && + (error = xs_read(XST_NIL, xenbus_get_otherend_path(dev), + "mac", NULL, (void **) &macstr) != 0)) return (error); s = macstr; for (i = 0; i < ETHER_ADDR_LEN; i++) { mac[i] = strtoul(s, &e, 16);