Commit Graph

27391 Commits

Author SHA1 Message Date
cg
2c0e81585d MFS rev 1.8.2.8:
release resources on detach

Submitted by:	"Christopher N . Harrell" <cnh@netvmg.com>
2001-08-27 00:54:26 +00:00
jon
c07859c916 Part two of this NEWCARD update:
Briefly, the significant changes include:
 * Way better resource management in pccbb, pccard and cardbus.
 * pccard hot-removal now appears to work.
 * support pre-fetchable memory in cardbus.
 * update cardbus to support new pci bus interface functions.
 * Fix CIS reading to no longer use rman_get_virtual().

What's not there, but in the works:
 * pccard needs to do interrupt properly and not read the ISR on single
   function cards.
 * real resource management for pccard
 * a complete implementation of CIS parsing
 * need to look into how to correctly use mutex in pccbb
2001-08-27 00:09:42 +00:00
jon
dc0fa08956 Non-functional changes to NEWCARD stuff.
This is the first part of a two-part update to NEWCARD.  Changes in this
commit are non-functional, and includes the following:
 * indentation and other changes to meet style(9).
 * other minor style consistancy changes
 * addition of comments
 * renaming of device_t variables to be consistant across all of NEWCARD.

(note that not all style violations are fixed in this commit -- those that
 aren't will be clobbered by the next commit.)
2001-08-26 23:56:49 +00:00
jon
1d2b5256d0 Non-functional changes to NEWCARD stuff.
This is the first part of a two-part update to NEWCARD.  Changes in this
commit are non-functional, and includes the following:
 * indentation and other changes to meet style(9).
 * other minor style consistancy changes
 * addition of comments
 * renaming of device_t variables to be consistant across all of NEWCARD.

(note that not all style violations are fixed in this commit -- those that
 aren't will be clobbered by the next commit.)
2001-08-26 23:55:34 +00:00
msmith
f498a8c651 Updates to match the ACPI CA 20010816 import:
- New debug macro (ACPI_DEBUG_PRINT), reducing debug-case code size.
 - New debug level/subsystem codes.
2001-08-26 22:50:15 +00:00
msmith
b01167587a Nuke the Windows platform defines; we don't need them. 2001-08-26 22:46:28 +00:00
msmith
397b5abcd4 Merge local changes. 2001-08-26 22:45:42 +00:00
msmith
73f2104b29 This commit was generated by cvs2svn to compensate for changes in r82367,
which included commits to RCS files with non-trunk default branches.
2001-08-26 22:28:18 +00:00
msmith
56186efdbc Vendor import of the Intel ACPI CA 20010816 update. 2001-08-26 22:28:18 +00:00
peter
d26474934a I missed a typo in the last commit: s/whach/which/
Submitted by:	bde
2001-08-26 21:55:54 +00:00
peter
70e5ce4c3e The EXTENDED_GEOMETRY flag is really bit 7. This affects >2GB drives.
PR:		29454
Submitted by:	Rob Manchester <rmanches@vmware.com>
2001-08-26 21:51:35 +00:00
iedowse
bff1ce4c20 Stop using dirhash when a directory is removed, and ensure that we
never attempt to hash directories once they are deleted. This fixes
a problem where operations on a deleted directory could trigger
dirhash sanity panics.
2001-08-26 20:47:19 +00:00
greid
a88b1ce13d Add support for the SiS 7018
PR:		30100
Submitted by:	Ada Lim <adal@cse.unsw.edu.au>
2001-08-26 19:15:28 +00:00
ache
eb7b8850bf Cosmetique & style fixes from bde 2001-08-26 10:28:58 +00:00
ache
c71ba5eea8 Cosmetique & style fixes from bde 2001-08-26 10:23:49 +00:00
billf
01b240a5a7 the IP_FW_GET code in ip_fw_ctl() sizes a buffer to hold information
about rules and dynamic rules. it later fills this buffer with these
rules.

it also takes the opporunity to compare the expiration of the dynamic
rules with the current time and either marks them for deletion or simply
charges the countdown.

unfortunatly it does this all (the sizing, the buffer copying, and the
expiration GC) with no spl protection whatsoever. it was possible for
the dynamic rule(s) to be ripped out from under the request before it
had completed, resulting in corrupt memory dereferencing.

Reviewed by:	ps
MFC before:	4.4-RELEASE, hopefully.
2001-08-26 10:09:47 +00:00
benno
d24e31398c Pass NULL instead of MAXPHYS to the DMA allocation method. Be a bit more
verbose if we fail to allocate the DMA buffer.
2001-08-26 07:07:47 +00:00
imp
c65c808072 Stop dereferencing 'r' unconditionally. Maybe it is NULL when ISA
mode and using polling mode.
2001-08-26 04:05:07 +00:00
iedowse
c8ef91ce6c When compacting directories, ufs_direnter() always trusted DIRSIZ()
to supply the number of bytes to be bcopy()'d to move an entry. If
d_ino == 0 however, DIRSIZ() is not guaranteed to return a sensible
length, so ufs_direnter could end up corrupting a directory during
compaction. In practice I believe this can only happen after fsck_ffs
has fixed a previously-corrupted directory.

We now deal with any mid-block unused entries specially to avoid
using DIRSIZ() or bcopy() on such entries. We also ensure that the
variables 'dsize' and 'spacefree' contain meaningful values at all
times. Add a few comments to describe better this intricate piece
of code.

The special handling of mid-block unused entries makes the dirhash-
specific bugfix in the previous revision (1.53) now uncecessary,
so this change removes it.

Reviewed by:	mckusick
2001-08-26 01:25:12 +00:00
imp
bda6136688 Fix last second typo 2001-08-25 22:53:47 +00:00
imp
a0e9d4b186 Back out the isa/pci string reporting. It may cause panics. 2001-08-25 22:45:45 +00:00
imp
ac3158572a The tunable is hw.pcic.irq, but the hw.pcic.override_irq was how it was
reported in sysctl.
2001-08-25 22:39:44 +00:00
imp
ddaef53997 Fix cut-and-paste-o that Nate found. We were setting csc_route twice,
rather than setting it once and setting func_route when we can't route
PCI interrupts.
2001-08-25 22:04:00 +00:00
brian
72dc54c8ff TUNSIFINFO now expects IFF_MULTICAST to be OR'd with either IFF_POINTOPOINT
or IFF_BROADCAST.  If it's not, the IFF_MULTICAST is removed.

This is in line with how NetBSD & OpenBSD do it.
2001-08-25 09:12:57 +00:00
peter
72b8990119 Argh! Revert accidental commit. 2001-08-25 07:42:27 +00:00
imp
5cdc9f7c0c First cut at getting the ISA routing working. If we can't route a PCI
interrupt for the CSC interrupt, then we revert to ISA.  If we didn't
have an interrupt set up with hw.pcic.irq, then do polling.

Also, don't complain about ignoring function 1 for any devices except
pcic devices.  This would normally only show up if someone set
hw.pcic.ignore_function_1=1.

MFC: as soon as I can test it on some troublesome laptops.
2001-08-25 06:40:00 +00:00
peter
e0dbc46fb0 Implement idle zeroing of pages. I've been tinkering with this
on and off since John Dyson left his work-in-progress.

It is off by default for now.  sysctl vm.zeroidle_enable=1 to turn it on.

There are some hacks here to deal with the present lack of preemption - we
yield after doing a small number of pages since we wont preempt otherwise.

This is basically Matt's algorithm [with hysteresis] with an idle process
to call it in a similar way it used to be called from the idle loop.

I cleaned up the includes a fair bit here too.
2001-08-25 05:00:44 +00:00
peter
5fa2d1a53c vm_page_zero_idle() is no longer MD. 2001-08-25 04:54:25 +00:00
peter
5f5f9e4c4e Remove a reference to MAP_INHERIT. 2001-08-25 04:27:40 +00:00
julian
ce1ff9984d Add another comment.
check for 'teh's this time..
2001-08-25 02:44:38 +00:00
peter
70aca15c21 Optionize UPAGES for the i386. As part of this I split some of the low
level implementation stuff out of machine/globaldata.h to avoid exposing
UPAGES to lots more places.  The end result is that we can double
the kernel stack size with 'options UPAGES=4' etc.

This is mainly being done for the benefit of a MFC to RELENG_4 at some
point.  -current doesn't really need this so much since each interrupt
runs on its own kstack.
2001-08-25 02:20:02 +00:00
peter
d244a653e5 s/teh/the/ 2001-08-25 02:06:59 +00:00
julian
f693bc9d7e Add an explanatory note that would have saved me an hour or two
of confusion had it been there when I started reading the code..
2001-08-25 01:16:47 +00:00
mjacob
b714916e03 John Polstra
bogus additional write to WXREG_IMASK that enabled *all* interrupt causes
while I was trying to disable the chip. Oops.
2001-08-24 23:08:13 +00:00
bmilekic
12d4e47ee8 Force a commit on kern_mutex.c to explain reason for last commit but while
I'm at it also add a comment in mtx_validate() explaining the purpose
of the last change.

Basically, this fixes booting kernels compiled with MUTEX_DEBUG. What used
to happen is before we setidt from init386() [still using BTX idt], we
called mtx_init() on several mutex locks, notably Giant and some others.
This is a problem for MUTEX_DEBUG because it enables mtx_validate() which
calls kernacc(), some of which in turn requires Giant.
Fix by calling kernacc() from mtx_validate() only if (!cold).
2001-08-24 23:00:59 +00:00
bmilekic
5f3f4b73af *** empty log message *** 2001-08-24 22:53:45 +00:00
dillon
afb098d153 Add INHERIT_XXX defines for minherit() system call.
Remove MAP_INHERIT - it is no longer supported.
2001-08-24 19:48:07 +00:00
dillon
69c707929d Remove support for the badly broken MAP_INHERIT (from -current only). 2001-08-24 19:29:56 +00:00
dillon
7f91d3a773 Remove MAP_NOEXTEND. It came from 4.4-lite and not only was never
implemented, but mmap()'s default behavior is *already* to not extend
files.  Only write() or ftruncate() can extend a file.
2001-08-24 18:22:46 +00:00
jhb
acc07169ae Style nits:
- Don't use punctuation or newlines in panic messages.
- Remove excess blank lines.

Requested and partially submitted by:	bde
2001-08-24 17:46:58 +00:00
imp
7dc16b8484 Explain what we're doing in pcic_pci_shutdown a little better. Try to
explain the subtle side effects that are going to happen and why we go
ahead and ack the interrupt source.  This stuff is tricky to get
right.

Also, emperical tests have shown that doing a shutdown in attach to be
ineffectual, so remove it from there.  Analysis of the code paths
shows that nearly identical writes to these registers happen in later
parts of the code.  The hanging problem on thinkpads when we change
the interrupt routing type is something else.
2001-08-24 17:29:42 +00:00
jhb
3130e8ec52 Axe a commented, unused #define related to the old giant lock. 2001-08-24 16:52:31 +00:00
jhb
be9d34abc8 INTREN() and INTRDIS() have been MP safe for a while. Don't say that they
are "soon to be" MP safe in the comments.
2001-08-24 16:51:47 +00:00
jhb
18051d7fd7 Remove references to the old giant kernel lock in various comments. 2001-08-24 16:46:15 +00:00
roam
81537f200c Prevent passing a null pointer as a filename to vn_open(),
if for some reason expand_name() failed to build a core file name.

PR:		29931
Submitted by:	Foldi Tamas <crow@kapu.hu>
Reviewed by:	dd, -arch
MFC after:	1 month
2001-08-24 15:49:30 +00:00
ache
ee0b05dda7 Copy from kern_lockf.c: remove extra check 2001-08-24 10:22:16 +00:00
ache
156b56921d Remove extra check unneded now 2001-08-24 10:20:26 +00:00
peter
ef6d8b9ba1 Export the actual KERNBASE to the symbol table. We can use nlist() to get
this without having to second guess it in userland.
2001-08-24 08:29:54 +00:00
peter
5ccbb1e22b Move cpu_fxsr definition to C code (so debug info is generated) and where
it is easily #ifdef'ed so that we dont miss unintentional references to it.
2001-08-24 08:27:24 +00:00
imp
7ebebd6970 Move code to shutdown the pcic_pci_shutdown. Call it on system
shutdown and also before we get going with the device initialization.
This may fix the hangs some people are seeing on warmboot.  It appears
that some machines will reset the cardbus bridge on boot, while others
don't.  So we turn off the card, and ack the interrupts (which likely
is a nop in the shutdown case since we're still fielding interrupts).
This should turn off the interrupts.

Since I don't have hardware that hangs on reboot, I'm committing this
without testing that aspect of the patch (it causes no harm on my
Dell).
2001-08-24 07:43:35 +00:00
imp
3e8c6264e6 Two fixes. First, put into place a more generic chipset specific
initialization structure.  Warn the user for those chipsets that
aren't yet customized that they might not work.  Second, try to power
off the slot on attach and ack the interrupts.  I don't know, but this
might solve the hangs that people will see on Thinkpads if they set
hw.pcic.init_routing=1.
2001-08-24 07:30:18 +00:00
nsayer
c62bd78156 Get rid of redundant device_set_desc. Both the PCI and PCCARD versions
do this in the probe routine now.
2001-08-24 05:47:50 +00:00
nsayer
ff3f45d379 In order for the MA301 to pass interrupts from the PCCard, you must
go into the PLX 9052's interrupt control register and turn on the magic
interrupt enable bit.

Partial thanks are due to OpenBSD for pointing out that the chip is a
PLX 9052 and pointing me to the datasheet PDF.
2001-08-24 02:14:26 +00:00
rwatson
e640f9f979 o Clarify comments in vaccess_acl_posix1e() ACL evaluation routine so
as to improve readability and accuracy.

Obtained from:	TrustedBSD Project
2001-08-24 01:41:42 +00:00
nsayer
f38428d5d3 if_wi can be either pci (without pccard) or pccard 2001-08-23 23:58:49 +00:00
jhb
6208b149df Use witness_upgrade/downgrade for sx_try_upgrade/downgrade. 2001-08-23 22:51:22 +00:00
jhb
9d1073d415 Whitespace nit. 2001-08-23 22:47:51 +00:00
jhb
93fe8f866d Add witness_upgrade() and witness_downgrade() for handling upgrades and
downgrades of shared/exclusive locks.
2001-08-23 22:47:05 +00:00
jhb
4c37bfb8ee Convert some KASSERT()'s into if (foo) panic() because they are testing
how locks are managed by the rest of the kernel, not verifying the internal
integrity of witness itself.
2001-08-23 22:44:47 +00:00
dd
000badbe72 Correct the comment about bpfattach() to match reality.
PR:		29967
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-08-23 22:38:08 +00:00
dd
6ea3a08d37 Correct a typo in a comment: FIN_WAIT2 -> FIN_WAIT_2
PR:		29970
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-08-23 22:34:29 +00:00
jhb
1383792740 Add a new kernel option RESTARTABLE_PANICS. If this option is present,
then one can restart from a panic by resetting the panicstr variable to
NULL.  This commit conditionalizes the previously committed functionality
on this variable.  It also removes the __dead2 attribute from the panic()
function so that when one continues from a panic() the behavior will
be predictable.
2001-08-23 20:32:21 +00:00
wpaul
0e50207f12 Fix a bug in the ste_setmulti() routine. The NIC has 4 16-bit multicast
hash registers, not 2 32-bit ones. This would prevent the multicasr filter
from being programmed correctly in some cases.
2001-08-23 18:22:55 +00:00
ache
6e290545e1 Stupid error from my side in prev. commit: || -> && 2001-08-23 18:02:29 +00:00
jhb
e84a42cf98 Clear the sx_xholder pointer when downgrading an exclusive lock. 2001-08-23 17:57:37 +00:00
ache
a480a6737d vn_stat(): if va_size (u_quad_t) > OFF_MAX, return EOVERFLOW, don't copy it
blindly to st_size
2001-08-23 17:56:48 +00:00
ache
640689c04d Copy yet one check for SEEK_END overflow 2001-08-23 17:12:42 +00:00
ache
661af8586d Add yet one check for SEEK_END overflow 2001-08-23 17:09:23 +00:00
ache
1dabef8845 lseek: fix check for vattr.va_size overflow. Check suggested by bde simple not
works with unsigned types.
2001-08-23 17:01:25 +00:00
ache
86b9c46400 Implement l_len<0 per POSIX check.
Check for valid l_whence too.
2001-08-23 16:13:59 +00:00
ache
f8ef40b0cb Copy my newly introduced l_len<0 'oops' fix from kern_lockf.c 2001-08-23 16:06:14 +00:00
ache
82c8a757fa Oops, fix my broken handling of new l_len<0 case 2001-08-23 16:00:27 +00:00
ache
e932bf8680 Copy POSIX l_len<0 handling from kern_lockf.c 2001-08-23 15:44:24 +00:00
ache
ffadfe832f Originally BSD return EINVAL for l_len < 0, but now POSIX wants it too,
so implement POSIX l_len < 0 handling.
2001-08-23 15:40:30 +00:00
ache
f79f77e5f9 Cosmetique: correct English in comments
non-cosmetique: add missing break; - original code was broken here
2001-08-23 14:45:31 +00:00
ache
abde972f28 Cosmetique: correct English in comments
Pointed by:	bde
2001-08-23 14:41:39 +00:00
ache
34f1fd94b4 Even better move: suppose that server is able to handle SEEK_END,
so check arguments for all but not SEEK_END case, leaving SEEK_END
handling for server
2001-08-23 14:21:26 +00:00
ache
aafa17c550 Apparently SEEK_END locking not supported by NFS. Previous variant
returns EINVAL in that case, change it to EOPNOTSUPP.
2001-08-23 14:09:16 +00:00
ache
29e4dde471 Cosmetique: more <sys/*> into one group, separate include families by
blank line
2001-08-23 13:51:17 +00:00
ache
2879f02ee4 Move <machine/*> after <sys/*>
Pointed by:	bde
2001-08-23 13:27:58 +00:00
ache
a5d8e8c957 Move <machine/*> after <sys/*>
Pointed by:	bde
2001-08-23 13:21:17 +00:00
ache
428194d97d Move <machine/*> after <sys/*>
Add missing fdrop() before EOVERFLOW

Pointed by:	bde
2001-08-23 13:19:32 +00:00
cg
f53d43761e the feederchain builder is currently broken for recording channels. disable
it until it is fixed.  this limits recording to native formats and speeds
only.
2001-08-23 12:27:27 +00:00
cg
a77fa3901d handle bogus values passed to SOUND_PCM_WRITE_CHANNELS/SNDCTL_DSP_CHANNELS
ioctls better- if 0 is passed, return the current setting.  if 1 or 2 are
passed, behave accordingly.  treat values >2 as 2.

PR:		kern/29964
2001-08-23 12:21:12 +00:00
cg
f92a958097 make the 4dwave nx chip work
Submitted by:	Philippe Anel <xigh@noos.fr>
2001-08-23 12:02:29 +00:00
cg
ebfee899aa MFS: make SNDCTL_DSP_SETTRIGGER work 2001-08-23 11:58:38 +00:00
cg
14ef1eed0d MFS: allow multiple opens of mixer devices 2001-08-23 11:56:07 +00:00
cg
2cfb90cc8d many changes:
* add new channels to the end of the list so channels used in order of
addition

* de-globalise definition of struct snddev_info and provide accessor
functions where necessary.

* move the $FreeBSD$ tag in each .c file into a macro and allow the
/dev/sndstat handler to display these when set to maximum verbosity to aid
debugging.

* allow each device to register its own sndstat handler to reduce the amount
of groping sndstat must do in foreign structs.
2001-08-23 11:30:52 +00:00
ache
9b50a3bc04 adv. lock:
copy EOVERFLOW handling code from main variant
fix type of 'size' arg
2001-08-23 08:54:22 +00:00
ache
e955b0b735 adv. lock:
detect off_t overflow _before_ it occurse and return EOVERFLOW instead of
EINVAL
2001-08-23 08:20:21 +00:00
ache
1905060cac Detect off_t EOVERFLOW of start/end offsets calculations for adv. lock,
as POSIX require.
2001-08-23 07:42:40 +00:00
nsayer
fef684f9f8 Oops. The new pci_ids array should be static. 2001-08-23 03:06:16 +00:00
peter
e702307f45 Fix a #endif misplacement in 1.231 due to misapplied patch
Pointy hat to: peter
2001-08-23 01:50:31 +00:00
peter
fdba1bd8ed Fix a comment error that was fixed in the pc98 version. hw.maxmem is
really hw.physmem.
2001-08-23 01:49:12 +00:00
peter
546d8cf46c Merge i386/machdep.c rev 1.474: dont overextend %cs. (finally, it doesn't
conflict with unmerged changes)
2001-08-23 01:47:26 +00:00
peter
5c215a9c87 Merge i386/machdep.c rev 1.469: whitespace changes to fit 80 columns
Forgotten by: jhb
2001-08-23 01:46:23 +00:00
peter
62914c539b Merge i386/machdep.c rev 1.468: make breakpoint/trace interrupt instead
of trap gates

Forgotten by: bde
2001-08-23 01:43:38 +00:00
peter
8e8addf424 Merge 386/machdep.c rev 1.467: fix bugs/miscalculations
Forgotten by:  iwasaki
2001-08-23 01:42:21 +00:00
peter
0e5d70abed Identical to i386/machdep.c rev 1.473: move submap initialization to MI. 2001-08-23 01:36:54 +00:00
peter
be26ed33a4 Merge i386/machdep.c rev 1.472: Fix bug in physmem_est and maxbcache
calculation

Forgotten by: dillon
2001-08-23 01:34:35 +00:00
peter
baeea019ed Merge i386/machdep.c rev 1.470. Limit KVM for buffer cache etc.
Forgotten by: dillon
2001-08-23 01:30:51 +00:00
peter
c5420ad0cd Dont add UPAGES to the %cs segment limit. There is nothing there except
page tables.
2001-08-23 01:25:21 +00:00
peter
ae0e5e244b Do not printf when we get called as a result of a pci shared interrupt,
and add a comment to that effect.
2001-08-23 01:16:10 +00:00
peter
8d577cb279 Revert part of the last commit, as suggested by Nick. This is expected,
it is part of the way PCI shared interrupts work.
2001-08-23 01:12:35 +00:00
peter
06f57e01ae Dont compile in SSE fxsave/fxrstor instructions if CPU_ENABLE_SSE isn't
active.
2001-08-23 01:03:56 +00:00
nsayer
2c80ec8e4a Add support for the Netgear MA301 PCI adapter for the MA401.
It appears that a number of PrismII card vendors seem to be doing the
same thing (that is, using the same PCI bridge chip) to support PCI,
but each with their own vendor/product ID. So rather than cut-n-paste
another if statement into the probe routine, it's probably better to
provide support for a table. Adding new devices will be a lot easier
that way.
2001-08-23 00:57:40 +00:00
tmm
b2b2e0d452 Regenerate from syscalls.master using the new makesyscalls.sh revision. 2001-08-22 23:27:20 +00:00
tmm
fd3e5ce275 Add padding before each element of the syscall argument structures in
sysproto.h in addition to the existing padding afterwards.
This is needed to support big-endian architectures like sparc64.

Reviewed by:	bde
Tested on alpha by:	jhb
2001-08-22 23:22:47 +00:00
alex
5fe82c17fe Fix a simple typo I just happened to find. 2001-08-22 19:12:24 +00:00
dillon
f658586bd8 Remove the code that limited the buffer_map to 1/2 the size of the
kernel_map.  maxbcache takes care of this now and the 1/2 limit can
interfere with testing.

Suggested by: bde
2001-08-22 18:10:37 +00:00
iwasaki
f098630938 Move CR4.PGE enabling code after paging is enabled via CR0.PG based on
the description (2.5. CONTROL REGISTERS) of Intel developer's manual at:
ftp://download.intel.com/design/PentiumII/manuals/24319202.pdf

Reviewed by:	peter, bde, tlambert2@mindspring.com
Pointed-out by:	"Shin'ya Kumabuchi" <kumabu@t3.rim.or.jp>
MFC after:	1 week
2001-08-22 15:41:43 +00:00
peter
dd00777ae1 OK, now I am scared of pxeldr. It had /boot/loader appended onto
the end of it and decoded the headers.

Submitted by:	jhb
2001-08-22 08:02:01 +00:00
peter
564eab1574 Make these depend on the usb module so they can use its symbols if they
are loaded as seperate .ko files
2001-08-22 05:33:57 +00:00
peter
89919bf2cb Generate an ELF /boot/loader instead of fake a.out. The fake a.out wrapper
did not work with old a.out-only bootblocks anyway. :-(
2001-08-22 05:29:25 +00:00
dillon
abe30f58d8 Move most of the kernel submap initialization code, including the
timeout callwheel and buffer cache, out of the platform specific areas
and into the machine independant area.  i386 and alpha adjusted here.
Other cpus can be fixed piecemeal.

Reviewed by:    freebsd-smp, jake
2001-08-22 04:07:27 +00:00
dillon
a11f076b5c KASSERT if vm_page_t->wire_count overflows. 2001-08-22 04:01:56 +00:00
iedowse
c37a1a0228 When compressing directory blocks, the dirhash code didn't check
that the directory entry was in use before attempting to find it
in the hash structures to change its offset. Normally, unused
entries do not need to be moved, but fsck can leave behind some
unused entries that do. A dirhash sanity panic resulted when the
entry to be moved was not found. Add a check that stops entries
with d_ino == 0 from being passed to ufsdirhash_move().
2001-08-22 01:35:17 +00:00
silby
58e247fcc4 Much delayed but now present: RFC 1948 style sequence numbers
In order to ensure security and functionality, RFC 1948 style
initial sequence number generation has been implemented.  Barring
any major crypographic breakthroughs, this algorithm should be
unbreakable.  In addition, the problems with TIME_WAIT recycling
which affect our currently used algorithm are not present.

Reviewed by: jesper
2001-08-22 00:58:16 +00:00
peter
b6d83b57c8 Introduce two new sysctl's.. vm.kvm_size and vm.kvm_free. These are
purely informational and can give some advance indications of tuning
problems.  These are i386 only for now as it seems that the i386 is
the only one suffering kvm pressure.
2001-08-22 00:50:46 +00:00
jhb
40315bd646 Clear db_active in boot() so that one can call the boot function (as well
as use the panic command) w/o having to manually clear db_active first
to avoid the db_error() in mi_switch().
2001-08-21 23:29:40 +00:00
jhb
e7f2aa236c Push down Giant some in trap_pfault() so we don't grab Giant around
trap_fatal() to make restarting from panic's slightly easier.  Before if
one did 'w 0 0' in ddb, the longjmp in ddb inside of trap_fatal() would
result in Giant being held (or recursed one level deeper) which led to
problems later on.  You can now drop to teh debugger, do 'w 0 0', and
continue w/o a problem.
2001-08-21 23:15:25 +00:00
jhb
88c481e309 Release the sched_lock before bombing out in mi_switch() via db_error().
This makes things slightly easier if you call a function that calls
mi_switch() as it keeps the locking before and after closer.
2001-08-21 23:10:37 +00:00
jhb
6288c19313 Allow one to restart from a panic in DDB by clearing the panicstr
variable to NULL.  Note that since panic() is marked with __dead2, this
has somewhat unpredictable results at best.
2001-08-21 22:55:20 +00:00
n_hibma
f6cd2321ff Find spurious interrupts. 2001-08-21 22:39:04 +00:00
n_hibma
ad3dc53fa8 Add support for the I-O DATA USB-ET/TX(USB Ethernet adapter)
PR:		27792
2001-08-21 22:20:50 +00:00
n_hibma
6c6b6a5819 Add support for the HP 4300C scanner.
Submitted by:		Ernst de Haan <ernst@jollem.com>
2001-08-21 22:16:44 +00:00
peter
8580722a57 Strip out some #if's for old implementations of global data pointers. 2001-08-21 22:14:13 +00:00
n_hibma
aa965e8248 Add quirks for the Olympus Digital Camera.
PR:		26295

Add quirks for the Microtech CameraMate.
2001-08-21 22:13:53 +00:00
n_hibma
20f768aec9 Support for the HP 8200e CD writer. (commented out)
Submitted by:	Heath Nielson <heath@cs.byu.edu>
2001-08-21 22:03:18 +00:00
n_hibma
2108a90fae Add support for the Microtech CameraMate.
Submitted by:		Phil Knaack <pknaack1@netscape.net>
Submitted by:		Jim Bryant <kc5vdj@yahoo.com>
2001-08-21 21:47:08 +00:00
n_hibma
459feba22a Deconfuse a debugging message. 2001-08-21 21:41:15 +00:00
n_hibma
8be7dfb7bf Regen.
National BearPaw 1200 has changed name USB_PRODUCT_NATIONAL_BEARPAW1200.
2001-08-21 21:36:58 +00:00
n_hibma
10d148026e Add Mustek, National and Ultima scanners.
Submitted by:	Henning Meier-Geinitz <hmg@gmx.de>
PR:		29777
MFC after:	1 week
2001-08-21 21:35:40 +00:00
imp
01d34df527 Report the interrupt path via the sysctl to userland as a string.
Submitted by: green
2001-08-21 21:31:27 +00:00
ache
5b25e70c26 Make lseek() POSIXed: for non character special files
1) handle off_t overflow with EOVERFLOW
2) handle negative offsets with EINVAL

Reviewed by:	arch discussion
2001-08-21 21:20:42 +00:00
jhb
2d8b874618 Add a hook to mi_switch() to abort via db_error() if we attempt to
perform a context switch from DDB.

Consulting from:	bde
2001-08-21 20:09:05 +00:00
imp
b3400f019f Rearrange how we do interrupt routing tweaking. We now have
hw.pcic.intr_path	{1,2}	1 == ISA, 2 == PCI
	hw.pcic.init_route	Force TI chipset initializations in edge case.
2001-08-21 20:04:42 +00:00
scottl
4c62004cf7 Fresh code drop from the vendor. This fixes some critical bugs and adds
support for a new class of controllers.  Also adjust MAINTAINER at the
approval of msmith.

Obtained from:	mark_salyzyn@adaptec.com
2001-08-21 19:58:16 +00:00
jhb
4f6c3a9342 - Fix a bug in the previous workaround for the tsleep/endtsleep race.
callout_stop() would fail in two cases:
    1) The timeout was currently executing, and
    2) The timeout had already executed.
  We only needed to work around the race for 1).  We caught some instances
  of 2) via the PS_TIMEOUT flag, however, if endtsleep() fired after the
  process had been woken up but before it had resumed execution,
  PS_TIMEOUT would not be set, but callout_stop() would fail, so we
  would block the process until endtsleep() resumed it.  Except that
  endtsleep() had already run and couldn't resume it.  This adds a new flag
  PS_TIMOFAIL to indicate the case of 2) when PS_TIMEOUT isn't set.
- Implement this race fix for condition variables as well.

Tested by:	sos
2001-08-21 18:42:45 +00:00
iwasaki
fbda0f8d3b Fix error checking about device state transition from D0 to D3.
Turn off the resources listed in _PR0 to go to D3 if we don't have _PR3/_PS3.

Reviewed by:	msmith
2001-08-21 18:22:40 +00:00
imp
db70defc69 It looks like we're doing the wrong thing by catching the setup_intr
request and just calling it when we get a bridge interrupt.  The
problem is that if other code wants to block hardware interrupts for a
little bit with splXXX, those masks aren't updated the way we're doing
it.  This doesn't matter for -current, but does for -stable.

The whole reason that we were catching interrupts was to detect that
the card was still there.  Ian's fixes however ensure that the card
will be there with an interrupt handler, or not there at all.  Since
the pcic interrupt is at a high priority, this should be OK.

This should fix the network related crashes people started seeing in
stable after I merged the pcic as a pci device code.

Submitted indirectly by: Ian Dowse
MFC when: Ian has had a chance to do his torture hang testing.
2001-08-21 18:13:16 +00:00
ru
cf9d9a36e7 Added TFTP support.
Submitted by:	Joe Clarke <marcus@marcuscom.com>
MFC after:	2 weeks
2001-08-21 16:25:38 +00:00
jhb
47668ffb66 Whitespace style nits. 2001-08-21 15:37:19 +00:00
jhb
bfb2a1d964 Protect prototype of ptrace_clear_single_step() with #ifdef _KERNEL/#endif.
Requested by:	bde
2001-08-21 13:42:39 +00:00
jhb
39008f1a5d GC unused prototype of ptrace_write_u().
Forgotten by:	peter
2001-08-21 13:41:46 +00:00
brian
3803cbd626 Fix two typos 2001-08-21 13:20:02 +00:00
sos
a70c5b3073 Add support for the newer Promise chips here as well. 2001-08-21 12:23:31 +00:00
sos
20971d752c Finally commit some of the minor things I've collected over the last month(s):
Add tagged queueing support for new IBM drives.

Add support for Yet Another Promise ATA 100 chip.

Flush disk cache on close.

Dont flush the disk cache on BIO_ORDERED anymore.

Cleanup the tests for DMA on ATAPI devices.

Allow to share ALL irq's even the std irg 14 & 15.

Fix calculation bug in end of media code on CD's.

Add REZERO on opening a CDR/CDRW.

Cleanup ataioctl a bit.
2001-08-21 11:35:47 +00:00
ru
4d0fae19b5 Close the "IRC DCC" security breach reported recently on Bugtraq.
Submitted by:	Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
2001-08-21 11:21:08 +00:00
bp
2e08e5b45a Map errdos:67 to the ENOENT.
Obtained from:	Mac OS X
MFC after:		1 week
2001-08-21 09:16:57 +00:00