Commit Graph

29386 Commits

Author SHA1 Message Date
Prafulla Deuskar
8bf402ad91 -Remove unneeded include stddef.h
-Modify modules Makefile so that em driver compiles only on
i386 platform. (Alpha not supported yet)

PR:	kern/32993
MFC after:	1
2001-12-20 17:55:49 +00:00
Boris Popov
d9d8c8172d Previous commit was intented to silence a warning, not to change codepath. 2001-12-20 15:56:45 +00:00
Sheldon Hearn
5bd80fc519 Silence harmless "smbfs_closel: Negative opencount" messages at
unmount time.

Thanks to iedowse for the background information.

Submitted by:	bp
2001-12-20 11:23:49 +00:00
Jim Mock
1bbfa941ef Add missing snd_ich_load entry.
Noticed by:	will
MFC after:	2 days
2001-12-20 09:14:45 +00:00
Dima Dorfman
53d745bc7c Actually make use of the md_version field of 'struct mdio'. In order
not to needlessly break compatibility, decrement MDIOVERSION to 0.

Approved by:	phk
2001-12-20 06:38:21 +00:00
Peter Wemm
1a7c0630db I am not sure if it is a good idea or not to have my id in the cvs log
for this file, but here goes nothing.  This was my first attempt at
tidying up this file.  Unfortunately, it just exposes many more horrors
in the code itself that had been masked by the eyesore that was there
before.  I think this just needs to be put out of its misery.
2001-12-20 05:34:49 +00:00
Peter Wemm
ff5a52e18e Replace a bunch of:
for (pv = TAILQ_FIRST(&m->md.pv_list);
               pv;
               pv = TAILQ_NEXT(pv, pv_list)) {
with:
      TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
2001-12-20 05:29:59 +00:00
Peter Wemm
c04cbb4706 Fix some whitespace nits, and a minor error that I made in some unused
#ifdef DEBUG code (VM_MAXUSER_ADDRESS vs UPT_MAX_ADDRESS).
2001-12-20 03:49:31 +00:00
Peter Wemm
b50e204300 Fix some whitespace nits, converge with other pmap.c's 2001-12-20 03:44:43 +00:00
Matthew Dillon
08f3c74981 Pseudofs was leaking VFS cache entries badly due to its cache and use of
the wrong VOP descriptor.  This misuse caused VFS-cached vnodes to be
re-cached, resulting in the leak.  This commit is an interim fix until DES
has a chance to rework the code involved.
2001-12-19 23:58:09 +00:00
Poul-Henning Kamp
96efd94a01 Comment out DEVICE_POLLING so that LINT compiles again. 2001-12-19 20:53:54 +00:00
Warner Losh
d7e53105ec Make this driver a better citizen by moving dev creation and
other initialization into attach from probe.  Also hide a few
printfs behind a bootverbose.

approved in principle by: phk
2001-12-19 19:37:31 +00:00
Matthew Dillon
a57094a011 Calculate whether the sbuf is dynamic *before* bzero()ing the
structure.  This fixes a serious memory leak in the sbuf code.

MFC after:	3 days
2001-12-19 19:04:57 +00:00
Orion Hodson
df6ee7b7a1 Correct unexpected interrupt detection. 2001-12-19 18:26:53 +00:00
Bill Paul
29a2220a5c Fix the "conexant chips don't work in full duplexmode" problem. According
to Phil Kernick:

"The problem is that in full duplex mode, the Conexant chip always reports a
carrier lost error, even when the frame is successfully sent.  So, if we
have a Conexant chip, then ignore carrier lost when in full duplex
mode."

Since the Xircom chips seem to have the same issue and since we already
have a workaround for this, just expand the workaround test to also
check for DC_IS_CONEXANT().
2001-12-19 18:23:45 +00:00
Bill Paul
d9700bb5b5 Fix compiler warning in dc_intr(): if the only code that does a "goto"
to a label is inside an #ifdef block, then the label should *also* be
inside an #ifdef block. Hide the "done:" label which is only used if
DEVICE_POLLING is enabled under #ifdef DEVICE_POLLING.
2001-12-19 18:13:44 +00:00
Orion Hodson
faee270315 Nitlets. 2001-12-19 18:04:04 +00:00
Orion Hodson
23d2179744 Clear resume interrupts - these can occur during initialization and
must be cleared to prevent machine hanging (presently aflicts -current
and -stable).

Problem reported by Bruce Montague <brucem@cse.iitkgp.ernet.in>

PR:		kern/29769 (probably)
2001-12-19 17:38:38 +00:00
Brian Somers
e20e9426e1 It's no longer necessary to ensure that ``gate'' is set when RTF_GATEWAY
is passed, as subsequent code does that check now anyway.

Submitted by:	ru
2001-12-19 16:05:27 +00:00
Brian Somers
02a5d63eff Only call rt_getifa() if we've either been passed a gateway or
if we've been given an RTA_IFP or changed RTA_IFA sockaddr.

This fixes the following bug:
  >/dev/tun100
  >/dev/tun101
  ifconfig tun100 1.2.3.4 5.6.7.8
  ifconfig tun101 1.2.3.4 6.7.8.9
  route change 6.7.8.9 -ifa 1.2.3.4 -iface -mtu 500
which erroneously changed tun101's host route to have an ifp of tun100
(rt_getifa() sets the ifp after calling ifa_ifwithnet(1.2.3.4))

This incarnation submitted by:	ru
2001-12-19 16:03:27 +00:00
Jonathan Lemon
e579ba1aea When storing an int value in a void *, use intptr_t as the cast type
(instead of int) to keep the 64 bit platforms happy.
2001-12-19 15:57:43 +00:00
Yaroslav Tykhiy
3f9e31220b Don't try to free a NULL route when doing IPFIREWALL_FORWARD.
An old route will be NULL at that point if a packet were initially
routed to an interface (using the IP_ROUTETOIF flag.)

Submitted by:	Igor Timkin <ivt@gamma.ru>
2001-12-19 14:54:13 +00:00
Sheldon Hearn
604fb1c032 Add another PS2 PNP id.
PR:		32973
Submitted by:	KT Sin <ktsin@acm.org>
2001-12-19 13:32:21 +00:00
Matthew N. Dodd
fe7075481b Allow retrieval of the virtual address of the AGP aperture
using agp_get_info().

MFC after:	1 week
2001-12-19 08:54:29 +00:00
Matthew N. Dodd
47676b530c Don't put variable declarations in header files, put prototypes.
'pci_devq' provides useful information now.
2001-12-19 08:49:11 +00:00
Jonathan Lemon
a9c9684163 Extend the SYN DoS defense by adding syncookies to the syncache.
All TCP ISNs that are sent out are valid cookies, which allows entries
in the syncache to be dropped and still have the ACK accepted later.
As all entries pass through the syncache, there is no sudden switchover
from cache -> cookies when the cache is full; instead, syncache entries
simply have a reduced lifetime.  More details may be found in the
"Resisting DoS attacks with a SYN cache" paper in the Usenix BSDCon 2002
conference proceedings.

Sponsored by: DARPA, NAI Labs
2001-12-19 06:12:14 +00:00
John Baldwin
4db62c69c2 Display the right message for the SiS 645 chipset.
Submitted by:	Kent Stewart <kstewart@owt.com>
2001-12-19 01:53:11 +00:00
Peter Wemm
9f2f52d695 Do not initialize static/global variables to 0. Use bss instead of
taking up space in the data section.
2001-12-19 01:35:18 +00:00
Peter Wemm
8f0d41d324 Use a different mechanism to get the vnlru process to wake up and notice
the shutdown request at reboot/halt time.
Disable the printf 'vnlru process getting nowhere, pausing...' and instead
export the count to the debug.vnlru_nowhere sysctl.
2001-12-19 01:31:12 +00:00
John Baldwin
c8e555ec14 Fix comment for the SiS 645 chipset to be 645 instead of 635. 2001-12-19 01:23:32 +00:00
John Baldwin
a3ac299561 Make RFPPWAIT a kernel-only flag. Programs desiring this feature should
use vfork() rather than manually invoking rfork().
2001-12-19 00:55:13 +00:00
Luigi Rizzo
d105c784d5 Complete the device polling support by adding a thread in charge
of polling interfaces at the lowest possible priority
(this might result in softnetisr being scheduled, but there is
no risk of livelock because they have a higher priority than
this thread).
2001-12-19 00:53:24 +00:00
John Baldwin
885ccc61f2 Return EINVAL if kernel only flags are passed to the rfork syscall rather
than silently masking them.
2001-12-19 00:53:23 +00:00
John Baldwin
7235f2b1e9 Axe stale extern for a non-existent variable. 2001-12-18 22:42:09 +00:00
Joerg Wunsch
038d1bbd1a Change the test for _MACHINE_ARCH == i386 into #ifdef __i386__ since it
otherwise breaks on the Alpha arch.  I think this is wrong since i'd
actually like to probe for a PC architecture, not for a particular CPU
type.  Anyway, now it's again the way it used to be.
2001-12-18 22:16:33 +00:00
Matthew Dillon
fdb33f08ef This is a forward port of Peter's vlrureclaim() fix, with some minor mods
by me to make it more efficient.  The original code had serious balancing
problems and could also deadlock easily.  This code relegates the vnode
reclamation to its own kproc and relaxes the vnode reclamation requirements
to better maintain kern.maxvnodes.  This code still doesn't balance as well
as it could, but it does a much better job then the original code.

Approved by:	re@freebsd.org
Obtained from:	ps, peter, dillon
MFS Assuming:	Assuming no problems crop up in Yahoo testing
MFC after:	7 days
2001-12-18 20:48:54 +00:00
John Baldwin
acec0a5867 Merge part of revision 1.18 of sys/i386/linux/linux_machdep.c: don't use
RFTHREAD in linux_clone().
2001-12-18 18:50:02 +00:00
Julian Elischer
45449f8432 In a couple of places, we recalculated addresses we already had in local
pointer variables.
2001-12-18 18:46:32 +00:00
John Baldwin
d961068fba Don't use RFTHREAD when creating a kernel process. 2001-12-18 18:42:02 +00:00
Kirk McKusick
f305c5d199 Change the atomic_set_char to atomic_set_int and atomic_clear_char
to atomic_clear_int to ease the implementation for the sparc64.

Requested by:	Jake Burkholder <jake@locore.ca>
2001-12-18 18:05:17 +00:00
John Baldwin
1857e7825f Whitespace fix. 2001-12-18 18:03:48 +00:00
Ruslan Ermilov
4aa5d00e3d Fixed the bug in transparent TCP proxying with the "encode_ip_hdr"
option -- TcpAliasOut() did not catch the IP header length change.

Submitted by:	Stepachev Andrey <aka50@mail.ru>
2001-12-18 16:13:45 +00:00
John Baldwin
48fd1f38ee - Change all callers of addupc_task() to check PS_PROFIL explicitly and
remove the check from addupc_task().  It would need sched_lock while
  testing the flag anyways.
- Always read sticks while holding sched_lock using a temporary variable
  where needed.
- Always init prticks to 0 in ast() to quiet a warning.
2001-12-18 09:06:10 +00:00
John Baldwin
3f9a462fb9 Various assembly fixes mostly in the form of using the "+" modifier for
output operands to mark them as both input and output rather than listing
operands twice.

Reviewed by:	bde
2001-12-18 08:54:39 +00:00
John Baldwin
e4e991e117 Allow the ATOMIC_ASM() macro to pass in the constraints on the V parameter
since the char versions need to use either ax, bx, cx, or dx.

Submitted by:	Peter Jeremy (mostly)
Recommended by:	bde
2001-12-18 08:51:34 +00:00
Peter Wemm
1b4a3b2ffd Fix warnings: the bge_bpd_read*() functions are not used (#ifdef notdef) 2001-12-18 08:03:25 +00:00
Peter Wemm
6197ca159f Fix warning; line 1640: ciss_abort_request defined but not used. 2001-12-18 08:01:48 +00:00
John Baldwin
810ffc1e83 - Add a function to convert 6 byte SCSI commands for read, write, mode
sense, and mode select into their 10 byte equivalents.  Eventually the
  da(4) driver will become more intelligent about this, or at least allow
  umass(4) to pass quirks in directly.  However, this is a functional
  workaround until a better fix is implemented.
- Use the 6 to 10 conversion function to allow the ATAPI and UFI command
  sets to emulate 6 byte commands with 10 byte commands.
- Use the ATAPI command set rather than UFI for the ScanLogic SL11R-IDE
  as it supports the SYNCH_CACHE command.
- Enable ATAPI command set support.
- Pass READ/WRITE_12 commands through for UFI support as the UFI spec
  says they should be supported.
- Update a comment in the UFI translation function since we handle
  MODE_SELECT.
2001-12-18 07:55:17 +00:00
Orion Hodson
0225c5ac86 Add calibration test to determine extent of AC97 overclocking (if any). 2001-12-18 03:29:31 +00:00
David E. O'Brien
99364715f7 With GCC 3, we *must* use the GCC stdarg.h. We can no longer just make
_BSD_VA_LIST_ match what we think the compiler is doing.
2001-12-18 03:28:08 +00:00