Commit Graph

21202 Commits

Author SHA1 Message Date
Kirk McKusick
55ba28c60a Add stub for softdep_flushworklist() so that kernels compiled
without the SOFTUPDATES option will load correctly.

Obtained from:	John Baldwin <jhb@bsdi.com>
2000-07-25 05:28:59 +00:00
Kirk McKusick
d56bdab31c Eliminate periodic 'mfs_badop[vop_getwritemount] = 45' messages.
Submitted by:	Sheldon Hearn <sheldonh@uunet.co.za>
2000-07-25 05:11:57 +00:00
Robert Watson
e2e45aa8a0 o Add missing function return types from capability syscall call stubs,
fix compiler warning.

Submitted by:	jake
2000-07-25 03:37:36 +00:00
Archie Cobbs
678f9e335e Several fixes:
- Fix slowness when operating over fast connections, where the timeout(9)
  granularity is on the same order of magnitude as the round trip time.
  timeout(9) can happen up to 1 tick early, which was causing receive
  ack timeouts to happen too early, causing bogus "lost" packets.
- Increase the local time counter to 64 bits to avoid roll-over.
- Keep statistics on memory allocation failures.
- Add a new option to always include the ack when sending data packets.
  Might be useful in high packet loss situations. Might not.
2000-07-25 00:23:19 +00:00
Justin T. Gibbs
c27eebfde8 aic7xxx.c:
Correct the BUILD_TCL macro.  It was placing the target id
	in the wrong bits.  This was only an issue for adapters that
	do not perform SCB paging (aha-3940AUW for instance).

	Don't bother inlining ahc_index_busy_tcl.  It is never
	used in a performance critical path and is a bit chunky.

	Correct ahc_index_busy_tcl to deal with "busy target tables"
	embedded in the latter half of 64byte SCBs.

	Don't initialize the busy target table to its empty state
	until after we have finished extracting configuration
	information from chip SRAM.  In the common case of using
	16 bytes of chip SRAM to do untagged target lookups,
	we were trashing the last 8 targets configuration data.
	(actually only target 8 because of the bug in the
	BUILD_TCL macro).

	Cram the "bus reset delivered" message back under bootverbose.

	Fix the cleanup of the SCB busy target table when aborting
	commands.  If the lun is wildcarded, we must loop through
	all possible luns.

aic7xxx.h:
	Only bother supporting 64 luns right now.  It doesn't seem
	like either this driver or any peripherals will be doing
	information unit transfers (where the lun number is a
	32 bit integer) any time soon.

aic7xxx.seq:
	Fix support for the aic7895.  We must flush the data
	FIFO if performing a manual transfer that is not
	a multiple of 8 bytes.  We were doing this quite
	regularly for embedded cdbs.

	Manaually flush the fifo on earlier adapters when
	dealing with embedded cdbs too.  We were stuffing
	the FIFO with 16 bytes instead, but triggering
	the flush is more efficient and allows us to
	remove two instructions from the "copy_to_fifo"
	routine.
2000-07-24 22:27:40 +00:00
Mitsuru IWASAKI
df56ce3e40 Fix a bug so that we have correct number of pccard instances in pcic_attach().
pcic_attach() got a wrong pointer to pcic_slots since device haven't
set correct unit number yet, so always accessed elements of pcic_slots
which belong to pcic0 (unit number 0).

Now we set unit number to pcic device first, then access to pcic_slots
based on the unit number we've just set.
2000-07-24 21:44:00 +00:00
Kenneth D. Merry
cf8432359c Allocate major number 153 for the character device interface for the ti(4)
driver.
2000-07-24 21:21:03 +00:00
Poul-Henning Kamp
2eaaa4dea8 Allocate major 152 to ACPI.
Requested by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
2000-07-24 19:00:18 +00:00
Nick Sayer
6d57c73f9c Sundry changes to debugging code.
Add spl/splx to various sensitive spots
Change semantics of the vmnet version of the device to keep VMware happy
(don't junk state when the device is closed)

Submitted by:	vsilyaev@mindspring.com
2000-07-24 15:32:26 +00:00
Sheldon Hearn
c146223678 When manual pages are moved or removed, MANX should be changed
to NOMAN.

Reported by:	bde
2000-07-24 13:52:07 +00:00
Jeroen Ruigrok van der Werven
899266e346 Document device tdfx and options TDFX_LINUX. 2000-07-24 11:16:56 +00:00
Kirk McKusick
9b97113391 This patch corrects the first round of panics and hangs reported
with the new snapshot code.

Update addaliasu to correctly implement the semantics of the old
checkalias function. When a device vnode first comes into existence,
check to see if an anonymous vnode for the same device was created
at boot time by bdevvp(). If so, adopt the bdevvp vnode rather than
creating a new vnode for the device. This corrects a problem which
caused the kernel to panic when taking a snapshot of the root
filesystem.

Change the calling convention of vn_write_suspend_wait() to be the
same as vn_start_write().

Split out softdep_flushworklist() from softdep_flushfiles() so that
it can be used to clear the work queue when suspending filesystem
operations.

Access to buffers becomes recursive so that snapshots can recursively
traverse their indirect blocks using ffs_copyonwrite() when checking
for the need for copy on write when flushing one of their own indirect
blocks. This eliminates a deadlock between the syncer daemon and a
process taking a snapshot.

Ensure that softdep_process_worklist() can never block because of a
snapshot being taken. This eliminates a problem with buffer starvation.

Cleanup change in ffs_sync() which did not synchronously wait when
MNT_WAIT was specified. The result was an unclean filesystem panic
when doing forcible unmount with heavy filesystem I/O in progress.

Return a zero'ed block when reading a block that was not in use at
the time that a snapshot was taken. Normally, these blocks should
never be read. However, the readahead code will occationally read
them which can cause unexpected behavior.

Clean up the debugging code that ensures that no blocks be written
on a filesystem while it is suspended. Snapshots must explicitly
label the blocks that they are writing during the suspension so that
they do not cause a `write on suspended filesystem' panic.

Reorganize ffs_copyonwrite() to eliminate a deadlock and also to
prevent a race condition that would permit the same block to be
copied twice. This change eliminates an unexpected soft updates
inconsistency in fsck caused by the double allocation.

Use bqrelse rather than brelse for buffers that will be needed
soon again by the snapshot code. This improves snapshot performance.
2000-07-24 05:28:33 +00:00
Brian Feldman
55af4c7d94 Using an atomic operation here won't help if nobody else uses them (for
this).  Use the simple_lock() on v_interlock like elsewhere.
2000-07-23 22:19:49 +00:00
Marcel Moolenaar
03567510a8 Add bounds checking to stackgap_alloc. Previously it was possible
to construct a path that was long enough (ie longer than
SPARE_USRSPACE bytes) and trash the stack.

Note that SPARE_USRSPACE is much smaller than MAXPATHLEN so that
the Linuxulator will now return ENAMETOOLONG even if the path
is smaller than MAXPATHLEN.

PR: 12749
2000-07-23 16:54:18 +00:00
Seigo Tanimura
eecdc4415b MFPAO: Add support for AX88190, equipped in MELCO LPC3-TX. 2000-07-23 15:15:43 +00:00
Mark Murray
c90a8fc9a5 Clean this up with some BDE-inspired fixes.
o Make the comments KNF-compliant.
o Use nanotime instead of getnanotime; the manpage lies about the
  kern.timecounter.method - it has been removed.
o Fix the ENTROPYSOURCE const permanently.
o Make variable names more consistent.
o Make function prototypes more consistent.

Some more needs to be done; to follow.
2000-07-23 11:08:16 +00:00
Sheldon Hearn
bf1a3264f7 Remove the awi(4) manual page from the sys/ hierarchy after a repo-
copy to share/man/man4 .  The file is still not connected to the
build from that directory either.
2000-07-23 09:40:39 +00:00
Brian Feldman
25ead03462 Solve the problem where it is possible to get the kernel stuck in
a loop down in pmap_init_pt().  A subtraction causes the number of
pages to become negative, that was assigned to an unsigned variable,
and there is a lot of iteration.  The bug is due to the ELF image
activator not properly checking for its files being the correct size
as specified by the ELF header.

The solution is to check that the header doesn't ask for part of a
file when that part of the file doesn't exist.  Make sure to set
VEXEC at the proper times to make the executables immutable (remove
race conditions).  Also, the ELF format specifiies header entries
that allow embedding of other executables (hence how ld-elf.so.1
gets loaded, but not the same as loading shared libraries), so those
executables need to be set VEXEC, too, so they're immutable.

Reviewed by:	peter
2000-07-23 06:49:46 +00:00
Poul-Henning Kamp
3765820607 Add transmit buffer limitation depending on actual bandwidth.
Add unframed E1 mode.
Various cleanup.
2000-07-22 17:08:52 +00:00
Kazutaka YOKOTA
7ce6464adc This is yet another attempt to fix "psmintr out of sync.." problems.
- Properly protect the watchdog timer routine.
- Relocate the sync check statement so that we don't see too many
  error messages.
2000-07-22 04:08:12 +00:00
Jayanth Vijayaraghavan
e7f3269307 When a connection is being dropped due to a listen queue overflow,
delete the cloned route that is associated with the connection.
This does not exhaust the routing table memory when the system
is under a SYN flood attack. The route entry is not deleted if there
is any prior information cached in it.

Reviewed by: Peter Wemm,asmodai
2000-07-21 23:26:37 +00:00
John Baldwin
ddb820b015 Remove an unnecessary .PATH entry. 2000-07-21 22:36:42 +00:00
Nick Sayer
edddbd723a Somehow the module makefile got missed in the big commit. 2000-07-21 15:09:25 +00:00
Sheldon Hearn
c023ba6ea6 Move the ef(4) manual page from sys/modules/if_ef to share/man/man4, as
discussed with bp.
2000-07-21 14:54:13 +00:00
Andrey A. Chernov
6e424f2ea5 Make Reset (ESC c) reset attributes too, not only clear screen 2000-07-21 14:26:31 +00:00
Sheldon Hearn
b601c69bdb Move the netgraph-related manual pages into share/man/man4/, as
discussed with archie.
2000-07-21 10:46:58 +00:00
Bill Paul
54358bfe2b Tweak probe message so that 1000baseSX and 1000baseT cards are
explicitly identified.
2000-07-20 23:43:45 +00:00
Bill Paul
e87631b976 Update the Tigon driver to support 1000baseTX gigE over copper AceNIC
cards. This basically involves switching to the 12.4.13 firmware, plus
a couple of minor tweaks to the driver.

Also changed the jumbo buffer allocation scheme just a little to avoid
'failed to allocate jumbo buffer' conditions in certain cases.
2000-07-20 22:24:43 +00:00
Nick Sayer
a1ce91d5ff Oops. Activate tap in man4 and modules makefiles 2000-07-20 20:29:03 +00:00
Andrey A. Chernov
91de5914ec Implement SGR 22,24,25,27 from ECMA-48 2000-07-20 18:48:03 +00:00
Nick Sayer
39902b5bea Oops. SYSCTL_HANDLER_ARGS -> (SYSCTL_HANDLER_ARGS) 2000-07-20 17:57:20 +00:00
Archie Cobbs
d2ea40c23f Allocate memory with M_NOWAIT instead of M_WAITOK, because it's possible
for these routines to be called from an interrupt context.

PR:		kern/20057
2000-07-20 17:23:49 +00:00
Nick Sayer
12dc24ded3 Add sysctl to perform bridge refresh. This is required if bridged
configurations include loadable interfaces. After loading new
interface drivers, perform a 'sysctl -w net.link.ether.bridge_refresh=1'
and the bridge code will reinitialize itself.

Submitted by: <vsilyaev@mindspring.com>
2000-07-20 17:07:06 +00:00
Nick Sayer
a5213f145a Add the tap driver.
The tap driver is used to present a virtual Ethernet interface to the
system. Packets presented by the network stack to the interface are
made available to a character device in /dev. With tap and the bridge
code, you can make remote bridge configurations where both sides of
the bridge are separated by userland daemons.

This driver also has a special naming hack to allow it to serve a similar
purpose to the vmware port.

Submitted by:	myevmenkin@att.com, vsilyaev@mindspring.com
2000-07-20 17:01:10 +00:00
Andrey A. Chernov
598cad91fd Accorfing to ECMA-48 SGR 39 and 49 are just another colors and must not reset
other attrs, so reset only bold on 39
2000-07-20 13:12:58 +00:00
Alfred Perlstein
f408896444 only allow accept filter modifications on listening sockets
Submitted by: ps
2000-07-20 12:17:17 +00:00
Alfred Perlstein
85f5e7f098 disallow unload until we do proper refcounting 2000-07-20 12:12:41 +00:00
Doug Rabson
ac7ba92669 Add support for the PC87303 chipset (found on Miata alphas) and add
support for relocating the port address if the isa hints specify a
different address from the address the chipset currently has.

Submitted by: Andrew M. Miklic <miklic@ibm.net>
2000-07-20 09:28:07 +00:00
Marcel Moolenaar
a603fe5a07 Revert implementation of setfsuid and setfsgid due to security
issues.

Requested by: rwatson
Backed by: kris
2000-07-20 05:37:41 +00:00
Mike Smith
4b85df4ea6 Remove some confusing verbosity - we have no idea what RAID level the
drive is at, so don't print the 'unknown' value, just say nothing.
2000-07-20 02:31:56 +00:00
Mike Smith
9105472b9a Add major numbers for the Adaptec FSA RAID controller. 2000-07-20 01:12:02 +00:00
Kris Kennaway
914594eaa1 Temporary hack for the benefit of the X-Bone project
(http://www.isi.edu/xbone). I expect this to go away in due course.

Submitted by:	Lars Eggert <larse@ISI.EDU>
2000-07-20 00:35:37 +00:00
Archie Cobbs
7c24617ca0 Remove node's name reference when the interface is detached;
otherwise, the ng_ether.ko KLD will never be unloadable after
all Ethernet interfaces are detached, as it should be, because
of the lingering extra reference.

Submitted by:	"Yevmenkin, Maksim N, CSCIO" <myevmenkin@att.com>
2000-07-19 17:33:53 +00:00
Warner Losh
b16ba28faf Default the pcic to polling. Some laptops need to have polling mode
due to a paucity of IRQs.  I have some reservations about this, so I'm
not going to MFC this just yet.  I'm doing this to see how many
problems it causes so we can do this in 4.2.  I've been seeing hangs
on my laptop from time to time, but sometimes it was not in polling
mode, other tmies it was.  Don't know if this is one problem or more
than one.

Requested by: Sean O Connell
2000-07-19 16:32:38 +00:00
Andrew Gallatin
0617522889 Fix an alpha-only race which causes the transmit side of the chip to
lock up under moderate to heavy load.

The status & command fields share a 32-bit longword.  The programming
API of the eepro apparently requires that you update the command field
of a transmit slot that you've already given to the card.  This means
the card could be updating the status field of the same longword at
the same time. Since alphas can only operate on 32-bit chunks of
memory, both the status & command fields are loaded from memory &
operated on in registers when the following line of C is executed:

                sc->cbl_last->cb_command &= ~FXP_CB_COMMAND_S;

The race is caused by the card DMA'ing up the status at just the wrong
time -- after it has been loaded into a register & before it has been
written back.  The old value of the status is written back, clobbering
the status the card just DMA'ed up. The fact that the card has sent
this frame is missed & the transmit engine appears to hang.

Luckily, as numerous people on the freebsd-alpha list pointed out, the
load-locked/store-conditional instructions used by the atomic
functions work with respect changes in memory due to I/O devices.  We
now use them to safely update the command field.

Tested by: Bernd Walter <ticso@mail.cicely.de>
2000-07-19 14:33:52 +00:00
Darren Reed
72130853fb fix conflicts 2000-07-19 14:02:09 +00:00
Peter Wemm
4f012c3d41 Use <bsd.kmod.mk> not a path to ../../conf/kmod.mk. 2000-07-19 10:40:39 +00:00
Warner Losh
3c91d95c96 Except for the information gathering IOCTLs, require apm device be
opened for write.  This should make the apm device read only safe.
2000-07-19 06:32:00 +00:00
Coleman Kane
48f6bffc18 Studied the tech docs for the Voodoo3 and Banshee, and hopefully fixed the
errors that plagued those cards with XFree86 4.0. They have two memory
ranges as well as an IO port range to them. Also cleaned up the three
warning messages that I got, from inb(), outb() and linuxulator. Also, I
noticed that the DRI and Glide support for the Voodoo4 and 5 has been
placed upon linux.3dfx.com, too bad they haven't released the tech docs
yet. Apparently, they are still pushing glide for all of us, so I will try
and add support once those tech docs are up.
2000-07-19 05:41:14 +00:00
Archie Cobbs
6e64168369 Const'ify parameters to ethers(3) routines as appropriate. 2000-07-18 22:44:52 +00:00