Deleted Added
sdiff udiff text old ( 152315 ) new ( 164033 )
full compact
1/*-
2 * Copyright (c) 1997-2001 Granch, Ltd. All rights reserved.
3 * Author: Denis I.Timofeev <timofeev@granch.ru>
4 *
5 * Redistributon 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

--- 13 unchanged lines hidden (view full) ---

22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEIGENCE 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
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/dev/sbni/if_sbni.c 152315 2005-11-11 16:04:59Z ru $");
31
32/*
33 * Device driver for Granch SBNI12 leased line adapters
34 *
35 * Revision 2.0.0 1997/08/06
36 * Initial revision by Alexey Zverev
37 *
38 * Revision 2.0.1 1997/08/11

--- 23 unchanged lines hidden (view full) ---

62
63
64#include <sys/param.h>
65#include <sys/systm.h>
66#include <sys/socket.h>
67#include <sys/sockio.h>
68#include <sys/mbuf.h>
69#include <sys/kernel.h>
70#include <sys/proc.h>
71#include <sys/callout.h>
72#include <sys/syslog.h>
73#include <sys/random.h>
74
75#include <machine/bus.h>
76#include <sys/rman.h>
77#include <machine/resource.h>

--- 1027 unchanged lines hidden (view full) ---

1105 case SIOCGINSTATS:
1106 in_stats = (struct sbni_in_stats *)ifr->ifr_data;
1107 bcopy((void *)(&(sc->in_stats)), (void *)in_stats,
1108 sizeof(struct sbni_in_stats));
1109 break;
1110
1111 case SIOCSHWFLAGS: /* set flags */
1112 /* root only */
1113 error = suser(td);
1114 if (error)
1115 break;
1116 flags = *(struct sbni_flags*)&ifr->ifr_data;
1117 if (flags.fixed_rxl) {
1118 sc->delta_rxl = 0;
1119 sc->cur_rxl_index = flags.rxl;
1120 } else {
1121 sc->delta_rxl = DEF_RXL_DELTA;

--- 5 unchanged lines hidden (view full) ---

1127 bcopy((caddr_t) &flags,
1128 (caddr_t) IF_LLADDR(sc->ifp)+3, 3);
1129
1130 /* Don't be afraid... */
1131 sbni_outb(sc, CSR1, *(char*)(&sc->csr1) | PR_RES);
1132 break;
1133
1134 case SIOCRINSTATS:
1135 if (!(error = suser(td))) /* root only */
1136 bzero(&sc->in_stats, sizeof(struct sbni_in_stats));
1137 break;
1138
1139 default:
1140 error = ether_ioctl(ifp, command, data);
1141 break;
1142 }
1143

--- 166 unchanged lines hidden ---