if_my.c (95673) | if_my.c (95803) |
---|---|
1/* 2 * Copyright (c) 2002 Myson Technology Inc. 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 * Written by: yen_cw@myson.com.tw available at: http://www.myson.com.tw/ 27 * | 1/* 2 * Copyright (c) 2002 Myson Technology Inc. 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 * Written by: yen_cw@myson.com.tw available at: http://www.myson.com.tw/ 27 * |
28 * $FreeBSD: head/sys/dev/my/if_my.c 95673 2002-04-28 20:34:20Z phk $ | 28 * $FreeBSD: head/sys/dev/my/if_my.c 95803 2002-04-30 15:50:09Z julian $ |
29 * 30 * Myson fast ethernet PCI NIC driver 31 */ 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/sockio.h> 35#include <sys/mbuf.h> 36#include <sys/malloc.h> --- 815 unchanged lines hidden (view full) --- 852 unit = device_get_unit(dev); 853 if (sc == NULL) { 854 printf("my%d: no memory for softc struct!\n", unit); 855 error = ENXIO; 856 goto fail; 857 858 } 859 bzero(sc, sizeof(struct my_softc)); | 29 * 30 * Myson fast ethernet PCI NIC driver 31 */ 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/sockio.h> 35#include <sys/mbuf.h> 36#include <sys/malloc.h> --- 815 unchanged lines hidden (view full) --- 852 unit = device_get_unit(dev); 853 if (sc == NULL) { 854 printf("my%d: no memory for softc struct!\n", unit); 855 error = ENXIO; 856 goto fail; 857 858 } 859 bzero(sc, sizeof(struct my_softc)); |
860 mtx_init(&sc->my_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); | 860 mtx_init(&sc->my_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 861 MTX_DEF | MTX_RECURSE); |
861 MY_LOCK(sc); 862 863 /* 864 * Map control/status registers. 865 */ 866#if 0 867 command = pci_read_config(dev, PCI_COMMAND_STATUS_REG, 4); 868 command |= (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); --- 1002 unchanged lines hidden --- | 862 MY_LOCK(sc); 863 864 /* 865 * Map control/status registers. 866 */ 867#if 0 868 command = pci_read_config(dev, PCI_COMMAND_STATUS_REG, 4); 869 command |= (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); --- 1002 unchanged lines hidden --- |