if_my.c (95939) | if_my.c (97641) |
---|---|
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 95939 2002-05-02 15:58:04Z julian $ | 28 * $FreeBSD: head/sys/dev/my/if_my.c 97641 2002-05-30 23:41:51Z 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> --- 1109 unchanged lines hidden (view full) --- 1146 int i; 1147 1148 MY_LOCK(sc); 1149 cd = &sc->my_cdata; 1150 ld = sc->my_ldata; 1151 for (i = 0; i < MY_RX_LIST_CNT; i++) { 1152 cd->my_rx_chain[i].my_ptr = 1153 (struct my_desc *) & ld->my_rx_list[i]; | 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> --- 1109 unchanged lines hidden (view full) --- 1146 int i; 1147 1148 MY_LOCK(sc); 1149 cd = &sc->my_cdata; 1150 ld = sc->my_ldata; 1151 for (i = 0; i < MY_RX_LIST_CNT; i++) { 1152 cd->my_rx_chain[i].my_ptr = 1153 (struct my_desc *) & ld->my_rx_list[i]; |
1154 if (my_newbuf(sc, &cd->my_rx_chain[i]) == ENOBUFS) | 1154 if (my_newbuf(sc, &cd->my_rx_chain[i]) == ENOBUFS) { 1155 MY_UNLOCK(sc); |
1155 return (ENOBUFS); | 1156 return (ENOBUFS); |
1157 } |
|
1156 if (i == (MY_RX_LIST_CNT - 1)) { 1157 cd->my_rx_chain[i].my_nextdesc = &cd->my_rx_chain[0]; 1158 ld->my_rx_list[i].my_next = vtophys(&ld->my_rx_list[0]); 1159 } else { 1160 cd->my_rx_chain[i].my_nextdesc = 1161 &cd->my_rx_chain[i + 1]; 1162 ld->my_rx_list[i].my_next = 1163 vtophys(&ld->my_rx_list[i + 1]); --- 718 unchanged lines hidden --- | 1158 if (i == (MY_RX_LIST_CNT - 1)) { 1159 cd->my_rx_chain[i].my_nextdesc = &cd->my_rx_chain[0]; 1160 ld->my_rx_list[i].my_next = vtophys(&ld->my_rx_list[0]); 1161 } else { 1162 cd->my_rx_chain[i].my_nextdesc = 1163 &cd->my_rx_chain[i + 1]; 1164 ld->my_rx_list[i].my_next = 1165 vtophys(&ld->my_rx_list[i + 1]); --- 718 unchanged lines hidden --- |