Commit Graph

20710 Commits

Author SHA1 Message Date
dmlb
3bb434e567 A bit of a messy monster.
Simple stuff
------------

	Split _download up so that the MIB settings are in their own functions.

	Made "tx completed but status is ..." a recoverable error

	Cut down verbosity of "unloaded" messages

	Moved ccs_free and com_runq from intr_ccs to ecf_done and runq_done
	to avoid embarasing mistakes and waits.

	Merged runq_add and runq_arr into one and called it runq_add

	Made RAY_COM_DUMP a real debug called RAY_DCOM

	Consistnet debugging around tsleeps.

	Use bus_activate_resource for attr/cm mapping, and set the flags
	correctly in the allocation routines (needs more hacks to
	sys/pccard/pcic.c)

	com_malloc is now seperated from the comq initialization. This was
	done whilst trying to set automatic variables for the comqs.

Harder Stuff
------------

	As part of the IFF_RUNNING fixes, remove the panic in runq if we are
	not running.

	Change, again, runq_add. This time we don't do any cleaning up
	if there were errors. This is so that callers get the chance
	to re-try (not that I ever see it being used).

	In runq_add, only sleep when there is something to sleep on!

	ioctl locking routines, stolen from awi.c but not used


Hardest Stuff
-------------

	Dealing with serialing ioctls correctly means that we must QUEUE
	changes to IFF_RUNNING and check it in the QUEUED commands, not
	in the user commands. Whilst simple to state, it took a few
	hours of head scratching to get it right. The realisation was that
	I only have to guarantee that sub-commands from a single process
	are serialised and "atomic", and that they check the status of the
	interface flags when invoked and not when they are queued.

	Another way of looking at it, is that the driver's state is stored
	in the runq and the IFF_RUNNING flag. These must be changed together.

	What this means practically, is that IFF_RUNNING is set after
	we have started/joined/associated with a network. And it is
	cleared by ray_stop via the runq so that unfinsished commands are
	not distrupted.

	I still have to fix up promisc, upp/repparams and mcast.

	Oh yeah, stop is essentially a noop in that it only
	changes IFF_RUNNING
2000-05-28 23:10:12 +00:00
gallatin
1cb2a97170 Part of AS2100 support that I neglected to commit last night
pointed out by: dfr
2000-05-28 17:52:08 +00:00
groudier
fb7bf5aeb8 - Make the NVRAM debug code compile and work.
- Get rid of a fiew uselessly `long' variables
  and casts to `long'.
- Estimate the PCI clock for all chips, except
  C1010 for now (we should do that for each PCI BUS)
- Refine a couple of C1010 errata work-arounds.
- For now, make sure AIP generation is disabled
  for the C1010-66.
2000-05-28 17:49:18 +00:00
peter
16f7036e8a Oops, nearly forgot to commit this one. Use correct register names, or
this will not compile without COMPAT_OLDPCI.
2000-05-28 16:38:28 +00:00
peter
786b298ee2 Encapsulate the old PCI compatability support and APIs completely under
"options COMPAT_OLDPCI".  This option already existed, but now also tidies
up the declarations in #include <pci/pci*.h>.  It is amazing how much stuff
was using the old pre-FreeBSD 3.x names and going silently undetected.
2000-05-28 16:35:57 +00:00
peter
2c50f3ffc2 Make this compile without depending on the FreeBSD 2.2 compatability
defines.
2000-05-28 16:31:35 +00:00
peter
df6bdc73c1 Make this compile without the old 2.2 compatability defines. 2000-05-28 16:24:17 +00:00
peter
eff1181c9c Fix a reference to an old FreeBSD 2.2 register name.
s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/
2000-05-28 16:21:45 +00:00
peter
bcc8fab5ee Do not depend on FreeBSD 2.2 compatability defines.
s/PCI_MAP_REG_START/PCIR_MAPS/
2000-05-28 16:18:58 +00:00
peter
13a42e3fa2 Fix some leakage from inside #ifdef PCI_COMPAT (the FreeBSD 2.2 compat
stuff).
2000-05-28 16:17:18 +00:00
peter
b66b4de5f7 Use the correct register name. s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/ 2000-05-28 16:13:43 +00:00
peter
5a253d2d01 Use the correct name for the PCI command register (PCIR_COMMAND). Don't
use constant that used to be a variable in our (very) old pci code.
2000-05-28 16:06:56 +00:00
peter
8a18ec435b Use the correct register names. s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/ 2000-05-28 16:02:05 +00:00
peter
453bf18bc5 Warn that this as an oldpci device.. 2000-05-28 15:59:52 +00:00
peter
4b86bb33b9 Use correct register values. This one was in aic7xxx and advansys too. 2000-05-28 15:50:40 +00:00
dfr
e01757ccf8 Add a new pmap entry point, pmap_enter_temporary() to be used during
dumps to create temporary page mappings. This replaces the use of CADDR1
which is fairly x86 specific.

Reviewed by: dillon
2000-05-28 15:49:55 +00:00
peter
7505a42f5f Use the correct register names. s/PCI_MAP_REG_START/PCIR_MAPS/ 2000-05-28 15:48:48 +00:00
peter
6cdc9fcfec Use the correct register names, not the FreeBSD 2.2 compatability ones. 2000-05-28 15:47:00 +00:00
dfr
8a7fee09ed Add taskqueue system for easy-to-use SWIs among other things.
Reviewed by: arch
2000-05-28 15:45:30 +00:00
peter
d8f09c3eaf Use the correct name for a mapping register, not the old FreeBSD 2.x
compatability name.
2000-05-28 15:15:14 +00:00
peter
252dc9302f Mass update of isa drivers using compatability shims to use
COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
2000-05-28 13:40:48 +00:00
peter
4010eff72c The dreaded isa_compat.h tables are no longer used, so there is no need
for a seperate pc98 version of this stuff.  Applying the same changes
from the i386 version yields identical files so remove these and use the
common ones.
2000-05-28 13:32:49 +00:00
peter
3cac9e85cc Redo the isa compat driver shim so that each driver is self contained
and does not require that evil list of drivers in isa_compat.h.
It uses the same strategy that pci drivers use, namely a
COMPAT_ISA_DRIVER() macro that creates the glue on the fly.
Theoretically old-style isa drivers should be preloadable now.
2000-05-28 13:30:44 +00:00
ache
44028bef6c Manipulate with AltGR Led (really CapsLock Led) only in K_XLATE mode, because
all other modes not set ALKED flag and it means that CapsLock always turned
off for them.
Real bug example is X11 which never turn on CapsLock with Russian keyboard.

PR:		18651
Submitted by:	"Mike E. Matsnev" <mike@po.cs.msu.su>
2000-05-28 12:43:24 +00:00
peter
3be85081fb ncr.c is no longer a COMPAT_OLDPCI device - remove the warning. 2000-05-28 10:45:06 +00:00
peter
622836de7e Remove haveseen_iobase() - it is no longer called from anywhere in the
kernel.
2000-05-28 10:11:49 +00:00
sos
6c5b1ef131 Cosmetics: dont say Unknown but Generic chipset in probe.. 2000-05-28 07:51:23 +00:00
sos
a9e74d8e2b Fix alignment problem on the alpha reported by several parties. 2000-05-28 07:50:19 +00:00
gallatin
71fe923a27 Add AlphaServer 2000 (demi-sable), 2100 (sable), and 2100A (lynx) support.
Only PCI and on-board ISA peripherials are supported at this time.

This support has been only lightly tested due to a lack of response to my
call for testers on the freebsd-alpha mailing list.  It works quite well
on the one AS2100 on which it has been tested, but it may not work on
an AS2100A and should therefore be regarded as experimental.
2000-05-28 02:52:54 +00:00
gallatin
3e444e4eaa Allow platform specific isa interrupt setup & teardown routines in
preparation for sable/lynx support
2000-05-28 02:40:53 +00:00
obrien
6e340a789f MFA: Add {kernel,module}-{depend,clean,cleandepend,tags,install,reinstall}
targets.  The {depend,clean,cleandepend,tags,install,reinstall} targets
are composits of the {kernel,module}-* targets (based on NO_MODULES).
2000-05-27 21:50:15 +00:00
obrien
06d1186653 Use /sys/sys/*.h over /usr/include/sys.
No repsonce from:	Maintainer
2000-05-27 21:35:47 +00:00
cg
be3cacb49a fix the return value of the SOUND_PCM_WRITE_CHANNELS ioctl
re-enable old pcm ioctls
2000-05-27 14:40:17 +00:00
dfr
7a6f818429 Use bus_space_handle_t instead of bus_space_tag_t to hold the result
from rman_get_bushandle().
2000-05-27 10:02:32 +00:00
dfr
b1683d2ef7 Update to use newbus and busspace. 2000-05-27 09:27:36 +00:00
jhb
bc414b06e3 - Remove unnecessary 'data32' and 'addr32' prefixes and #define's.
- Go ahead and use 'lgdt' again instead of hand-assembling the instruction.
  During testing this code worked fine.  If for some reason a 32-bit offset
  is needed, 'lgdtl' should be used instead of reverting to manual machine
  code.

Tested by:	peter
2000-05-27 06:25:35 +00:00
peter
a1907d0b27 Use .include <bsd.kmod.mk> to get to ../../*/conf/kmod.mk instead of
encoding the relative path.
2000-05-27 01:14:33 +00:00
dcs
105469b255 Strip spaces and comments more agressively. 2000-05-26 22:58:10 +00:00
cg
a873e6a0c9 move various fields from pcm_channel to snd_dbuf
improve chn_read code- don't stop/restart on overrun, just dump data

more error checking on ioctls
2000-05-26 21:55:13 +00:00
cg
0f1dd9ed49 if we have a codec init routine, fail the attach if init fails 2000-05-26 21:42:50 +00:00
dcs
21cd624f91 Bring in FICL 2.04. No bump of loader version is required by this
commit.
2000-05-26 21:35:08 +00:00
cg
33821aa2e8 handle emulated dma reads
don't try to get sample size from snd_dbuf
2000-05-26 21:15:47 +00:00
msmith
6c7acf1fe4 Some joker decided to make it even harder to build modules outside the
kernel, and rather than fix the make search path, hardcoded it into the
module Makefiles themselves.  Go with the herd.
2000-05-26 20:07:29 +00:00
sos
4c4f9e296b If devclass_alloc_unit() is called with a wired unit #, and this is
buzy, only search upwards for a free slot to use..

This broke unit numbering on ATA systems where PCI attached controllers
come before the mainboard ones...

Reviewed by: dfr
2000-05-26 13:59:05 +00:00
gallatin
e8a925d9d4 Rather than checking for hlen causing misalignment, we should do the
m_adj() and then check the resulting mbuf for misalignment, copying
backwards to align the mbuf if required.

This fixes a longstanding problem where an mbuf which would have been
properly aligned after an m_adj() was being misaligned and causing an
unaligned access trap in ip_input().  This bug only triggered when booting
diskless.

Reviewed by:	dfr
2000-05-26 13:47:02 +00:00
nyan
47013b1274 Fixed header file path (machine/lpt.h -> dev/ppbus/lptio.h). 2000-05-26 12:25:01 +00:00
tanimura
04dce89848 Add SUP1670 - Supra 336i V+ Intl. Since we update the PnP IDs
more frequently than the core part of the sio driver, it might
be good to move the PnP IDs to sio_isapnp.h or something like
that.

PR:		i386/18828
Submitted by:	J.P. King <jpk28@cam.ac.uk>
2000-05-26 11:41:08 +00:00
darrenr
6a77390f8e define CSUM_DELAY_DATA to match merge 2000-05-26 07:28:03 +00:00
jake
5e208b0c18 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
obrien
120ac5d344 Bump __FreeBSD_version after the Binutils upgrade -- just in case a port
or someone needs to decern the event.
2000-05-26 00:22:48 +00:00
n_hibma
45b48f2830 Regen. 2000-05-25 22:29:47 +00:00
n_hibma
707667a962 New entries (Mike Meyer) 2000-05-25 22:27:55 +00:00
tegge
3b995cc82d Reintroduce a workaround for a gas bug (misassembled lgdt instruction)
Use .code16 for the real mode part of the AP bootstrap trampoline code.
2000-05-25 21:33:52 +00:00
darrenr
2005a2d399 fix up #ifdef jungle for FreeBSD 2000-05-25 16:24:46 +00:00
darrenr
06a04563ec remove duplicate prototypes 2000-05-25 16:23:30 +00:00
jlemon
c31a636305 Mark the checksum as complete when looping back multicast packets.
Submitted by:	Jeff Gibbons <jgibbons@n2.net>
2000-05-25 02:27:14 +00:00
archie
3cf9752619 Fix typo. 2000-05-25 00:36:43 +00:00
msmith
b0e070e0bf Build the twe module with the rest. 2000-05-24 23:42:03 +00:00
msmith
94b3594faa Add the 'twe' driver module makefile. 2000-05-24 23:41:26 +00:00
msmith
4a21342c8c Initial import of a driver for the 3ware Escalade family of ATA RAID
controllers.
2000-05-24 23:35:23 +00:00
msmith
7d63ac4a42 Take 146 and 147 for the twe driver. 2000-05-24 23:19:15 +00:00
archie
d6172f3d67 Just need to pass the address family to if_simloop(), not the whole sockaddr. 2000-05-24 21:16:56 +00:00
darrenr
d9cbc39cd2 fix duplicate rcsid's 2000-05-24 19:38:17 +00:00
peter
c91ec627c6 pmap_enter() masked off the page offset bits, pmap_kenter() did not.
This (I believe) is the cause of the XFree86 startup and/or mptable(8)
panics when programs were reading from /dev/mem at non-page-aligned
offsets.  The offsets were being converted into random page flags in the
page tables. :-(   (including PG_PS = 4MB page size)
2000-05-24 14:22:22 +00:00
bde
1e19f827bc Fixed some style bugs (mainly convoluted logic for blackhole processing). 2000-05-24 12:57:52 +00:00
peter
c9715053d0 It would have been nice if this actually compiled. Close the header
comment */.
2000-05-24 09:08:55 +00:00
kuriyama
18c55c0081 Add OPTi 82C700 chipset.
Submitted by:	sanpei@sanpei.org
PR:		kern/18155 (part of)
2000-05-24 09:03:30 +00:00
des
43adb013f4 Make exe a symlink. 2000-05-24 07:37:02 +00:00
darrenr
ca92844ecb fix up conflicts 2000-05-24 04:40:17 +00:00
darrenr
fb324ced5f fix conflicts 2000-05-24 04:21:35 +00:00
darrenr
d9c9d2d0f0 fix conflicts 2000-05-24 04:09:13 +00:00
darrenr
df6655df92 fix conflicts 2000-05-24 04:01:49 +00:00
darrenr
c43e65a600 fix conflicts 2000-05-24 04:01:30 +00:00
darrenr
41542073e2 fix conflicts 2000-05-24 03:43:24 +00:00
darrenr
325b40c92d fix conflicts 2000-05-24 03:17:16 +00:00
kuriyama
12b3676bad Add 440MX chipset.
Submitted by:	YOSHIMURA Hideaki <hideakiy@cs-tokyo01.chuosystem.co.jp>
References:	[bsd-nomads:13764]
2000-05-24 02:24:38 +00:00
jhb
37174748e6 Convert the short stub of real-mode code into 16-bit assembly. 2000-05-24 02:20:34 +00:00
archie
7e9f06467f Avoid double-call to bpf_mtap(). This is now handled in ether_input(). 2000-05-24 00:05:44 +00:00
jake
1d685644e0 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
jlemon
40b39bdbeb Add code which actually checks for the NCR PCI id so it can be used. 2000-05-23 19:27:43 +00:00
sos
164ad62aae Fix a nasty bug in ata_intr, parens are a good thing if used right.
Make the error recovery code a little more obvious.

Inform the user if UDMA66 mode couldn't be selected due to a
non ATA66 compliant 80pin cable.

Minor cosmetics.
2000-05-23 19:05:56 +00:00
dmlb
2d490421c5 Moved a bit of resource allocation from probe to attach based on feedback
in -hackers on the correct driver structure.

Started to tidy up _detach and _stop.

Added the comq array stuff into mcast.
2000-05-23 16:38:12 +00:00
jhb
3635f4d558 Grrr, fix a silly 'movl' -> 'movw' typo in both pxeldr and cdldr. Also,
remove unnecessary cruft from the Makefiles for both.
2000-05-23 12:31:32 +00:00
jhb
eac613471e Clean up some more 16-bit code and get rid of more m4 macros. 2000-05-23 12:28:31 +00:00
jhb
443756c82f Clean up all of the 16-bit assembly code in the x86 bootstrap to work
with the new binutils.  Now that we have a decent assembler, all the old
m4 macros are no longer needed.  Instead, straight assembly can be used
since as(1) now understands 16-bit addressing, branches, etc.  Also,
several bugs have been fixed in as(1), allowing boot0.s to be further
cleaned up.
2000-05-23 12:18:49 +00:00
dcs
449e64d626 Document abial's .#. 2000-05-23 11:47:23 +00:00
nyan
dd5896144b Fixed return value of adv_attach function.
Submitted by:	Oleg Sharoiko <os@rsu.ru>
2000-05-23 10:12:42 +00:00
msmith
76c6a1e1b1 Make a trip to Pointy-Hats-R-Us and actually include the header that
defines ROOTDEVNAME.

Submitted by:	"Jeffrey S. Sharp" <jss@subatomix.com>
2000-05-22 17:25:47 +00:00
joerg
5540edaec3 Apply a `fixup' to the blocksize gathered from the device after a READ
CAPACITY operation.  SCSI-3 mandates this to be 2048, but some older
drives like my old Plasmon CD-R report weird numbers between 2048 and
up to 2352 bytes depending on the mode of the last track etc.  This in
turn confuses stuff like the slice code since it refuses to work with
devices that do not have a blocksize which is a multiple of 512 bytes.

Reviewed by:	ken
2000-05-22 17:21:50 +00:00
obrien
af4ddb3064 Sort the sys includes. 2000-05-22 17:09:13 +00:00
obrien
7c238e0a37 AT&T asm syntax requires a leading '*' in front of the operand for
indirect calls and jumps.
2000-05-22 17:02:53 +00:00
obrien
95f6ec9de3 Fix a C-style comment that had a syntax error -- AND gas 2.9.1 accepted! 2000-05-22 17:00:15 +00:00
obrien
0502a68b96 If we are going to do a byte compare, the operands should be byte-sized.
In this case, I believe we want to compare against the 32-bit operand so
use a full-world compare operation.
2000-05-22 16:58:44 +00:00
obrien
13fb483bad Fix inconsistent assembly. If byte moves are specified, a byte-sized
target must be too.
2000-05-22 16:56:42 +00:00
dan
030760dd90 sysctl'ize ICMP_BANDLIM and ICMP_BANDLIM_SUPPRESS_OUTPUT.
Suggested by: des/nbm
2000-05-22 16:12:28 +00:00
dan
4e067dea02 Add option ICMP_BANDLIM_SUPPRESS_OUTPUT to the mix. With this option,
badport_bandlim() will not muck up your console with printf() messages.
2000-05-22 15:00:41 +00:00
jlemon
ea211946ea Add PCI ID for NEC/Compaq controller. 2000-05-22 13:59:32 +00:00
jlemon
8b84e209fb Add PCI id for Compaq Smart Array 431 card. 2000-05-22 13:45:41 +00:00
nyan
73d53d9c0b Sync with sys/i386/isa/isa_compat.h revisions 1.28, 1.29 and 1.33. 2000-05-22 13:11:12 +00:00
imp
cc04a9248c It turns out that I was wrong. The chip in my machine is not a
CXD1847A, but a CXD1947A.  I checked by visual inspection after
prompting from onoe-san.
2000-05-22 03:43:16 +00:00
kuriyama
5c0b38368c CXD1847A and CXD1947A have same product ID.
Approved by:	imp (original CXD1847A addition)
2000-05-22 03:20:18 +00:00
ken
59077611d2 Implement a new camcontrol function, 'camcontrol format'.
libcam/Makefile:	Add scsi_da.c to libcam for the new
			scsi_format_unit() function.

camcontrol.8:		Update the man page for the new format
			functionality, and take out the examples section
			describing how to do it with 'camcontrol cmd'.

camcontrol.c:		New format functionality.  Note that unlike the
			rest of the camcontrol subcommands, this one is
			interactive by default.  Because of the potential
			destructiveness of the format command, I thought
			it necessary to get confirmation from the user
			before spamming a disk.  You can disable the
			interactive behavior, and the status meter with
			command line arguments.

scsi_da.c:		Add the new scsi_format_unit() cdb building
			function and use #ifdef _KERNEL to make this file
			compile in both the kernel and userland.  The
			format unit function is currently only defined in
			the non-kernel case, because nothing in the kernel
			is using it.  If that changes, it should be
			un-ifdefed and compiled in both cases.

scsi_da.h:		New function declaration, CDB structure and format
			data structures.

Thanks to Nick Hibma for providing some valuable input on these changes.
2000-05-21 23:57:52 +00:00
jlemon
66bfebbaed Compute the checksum before handing the packet off to IPFilter.
Tested by:  Cy Schubert <Cy.Schubert@uumail.gov.bc.ca>
2000-05-21 21:26:06 +00:00
dmlb
0eb631af0a MFRELENG_3 2000-05-21 21:20:18 +00:00
dmlb
d73f93980e MFRELENG_3 2000-05-21 20:51:09 +00:00
dmlb
109e9d6dbb MFRELENG_3 2000-05-21 20:43:24 +00:00
green
eb379423de Back out NOTE_EXIT status reporting pending discussion. 2000-05-21 16:27:41 +00:00
peter
dc0c7cc28c Provide a temporary undocumented option: SHM_PHYS_BACKED. This will
become sysctl and/or flags controlled later.  It's mainly here for an
easy place to test the physical memory backed objects.
2000-05-21 13:52:13 +00:00
peter
5f3f97de55 Checkpoint of a new physical memory backed object type, that does not
have pv_entries.  This is intended for very special circumstances,
eg: a certain database that has a 1GB shm segment mapped into 300
processes.  That would consume 2GB of kvm just to hold the pv_entries
alone.  This would not be used on systems unless the physical ram was
available, as it's not pageable.

This is a work-in-progress, but is a useful and functional checkpoint.
Matt has got some more fixes for it that will be committed soon.

Reviewed by:	dillon
2000-05-21 13:41:29 +00:00
peter
a7e7430603 Ack, I made a typo moments before commit. :-( 2000-05-21 13:00:21 +00:00
peter
154787c368 Implement an optimization of the VM<->pmap API. Pass vm_page_t's directly
to various pmap_*() functions instead of looking up the physical address
and passing that.  In many cases, the first thing the pmap code was doing
was going to a lot of trouble to get back the original vm_page_t, or
it's shadow pv_table entry.

Inspired by: John Dyson's 1998 patches.

Also:
Eliminate pv_table as a seperate thing and build it into a machine
dependent part of vm_page_t.  This eliminates having a seperate set of
structions that shadow each other in a 1:1 fashion that we often went to
a lot of trouble to translate from one to the other. (see above)
This happens to save 4 bytes of physical memory for each page in the
system.  (8 bytes on the Alpha).

Eliminate the use of the phys_avail[] array to determine if a page is
managed (ie: it has pv_entries etc).  Store this information in a flag.
Things like device_pager set it because they create vm_page_t's on the
fly that do not have pv_entries.  This makes it easier to "unmanage" a
page of physical memory (this will be taken advantage of in subsequent
commits).

Add a function to add a new page to the freelist.  This could be used
for reclaiming the previously wasted pages left over from preloaded
loader(8) files.

Reviewed by:	dillon
2000-05-21 12:50:18 +00:00
hoek
54797922e8 Compile in the case that anyone ever actually uses LEAVE_FREE_CHARS.
It's not clear what this does nor why they would do it, but it should
compile, now.  This could be a case where fixing the code so that it
compiles merely masks more devious dysfunctional behaviour.
2000-05-21 05:40:44 +00:00
hoek
7488e9a19b Uh, ya, sure this almost compiled for __bsdi__. NOT!
Note that __bsdi__s_/_i_/_os_/__ has moved this file to dev/ic/ and
has completely removed the non-compiling function from pdq_ifsubr.c and
has completely removed this function and placed it into netinet/if_ether.c
(if, in fact, it wasn't there the whole time).  I was tempted to simply
remove this __bsdi__only__ function.

The function is arp_ifinit().

PR:	kern/7903
2000-05-21 05:33:40 +00:00
hoek
8da2e77b97 Make this compile in case anyone ever wants to use the PC98 booter
on an IBM machine.  This fix matches i386/boot2/boot.c.

PR:	kern/7903
2000-05-21 05:27:56 +00:00
jake
b5ae8cc0c1 Major style cleanup; make ordering and internal use of the macros consistent.
Hopefully enforce KNF conformance.  Add a missing _HEAD_INITIALIZER.

Reviewed by:	archie, phk, bde
	(bde did not like all of it)
Approved by:	mdodd
2000-05-21 01:54:45 +00:00
gallatin
eb1b9d5e82 Prevent vidcontrol -i from crashing alphas
Reported by: Christian Weisgerber <naddy@mips.inka.de>
Approved by: yokota@FreeBSD.ORG
2000-05-21 01:16:47 +00:00
nyan
dcd19f39f0 Oops, rman_get_bushandle() should be converted to rman_get_virtual()
if resources are mapped to memory.
2000-05-20 16:15:50 +00:00
obrien
86070ff51e Match the include protection with the install location. 2000-05-20 05:45:04 +00:00
grog
54f4f70975 Don't forget 'stripe' and 'mirror' commands when we turn off
debugging.

Submitted-by: mdodd
2000-05-20 03:21:50 +00:00
msmith
33cffa1c80 Correct the syntax of ROOTDEVNAME and describe it somewhat better. 2000-05-19 20:46:28 +00:00
obrien
ec59c36d2d We use a MI version of this now, which is mostly this file repo copied to
dev/ppbus/lptio.h.
2000-05-19 18:25:23 +00:00
obrien
973582d65e Rather than use a MD lpt.h, we now use the MI lptio.h. 2000-05-19 18:23:48 +00:00
nyan
d569e8dbef Sync with sys/i386/conf/GENERIC revisions from 1.246 to 1.256. 2000-05-19 16:36:42 +00:00
nyan
2b80ed9c28 Fixed to support PC-98. 2000-05-19 16:31:45 +00:00
nyan
636a1aa666 Use the rman_get_bustag() and rman_get_bushandle() functions. 2000-05-19 16:19:51 +00:00
nyan
e6fbdc629d Supported the mss on PC-98 and Sound Blaster 98.
Submitted by:	"T.Yamaoka" <taka@windows.squares.net>
2000-05-19 15:41:52 +00:00
dcs
e858d816e8 One of loaders' bugs disappeared somewhere along the way. 2000-05-19 11:15:12 +00:00
tanimura
ae52c651ed Add RSS0262 - 5614Jx3[G] V90+K56Flex Modem.
PR:		kern/18168
Submitted by:	Tony Voet <voet@engineer.com>
2000-05-19 10:02:15 +00:00
dcs
1e6440a513 Move man page directives to common/Makefile.inc. 2000-05-19 08:52:16 +00:00
dcs
779a5ff995 This file got repo-copied to common/. 2000-05-19 08:44:48 +00:00
dcs
a802e4df99 Move man page directives to common/Makefile.inc. 2000-05-19 08:41:45 +00:00
dcs
3e63ed7956 Remove INSTALL_FORTH stuff. 2000-05-19 08:40:37 +00:00
dcs
ca29f7df26 Move man page directives to common/Makefile.inc.
Remove INSTALL_FORTH stuff.
2000-05-19 08:40:11 +00:00
tanimura
5c46791232 Add ACH2012 - 5634BTS 56K Video Ready Modem.
PR:		kern/17351
Submitted by:	Eric D. Futch <efutch@nyct.net>
2000-05-19 03:41:22 +00:00
peter
f0d32ff579 Return ECONNRESET instead of EINVAL if the connection has been shot
down as a result of a reset.  Returning EINVAL in that case makes no
sense at all and just confuses people as to what happened.  It could be
argued that we should save the original address somewhere so that
getsockname() etc can tell us what it used to be so we know where the
problem connection attempts are coming from.
2000-05-19 00:55:21 +00:00
peter
c7462d1168 Eliminate a couple of evil common declarations. 2000-05-18 23:38:33 +00:00
billf
8aed9ca0b9 bump __FreeBSD_version for the bio/buf divorce by phk. 2000-05-18 21:57:34 +00:00
jayanth
107943c85e snd_cwnd was updated twice in the tcp_newreno function. 2000-05-18 21:21:42 +00:00
dfr
a77c2949cd Print the correct value for the map type on a verbose boot.
PR:	kern/18662
Submitted by: tamaru@ap.t.u-tokyo.ac.jp
2000-05-18 20:28:15 +00:00
dcs
2912591604 Make corrections to allow for Alpha. 2000-05-18 12:44:50 +00:00
grog
d02a8ed467 Correct previous commit: solve the "stopped clock" syndrome in remote
kernel debugger.
2000-05-18 02:29:23 +00:00
tanimura
20c3871887 Add a couple of new PnP IDs.
o OZO800f - Zoom 2812 (56k Modem)
PR:		kern/18603
Submitted by:	Matt Loschert <loschert@servint.com>

o DAV0336 - DAVICOM 336PNP MODEM
PR:		kern/18608
Submitted by:	Martijn Plak <martijn@be3.com>
2000-05-18 02:06:24 +00:00
msmith
5f9fac1b8b Implement real read/write barriers for the i386. Despite the comment in
previous versions of this file, some barrier functionality is required.
2000-05-18 00:06:10 +00:00
msmith
afc90414e3 If we are running in APIC_IO mode, pretend that we didn't see the BIOS
reporting an AT PIC.  We do this because otherwise the PIC will claim
IRQ 2 in an unshareable mode, preventing other devices from legitimately
using it.

For symmetry, in !APIC_IO mode, ignore the APIC if it's reported.

This is a hack; a better solution would have the PIC's driver release
the IRQ if it was not going to be active.
2000-05-17 19:44:16 +00:00
jayanth
d38c2fe9e1 Sigh, fix a rookie patch merge error.
Also-missed-by:	peter
2000-05-17 06:55:00 +00:00
jlemon
0d658f6508 Cast sizeof() calls to be of type (int) when they appear in a signed
integer expression.  Otherwise the sizeof() call will force the expression
to be evaluated as unsigned, which is not the intended behavior.

Obtained from:  NetBSD   (in a different form)
2000-05-17 04:05:07 +00:00
green
3759da5283 Put the wait(2) exit status in "data" for NOTE_EXIT kevents. 2000-05-17 01:16:11 +00:00
darrenr
c4e6ff4d22 add IPFILTER_DEFAULT_BLOCK and put it in opt_ipfilter.h 2000-05-16 08:58:39 +00:00
jayanth
fa34d508a8 snd_una was being updated incorrectly, this resulted in the newreno
code retransmitting data from the wrong offset.

As a footnote, the newreno code was partially derived from NetBSD
and Tom Henderson <tomh@cs.berkeley.edu>
2000-05-16 03:13:59 +00:00
paul
f548509f2d Replace all references to lnc_softc with a typedef. 2000-05-16 02:30:53 +00:00
paul
596420d799 Update copyright. 2000-05-16 02:18:49 +00:00
paul
17b1de0ece Re-organise lnc driver in preparation for newbusifying it. 2000-05-16 02:08:04 +00:00
ru
977e45dbae Do not call icmp_error() if ipfirewall(4) denied packet.
PR:		kern/10747, kern/18382
2000-05-15 18:41:01 +00:00
dillon
d51b390f67 Change f_count and f_msgcount from short to int, solving the rollover
problem demonstrated by the PR.  MFC to follow.

PR: kern/18346
2000-05-15 06:54:41 +00:00
cg
bbe7ad2bed fix a speed bug that nobody noticed 2000-05-15 02:10:27 +00:00
n_hibma
78d2db5fc1 Sync with NetBSD:
Add quirks for self-powered hubs that are not.
2000-05-14 19:51:38 +00:00
n_hibma
d3e9e3d8da Sync with NetBSD:
Textual changes.
2000-05-14 19:44:24 +00:00
n_hibma
1cc0c86a14 Sync with NetBSD:
Make the behaviour more similar to what the Microsoft uhub driver
does.
2000-05-14 19:39:10 +00:00
paul
26e045fa2c Unchain lnc include files. 2000-05-14 19:14:41 +00:00
paul
f2a416fa91 Fix location of lnc pci code. 2000-05-14 19:10:46 +00:00
dillon
423a05e1b9 Fixed bug in madvise() / MADV_WILLNEED. When the request is offset
from the base of the first map_entry the call to pmap_object_init_pt()
    uses the wrong start VA.  MFC to follow.

PR: i386/18095
2000-05-14 18:46:40 +00:00
paul
03c3b79228 Remove old lnc files. 2000-05-14 18:27:47 +00:00
paul
ba7ec8c213 Remove if_pci_p.c from old location. 2000-05-14 18:25:51 +00:00
paul
fe29acdc6d Build lnc driver from /sys/dev from now on. 2000-05-14 18:24:41 +00:00
paul
e78746dfe8 Fix includes to build from /sys/dev/lnc 2000-05-14 18:21:39 +00:00
n_hibma
c81dba507c Sync with NetBSD:
Add USB_SET_REPORT ioctl.
Add FIOASYNC, TIOCSPGRP ioctl.
Change some debugging output
2000-05-14 17:43:59 +00:00
paul
6da5153187 Sync with the BPF and BRIDGE changes. 2000-05-14 17:37:34 +00:00
n_hibma
80347096f5 Sync with NetBSD:
Mostly textual changes.
Set configuration to 0 (reset all endpoints) on open.
2000-05-14 17:33:26 +00:00
n_hibma
28bbb2ab8b Make some if's cleaner. Add a define for the Zip 250. 2000-05-14 17:25:33 +00:00
dillon
4c7daf34ab Zero out the uio structure prior to initializing it. A garbage (uninitialized)
proc pointer is believed to have been the cause of panics related to vnconfig
    on top of intr-optioned NFS mounts.

Reported by: "Sean O'Connell" <sean@stat.Duke.EDU>
2000-05-14 17:15:58 +00:00
n_hibma
26334c9dd9 Sync with NetBSD:
Fix the saving of the location at pop properly. Only save the position
and not the complete locator.

(sp? s/sav/saf/g if appropriate)
2000-05-14 16:59:31 +00:00
n_hibma
34b4d74e79 Change Lennart's e-mail address. 2000-05-14 16:43:10 +00:00
dfr
3ff308824a Port ppc driver to alpha.
Submitted by: Andrew M. Miklic <miklic@ibm.net>
2000-05-14 13:47:57 +00:00
asmodai
588f5e7f63 Fix the rootmount code for now.
This function will probably rewritten/renamed to devpp.

Submitted by:	Assar Westerlund <assar@sics.se> on -current
Confirmed to work:	Steinar Haug <sthaug@nethelp.no>,
			Manfred Antar <mantar@pacbell.net>
Reviewed by:	phk
2000-05-14 07:43:12 +00:00
chris
2d62ac8313 Remove the -DFDESC cruft that is no longer necessary since the support
for it was removed from <sys/mount.h> long, long ago.
2000-05-14 04:44:30 +00:00
archie
ee1bf5d271 Move code to handle BPF and bridging for incoming Ethernet packets out
of the individual drivers and into the common routine ether_input().
Also, remove the (incomplete) hack for matching ethernet headers
in the ip_fw code.

The good news: net result of 1016 lines removed, and this should make
bridging now work with *all* Ethernet drivers.

The bad news: it's nearly impossible to test every driver, especially
for bridging, and I was unable to get much testing help on the mailing
lists.

Reviewed by:	freebsd-net
2000-05-14 02:18:43 +00:00
dfr
0d05ed23db Enable EISA interrupts if the mcpcia has an attached EISA bus. 2000-05-13 21:33:57 +00:00
dfr
a2c853cb98 Use bus_space for all register accesses. 2000-05-13 18:47:24 +00:00
dfr
185ff51a15 Only probe network settings on the first open of the network device.
The alpha firmware takes a seriously long time to open the network device
the first time.
2000-05-13 15:40:46 +00:00
hoek
7b2d97685f Change to comments only: spell FreeBSD.org correctly 2000-05-13 11:21:19 +00:00
peter
bb2858c40a Make /dev/[k]mem work after last commit. Transfers were being double
counted due to break/continue changes that were missed.  There are
still too many diffs relative to the i386 version.
2000-05-13 07:43:00 +00:00
peter
fd327c32d3 Unbreak 'make reinstall' after last commit 2000-05-13 07:39:46 +00:00
msmith
3dd5fae3c8 Fix a leak where a scratch buffer was not freed when reading from the
/dev/?random devices.  This appears to have been missed when the code
was brought across from the i386.  (This should fix the "world build
hangs with everything waiting on 'temp' problem.)

Also add some iovec fixup code in the error path which seems to have
been similarly fixed.

There are a number of other differences between the i386 and alpha
version which have not been examined.  This code should still be
considered suspect.
2000-05-13 05:38:25 +00:00
jdp
9e7cd700fd Add a comment explaining the obscure lines:
static void const * const __set_##set##_sym_##sym = &sym;

in the MAKE_SET macros.
2000-05-13 04:38:50 +00:00
obrien
8b4fc1dc48 Add {kernel,module}-{depend,clean,cleandepend,tags,install,reinstall}
targets.  The {depend,clean,cleandepend,tags,install,reinstall} targets
are composits of the {kernel,module}-* targets (based on NO_MODULES).
2000-05-13 03:15:37 +00:00
obrien
7f5471a83e The loader was written so that if /kernel was missing /kernel.old would
be booted.  Due to a bug, this wasn't happening.

There is still a lesser bug in that the loader decides which file to boot
after the 10sec count down.  This means the bootfile listed in the count
down in is wrong in the case where the loader will boot /kernel.old.
2000-05-13 02:45:11 +00:00
peter
a46f7a757e Install the bootforth config files for the Alpha too. loader.conf should
be functional now.
2000-05-12 23:22:09 +00:00
peter
45dbbb5f11 Reactivate the FICL hooks to make it be compiled in, but also initialize
FICL.  bootforth is now live on the Alpha!

**BEWARE** - you *MUST* build and install a current libstand or you will
most likely get zfree() panics at loader startup.

We should now be able to set up the loader.conf stuff on the Alpha too.
2000-05-12 22:45:16 +00:00
peter
79c8f96a61 Stop libficl from using floating point registers - this was cauing
dictDelete() to fault early on the Alpha and was the original cause of
the Alpha ficl failures.
2000-05-12 21:51:20 +00:00
jlemon
aca5c5321d This driver attempts to cache mbufs, and re-use them as headers instead
of using the MGETHDR macro all the time.  When an mbuf is reused as a
header, initialize csum_flags to zero as well, so the delayed_checksum
call woks properly.

Debbugging work done by: jmas
2000-05-12 16:48:59 +00:00
asmodai
8c861def31 Fix comment typo.
Submitted by:	nrahlstr
2000-05-12 16:06:49 +00:00
nyan
3dfbe4d57d Use bus_space stuff except where it needs high performance. 2000-05-12 12:38:25 +00:00
nyan
e4e42b42e2 Use bus_space stuff except where it needs high performance.
Reviewed by:	bde
2000-05-12 12:37:28 +00:00
peter
61b8303d8e Fix the Alpha loader the rest of the way. If FICL is present in
/boot/loader (even though it is 100% dormant in the Alpha version),
then the loader panics with a zfree error:Loading /boot/loader.test
  *** keyboard not plugged in...
  Console: SRM firmware console
  panic: zfree(0x2003cb58,4096): wild pointer
versus the exact same code but without FICL linked in:
  Loading /boot/loader
  Console: SRM firmware console
  VMS PAL rev: 0x1000600010114
  OSF PAL rev: 0x1000600020116
  Switch to OSF PAL code succeeded.

  FreeBSD/alpha SRM disk boot, Revision 0.1

This is almost certainly an alpha infrastructure bug, not a FICL
problem.  It's probably the same thing that made FICL fail for no
apparent reason on the Alpha.
2000-05-12 07:47:47 +00:00
bp
ba5ed5fdbb long != int on Alphas. 2000-05-12 05:16:37 +00:00
ken
c5769246cc Add support for the DVD ioctl interface. 2000-05-12 03:36:02 +00:00
jhb
fa93764887 Turn on USB support for most USB devices. udbp is not turned on since
NETGRAPH is not present in GENERIC at the moment.  Also, change some
settings to support USB installs:

- Add KBD_INSTALL_CDEV as an option to make /dev/kbd[01] actually work.
- Turn on keyboard probing in sc0.  The syscons driver will now use a
  flag documented in ukbd(4) but not in sc(4) that tells syscons to
  actively search for a keyboard device if none is found.  This allows
  USB keyboards to just be plugged in and instantly start working.
- Require the atkbd0 driver to actually probe to see if a keyboard is
  there.  This allows USB keyboards to be seen by sc0 if an AT keyboard
  isn't plugged into the computer.  This also means that you will no
  longer be able to plug an AT keyboard into a machine after it has
  booted a GENERIC kernel and use it.  AT keyboards aren't designed for
  this anyway.  USB keyboards are designed for this, and they work.
2000-05-12 03:05:35 +00:00
jayanth
5caa423c93 Temporarily turn off the newreno flag until we can track down the known
data corruption problem.
2000-05-11 22:28:28 +00:00
chris
d9f13ec34f Adapt fdesc to be mounted on /dev/fd and remove fd, stdin, stdout and
stderr nodes.  More specific items of this patch:
  o Removed support for symbolic links, and the need for
    fdesc_readlink().
  o Put all the code from fdesc_attr() into fdesc_getattr() and removed
    fdesc_attr().  This also made it easier to properly give all nodes
    unique inode numbers.
  o The removal of all non-fd nodes allowed the removal of the fdesc_read(),
    fdesc_write(), and fdesc_ioctl() nodes, since we no longer have nodes
    that get special handling.
  o Correct the component name validity-checking in fdesc_lookup().  It
    previously detected the end of the string by checking for a terminating
    NUL, now it uses cnp->cn_namelen.
  o Handle kqueue files as FIFOs.  This is probably the closest file type
    to represent this type of file there is, and it is unfortunately not
    very representative of a kqueue.  Creation time is not supported by
    kqueue, so ctime, mtime and atime are all set to the current time when
    getattr() was called.
  o Also set st_[mca]time to the current time since there's no data in
    socket structures that can be used to fill this in (FIFOs).
  o Simplify fdesc_readdir() since it only has to report the numbered
    fd nodes.  Add `.' and `..' directory links as well.
  o Remove read bits from directories as they tend to confuse programs
    like tar(1).

Reviewed by:	phk
Discussed with:	bde (earlier on, not quite review)
2000-05-11 22:10:51 +00:00
chris
8b08e6d572 Include the UID and GID values filled in by socreate() into socket->so_cred
for stat() calls.

Reviewed by:	phk
2000-05-11 22:08:57 +00:00