if_sis.c (51031) | if_sis.c (51042) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/pci/if_sis.c 51031 1999-09-06 19:42:02Z wpaul $ | 32 * $FreeBSD: head/sys/pci/if_sis.c 51042 1999-09-06 23:29:50Z wpaul $ |
33 */ 34 35/* 36 * SiS 900/SiS 7016 fast ethernet PCI NIC driver. Datasheets are 37 * available from http://www.sis.com.tw. 38 * 39 * Written by Bill Paul <wpaul@ee.columbia.edu> 40 * Electrical Engineering Department --- 52 unchanged lines hidden (view full) --- 93#define SIS_USEIOSPACE 94 95#include <pci/if_sisreg.h> 96 97#include "miibus_if.h" 98 99#ifndef lint 100static const char rcsid[] = | 33 */ 34 35/* 36 * SiS 900/SiS 7016 fast ethernet PCI NIC driver. Datasheets are 37 * available from http://www.sis.com.tw. 38 * 39 * Written by Bill Paul <wpaul@ee.columbia.edu> 40 * Electrical Engineering Department --- 52 unchanged lines hidden (view full) --- 93#define SIS_USEIOSPACE 94 95#include <pci/if_sisreg.h> 96 97#include "miibus_if.h" 98 99#ifndef lint 100static const char rcsid[] = |
101 "$FreeBSD: head/sys/pci/if_sis.c 51031 1999-09-06 19:42:02Z wpaul $"; | 101 "$FreeBSD: head/sys/pci/if_sis.c 51042 1999-09-06 23:29:50Z wpaul $"; |
102#endif 103 104/* 105 * Various supported device vendors/types and their names. 106 */ 107static struct sis_type sis_devs[] = { 108 { SIS_VENDORID, SIS_DEVICEID_900, "SiS 900 10/100BaseTX" }, 109 { SIS_VENDORID, SIS_DEVICEID_7016, "SiS 7016 10/100BaseTX" }, --- 990 unchanged lines hidden (view full) --- 1100 * the fragment pointers. Stop when we run out 1101 * of fragments or hit the end of the mbuf chain. 1102 */ 1103 m = m_head; 1104 cur = frag = *txidx; 1105 1106 for (m = m_head; m != NULL; m = m->m_next) { 1107 if (m->m_len != 0) { | 102#endif 103 104/* 105 * Various supported device vendors/types and their names. 106 */ 107static struct sis_type sis_devs[] = { 108 { SIS_VENDORID, SIS_DEVICEID_900, "SiS 900 10/100BaseTX" }, 109 { SIS_VENDORID, SIS_DEVICEID_7016, "SiS 7016 10/100BaseTX" }, --- 990 unchanged lines hidden (view full) --- 1100 * the fragment pointers. Stop when we run out 1101 * of fragments or hit the end of the mbuf chain. 1102 */ 1103 m = m_head; 1104 cur = frag = *txidx; 1105 1106 for (m = m_head; m != NULL; m = m->m_next) { 1107 if (m->m_len != 0) { |
1108 if ((SIS_RX_LIST_CNT - | 1108 if ((SIS_TX_LIST_CNT - |
1109 (sc->sis_cdata.sis_tx_cnt + cnt)) < 2) 1110 return(ENOBUFS); 1111 f = &sc->sis_ldata->sis_tx_list[frag]; 1112 f->sis_ctl = SIS_CMDSTS_MORE | m->m_len; 1113 f->sis_ptr = vtophys(mtod(m, vm_offset_t)); 1114 if (cnt != 0) 1115 f->sis_ctl |= SIS_CMDSTS_OWN; 1116 cur = frag; --- 342 unchanged lines hidden --- | 1109 (sc->sis_cdata.sis_tx_cnt + cnt)) < 2) 1110 return(ENOBUFS); 1111 f = &sc->sis_ldata->sis_tx_list[frag]; 1112 f->sis_ctl = SIS_CMDSTS_MORE | m->m_len; 1113 f->sis_ptr = vtophys(mtod(m, vm_offset_t)); 1114 if (cnt != 0) 1115 f->sis_ctl |= SIS_CMDSTS_OWN; 1116 cur = frag; --- 342 unchanged lines hidden --- |