Commit Graph

21235 Commits

Author SHA1 Message Date
Robert Watson fc3345a4a7 o Modify extattr_{set,get}() syscalls so that partial reads and writes
with an error condition such as EINTR, EWOULDBLOCK, and ERESTART,
  are reported to the application, not silently conceal.  This
  behavior was copied from the {read,write}v() syscalls, and is
  appropriate there but not here.
o Correct a bug in extattr_delete() wherein the LOCKLEAF flag is
  passed to the wrong argument in namei(), resulting in some
  unexpected errors during name resolution, and passing in an unlocked
  vnode.

Obtained from:	TrustedBSD Project
2000-07-28 19:52:38 +00:00
Sheldon Hearn 1b2fbe6ff9 Rename the loadable nullfs kernel module: null -> nullfs 2000-07-28 11:54:09 +00:00
KATO Takenori 1fb2276093 Merged from sys/dev/syscons/syscons.c revision 1.345. 2000-07-28 09:36:37 +00:00
Jeroen Ruigrok van der Werven a66233226c Fix if_types.h as per the IANA assignments with regard to IPv6.
gif/faith/stf moved to 0xfN entries, since their previous location
is allocated to some other interfaces.
Also add the IFT_PVC, which is the ATM PVC subinterface from ALTQ.

This also syncs us up a bit to NetBSD again.

This change requires a total recompilation of all kmem users, as
itojun told me.

Next in line is synching to the IANI SMI list.

Approved by:	itojun
2000-07-28 06:20:11 +00:00
Kazutaka YOKOTA fc581b6bf6 Fix GENERIC_MOUSE_ENTRY.
Submitted by: Graham Wheeler <gram@cequrux.com> and gibbs
2000-07-28 03:48:46 +00:00
Justin T. Gibbs 957790c3e6 ahc_pci.c:
Disable "cache line streaming" for aic7890/91 Rev A chips.  I
	have never seen these chips fail using this feature, but
	some of Adaptec's regression tests have.

	Explicitly set "cache line streaming" to on for aic7896/97
	chips.  This was happening before, but this documents the
	fact that these chips will not function correctly without
	CACHETHEEN set.

aic7xxx.h:
	Add new bug types.

	Fix a typo in a comment.

aic7xxx.reg:
	Add a definition for the SHVALID bit in SSTAT3 for Ultra2/3
	chips.  This bit inicates whether the bottom most (current)
	element in the S/G fifo has exhausted its data count.

aic7xxx.seq:
	Be more careful in how we turn off the secondary DMA channel.
	Being less careful may hang the PCI bus arbitor that negotiates
	between the two DMA engines.

	Remove an unecessary and incorrect flag set operation in
	the overrun case.

	On Ultra2/3 controllers, clear the dma FIFO before starting
	to handle an overrun.  We don't want any residual bytes from
	the beginning of the overrun to cause the code that shuts
	down the DMA engine from hanging because the FIFO is not
	(and never will be) empty.

	If the data fifo is empty by the time we notice that a
	read transaction has completed, there is no need to
	hit the flush bit on aic7890/91 hardware that will not
	perform an auto-flush.  Skip some cycles by short circuiting
	the manual flush code in this case.

	When transitioning out of data phase, make sure that we
	have the next S/G element loaded for the following
	reconnect if there is more work to do.  The code
	would do this in most cases before, but there was
	a small window where the current S/G element could
	be exhausted before our fetch of the next S/G element
	completed.  Since the S/G fetch is already initiated
	at this point, it makes sense to just wait for the
	segment to arrive instead of incuring even more latency
	by canceling the fetch and initiating it later.

	Fast path the end of data phase handling for the last
	S/G segment.   In the general case, we might have
	worked ahead a bit by stuffing the S/G FIFO with
	additional segments.  If we stop before using them
	all, we need to fixup our location in the S/G stream.
	Since we can't work past the last S/G segment, no
	fixups are ever required if we stop somewhere in
	that final segment.

	Fix a little buglet in the target mode dma bug handler.
	We were employing the workaround in all cases instead
	of only for the chips that require it.

	Fix the cause of SCB timeouts and possible "lost data"
	during read operations on the aic7890.  When sending
	a data on any Ultra2/3 controller, the final segment
	must be marked as such so the FIFO will be flushed and
	cleaned up correctly when the transfer is ended.  We
	failed to do this for the CDB transfer and so, if
	the target immediately transfered from command to data
	phase without an intervening disconnection, the first
	segment transferred would be any residual bytes from
	the cdb transfer.  The Ultra160 controllers for some
	reason were not affected by this problem.

Many Thanks to Tor Egge for bringing the aic7890 problem
to my attention, providing analysis, as well as a mechanism
to reproduce the problem.
2000-07-27 23:17:52 +00:00
Jonathan Lemon ab2adc20f2 Have kevent() automatically restart if interrupted by a signal. If this
is not desired, then the user can register an EV_SIGNAL filter to
explicitly catch a signal event.

Change requested by: jayanth, ps, peter
		     "Why is kevent non-restartable after a signal?"
2000-07-27 23:06:14 +00:00
Jonathan Lemon 1277c3bac4 The DEC version of the Smart controller has its configuration information
stored at a different location in the PCI space, so adjust accordingly.

Also, when using more than two smart controllers in one machine, the
disks were assigned the wrong drive number; fix this as well.
2000-07-27 22:24:44 +00:00
Poul-Henning Kamp f4bac0e6c6 Remove stale, unused and bogus root device hunting code. 2000-07-27 18:18:47 +00:00
Jeroen Ruigrok van der Werven 3759e79c20 Document the 0x12258086 PCI id.
This is in fact an Intel Orion chipset (82454KX/GX) which has been used
in HP NetServer's LS4 range.
HP Probably relabeled the DID.  That's the only explanation I can find
plausible to this `mystery'.
2000-07-27 09:54:50 +00:00
Brian Feldman f623957fef -mkdir the ${DESTDIR}/modules directory upon modules-install in case it
doesn't exist.  This could bite you by allowing you merrily install your
modules one on top of the other as the regular file ${DESTDIR}/modules
and think it completed properly...
2000-07-27 03:50:25 +00:00
Brian Feldman 3c89e357f0 Distinguish between whether ktraceing was enabled before an IO
operation or after it.  If the ktrace operation was enabled while the
process was blocked doing IO, the race would allow it to pass down
invalid (uninitialized) data and panic later down the call stack.
2000-07-27 03:45:18 +00:00
Marcel Moolenaar 4c02bded00 Remove the only use of SCARG and perform dead code elimination. 2000-07-27 01:22:24 +00:00
Bill Paul 51a4eb4bed Use a custom Tigon 2 firmware image, hopefully temporarily. This is
the 12.4.11 firmware with a few changes to the link handling code merged
in from the 12.4.13 release. I'm doing this because the 12.4.13 firmware
doesn't seem to handle 10/100 link settings properly on 1000baseT cards.
Note that the revision codes still identify the firmware as 12.4.13
because both ti_fw2.h and ti_fw.h have to have the same revision values,
and I wanted to keep the 12.4.13 firmware for Tigon 1 cards.

It's nice to have firmware source.
2000-07-26 23:55:34 +00:00
Archie Cobbs 642e43b39b Add address translation support for RTSP/RTP used by RealPlayer and
Quicktime streaming media applications.

Add a BUGS section to the man page.

Submitted by:	Erik Salander <erik@whistle.com>
2000-07-26 23:15:46 +00:00
Kirk McKusick a6c8be39c9 Disable LK_CANRECURSE on buffer locks. The recusion is needed only for
certain uses of snapshots and currently appears to be causing some
other problems. So for now, I am reverting to the old semantics until
I have had time to investigate what is causing the other problems.
2000-07-26 23:10:02 +00:00
Kirk McKusick 3592b7155c Clean up the snapshot code so that it no longer depends on the use of
the SF_IMMUTABLE flag to prevent writing. Instead put in explicit
checking for the SF_SNAPSHOT flag in the appropriate places. With
this change, it is now possible to rename and link to snapshot files.
It is also possible to set or clear any of the owner, group, or
other read bits on the file, though none of the write or execute
bits can be set. There is also an explicit test to prevent the
setting or clearing of the SF_SNAPSHOT flag via chflags() or
fchflags(). Note also that the modify time cannot be changed as
it needs to accurately reflect the time that the snapshot was taken.

Submitted by:	Robert Watson <rwatson@FreeBSD.org>
2000-07-26 23:07:01 +00:00
Robert Watson 3ce7b7aa84 o Lock vnode before calling extattr_* VOP's, and modify vnode spec to
allow for that.
o Remember to call NDFREE() if exiting as a result of a failed
  vn_start_write() when snapshotting.

Reviewed by:	mckusick
Obtained from:	TrustedBSD Project
2000-07-26 20:29:20 +00:00
John Baldwin 13f5bcc90d Remove the SHM_PHYS_BACKED option.
Approved by:	peter (in principle)
2000-07-26 19:40:42 +00:00
John Baldwin 446af86da3 Document the SYSV IPC kernel options. Also, remove the SHM_PHYS_BACKED
option as it is no longer used.

PR:		docs/20080
Submitted by:	Michael Robinson <robinson@netrinsics.com>
2000-07-26 19:39:46 +00:00
Poul-Henning Kamp a0580699e1 Fix the "mfs_badop[vop_getwritemount] = 45" messages. 2000-07-26 17:53:04 +00:00
Nick Hibma 9d6eda11bc Remove the preliminary support for ATAPI. It does not work and breaks
(physically) IBM Microdrives.
2000-07-26 01:01:01 +00:00
Nick Sayer b14e438ed8 Change to support vmware... SIOCSIFADDR on the character device
sets the (notional) "remote" ethernet address.

Submitted by:	vsilyaev@mindspring.com
2000-07-25 23:50:30 +00:00
John Baldwin edf6db6217 style(9)'ify all the function prototypes by protecting all the parameter
names with a leading underscore.  Notably, the 'stat' parameter in the
kld_stat() prototype conflicted with stat() and generated a BDE warning.

Approved by:	peter
2000-07-25 22:58:52 +00:00
Mark Murray 7aa4389a6c o Fix a horrible bug where small reads (< 8 bytes) would return the
wrong bytes.

o Improve the public interface; use void* instead of char* or u_int64_t
  to pass arbitrary data around.
Submitted by:	kris ("horrible bug")
2000-07-25 21:18:47 +00:00
Justin T. Gibbs f94bf02fdb Properly handle the case where the residual is 0, but, as the target
didn't bother to send a saved data pointers after the last transfer,
is not recorded in sgptr.  This was only a problem if the target
reported non-zero status as we always check the residual in that case.
2000-07-25 20:40:34 +00:00
Archie Cobbs da010626df Followup to previous commit..
- It's worthwhile to use untimeout(9), even though we must still protect
  against "false" timeouts, because most of the time it saves having to
  handle a dummy timeout event.
- Slight tweaks to the delayed ACK algorithm paramters.
2000-07-25 18:57:20 +00:00
Kirk McKusick 54e53ebda7 Now that buffer locks can be recursive, we need to delete the panics
that complain about them.

Obtained from:	Brian Fundakowski Feldman <green@FreeBSD.org>
2000-07-25 18:28:46 +00:00
Jeroen Ruigrok van der Werven 8259bcdff2 Document IPFILTER_DEFAULT_BLOCK.
PR:		20075
Submitted by:	Arjan de Vet <Arjan.deVet@adv.iae.nl>
2000-07-25 15:40:19 +00:00
Hajimu UMEMOTO 8bf72aef7c Workaround to avoid panic during detach pccard nic. 2000-07-25 11:21:01 +00:00
Bill Fumerola 78a40870e5 s%LINT%NOTES%g 2000-07-25 08:25:48 +00:00
Paul Saab 42f6636213 kern_accf.c is now uipc_accf.c after repo copy. 2000-07-25 07:32:15 +00:00
Kirk McKusick aec3bbe11c Do not need vrele(nd.ni_vp) as that is done by NDFREE(&nd, 0);
Submitted by:	Peter Holm <pho@freebsd.org>
2000-07-25 05:38:54 +00:00
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