t4_vf.c (346876) | t4_vf.c (346883) |
---|---|
1/*- 2 * Copyright (c) 2016 Chelsio Communications, Inc. 3 * All rights reserved. 4 * Written by: John Baldwin <jhb@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2016 Chelsio Communications, Inc. 3 * All rights reserved. 4 * Written by: John Baldwin <jhb@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/11/sys/dev/cxgbe/t4_vf.c 346876 2019-04-29 04:42:18Z np $"); | 29__FBSDID("$FreeBSD: stable/11/sys/dev/cxgbe/t4_vf.c 346883 2019-04-29 05:35:52Z np $"); |
30 31#include "opt_inet.h" 32#include "opt_inet6.h" 33 34#include <sys/param.h> 35#include <sys/bus.h> 36#include <sys/conf.h> 37#include <sys/kernel.h> --- 594 unchanged lines hidden (view full) --- 632 633 /* No t4_link_start. */ 634 635 snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", 636 device_get_nameunit(dev), i); 637 mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); 638 sc->chan_map[pi->tx_chan] = i; 639 | 30 31#include "opt_inet.h" 32#include "opt_inet6.h" 33 34#include <sys/param.h> 35#include <sys/bus.h> 36#include <sys/conf.h> 37#include <sys/kernel.h> --- 594 unchanged lines hidden (view full) --- 632 633 /* No t4_link_start. */ 634 635 snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", 636 device_get_nameunit(dev), i); 637 mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); 638 sc->chan_map[pi->tx_chan] = i; 639 |
640 /* All VIs on this port share this media. */ 641 ifmedia_init(&pi->media, IFM_IMASK, cxgbe_media_change, 642 cxgbe_media_status); 643 |
|
640 pi->dev = device_add_child(dev, sc->names->vf_ifnet_name, -1); 641 if (pi->dev == NULL) { 642 device_printf(dev, 643 "failed to add device for port %d.\n", i); 644 rc = ENXIO; 645 goto done; 646 } 647 pi->vi[0].dev = pi->dev; --- 316 unchanged lines hidden --- | 644 pi->dev = device_add_child(dev, sc->names->vf_ifnet_name, -1); 645 if (pi->dev == NULL) { 646 device_printf(dev, 647 "failed to add device for port %d.\n", i); 648 rc = ENXIO; 649 goto done; 650 } 651 pi->vi[0].dev = pi->dev; --- 316 unchanged lines hidden --- |