netfront.c (221130) | netfront.c (222975) |
---|---|
1/*- 2 * Copyright (c) 2004-2006 Kip Macy 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004-2006 Kip Macy 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/xen/netfront/netfront.c 221130 2011-04-27 19:30:44Z bz $"); | 29__FBSDID("$FreeBSD: head/sys/dev/xen/netfront/netfront.c 222975 2011-06-11 04:59:01Z gibbs $"); |
30 31#include "opt_inet.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/sockio.h> 36#include <sys/mbuf.h> 37#include <sys/malloc.h> --- 607 unchanged lines hidden (view full) --- 645 } 646 } 647} 648#endif 649 650/** 651 * Callback received when the backend's state changes. 652 */ | 30 31#include "opt_inet.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/sockio.h> 36#include <sys/mbuf.h> 37#include <sys/malloc.h> --- 607 unchanged lines hidden (view full) --- 645 } 646 } 647} 648#endif 649 650/** 651 * Callback received when the backend's state changes. 652 */ |
653static int | 653static void |
654netfront_backend_changed(device_t dev, XenbusState newstate) 655{ 656 struct netfront_info *sc = device_get_softc(dev); 657 658 DPRINTK("newstate=%d\n", newstate); 659 660 switch (newstate) { 661 case XenbusStateInitialising: --- 13 unchanged lines hidden (view full) --- 675#ifdef INET 676 netfront_send_fake_arp(dev, sc); 677#endif 678 break; 679 case XenbusStateClosing: 680 xenbus_set_state(dev, XenbusStateClosed); 681 break; 682 } | 654netfront_backend_changed(device_t dev, XenbusState newstate) 655{ 656 struct netfront_info *sc = device_get_softc(dev); 657 658 DPRINTK("newstate=%d\n", newstate); 659 660 switch (newstate) { 661 case XenbusStateInitialising: --- 13 unchanged lines hidden (view full) --- 675#ifdef INET 676 netfront_send_fake_arp(dev, sc); 677#endif 678 break; 679 case XenbusStateClosing: 680 xenbus_set_state(dev, XenbusStateClosed); 681 break; 682 } |
683 return (0); | |
684} 685 686static void 687xn_free_rx_ring(struct netfront_info *sc) 688{ 689#if 0 690 int i; 691 --- 1503 unchanged lines hidden --- | 683} 684 685static void 686xn_free_rx_ring(struct netfront_info *sc) 687{ 688#if 0 689 int i; 690 --- 1503 unchanged lines hidden --- |