Commit Graph

26685 Commits

Author SHA1 Message Date
Dima Dorfman
10b0e058bb Use MD_NAME and MDCTL_NAME constants where appropriate. 2001-07-18 13:32:38 +00:00
Peter Pentchev
2f7538d646 Make sure that installing a module complains if the target modules
directory does not exist, instead of creating/overwriting a file
with the name of the (expected) directory.  Yes, this deviates a bit
from nearly all other install targets in the tree, but let's face it,
removing a modules directory is not all that uncommon a mistake,
and finding a file with the contents of the last module installed
is a baaad surprise at boot time..

PR:		26317
Submitted by:	"T. William Wells" <bill@twwells.com> (the PR)
		Gregory Bond <gnb@itga.com.au> (the actual patch)
Reviewed by:	silence on -arch and -audit for the last 10 days
MFC after:	2 weeks
2001-07-18 09:59:55 +00:00
Daniel C. Sobral
3afefa3924 Skip the route checking in the case of multicast packets with known
interfaces.

Reviewed by:	people at that channel
Approved by:	silence on -net
2001-07-17 18:47:48 +00:00
David E. O'Brien
b46ba8880c Increase NMBCLUSTERS by 4x.
This takes a GENERIC kernel (MAXUSERS=32) from 1536 to 3072.
2001-07-17 15:51:12 +00:00
Tor Egge
e55bc0a096 The per-cpu temporary buffers are not needed since the pcb_save areas have
the proper alignment.  Change dummy variable in npxinit from stack to bss
to ensure proper alignment.

Reviewed by:	bde
2001-07-17 13:06:47 +00:00
Ruslan Ermilov
9f81cc840b Backout damage to the INADDR_TO_IFP() macro in revision 1.7.
This macro was supposed to only match local IP addresses of
interfaces, and all consumers of this macro assume this as
well.  (See IP_MULTICAST_IF and IP_ADD_MEMBERSHIP socket
options in the ip(4) manpage.)

This fixes a major security breach in IPFW-based firewalls
where the `me' keyword would match the other end of a P2P
link.

PR:		kern/28567
2001-07-17 10:30:21 +00:00
Poul-Henning Kamp
dd8efa4aa4 Add missing () around macro argument in cv_waitq_empty()
Submitted by:	Harti Brandt <brandt@fokus.gmd.de>
2001-07-17 08:25:24 +00:00
Bill Paul
248fa967ca Change the interrupt handler a bit so that we call the nge_rxeof() handler
when we get an RX_ERR interrupt rather than the nge_rxeoc() handler. The
rxeoc (end of channel) handler attempts to reinitialize the whole NIC,
which we don't want to do if we only received a bad packet.
2001-07-16 16:35:09 +00:00
Tor Egge
a5d00fe997 Use PCPU_GET(cpuid) instead of curproc->p_oncpu.
Reviewed by:	peter
2001-07-16 06:00:23 +00:00
Peter Wemm
815d14ddab Use a fixed type for times in on-disk structures for ufs rather than
something that could potentially change like time_t.
2001-07-16 00:55:27 +00:00
David E. O'Brien
59177a15cc Now that config(8) has stopped breaking POLA (mkmakefile.c rev 1.69) by
always including <KERNEL>.hints if its exist reguardless of the lack of a
"hints" directive in the <KERNEL> file; we can have a real hints file again.
2001-07-15 17:56:53 +00:00
Hajimu UMEMOTO
09541513e6 do not M_WAITOK in in6_update_ifa(), since this function can be called
under splnet().  (some comment was added by KAME)

PR:		28927
MFC after:	1 week
2001-07-15 14:24:00 +00:00
Dima Dorfman
02c4d9cff7 Remove whitespace at EOL. 2001-07-15 08:21:37 +00:00
Brooks Davis
09261c4f2f Put module directories one per line so adding new modules creates readable
diffs and produces less conflicts with local source trees.
2001-07-15 04:55:37 +00:00
Benno Rice
1f246456a5 The i386-specific includes in this file were "fixed" by bracketing them with
#ifndef __alpha__.  Fix this for the rest of the world by turning it into
#ifdef __i386__.

Reviewed by:	obrien
2001-07-15 04:11:51 +00:00
David E. O'Brien
2a57c11a3a Turn off preemption on the Alpha for the time being. Peter and JHB aren't
sure when things got so bad (JHB says preemption worked just fine for months
before the AlbertVM commit).  Even post DillionVM locking commit, Miatas
(DEC Personal Workstations) are very fragile -- not making it thru a world
build.  With this patch it does.

Those hacking on SMPng will want to locally back out this commit.  The rest
of us will want to run with it until the SMPng guys figure out the problem(s).

Submitted by:	peter
2001-07-15 00:03:01 +00:00
John Baldwin
ce11a18f0e Fix MCOUNT_ENTER() so it actually compiles in the profiling case.
Pointy hat to:	me
Submitted by:	Danny J. Zerkel <dzerkel@columbus.rr.com>
2001-07-14 21:40:53 +00:00
Matt Jacob
8f01c08a34 Fix reboot hangs that have happened with multiple processors
on Alpha 4100s.

Basically, if you're halting or you're rebooting, you should
tell all other processors to halt first. Define IPI_HALT- IPI_STOP
is not what we want for this purpose, which will call prom_halt(0)
on receipt.

The processor running the halt or reboot wil send an IPI_HALT to all
other processors, delay a bit, then continue to do what what it was
planning on doing (prom_halt({0|1})).
2001-07-14 21:37:57 +00:00
Joerg Wunsch
3a5c2c86a8 Hrmpf. nyan's rev 1.25 commit to fdc.h crossed with my removal of it.
Back-integrate his (PC98) changes into fd.c.
2001-07-14 20:28:02 +00:00
Joerg Wunsch
246ed35d55 Yet another large non-function change.
. Integrate fdc.h into fd.c, with the removal of ft(4) there's no longer
  a reason to scatter things across two files.

. Sanitize comments.  Convert them into the style(9)-recommended
  multi-line form, make them sentences where apprpriate, etc.

. Declare all functions on top, and declare them in the order they
  appear in the file.  This order is totally chaotic, but Bruce
  convinced me that reordering the file wouldn't make it better either.

. Kill a `possibly uninitialized' warning (only seen with -O2) in
  fd_read_status().

. Make the comments at return (0|1) statements in fdstate() consistent.

. Nuke a ``keep the compiler happy'' dummy return at the end of fdstate(),
  gcc is smart enough to detect that it would never be reached anyway.
2001-07-14 20:25:01 +00:00
Peter Wemm
2fc4762c60 Move the hints gunk to a seperate file. It isn't really part of the
newbus structure (no more than subr_rman.c is anyway).
2001-07-14 08:25:18 +00:00
Yoshihiro Takahashi
2308cfa4fc Fixed conflict with sys/dev/syscons/syscons.h.
Submitted by:	yokota
2001-07-14 08:07:26 +00:00
Dima Dorfman
a7a1b07e25 Move fxp to the miibus section where it belongs. 2001-07-14 06:35:54 +00:00
Julian Elischer
8b68f82f72 remember to set the return address in a message when
sending it along a hook.

PR: 27906
Submitted by: Harti Brandt <brandt@fokus.gmd.de>

no MFC as code is different in 4.x
2001-07-14 05:51:33 +00:00
Yoshihiro Takahashi
77663c3006 - Refine pc98 supports.
- Use bus_space stuff.
- Rename FDO_* -> FDC_* (obtained from NetBSD/pc98)
2001-07-14 04:19:09 +00:00
Yoshihiro Takahashi
cde2e82802 Added epson_inw function. 2001-07-14 04:14:29 +00:00
Yoshihiro Takahashi
c713c25620 Merged from the following changes.
sys/dev/syscons/scvgarndr.c revision  1.11
sys/dev/syscons/scvtb.c     revision  1.8
sys/dev/syscons/syscons.c   revisions 1.361, 1.363, 1.364, 1.365 and 1.366
sys/isa/atkbd_isa.c         revision  1.9
sys/isa/syscons_isa.c       revision  1.17
2001-07-14 03:26:02 +00:00
Yoshihiro Takahashi
dd080a65a2 Merged from sys/i386/conf/GENERIC revision 1.313. 2001-07-14 02:45:53 +00:00
Yoshihiro Takahashi
654739ff90 Added (commented out) audio driver. 2001-07-14 02:44:51 +00:00
Yoshihiro Takahashi
d890403f31 Merged from sys/conf/options.i386 revision 1.150. 2001-07-14 02:43:52 +00:00
Noriaki Mitsunaga
b45f9c03c7 Catch up with NetBSD/pc98.
o Much cleanly separate NetBSD(XS) / FreeBSD(CAM) codes.
o Improve tagged queing support (full QTAG).
o Improve quirk support.
o Improve parity error retry.
o Impliment wide negotheation.
o Cmd link support.
o Add copyright of CAM part.
o Change for CAM_NEW_TRAN_CODE.
o Work around for buggy KME UJDCD450.

o stg: add disconnet condition.
o nsp: use suspend I/O.
and more. I thank Honda-san.

conf/options.pc98: add CT_USE_RELOCATE_OFFSET and CT_BUS_WEIGHT
dev/{ct,ncv,nsp,stg}/*_{pccard,isa}.c: add splcam() before calling
        attach/detach functions.

Tested by: bsd-nomads
Obtained from:  NetBSD/pc98
2001-07-14 00:38:51 +00:00
Peter Wemm
9516fbd6d9 Go back to having either static OR dynamic hints, with fallback
support.  Trying to fix the merged set where dynamic overrode
static was getting more and more complicated by the day.

This should fix the duplicate atkbd, psm, fd* etc in GENERIC.  (which
paniced the alpha, but not the i386)
2001-07-14 00:23:10 +00:00
Mike Smith
822c2e6a94 Merge with latest version of the Mylex 6+ driver.
- All sources are built in a single object, reducing namespace pollution.
 - Kill the ready queue, and handle a busy response to mly_start in callers
   rather than deferring the command.
 - Improve our interaction with CAM:
   - Don't advertise physical channels as SCSI busses by default.
   - use the SIM queue freeze capability rather than queueing CDBs internally.
   - force bus reprobe at module load time.
 - Clean up more resources in mly_free.
 - Tidy up debugging levels.
 - Tidy up handling of events (mostly just code cleanliness).
 - Use explanatory macros for operations on bus/target/channel numbers.
2001-07-14 00:12:23 +00:00
Ian Dowse
50c7c3a7c8 Return a locked struct buf from ufsdirhash_lookup() to avoid one
extra getblk/brelse sequence for each lookup. We already had this
buf in ufsdirhash_lookup(), so there was no point in brelse'ing it
only to have the caller immediately reaquire the same buffer.

This should make the case of sequential lookups marginally faster;
in my tests, sequential lookups with dirhash enabled are now only
around 1% slower than without dirhash.
2001-07-13 20:50:38 +00:00
David E. O'Brien
6036d427b7 I really should have just commented out this intire file vs. removing all
the contents.  One may still want the contents as reference for creating
/boot/device.hints.
2001-07-13 18:45:06 +00:00
David E. O'Brien
81e561cdf2 Bump net.inet.tcp.sendspace to 32k and net.inet.tcp.recvspace to 65k.
This should help us in nieve benchmark "tests".

It seems a wide number of people think 32k buffers would not cause major
issues, and is in fact in use by many other OS's at this time.  The
receive buffers can be bumped higher as buffers are hardly used and several
research papers indicate that receive buffers rarely use much space at all.

Submitted by:			Leo Bicknell <bicknell@ufp.org>
				<20010713101107.B9559@ussenterprise.ufp.org>
Agreed to in principle by:	dillon (at the 32k level)
2001-07-13 18:38:04 +00:00
David E. O'Brien
5f662f42d6 Hints processing is FUBAR'ed right now.
By default, we will end up with a duplicate set of hints if people have
a properly populated /boot/device.hints.  So for now, remove the hints
here until Peter revisits the new hints processing from mid-June that
broke Alpha booting.
2001-07-13 17:43:38 +00:00
Dima Dorfman
2e1b1231fc `pcn' supports AMD Am79C97x cards, not Am79C79x cards.
PR:		28946
Submitted by:	Ryuichiro Imura <imura@ryu16.org>
2001-07-13 13:34:08 +00:00
Maxim Sobolev
2ac3543b03 Unbroke kernel if I686_CPU is not defined. 2001-07-13 11:23:06 +00:00
Bill Paul
e7be9f9a1a Deal with the condition where we lose link in the middle of transmitting
a bunch of frames. In this case, the dc_link flag is cleared, and dc_start()
stops draining the if_snd send queue, which results in lots of 'no buffers
available' errors being reported to applications. The whole idea behind
not draining the send queue until the link comes up was to avoid having
the gratuitous ARP being lost while we're waiting for autoneg to complete
after the interface is first brought up. As an optimization, change the
test in dc_start() so that we only bail if dc_link is not set _and_ there
are less than 10 packets in the send queue. If the queue has many frames
in it, we need to drain them. If the queue has a small number of frames
in it, we can hold off on sending them until the link comes up.

MFC after: 1 week
2001-07-12 22:51:59 +00:00
Peter Wemm
28f74b2003 The #define for pcb_savefpu seems to do more harm than good. 2001-07-12 12:48:08 +00:00
Peter Wemm
ad1b7ffaee Fix another missed pcb_savefpu reference (inside NPX_DEBUG) 2001-07-12 12:21:53 +00:00
Peter Wemm
8771bd7eb0 Do not depend on pcb_savefpu backwards compat #define. 2001-07-12 12:19:11 +00:00
Peter Wemm
6a25c625b2 Forgot this fix from another tree. make enable_sse() a real prototype. 2001-07-12 11:54:11 +00:00
Kazutaka YOKOTA
9a3a173bd3 - Define a convenience macro ISTTYOPEN().
- Slightly refine screen saver logic.

No functional change.
MFC after:	2 weeks
2001-07-12 11:43:29 +00:00
Peter Wemm
51ae779a7e Bump param, for SSE support and include file impact (<machine/pcb.h>) 2001-07-12 11:42:47 +00:00
Peter Wemm
aa32e9a994 Move init_sse() out of the "GenuineIntel" section, my AthlonMP system
has it, for example, and it works fine.
2001-07-12 06:36:03 +00:00
Peter Wemm
adc3cb92c2 Apply the i386 SSE mods to pc98 as well. 2001-07-12 06:34:25 +00:00
Peter Wemm
9d146ac5d1 Activate SSE/SIMD. This is the extra context switching support that
we are required to do if we let user processes use the extra 128 bit
registers etc.

This is the base part of the diff I got from:
  http://www.issei.org/issei/FreeBSD/sse.html
I believe this is by:  Mr. SUZUKI Issei <issei@issei.org>
SMP support apparently by: Takekazu KATO <kato@chino.it.okayama-u.ac.jp>
Test code by: NAKAMURA Kazushi <kaz@kobe1995.net>, see
  http://kobe1995.net/~kaz/FreeBSD/SSE.en.html

I have fixed a couple of style(9) deviations.  I have some followup
commits to fix a couple of non-style things.
2001-07-12 06:32:51 +00:00
Bill Paul
660e0297c7 Another NatSemi gigE card; the Netgear GA622T 2001-07-11 22:29:05 +00:00
Bill Paul
01019292b0 Document additional cards supported by the nge driver: LinkSys EG1032
anf EG1064, and the Surecom EP-320G-TX.

Also fix typo in nge.4 man page: Addrton -> Addtron.
2001-07-11 22:09:31 +00:00
Jim Pirzyk
03b84cf051 Commited patch for uni signaling fix.
PR:		kern/28748
Submitted by:	Richard Hodges <rh@matriplex.com>
MFC after:	2 weeks
2001-07-11 16:31:50 +00:00
Dima Dorfman
e30b87b534 Call disk_destroy in cdcleanup() as appropriate.
PR:		24596
Reviewed by:	ken
2001-07-11 05:16:27 +00:00
Brian S. Dean
17bbfb5897 Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' and
'dwatch'.  The new commands install hardware watchpoints if supported
by the architecture and if there are enough registers to cover the
desired memory area.

No objection by: audit@, hackers@

MFC after: 2 weeks
2001-07-11 03:15:25 +00:00
Matt Jacob
761d6b7150 Hmm. Let's try this on for size...
We originally had it such that if the connection topology was FL-loop
(public loop), we never looked at any local loop addresses. The reason
for not doing that was fear or concern that we'd see the same local
loop disks reflected from the name server and we'd attach them twice.

However, when I recently hooked up a JBOD and a system to an ANCOR SA-8
switch, the disks did *not* show up on the fabric. So at least the
ANCOR is screening those disks from appearing on the fabric. Now, it's
possible this is a 'feature' of the ANCOR. When I get a chance, I'll
check the Brocade (it's hard to do this on a low budget).

In any case, if they *do* also show up on the fabric, we should
simply elect to not log into them because we already have an
entry for the local loop. There is relatively unexercised code
just for this case.

MFC after:	2 weeks
2001-07-11 02:34:21 +00:00
Matt Jacob
cd7c95e0bd Sanity guard- return ENODEV if we don't have a good IRQ resource. 2001-07-11 02:24:28 +00:00
Matt Jacob
71cfb39eb9 Slight cleanliness- add an unlock of Giant in one dopanic case. Do
some very minor formatting changes.
2001-07-11 02:23:31 +00:00
Dima Dorfman
b2c3fa70e3 Correct spelling in a comment and remove trailing newline from a
panic() call (panic() adds it itself).
2001-07-11 02:04:43 +00:00
Bill Paul
962315f66f Two optimizations:
1) Bite the bullet, and allow unaligned accesses without buffer copies
   on the i386 platform. According to some tests run by Andrew Gallatin,
   the buffer copy performance hit is greater than the unaligned access
   performance hit (especially with jumbo frames). We still need to copy
   everywhere else.

2) Enable interrupt moderation with a 100us timeout.

Submitted by: Andrew Gallatin <no longer at duke.edu>
MFC after: 1 week
2001-07-10 23:07:15 +00:00
Ian Dowse
9b5ad47fb7 Bring in dirhash, a simple hash-based lookup optimisation for large
directories. When enabled via "options UFS_DIRHASH", in-core hash
arrays are maintained for large directories. These allow all
directory operations to take place quickly instead of requiring
long linear searches. For now anyway, dirhash is not enabled by
default.

The in-core hash arrays have a memory requirement that is approximately
half the size of the size of the on-disk directory file. A number
of new sysctl variables allow control over which directories get
hashed and over the maximum amount of memory that dirhash will use:

  vfs.ufs.dirhash_minsize
    The minimum on-disk directory size for which hashing should be
    used. The default is 2560 (2.5k).

  vfs.ufs.dirhash_maxmem
    The system-wide maximum total memory to be used by dirhash data
    structures. The default is 2097152 (2MB).

The current amount of memory being used by dirhash is visible
through the read-only sysctl variable vfs.ufs.dirhash_maxmem.
Finally, some extra sanity checks that are enabled by default, but
which may have an impact on performance, can be disabled by setting
vfs.ufs.dirhash_docheck to 0.

Discussed on: -fs, -hackers
2001-07-10 21:21:29 +00:00
Doug Rabson
ecab3d453e Make this build again after breakage from previous commits. 2001-07-10 16:18:20 +00:00
Kazutaka YOKOTA
44b37d9627 Fix dependencies between kernel options:
- When both SC_PIXEL_MODE and SC_NO_FONT_LOADING are defined,
  quietly drop SC_NO_FONT_LOADING, because the pixel(raster)
  console requires font.
- When SC_NO_FONT_LOADING is defined, force SC_ALT_MOUSE_IMAGE.
  Without font, the arrow-shaped mouse cursor cannot be drawn.
- Fiddle and simplify some internal macros.
MFC after:	2 weeks
2001-07-10 14:13:34 +00:00
Ruslan Ermilov
a307d59838 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
Yoshihiro Takahashi
214de8c67f Added #include <sys/proc.h>
Submitted by:	Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
2001-07-10 09:59:52 +00:00
Warner Losh
f939cab371 Use INTR_TYPE_AV rather than INTR_TYPE_MISC for the interrupt for
pci interrupts for the bridge.
2001-07-10 04:43:21 +00:00
Peter Wemm
57385865a9 Somehow I missed this. Use INTR_TYPE_AV (high priority) instead of
INTR_TYPE_TTY (lowest priority).
2001-07-09 23:44:54 +00:00
Mike Smith
dfcd35dd08 Whoops; we get an ACPI_OBJECT back from evaluating a method, not
an ACPI_OPERAND_OBJECT.  Fix this so that the power resource type
can be properly checked, and we can get the system level and
resource order.
2001-07-09 21:24:59 +00:00
Joerg Wunsch
0e17a5bcdb Log when the user is turning debugging on/off.
Also sanitize the TRACE* macros a bit so they syntactically behave like
single C statements (even inside in `if' statement).

Submitted by:	des
2001-07-09 21:11:10 +00:00
Joerg Wunsch
5d54fe9172 Hmpf, remove two variables that got unused by rev 1.214. 2001-07-09 21:00:02 +00:00
Joerg Wunsch
83edbfa5ff Ouch, calculate correctly. With 300 rpm and 25 retries, it's 5 seconds
till timeout.
2001-07-09 20:53:19 +00:00
Joerg Wunsch
e3b525a006 Remove parts of rev 1.211 again: do not delete our children iff they
haven't been probed successfully.  It's a known bug that ISA hints
processing instantiates those devices, and prematurely killing them
has other unwanted side-effects.
2001-07-09 20:50:41 +00:00
Joerg Wunsch
3fef646ef0 As des' example shows us, DMA overruns could happen in a situation
where they will never succeed.  Add a stop-gap measure that will at
least eventually timeout the operation instead of retrying it
indefinately.

MFC after:	1 month
2001-07-09 20:46:45 +00:00
Matt Jacob
5819b85009 Add SYSCTL ints for default normal I/O timeout && retry counts.
This is useful if you want to dynamically move into a Fibre Channel
or Multi-initiator environment that happens to be particularly noisy
and ugly that requires a lot of retries (with shorter I/O timeouts)
for commands destried by LIPs or Bus Resets.

Reviewed by:	deafening silence on audit && scsi on the retry counts
MFC after:	2 weeks
2001-07-09 19:18:00 +00:00
Dag-Erling Smørgrav
f0cc1c6f81 Constify the fstype argument to vfs_mount(). This eliminates at least one
"call discards qualifier" warning (in sys/compat/linux/linux_file.c).
2001-07-09 19:11:51 +00:00
Guido van Rooij
333ea48563 Don't share sig handlers after an exec
Reviewed by:	Alfred Perlstein
2001-07-09 19:01:42 +00:00
Guido van Rooij
9b956e9897 Get rid of useless bcopy (the next statement was equivalent) 2001-07-09 19:00:08 +00:00
Bill Paul
75ff968cd5 Apply patch supplied by Jonathan Chen: use the correct arguments to
pci_enable_io(). We need to use SYS_RES_IOPORT/SYS_RES_MEMORY instead
of PCIM_CMD_PORTEN/PCIM_CMD_MEMEN.
2001-07-09 17:58:42 +00:00
Warner Losh
66abd14823 Note that spls are noops 2001-07-09 16:06:06 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Dag-Erling Smørgrav
bf3009895e Fix missing newline and terminator at the end of the vm.zone sysctl. 2001-07-09 03:37:33 +00:00
Joerg Wunsch
fb35bd37f2 Another large patchset from Bruce.
Despite of a few cosmetic things like adding ``irritating silly
parentheses'' around all return values, this mainly improves FDC reset
handling by no longer gratuitously resetting the FDC all the time
(which causes it to lose the notion of the current track) but only in
case of errors, and it sanitizes the block and offset calculations in
fdstrategy() and fdstate().  Some additional cleanup added by me, in
particular the large switch in fdstate() now always uses return to
break out, and no branch falls off the end of the switch statement
anymore.  Per Bruce's suggestion, removed M_NOWAIT from the malloc()s
to simplify things.

Submitted by:	bde (mostly)
2001-07-08 20:50:20 +00:00
Hajimu UMEMOTO
89349143ab soopt_mcopyout() frees mbuf if error occurs, and DOES NOT free it if it is
successful.
This part was lacked during merge.

Obtained from:	KAME
MFC after:	1 week
2001-07-08 18:06:03 +00:00
Bill Paul
2ce0498bd7 Do not set the MODE_1000 bit unless we actually have a gigabit link.
Previously, I had the MODE_1000 bit in the global config register set
unconditionally, which was wrong: we have to turn it off if we have
a 10/100 link. This is now handled in the nge_miibus_statchg() routine.

Discovered by: Nathan Binkert <binkertn@eecs.umich.edu>

(Note: this commit is being done from JFK airport. :P )
2001-07-08 16:24:01 +00:00
Julian Elischer
50bc553e3c Small whitespace fix.
BDE'd by: BDE
2001-07-08 04:58:29 +00:00
Julian Elischer
0b1ae8097d A set of changes to reduce the number of include files the kernel
takes from /usr/include. I cannot check them on alpha.. (will try beast)

Briefly looked at by: Warner Losh <imp@harmony.village.org>
2001-07-08 04:56:07 +00:00
Julian Elischer
8ff09ab3a9 turn on the null-modem device.
(I've been using it with vmware for over a year now.)
2001-07-08 04:17:26 +00:00
Mike Silbersack
2d610a5028 Temporary feature: Runtime tuneable tcp initial sequence number
generation scheme.  Users may now select between the currently used
OpenBSD algorithm and the older random positive increment method.

While the OpenBSD algorithm is more secure, it also breaks TIME_WAIT
handling; this is causing trouble for an increasing number of folks.

To switch between generation schemes, one sets the sysctl
net.inet.tcp.tcp_seq_genscheme.  0 = random positive increments,
1 = the OpenBSD algorithm.  1 is still the default.

Once a secure _and_ compatible algorithm is implemented, this sysctl
will be removed.

Reviewed by: jlemon
Tested by: numerous subscribers of -net
2001-07-08 02:20:47 +00:00
Dima Dorfman
4718c85a24 Fill paragraphs after previous commit. 2001-07-08 01:04:10 +00:00
Dima Dorfman
86bbbaba40 Note that options should be listed in NOTES, not LINT, although LINT
is generated from NOTES.  Also correct a bogus path;
<machine>/conf/options.<machine> doesn't exist.
2001-07-08 01:02:37 +00:00
Mike Smith
55ec04d9bc Ha! This time, I remembered the ACPI module. Update the sources list
to reflect recent changes in the code.
2001-07-07 23:36:13 +00:00
Mike Smith
83ac9b3bab Nuke the ACPI APIC driver. The ACPI CA infrastructure it depended on
is gone, and it's not coming back, and the whole driver needed to be
rethrought to deal with a major chicken-and-egg consideration.
2001-07-07 22:23:56 +00:00
Mike Smith
815e9365a2 Nuke the ACPI APIC driver. The ACPI CA infrastructure it depended on
is gone, and it's not coming back, and the whole driver needed to be
rethrought to deal with a major chicken-and-egg consideration.
2001-07-07 22:18:30 +00:00
Hajimu UMEMOTO
3efe99eb71 The m_free call in the ip6_fw_ctl_ptr == NULL case apparently
tries to free uninitialized mbuf.
This was my mistake during recent KAME merge.  This part is for
*BSD other than FreeBSD.

Submitted by:	Alexander N. Kabaev <ak03@gte.com>
2001-07-07 19:58:45 +00:00
Mitsuru IWASAKI
f0987736ef Fix typo in acpi_cpu_attach() and correct range checking in
acpi_cpu_speed_sysctl().
2001-07-07 18:39:13 +00:00
Mike Smith
fec754d4b4 Kill the old processor driver; the ACPI CA functions it depended on
are not coming back any time soon.  Implement a new 'acpi_cpu' driver
with support for CPU throttling and power policies.
2001-07-07 10:27:17 +00:00
Mike Smith
7d3bcec9fb Add acpi_GetTableIntoBuffer, to aid in fetching tables. 2001-07-07 10:20:17 +00:00
Mike Smith
db302f9945 Get the ACPI softc before we potentially dereference it. 2001-07-07 10:18:10 +00:00
Mike Smith
30185bcabe Quiet the complaint about the _SCP method if it doesn't exist; it's
not mandatory.
2001-07-07 10:17:22 +00:00
Mike Smith
8077a62b9c Oops, have to use AcpiSetCurrentResources, not invoke the _SRS method
directly.
2001-07-07 10:12:06 +00:00
Yoshihiro Takahashi
3b2b0a59d0 Merged from sys/i386/i386/machdep.c revisions 1.459 and 1.460. 2001-07-07 04:06:04 +00:00
Mike Smith
4a54f77582 Add support for user-requested override of cooling levels.
Monitor the system power profile, and use _SCP to adjust thermal zones
accordingly.

Simplify the behaviour of the timeout routine, and add some temporary
debugging.
2001-07-07 01:49:15 +00:00
Mike Smith
59c82e8fd0 Add support for system power profiles; select "performance" when AC power
is available and "economy" when it is not.
2001-07-07 01:46:40 +00:00
Mike Smith
b9f0d8be36 Add acpi_powerprofile.c 2001-07-07 01:45:51 +00:00
Mike Smith
02dabf5bf0 Support for system "power profiles". Currently we support two profiles;
"economy" and "performance".
2001-07-07 01:45:37 +00:00
Mike Smith
2b80a316c3 This was only half-implemented when I committed it, and certainly didn't
work.  Now it's implemented and seems to work.
2001-07-06 09:00:07 +00:00
Warner Losh
2c50132299 Cleanup some obsolete comments 2001-07-06 05:52:59 +00:00
Kazutaka YOKOTA
e67e345124 Call ttymalloc() when sysmouse is opened, rather than
when the driver is attached.
MFC after:	2 weeks
2001-07-06 03:24:40 +00:00
Jake Burkholder
d652b3d918 Backout mwakeup, etc. 2001-07-06 01:16:43 +00:00
John Baldwin
52b3919d31 Make these compile again by adding proc.h include for GIANT_REQUIRED
that is in included vm headers.
2001-07-05 21:28:47 +00:00
Matt Jacob
8e6a12fcad Oops- missed a CAMLOCK_2_ISP case. 2001-07-05 19:34:06 +00:00
Matt Jacob
48bd6f600e Bracket call to vm_page_flag_set with required Giant lock/unlock. 2001-07-05 17:27:50 +00:00
Matt Jacob
45c9a36af5 Things have become cinched down more tightly about assertions for Giant.
This uncovered some missing spots where I trade off between isp's lock
and Giant as I enter CAM.
2001-07-05 17:14:57 +00:00
Robert Watson
a0f75161f9 o Replace calls to p_can(..., P_CAN_xxx) with calls to p_canxxx().
The p_can(...) construct was a premature (and, it turns out,
  awkward) abstraction.  The individual calls to p_canxxx() better
  reflect differences between the inter-process authorization checks,
  such as differing checks based on the type of signal.  This has
  a side effect of improving code readability.
o Replace direct credential authorization checks in ktrace() with
  invocation of p_candebug(), while maintaining the special case
  check of KTR_ROOT.  This allows ktrace() to "play more nicely"
  with new mandatory access control schemes, as well as making its
  authorization checks consistent with other "debugging class"
  checks.
o Eliminate "privused" construct for p_can*() calls which allowed the
  caller to determine if privilege was required for successful
  evaluation of the access control check.  This primitive is currently
  unused, and as such, serves only to complicate the API.

Approved by:	({procfs,linprocfs} changes) des
Obtained from:	TrustedBSD Project
2001-07-05 17:10:46 +00:00
Matt Jacob
0b848380bb You cannot require Giant to be locked when you haven't acquired it yet. 2001-07-05 16:55:50 +00:00
Hajimu UMEMOTO
4d303ab842 unbreak building kernel without option INET6
Reported by:	markp
2001-07-05 14:42:54 +00:00
Benno Rice
beefc79739 Set vendor string correctly for the Apple KeyLargo.
Forgotten by:	benno
Spotted by:	n_hibma
2001-07-05 12:04:19 +00:00
Nick Hibma
55e6acd71b Pull in the current version of NetBSD's ulpt.c, supporting bidirectional
communication with printers.
2001-07-05 10:15:37 +00:00
Nick Hibma
48405163d9 Regen. 2001-07-05 10:14:40 +00:00
Nick Hibma
e1f5734cbe Pull in the most recent version of usb_quirks.h and propagate the necessary
changes to the various files.

Also, pull in most of the current usb_subr.c file.
2001-07-05 10:12:59 +00:00
Nick Hibma
b74562cf03 Make the string argument a const. 2001-07-05 10:09:22 +00:00
Nick Hibma
c077cffc2e Update with NetBSD version
Remove duplicates

NOTE: USB_PRODUCT_SANDISK_IMAGEMATE has changed to
USB_PRODUCT_SANDISK_SDDR05A
2001-07-05 09:35:46 +00:00
Dima Dorfman
4c9cf96ea0 Spelling police: extention -> extension in a comment. 2001-07-05 08:52:40 +00:00
Mike Smith
76d1dff4b4 Improve some error messages slightly. 2001-07-05 07:21:12 +00:00
Mike Smith
4fa387b692 Implement PCI interrupt routing using the ACPI data attached to the
PCI bus object.  This should deal both with already-routed interrupts
as well as devices that need an interrupt routed.

Note that it *doesn't* deal with interlocked interrupt dependancies, nor
does it select between interrupt options in a smart way.  These are
optimisations that need further work.
2001-07-05 07:20:51 +00:00
Mike Smith
93962773c5 Fix a couple of misunderstandings in the monitor code. Passive cooling
is a parallel adjunct to active cooling, not a lesser evil.  The _ACx
levels sort from 0 being hottest, not coolest.

Sanity check the returned temperature values, since we are having
trouble reading them on some systems.

Rearrange sysctl nodes a bit; this is probably close to the final layout.
2001-07-05 07:19:17 +00:00
Mike Smith
6f69255b9f Add a new helper function for finding resources in resource buffers.
Move the ACPI generic battery code into a new file.
2001-07-05 07:14:30 +00:00
Matt Jacob
f343cf2135 Apply field bandages to the includes so compiles happen on alpha. 2001-07-05 06:13:44 +00:00
Warner Losh
e3b32280d9 Sync to pccarddevs 1.12 2001-07-05 03:20:48 +00:00
Warner Losh
6b3224653a Merge from NetBSD:
1.131: crhistos; cn40bc ne clone
	1.130: ichiro; COREGA FEther PCC-TXF
	1.129: ichiro; nits
	1.128: ichiro; National Instruments pcmcia GPIB
	1.127: jhawk; Socket EA ethernet
	1.126: ichiro; Intel PRO/Wireless 2001 LAN PC Card
	1.125: ichiro; BUFFALO AirStation 11Mbps WLAN Card
	1.124: ichiro; Corega FEther PCC-TXD
	1.123: onoe; Cisco Aironet 350 Series
	1.122: ichiro; I-O DATA WN-B11/PCM wlan
	1.121: aymeric; Synergy 21 S21810+
	1.120: thorpej; D-LINK DMF-560TX
	1.119: ichiro; typo
	1.118: ichiro; some wavelan card
	1.117: ichiro; Contec FLEXLAN/FX-DS100-PCC wavelan
	1.116: ichiro; COMPAQ Wireless CARD NC5004(Prism2)
	1.114: thorpej; Xircom CreditCard Token Ring II
2001-07-05 03:19:43 +00:00
Matthew Dillon
7197571105 Move vm_page_zero_idle() from machine-dependant sections to a
machine-independant source file, vm/vm_zeroidle.c.  It was exactly the
same for all platforms and updating them all was getting annoying.
2001-07-05 01:32:42 +00:00
Matthew Dillon
6d03d577a5 Reorg vm_page.c into vm_page.c, vm_pageq.c, and vm_contig.c (for contigmalloc).
Also removed some spl's and added some VM mutexes, but they are not actually
used yet, so this commit does not really make any operational changes
to the system.

vm_page.c relates to vm_page_t manipulation, including high level deactivation,
activation, etc...  vm_pageq.c relates to finding free pages and aquiring
exclusive access to a page queue (exclusivity part not yet implemented).
And the world still builds... :-)
2001-07-04 23:27:09 +00:00
Joerg Wunsch
6044485346 More cleanup when detaching. Clone device entries will now be
destroyed properly (otherwise bad things would happen after a clone
dev had been created, and the module was kldunloaded).  Allocated
children that have not successfully probed are being deleted again
(otherwise fd0 and fd1 have always been allocated, even if only
fd0 was acutally present, and fd1 even survived kldunloading the
module).

Still, kldunloading leaves remnants of the previously existing devices
intact.  Why doesn't it destroy all the devices?  As a consequence,
since dev->descr now points into no longer allocated memory, the
system panics deep inside printf(9) when running devinfo(1) after
kldunloading the module.  Ideas sought...

Also, when kldloading the module on a hints-populated isab0, this bus
somehow has already created an fdc0 entry (a dummy) so the load
attempt fails and will register fdc1 instead.  What are those dummy
entries for?  Loading the module from the bootloader works, and it
can be unloaded an re-loaded then later.
2001-07-04 22:10:33 +00:00
Matthew Dillon
1b40f8c036 Change inlines back into mainline code in preparation for mutexing. Also,
most of these inlines had been bloated in -current far beyond their
original intent.  Normalize prototypes and function declarations to be ANSI
only (half already were).  And do some general cleanup.

(kernel size also reduced by 50-100K, but that isn't the prime intent)
2001-07-04 20:15:18 +00:00
John Baldwin
617e358cdf - Sort includes.
- Update vmmeter statistics for vnode pagein/pageouts in getpages/putpages.
2001-07-04 20:14:59 +00:00
John Baldwin
f583b1d938 Spelling fix in a KASSERT: runq_chose -> runq_choose. 2001-07-04 20:00:48 +00:00
John Baldwin
4a370459cc - Update the vmmeter statistics for vnode pageins and pageouts in
getpages/putpages.
- Use vm_page_undirty() instead of messing with pages' dirty fields
  directly.
2001-07-04 19:55:01 +00:00
Matthew Dillon
54d9214595 whitespace / register cleanup 2001-07-04 19:00:13 +00:00
Matt Jacob
ab163f5fee Add CAM_NEW_TRAN_CODE support. Use correct CAMLOCK_2_ISPLOCK macros.
For fibre channel, start going for the gusto and using AC_FOUND_DEVICE
and AC_LOST_DEVICE calls to xpt_async when devices appear and disappear
as the loop or fabric changes.

ISPASYNC_FW_CRASH is the async event code where the platform layer
deals with a firmware crash.
2001-07-04 18:54:29 +00:00
Matt Jacob
9927912756 Macroize request/response in/out queue pointer access. 2001-07-04 18:52:23 +00:00
Matt Jacob
559a1ad2c1 Some possibly helpful casts. 2001-07-04 18:51:58 +00:00
Matt Jacob
f0f4c8ae4b Add a microcomment about how you'd use ispds64_t or ispdlist_t
for CTIO3/CTIO4 entries.
2001-07-04 18:51:06 +00:00
Matt Jacob
1ee34f05dd Add a bunch of additional defines for completion codes. Define
some of the RIO (reduced interrupt operation) stuff. Add 64 bit
data list (DSD type 1) and arbitrary data list (DSD type 2)
data structure defines.

Add macros that parameterize usage of the Request/Response in/out
queue pointers. When we finish 2300 support, different registers
will be accessed for the 2300.
2001-07-04 18:49:00 +00:00
Matt Jacob
b91862efef Firmware crashes handled in platform specific code (isp_async call).
Fix longstanding silly buglet that left a hole in the debug log defines.
2001-07-04 18:46:50 +00:00
Matt Jacob
9b9288ec4a More 2300 support prep- the Request/Response in/out pointers are
part of the PCI block for the 2300- not software convention usage
of the mailbox registers- so we macrosize in/out pointer usage.

Only report that a LIP destroyed commands if it actually destroyed
commands. Get the chan/tgt/lun order correct.  Fix a longstanding
stupid bug that caused us to try and issue a command with a tag on
Channel B because we were checking the tagged capability for the
target against Channel A.

A firmware crash is now vectored out to platform specific code
as an async event.

Some minor formatting tweaks.
2001-07-04 18:42:41 +00:00
Matthew Dillon
7b9673fa28 cleanup: GIANT macros, rename DEPRECIATE to DEPRECATE
Move p_giant_optional to proc zero'd section
Remove (old) XXX zfree comment in pipe code
2001-07-04 17:11:03 +00:00
Matthew Dillon
0cddd8f023 With Alfred's permission, remove vm_mtx in favor of a fine-grained approach
(this commit is just the first stage).  Also add various GIANT_ macros to
formalize the removal of Giant, making it easy to test in a more piecemeal
fashion. These macros will allow us to test fine-grained locks to a degree
before removing Giant, and also after, and to remove Giant in a piecemeal
fashion via sysctl's on those subsystems which the authors believe can
operate without Giant.
2001-07-04 16:20:28 +00:00
Matthew Dillon
085be199c6 postsig() currently requires Giant to be held. Giant is held properly at
the first postsig() call, but not always held at the second place,
resulting in an occassional panic.
2001-07-04 15:36:30 +00:00
Yoshihiro Takahashi
f44a4f377e - Don't overwrite inb, inw and outw.
- Move the lance_probe function to if_lnc.c.
- Support C-NET(98)S again.

Submitted by:		chi@bd.mbn.or.jp (Chiharu Shibata) and nyan
No response from:	Paul Richards
2001-07-04 13:00:21 +00:00
Hajimu UMEMOTO
033110569e adjust mbuf length right in route_output().
Obtained from:	KAME
MFC after:	1 week
2001-07-04 11:29:55 +00:00
Hajimu UMEMOTO
554bf4aa86 When the link-layer address of a router changes, select the
best router again.  In particular, when the neighbor entry is newly
created, it might affect the selection policy.

Obtained from:	KAME
MFC after:	1 week
2001-07-04 11:27:24 +00:00