aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1994-11-09 20:27:33 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1994-11-09 20:27:33 +0000
commite382a3a979c7d544140dcf27147123fe0f979838 (patch)
tree630c0fddba2191fffd35fd62241c49fc9dd46a37
parentd216e1f6de8c4ada202866bfe7ab788a4a139b9c (diff)
downloadsrc-e382a3a979c7d544140dcf27147123fe0f979838.tar.gz
src-e382a3a979c7d544140dcf27147123fe0f979838.zip
This commit was manufactured by cvs2svn to create branch 'ALPHA_2_0'.
Notes
Notes: svn path=/releng/ALPHA_2_0/; revision=4325
-rw-r--r--release/Makefile15
-rwxr-xr-xrelease/bininst102
-rw-r--r--share/FAQ/DISKSPACE.FAQ59
-rw-r--r--share/FAQ/RELNOTES.FreeBSD14
-rw-r--r--sys/i386/pci/if_de.c91
-rw-r--r--sys/pci/if_de.c91
6 files changed, 147 insertions, 225 deletions
diff --git a/release/Makefile b/release/Makefile
index 092ffdb5a7fd..bfeda1c083dc 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -1,11 +1,18 @@
-# $Id: Makefile,v 1.27 1994/11/08 13:54:21 jkh Exp $
+# $Id: Makefile,v 1.28 1994/11/08 18:36:45 jkh Exp $
#
+FLOPPY= fd0
+
+.if 1
FDLABEL= fd1200
+DDBS= 15k
+DDCOUNT= 80
+.else
+FDLABEL= fd1440
+DDBS= 18k
DDCOUNT= 80
+.endif
-FLOPPY= fd0
-DDBS= 15k
MNT= /mnt
CPIO1= cat chmod cp date dd df echo ed expr hostname kill ln ls mkdir
@@ -25,6 +32,8 @@ CLEANFILES+= boot_flp boot.flp cpio_flp_1
MTREE_DIR= ${.CURDIR}/../etc/mtree
+ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 -
+
hierarchy:
mtree -deU -f ${MTREE_DIR}/BSD.root.dist -p ${DESTDIR}/
mtree -deU -f ${MTREE_DIR}/BSD.var.dist -p ${DESTDIR}/var
diff --git a/release/bininst b/release/bininst
index cb31e5396797..acc70fafd855 100755
--- a/release/bininst
+++ b/release/bininst
@@ -5,14 +5,15 @@
# is actually something of a misnomer, since this utility will install
# more than just the bindist set.
#
-# November 11th, 1994
+# Written: November 11th, 1994
# Copyright (C) 1994 by Jordan K. Hubbard
#
# Permission to copy or use this software for any purpose is granted
-# provided that this message stay intact, and at this location (no putting
+# provided that this message stay intact, and at this location (e.g. no putting
# your name on top after doing something trivial like reindenting it, just
# to make it look like you wrote it!).
#
+# $Id: bininst,v 1.21 1994/11/09 02:49:04 jkh Exp $
# Some useful constants.
PATH=/usr/bin:/usr/sbin:/bin:/sbin:/stand
@@ -41,6 +42,8 @@ set_defaults() {
ftp_path="ftp://ftp.freebsd.org/pub/FreeBSD/2.0-ALPHA/bindist" ;
nfs_path="" ;
cdrom_path="" ;
+ serial_interface="/dev/tty00" ;
+ serial_speed="38400" ;
installing=1 ;
mkdir -p ${TMP}
cp /stand/etc/* /etc
@@ -90,14 +93,16 @@ welcome() {
dialog --title "Welcome to FreeBSD" --clear \
--msgbox " We're now ready to install one or more packed distribution
sets onto your machine. At the minimum, you need a bindist
-installation though a secrdist is also useful if you want your
+distribution, though a secrdist is also useful if you want your
system to use the same DES and/or Kerberos security model used
by other commercial systems (the FreeBSD model is md5 based,
and not bad in and of itself though). The secrdist is also a
bit of a special case since it cannot be legally obtained from
the U.S. due to export restrictions, but non-U.S. versions are
also available. See the release notes for more information on
-obtaining a secrdist for your part of the world." 15 72
+obtaining a secrdist for your part of the world. If you're
+interested in doing FreeBSD development, a srcdist is also
+highly recommended!" 18 72
if ! handle_rval $?; then return 1; fi
}
@@ -106,18 +111,18 @@ obtaining a secrdist for your part of the world." 15 72
choose_media() {
while [ "$media_device" = "" ]; do
- dialog --clear --title "Chose installation media" \
---menu "Before we begin the installation, we need to chose and possibly \n\
-configure your method of installation. Please pick from one of \n\
-the following options. If your option isn't listed here, your \n\
-best bet may be to simply hit ESC twice to get a subshell and \n\
-proceed manually on your own. If you are finished installing, \n\
-select cancel.\n\n\
+ dialog --clear --title "Installation From" \
+--menu "Before installing a distribution, you need to chose \n\
+and/or configure your method of installation. Please pick from \n\
+one of the following options. If none of the listed options works \n\
+for you then your best bet may be to simply hit ESC twice to get \n\
+a subshell and proceed manually on your own. If you are already \n\
+finished with installation, select cancel to go on.\n\n\
Please choose one of the following:" 20 72 5 \
- "Tape" "Load installation from SCSI or QIC tape" \
- "CDROM" "Load installation from SCSI or Mitsumi CDROM" \
+ "Tape" "Load distribution from SCSI or QIC tape" \
+ "CDROM" "Load distribution from SCSI or Mitsumi CDROM" \
"DOS" "Load from DOS floppies or a DOS hard disk partition" \
- "FTP" "Load the distribution over ftp" \
+ "FTP" "Load distribution using FTP" \
"NFS" "Load the distribution over NFS" 2> ${TMP}/menu.tmp.$$
retval=$?
@@ -127,7 +132,7 @@ select cancel.\n\n\
case $choice in
Tape)
- dialog --clear --title "Chose tape type" \
+ dialog --clear --title "Chose Tape Type" \
--menu "Which type of tape drive do you have attached to your \n\
system? FreeBSD supports the following types:\n\n\
Choose one of the following:" 20 72 2 \
@@ -149,7 +154,7 @@ system? FreeBSD supports the following types:\n\n\
esac
;;
CDROM)
- dialog --clear --title "Chose CDROM type" \
+ dialog --clear --title "Chose CDROM Type" \
--menu "Which type of CDROM drive do you have attached to your \n\
system? FreeBSD supports the following types:\n\n\
Choose one of the following:" 15 72 2 \
@@ -178,11 +183,10 @@ system? FreeBSD supports the following types:\n\n\
dialog --title "FTP Installation Information" --clear \
--inputbox "Please specify the machine and directory location of the
distribution you wish to load. This should be either a \"URL style\"
-specification (e.g. something like ftp://ftp.freeBSD.org/pub/...) or
-simply the name of a host to connect to. If only a host name is
-specified, the installation assumes that you will properly connect
-and \"mget\" the files yourself.\n\n" \
-16 72 "$ftp_path" 2> ${TMP}/inputbox.tmp.$$
+specification (e.g. ftp://ftp.freeBSD.org/pub/FreeBSD/...) or simply
+the name of a host to connect to. If only a host name is specified,
+the installation assumes that you will properly connect and \"mget\"
+the files yourself.\n\n" \ 16 72 "$ftp_path" 2> ${TMP}/inputbox.tmp.$$
if ! handle_rval $?; then continue; fi
media_type=ftp
media_device=`cat ${TMP}/inputbox.tmp.$$`
@@ -193,10 +197,10 @@ and \"mget\" the files yourself.\n\n" \
if ! setup_network; then continue; fi
dialog --title "NFS Installation Information" --clear \
--inputbox "Please specify the machine and directory location of the
-distribution you wish to load. This should be in machine:dir
-syntax (e.g. zooey:/a/FreeBSD/bindist). The remote directory
-should also, of course, be exported!\n\n" \
-16 72 "$nfs_path" 2> ${TMP}/inputbox.tmp.$$
+distribution you wish to load. This must be in machine:dir
+format (e.g. zooey:/a/FreeBSD/bindist). The remote directory
+must be be exported to your machine (or globally) for this to
+work!\n\n" \ 14 72 "$nfs_path" 2> ${TMP}/inputbox.tmp.$$
if ! handle_rval $?; then continue; fi
media_type=nfs
nfs_path=`cat ${TMP}/inputbox.tmp.$$`
@@ -204,6 +208,7 @@ should also, of course, be exported!\n\n" \
error "Unable to mount $nfs_path"
else
media_device=$nfs_path
+ message "$nfs_path mounted successfully"
fi
;;
esac
@@ -219,8 +224,10 @@ free space to hold the temporary files for this distribution.
At minimum, a binary distribution will require around 21MB of
temporary space. At maximum, a srcdist may take 40MB or more.
If the directory you specify does not exist, it will be created
-for you.\n\n" \
-16 72 "/usr/tmp" 2> ${TMP}/inputbox.tmp.$$
+for you. If you do not have enough free space to hold both the
+packed and unpacked distribution files, consider using the NFS
+or CDROM installation methods as they require no temporary
+storage.\n\n" \ 18 72 "/usr/tmp" 2> ${TMP}/inputbox.tmp.$$
if ! handle_rval $?; then return 1; fi
tmp_dir=`cat ${TMP}/inputbox.tmp.$$`
rm -f ${TMP}/inputbox.tmp.$$
@@ -247,7 +254,7 @@ rm_tmpdir()
setup_network_ether()
{
dialog --clear --title "Ethernet Interface Name" \
- --menu "Please select the type of ethernet device you have:\n\n" \
+ --menu "Please select the type of ethernet interface you have:\n\n" \
20 76 6 \
"ed0" "WD80x3, SMC, Novell NE[21]000 or 3C503 generic NIC at 0x280/5" \
"ed1" "Same as above, but at address 0x300 and IRQ 5" \
@@ -265,18 +272,24 @@ setup_network_ether()
setup_network_slip()
{
- not_supported
-}
+ default_value=""
+ if ! network_dialog "What is the IP number for the remote host"; then return 1; fi
+ remote_hostip=$answer
+ interface=sl0
-setup_network_ppp()
-{
- not_supported
+ default_value=$serial_interface
+ if ! network_dialog "What is the name of the serial interface"; then return 1; fi
+ serial_interface=$answer
+
+ default_value=$serial_speed
+ if ! network_dialog "What speed is the serial interface"; then return 1; fi
+ serial_speed=$answer
}
setup_network_plip()
{
default_value=""
- if ! network_dialog "What is the ip number for the remote host"; then return 1; fi
+ if ! network_dialog "What is the IP number for the remote host"; then return 1; fi
remote_hostip=$answer
interface=lp0
}
@@ -296,10 +309,9 @@ setup_network()
while [ "$interface" = "" ]; do
dialog --clear --title "Set up network interface" \
--menu "Please select the type of network connection you have:\n\n" \
- 20 72 4 \
+ 20 72 3 \
"ether" "A supported ethernet card" \
"SLIP" "A point-to-point SLIP (Serial Line IP) connection" \
- "PPP" "A point-to-point protocol link" \
"PLIP" "A Parallel-Line IP setup (sort of like lap-link)" \
2> ${TMP}/menu.tmp.$$
@@ -316,10 +328,6 @@ setup_network()
if ! setup_network_slip; then continue; fi
;;
- PPP)
- if ! setup_network_ppp; then continue; fi
- ;;
-
PLIP)
if ! setup_network_plip; then continue; fi
;;
@@ -361,6 +369,9 @@ setup_network()
ipaddr=""; interface=""
continue
fi
+ if [ "$interface" = "sl0" ]; then
+ slattach -a -s $serial_speed $serial_interface
+ fi
rm -f ${TMP}/inputbox.tmp.$$
echo "$ipaddr $remote_hostip netmask $netmask $ifconfig_flags" > /etc/hostname.$interface
default_value=""
@@ -385,7 +396,7 @@ setup_network()
extract_dist()
{
if [ -f extract.sh ]; then
- message "Extracting distribution"
+ message "Extracting distribution.. Please wait!"
sh ./extract.sh > /dev/ttyv1 2>&1
else
error "Improper distribution. No installation script found."
@@ -448,6 +459,7 @@ install_set()
;;
nfs)
+ message "Extracting from NFS directory"
cd /mnt
extract_dist
cd /
@@ -465,8 +477,12 @@ time, there's nothing fancy here, but for the release we plan to
ask some additional questions about time zone setup, what sort of
mail client this host is, etc. We just ran out of time for ALPHA!
At the very least, you may wish to check out the 'tzsetup' command;
-it will at least handle the first checklist item for you. Thanks!
-\nAny install-related comments to jkh, phk or paul (@freebsd.org)." 15 72
+it will at least handle the first checklist item for you. \n
+The login name \"root\" has no password. If you're new to UN*X, log
+in as root when prompted for a user name and run vipw to add a new
+user for yourself.
+
+Any install-related comments to jkh, phk or paul (@freebsd.org)." 18 72
}
welcome
diff --git a/share/FAQ/DISKSPACE.FAQ b/share/FAQ/DISKSPACE.FAQ
index c6455e916d30..fb18dc9bb200 100644
--- a/share/FAQ/DISKSPACE.FAQ
+++ b/share/FAQ/DISKSPACE.FAQ
@@ -44,26 +44,27 @@ It was later realized, with the hindsight that IBM is famous for, that disks
could be bigger than the 32Mb that the early DOS FAT-12 file system could
handle, so they added a kludge: They had two MSDOS slices, a "Primary" and
a "Secondary". The primary could still only be 32Mb, but the Secondary had
-no size limit. And the trick was that the secondary had ANOTHER "table entry"
-so that now suddenly up to 5 slices could be available to MS-DOS. The
-Secondary boot record was later made recursive, thus effectively avoiding
-any fixed limit. Of course, they were still stuck with a maximum of 26 slices
-given the use of "drive letters" in DOS. They also reserved only 10 bits
-for cylinder addressing, limiting DOS to being able to address a maximum
-of 1024 cylinders (and cause of the dreaded "cylinder translation" kludges,
-the misconfiguration of which many users have seen as the notorious "Missing
-Operating System" message). Yes, truly DOS was and is an utterly terrible
-operating system, which of course explains its amazing degree of success.
-Anyway, this all brings us up to today, which is where FreeBSD comes in:
+no size limit. And the trick was that the secondary had ANOTHER "table
+entry" so that now suddenly up to 5 slices could be available to MS-DOS.
+The Secondary boot record was later made recursive, thus effectively
+avoiding any fixed limit. Of course, they were still stuck with a maximum
+of 26 slices given the use of "drive letters" in DOS. They also reserved
+only 10 bits for cylinder addressing, limiting DOS to being able to address
+a maximum of 1024 cylinders (and cause of the dreaded "cylinder translation"
+kludges, the misconfiguration of which many users have seen as the notorious
+"Missing Operating System" message). Yes, truly DOS was and is an utterly
+terrible operating system, which of course explains its amazing degree of
+success. Anyway, this all brings us up to today, which is where FreeBSD
+comes in:
1.2 What FreeBSD does
----------------------
FreeBSD has, like any other UNIX-like operating system, the concept of
-"partitions." Partitions are used to implement its own "slicing" abstraction,
-and although there is no real difference between a slice and a partition as
-such, we use the two words to distinguish between these two different levels
-of slicing.
+"partitions." Partitions are used to implement its own "slicing"
+abstraction, and although there is no real difference between a slice and a
+partition as such, we use the two words to distinguish between these two
+different levels of slicing.
The result is that we have a two-tier structure on the disk:
@@ -155,9 +156,9 @@ operating system entries!
Even if you don't plan to have MSDOS on a disk, make an MSDOS slice
using the MSDOS's FDISK.COM program. The reason for this is that if you
do it that way, you are 100% sure that FreeBSD will use the same number
-of heads, sectors and cylinders as MSDOS would use. If you really don't plan
-to have MSDOS on the disk, just (D)elete the slice in the FreeBSD's (F)disk
-editor.
+of heads, sectors and cylinders as MSDOS would use. If you really don't
+plan to have MSDOS on the disk, just (D)elete the slice in the FreeBSD's
+(F)disk editor.
From the main screen press 'F' to enter the MBR editor. You have five
commands available:
@@ -168,14 +169,14 @@ commands available:
(E)dit -- Allows you to edit a slice. It will ask how many megabytes
you want to assign to the slice, and will suggest the maximum possible
- as a default. It might say zero, even though there is disk space available,
- in which case you will probably need to delete and recreate the other
- partitions to get it to see where the free space is.
+ as a default. It might say zero, even though there is disk space
+ available, in which case you will probably need to delete and recreate the
+ other partitions to get it to see where the free space is.
It will then ask you what type to give the slice, for which the default is
- 0xa5 (a FreeBSD slice). You can enter any other number here too, which can
- be useful as a placeholder for some other OS you plan to install later.
- Finally, it will ask you about the "boot flag". 0x80 means "boot from this"
- slice by default, and anything else means "don't".
+ 0xa5 (a FreeBSD slice). You can enter any other number here too, which
+ can be useful as a placeholder for some other OS you plan to install
+ later. Finally, it will ask you about the "boot flag". 0x80 means "boot
+ from this" slice by default, and anything else means "don't".
If you specified a FreeBSD slice, any existing slices with the 0xa5
type will be reset to 0x00 "unused". FreeBSD only supports one slice
@@ -240,9 +241,9 @@ applicatins, here are some good rules of thumb to follow:
3. /usr can take up the rest of your disk, though some people like to create
extra partitions for user home directories and the like. Be sure to make
- your /usr big enough to contain the system software (about 50MB) and perhaps
- some of your own, unless you're going to use symbolic links to point things
- like /usr/local (or /usr/src) somewhere else.
+ your /usr big enough to contain the system software (about 50MB) and
+ perhaps some of your own, unless you're going to use symbolic links to
+ point things like /usr/local (or /usr/src) somewhere else.
Here are some suggested filesystem names and sizes, just for reference:
@@ -259,4 +260,4 @@ Mountpoint Filesystem size
/usr/X11R6 50Mb If you load the entire XFree86 binary kit.
-$Id: DISKSPACE.FAQ,v 1.2 1994/11/05 06:54:49 jkh Exp $
+$Id: DISKSPACE.FAQ,v 1.3 1994/11/07 10:35:54 jkh Exp $
diff --git a/share/FAQ/RELNOTES.FreeBSD b/share/FAQ/RELNOTES.FreeBSD
index 7c33cacf92be..f35e73c7c196 100644
--- a/share/FAQ/RELNOTES.FreeBSD
+++ b/share/FAQ/RELNOTES.FreeBSD
@@ -41,9 +41,9 @@ The core of FreeBSD does not contain DES code which would inhibit its
being exported outside the United States. There is an add-on package
to the core distribution, for use only in the United States, that
contains the programs that normally use DES. The auxilliary packages
-provided separately can be used by anyone. A freely (from outside the U.S.)
-exportable European distribution of DES for our non U.S. users also exists
-and is described in the FreeBSD FAQ.
+provided separately can be used by anyone. A freely (from outside the
+U.S.) exportable European distribution of DES for our non U.S. users also
+exists and is described in the FreeBSD FAQ.
1.1 What's new in 2.0?
----------------------
@@ -118,8 +118,9 @@ Sources involved: sys/*fs, lkm/*fs, usr.bin/lsvfs, lib/libc/gen
S/Key
-----
-Since version 1.1.5, FreeBSD has supported the S/Key one time password scheme.
-The version used is derived from the logdaemon package of Wietse Venema.
+Since version 1.1.5, FreeBSD has supported the S/Key one time password
+scheme. The version used is derived from the logdaemon package of Wietse
+Venema.
Some of the features new in 2.0 are:
- New access control table format to impose the use of S/Keys
based on: hostname, ip address, port, username, group id.
@@ -458,6 +459,7 @@ The FreeBSD "core" team:
Gary Palmer
Geoff Rehmet
Paul Richards
+ Soren Schmidt
Andreas Schulz
Jack Vogel
Garrett A. Wollman
@@ -493,4 +495,4 @@ hope you enjoy this release of FreeBSD!
The FreeBSD Core Team
-$Id: RELNOTES.FreeBSD,v 1.2 1994/11/07 10:35:55 jkh Exp $
+$Id: RELNOTES.FreeBSD,v 1.4 1994/11/08 20:17:45 jkh Exp $
diff --git a/sys/i386/pci/if_de.c b/sys/i386/pci/if_de.c
index 8f088ac76270..447225b98460 100644
--- a/sys/i386/pci/if_de.c
+++ b/sys/i386/pci/if_de.c
@@ -21,9 +21,13 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.6 1994/10/11 18:20:10 thomas Exp $
+ * $Id: if_de.c,v 1.3 1994/10/12 11:19:35 se Exp $
*
* $Log: if_de.c,v $
+ * Revision 1.3 1994/10/12 11:19:35 se
+ * Submitted by: Matt Thomas <thomas@lkg.dec.com>
+ * Preliminary FAST Ethernet support added (DEC21140).
+ *
* Revision 1.6 1994/10/11 18:20:10 thomas
* new pci interface
* new 100mb/s prelim support
@@ -176,7 +180,6 @@ typedef struct {
struct arpcom tulip_ac;
tulip_regfile_t tulip_csrs;
vm_offset_t tulip_rxspace;
- unsigned tulip_high_intrspins;
unsigned tulip_flags;
#define TULIP_WANTSETUP 0x01
#define TULIP_WANTHASH 0x02
@@ -207,7 +210,6 @@ const char *tulip_chipdescs[] = {
tulip_softc_t *tulips[NDE];
tulip_chipid_t tulip_chipids[NDE];
-unsigned tulip_intrs[NDE];
#define tulip_if tulip_ac.ac_if
#define tulip_unit tulip_ac.ac_if.if_unit
@@ -350,16 +352,6 @@ tulip_init(
}
}
-static struct {
- unsigned notwhole;
- unsigned rxerror;
- unsigned nombufs[2];
- unsigned rcvs;
-#if TULIP_CHECK_RXCRC
- unsigned badcrc;
-#endif
- unsigned badsop;
-} tulip_rx;
#if TULIP_CHECK_RXCRC
static unsigned
@@ -400,8 +392,9 @@ tulip_rx_intr(
tulip_softc_t *sc)
{
tulip_ringinfo_t *ri = &sc->tulip_rxinfo;
+ struct ifnet *ifp = &sc->tulip_if;
- for (;; tulip_rx.rcvs++) {
+ for (;;) {
tulip_desc_t *eop;
int total_len, ndescs;
caddr_t bufaddr = (caddr_t) sc->tulip_rxspace;
@@ -410,9 +403,6 @@ tulip_rx_intr(
if (((volatile tulip_desc_t *) eop)->d_status & TULIP_DSTS_OWNER)
return;
- if ((eop->d_status & TULIP_DSTS_RxFIRSTDESC) && eop != ri->ri_nextin) {
- tulip_rx.badsop++;
- }
if (eop->d_status & TULIP_DSTS_RxLASTDESC)
break;
if (++eop == ri->ri_last)
@@ -429,8 +419,7 @@ tulip_rx_intr(
#if TULIP_CHECK_RXCRC
unsigned crc = tulip_crc32(bufaddr, total_len);
if (~crc != *((unsigned *) &bufaddr[total_len])) {
- printf("de0: %d: bad rx crc: %08x [rx] != %08x\n",
- tulip_rx.rcvs,
+ printf("de0: bad rx crc: %08x [rx] != %08x\n",
*((unsigned *) &bufaddr[total_len]), ~crc);
goto next;
}
@@ -452,29 +441,27 @@ tulip_rx_intr(
#endif
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m != NULL) {
+ m->m_pkthdr.rcvif = ifp;
total_len -= sizeof(eh);
if (total_len > MHLEN) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
- tulip_rx.nombufs[1]++;
- sc->tulip_if.if_ierrors++;
+ ifp->if_ierrors++;
goto next;
}
}
bcopy(bufaddr + sizeof(eh), mtod(m, caddr_t), total_len);
m->m_len = m->m_pkthdr.len = total_len;
- ether_input(&sc->tulip_if, &eh, m);
+ ether_input(ifp, &eh, m);
} else {
- tulip_rx.nombufs[0]++;
- sc->tulip_if.if_ierrors++;
+ ifp->if_ierrors++;
}
} else {
- tulip_rx.rxerror++;
- sc->tulip_if.if_ierrors++;
+ ifp->if_ierrors++;
}
next:
- sc->tulip_if.if_ipackets++;
+ ifp->if_ipackets++;
while (ndescs-- > 0) {
ri->ri_nextin->d_status |= TULIP_DSTS_OWNER;
if (++ri->ri_nextin == ri->ri_last)
@@ -649,10 +636,10 @@ tulip_start(
}
#endif
}
- if (ri->ri_free - 2 <= (segcnt + 1) / 2)
+ if (ri->ri_free - 2 <= (segcnt + 1) >> 1)
break;
- ri->ri_free -= (segcnt + 1) / 2;
+ ri->ri_free -= (segcnt + 1) >> 1;
/*
* Now we fill in our transmit descriptors. This is
* a bit reminiscent of going on the Ark two by two
@@ -702,13 +689,9 @@ tulip_intr(
tulip_softc_t *sc)
{
tulip_uint32_t csr;
- unsigned spins = 0;
-
- tulip_intrs[sc->tulip_unit]++;
while ((csr = *sc->tulip_csrs.csr_status) & (TULIP_STS_NORMALINTR|TULIP_STS_ABNRMLINTR)) {
*sc->tulip_csrs.csr_status = csr & sc->tulip_intrmask;
- spins++;
if (csr & TULIP_STS_SYSERROR) {
if ((csr & TULIP_STS_ERRORMASK) == TULIP_STS_ERR_PARITY) {
@@ -729,8 +712,6 @@ tulip_intr(
*sc->tulip_csrs.csr_command = sc->tulip_cmdmode;
}
}
- if (spins > sc->tulip_high_intrspins)
- sc->tulip_high_intrspins = spins;
return 1;
}
@@ -785,7 +766,6 @@ tulip_read_macaddr(
return 0;
}
-#ifdef MULTICAST
static unsigned
tulip_mchash(
unsigned char *mca)
@@ -803,24 +783,20 @@ tulip_mchash(
#endif
return crc & 0x1FF;
}
-#endif MULTICAST
static void
tulip_addr_filter(
tulip_softc_t *sc)
{
tulip_uint32_t *sp = sc->tulip_setupdata;
-#ifdef MULTICAST
struct ether_multistep step;
struct ether_multi *enm;
-#endif
int i;
sc->tulip_flags &= ~TULIP_WANTHASH;
sc->tulip_flags |= TULIP_WANTSETUP;
sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN;
sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED;
-#ifdef MULTICAST
if (sc->tulip_ac.ac_multicnt > 14) {
unsigned hash;
/*
@@ -843,12 +819,10 @@ tulip_addr_filter(
sp[41] = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
sp[42] = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
} else {
-#endif
/*
* Else can get perfect filtering for 16 addresses.
*/
i = 0;
-#ifdef MULTICAST
ETHER_FIRST_MULTI(step, &sc->tulip_ac, enm);
for (; enm != NULL; i++) {
*sp++ = ((u_short *) enm->enm_addrlo)[0];
@@ -856,7 +830,6 @@ tulip_addr_filter(
*sp++ = ((u_short *) enm->enm_addrlo)[2];
ETHER_NEXT_MULTI(step, enm);
}
-#endif
/*
* If an IP address is enabled, turn on broadcast
*/
@@ -874,9 +847,7 @@ tulip_addr_filter(
*sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
*sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
}
-#ifdef MULTICAST
}
-#endif
}
static int
@@ -949,7 +920,6 @@ tulip_ioctl(
break;
}
-#ifdef MULTICAST
case SIOCADDMULTI:
case SIOCDELMULTI: {
/*
@@ -967,7 +937,6 @@ tulip_ioctl(
}
break;
}
-#endif /* MULTICAST */
default: {
error = EINVAL;
@@ -987,10 +956,7 @@ tulip_attach(
struct ifaddr *ifa = ifp->if_addrlist;
int cnt;
- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
-#ifdef MULTICAST
- ifp->if_flags |= IFF_MULTICAST;
-#endif /* MULTICAST */
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
*sc->tulip_csrs.csr_sia_connectivity = 0;
*sc->tulip_csrs.csr_sia_connectivity = TULIP_SIACONN_10BASET;
@@ -1011,10 +977,6 @@ tulip_attach(
ifp->if_output = ether_output;
ifp->if_reset = tulip_reset;
ifp->if_start = tulip_start;
- ifp->if_mtu = ETHERMTU;
- ifp->if_type = IFT_ETHER;
- ifp->if_addrlen = 6;
- ifp->if_hdrlen = 14;
printf("%s%d: %s pass %d.%d ethernet address %s\n",
sc->tulip_name, sc->tulip_unit,
@@ -1023,26 +985,11 @@ tulip_attach(
sc->tulip_revinfo & 0x0F,
ether_sprintf(sc->tulip_hwaddr));
+ if_attach(ifp);
+
#if NBPFILTER > 0
bpfattach(&sc->tulip_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
-
- if_attach(ifp);
-
- while (ifa && ifa->ifa_addr && ifa->ifa_addr->sa_family != AF_LINK)
- ifa = ifa->ifa_next;
-
- if (ifa != NULL && ifa->ifa_addr != NULL) {
- struct sockaddr_dl *sdl;
- /*
- * Provide our ether address to the higher layers
- */
- sdl = (struct sockaddr_dl *) ifa->ifa_addr;
- sdl->sdl_type = IFT_ETHER;
- sdl->sdl_alen = 6;
- sdl->sdl_slen = 0;
- bcopy(sc->tulip_ac.ac_enaddr, LLADDR(sdl), 6);
- }
}
static void
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index 8f088ac76270..447225b98460 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -21,9 +21,13 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.6 1994/10/11 18:20:10 thomas Exp $
+ * $Id: if_de.c,v 1.3 1994/10/12 11:19:35 se Exp $
*
* $Log: if_de.c,v $
+ * Revision 1.3 1994/10/12 11:19:35 se
+ * Submitted by: Matt Thomas <thomas@lkg.dec.com>
+ * Preliminary FAST Ethernet support added (DEC21140).
+ *
* Revision 1.6 1994/10/11 18:20:10 thomas
* new pci interface
* new 100mb/s prelim support
@@ -176,7 +180,6 @@ typedef struct {
struct arpcom tulip_ac;
tulip_regfile_t tulip_csrs;
vm_offset_t tulip_rxspace;
- unsigned tulip_high_intrspins;
unsigned tulip_flags;
#define TULIP_WANTSETUP 0x01
#define TULIP_WANTHASH 0x02
@@ -207,7 +210,6 @@ const char *tulip_chipdescs[] = {
tulip_softc_t *tulips[NDE];
tulip_chipid_t tulip_chipids[NDE];
-unsigned tulip_intrs[NDE];
#define tulip_if tulip_ac.ac_if
#define tulip_unit tulip_ac.ac_if.if_unit
@@ -350,16 +352,6 @@ tulip_init(
}
}
-static struct {
- unsigned notwhole;
- unsigned rxerror;
- unsigned nombufs[2];
- unsigned rcvs;
-#if TULIP_CHECK_RXCRC
- unsigned badcrc;
-#endif
- unsigned badsop;
-} tulip_rx;
#if TULIP_CHECK_RXCRC
static unsigned
@@ -400,8 +392,9 @@ tulip_rx_intr(
tulip_softc_t *sc)
{
tulip_ringinfo_t *ri = &sc->tulip_rxinfo;
+ struct ifnet *ifp = &sc->tulip_if;
- for (;; tulip_rx.rcvs++) {
+ for (;;) {
tulip_desc_t *eop;
int total_len, ndescs;
caddr_t bufaddr = (caddr_t) sc->tulip_rxspace;
@@ -410,9 +403,6 @@ tulip_rx_intr(
if (((volatile tulip_desc_t *) eop)->d_status & TULIP_DSTS_OWNER)
return;
- if ((eop->d_status & TULIP_DSTS_RxFIRSTDESC) && eop != ri->ri_nextin) {
- tulip_rx.badsop++;
- }
if (eop->d_status & TULIP_DSTS_RxLASTDESC)
break;
if (++eop == ri->ri_last)
@@ -429,8 +419,7 @@ tulip_rx_intr(
#if TULIP_CHECK_RXCRC
unsigned crc = tulip_crc32(bufaddr, total_len);
if (~crc != *((unsigned *) &bufaddr[total_len])) {
- printf("de0: %d: bad rx crc: %08x [rx] != %08x\n",
- tulip_rx.rcvs,
+ printf("de0: bad rx crc: %08x [rx] != %08x\n",
*((unsigned *) &bufaddr[total_len]), ~crc);
goto next;
}
@@ -452,29 +441,27 @@ tulip_rx_intr(
#endif
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m != NULL) {
+ m->m_pkthdr.rcvif = ifp;
total_len -= sizeof(eh);
if (total_len > MHLEN) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
- tulip_rx.nombufs[1]++;
- sc->tulip_if.if_ierrors++;
+ ifp->if_ierrors++;
goto next;
}
}
bcopy(bufaddr + sizeof(eh), mtod(m, caddr_t), total_len);
m->m_len = m->m_pkthdr.len = total_len;
- ether_input(&sc->tulip_if, &eh, m);
+ ether_input(ifp, &eh, m);
} else {
- tulip_rx.nombufs[0]++;
- sc->tulip_if.if_ierrors++;
+ ifp->if_ierrors++;
}
} else {
- tulip_rx.rxerror++;
- sc->tulip_if.if_ierrors++;
+ ifp->if_ierrors++;
}
next:
- sc->tulip_if.if_ipackets++;
+ ifp->if_ipackets++;
while (ndescs-- > 0) {
ri->ri_nextin->d_status |= TULIP_DSTS_OWNER;
if (++ri->ri_nextin == ri->ri_last)
@@ -649,10 +636,10 @@ tulip_start(
}
#endif
}
- if (ri->ri_free - 2 <= (segcnt + 1) / 2)
+ if (ri->ri_free - 2 <= (segcnt + 1) >> 1)
break;
- ri->ri_free -= (segcnt + 1) / 2;
+ ri->ri_free -= (segcnt + 1) >> 1;
/*
* Now we fill in our transmit descriptors. This is
* a bit reminiscent of going on the Ark two by two
@@ -702,13 +689,9 @@ tulip_intr(
tulip_softc_t *sc)
{
tulip_uint32_t csr;
- unsigned spins = 0;
-
- tulip_intrs[sc->tulip_unit]++;
while ((csr = *sc->tulip_csrs.csr_status) & (TULIP_STS_NORMALINTR|TULIP_STS_ABNRMLINTR)) {
*sc->tulip_csrs.csr_status = csr & sc->tulip_intrmask;
- spins++;
if (csr & TULIP_STS_SYSERROR) {
if ((csr & TULIP_STS_ERRORMASK) == TULIP_STS_ERR_PARITY) {
@@ -729,8 +712,6 @@ tulip_intr(
*sc->tulip_csrs.csr_command = sc->tulip_cmdmode;
}
}
- if (spins > sc->tulip_high_intrspins)
- sc->tulip_high_intrspins = spins;
return 1;
}
@@ -785,7 +766,6 @@ tulip_read_macaddr(
return 0;
}
-#ifdef MULTICAST
static unsigned
tulip_mchash(
unsigned char *mca)
@@ -803,24 +783,20 @@ tulip_mchash(
#endif
return crc & 0x1FF;
}
-#endif MULTICAST
static void
tulip_addr_filter(
tulip_softc_t *sc)
{
tulip_uint32_t *sp = sc->tulip_setupdata;
-#ifdef MULTICAST
struct ether_multistep step;
struct ether_multi *enm;
-#endif
int i;
sc->tulip_flags &= ~TULIP_WANTHASH;
sc->tulip_flags |= TULIP_WANTSETUP;
sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN;
sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED;
-#ifdef MULTICAST
if (sc->tulip_ac.ac_multicnt > 14) {
unsigned hash;
/*
@@ -843,12 +819,10 @@ tulip_addr_filter(
sp[41] = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
sp[42] = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
} else {
-#endif
/*
* Else can get perfect filtering for 16 addresses.
*/
i = 0;
-#ifdef MULTICAST
ETHER_FIRST_MULTI(step, &sc->tulip_ac, enm);
for (; enm != NULL; i++) {
*sp++ = ((u_short *) enm->enm_addrlo)[0];
@@ -856,7 +830,6 @@ tulip_addr_filter(
*sp++ = ((u_short *) enm->enm_addrlo)[2];
ETHER_NEXT_MULTI(step, enm);
}
-#endif
/*
* If an IP address is enabled, turn on broadcast
*/
@@ -874,9 +847,7 @@ tulip_addr_filter(
*sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
*sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
}
-#ifdef MULTICAST
}
-#endif
}
static int
@@ -949,7 +920,6 @@ tulip_ioctl(
break;
}
-#ifdef MULTICAST
case SIOCADDMULTI:
case SIOCDELMULTI: {
/*
@@ -967,7 +937,6 @@ tulip_ioctl(
}
break;
}
-#endif /* MULTICAST */
default: {
error = EINVAL;
@@ -987,10 +956,7 @@ tulip_attach(
struct ifaddr *ifa = ifp->if_addrlist;
int cnt;
- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
-#ifdef MULTICAST
- ifp->if_flags |= IFF_MULTICAST;
-#endif /* MULTICAST */
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
*sc->tulip_csrs.csr_sia_connectivity = 0;
*sc->tulip_csrs.csr_sia_connectivity = TULIP_SIACONN_10BASET;
@@ -1011,10 +977,6 @@ tulip_attach(
ifp->if_output = ether_output;
ifp->if_reset = tulip_reset;
ifp->if_start = tulip_start;
- ifp->if_mtu = ETHERMTU;
- ifp->if_type = IFT_ETHER;
- ifp->if_addrlen = 6;
- ifp->if_hdrlen = 14;
printf("%s%d: %s pass %d.%d ethernet address %s\n",
sc->tulip_name, sc->tulip_unit,
@@ -1023,26 +985,11 @@ tulip_attach(
sc->tulip_revinfo & 0x0F,
ether_sprintf(sc->tulip_hwaddr));
+ if_attach(ifp);
+
#if NBPFILTER > 0
bpfattach(&sc->tulip_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
-
- if_attach(ifp);
-
- while (ifa && ifa->ifa_addr && ifa->ifa_addr->sa_family != AF_LINK)
- ifa = ifa->ifa_next;
-
- if (ifa != NULL && ifa->ifa_addr != NULL) {
- struct sockaddr_dl *sdl;
- /*
- * Provide our ether address to the higher layers
- */
- sdl = (struct sockaddr_dl *) ifa->ifa_addr;
- sdl->sdl_type = IFT_ETHER;
- sdl->sdl_alen = 6;
- sdl->sdl_slen = 0;
- bcopy(sc->tulip_ac.ac_enaddr, LLADDR(sdl), 6);
- }
}
static void