117610 Commits

Author SHA1 Message Date
imp
5eaca6ae49 MFC: Bring in support for new PC Card chipset (TC5299J) and old
ISA/PCI chipset (RTL8019 and RTL8029).  Eliminate ED_NO_MIIBUS option.
You are now required to have miibus if you have pccard in your kernel
(but not required if you don't!).  Split out register definitions for
possible future subsetting.

Approved by: re@ (scottl)
2005-10-08 18:00:41 +00:00
delphij
7eae1cb08f MFC (by deischen)
|  Add usleep to the map files.
|
|  Noticed by:     davidxu
|
|  Revision  Changes    Path
|  1.15      +2 -0      src/lib/libpthread/pthread.map
|  1.4       +2 -0      src/lib/libthr/pthread.map

Approved by:	re (kensmith)
Ok'ed by:	deischen, davidxu
2005-10-08 17:58:11 +00:00
delphij
1a10afa24f MFC (by deischen)
|  Add a cancellation point for usleep().
|
|  Revision  Changes    Path
|  1.9       +16 -1     src/lib/libpthread/thread/thr_sleep.c

Approved by:	re (kensmith)
Ok'ed by:	deischen, davidxu
2005-10-08 17:57:49 +00:00
delphij
c87122e6d8 MFC (by deischen)
|  Add a cancellation point for usleep().
|
|  While here, fix sleep() so that it is also a cancellation point (a
|  missing weak reference prevented that).
|
|  Revision  Changes    Path
|  1.10      +19 -0     src/lib/libthr/thread/thr_syscalls.c

Approved by:	re (kensmith)
Ok'ed by:	deischen, davidxu
2005-10-08 17:57:28 +00:00
maxim
2d97b0f05a MFC rev. 1.77: restore kerneldumpheader.architectureversion bytes
swopping.

Approved by:	re (kensmith)
2005-10-08 17:57:15 +00:00
delphij
50d80715c4 MFC (by deischen)
|  Make syslog() use the internal (non-cancellation point) _usleep().
|  Prior to this it was calling the cancellable usleep() while holding
|  a lock.
|
|  Revision  Changes    Path
|  1.36      +1 -1      src/lib/libc/gen/syslog.c

Approved by:	re (kensmith)
Ok'ed by:	deischen, davidxu
2005-10-08 17:57:10 +00:00
delphij
1de4269756 MFC (by deischen)
| Make usleep() overridable by the thread libraries so they can provide
| cancellation points.
|
| Noticed by:     phk
|
| Revision  Changes    Path
| 1.29      +4 -1      src/lib/libc/gen/usleep.c

Approved by:	re (kensmith)
Ok'ed by:	deischen, davidxu
2005-10-08 17:56:53 +00:00
delphij
0273af281b MFC (by deischen)
| Add namespace #defines for usleep.
|
| Revision  Changes    Path
| 1.17      +1 -0      src/lib/libc/include/namespace.h
| 1.14      +1 -0      src/lib/libc/include/un-namespace.h

Approved by:	re (kensmith)
Ok'ed by:	deischen, davidxu
2005-10-08 17:56:33 +00:00
delphij
348870b108 MFC 1.50 (by keramida):
| Add a short description of how a literal colon ':' can be inlined in the
| value of capability databases, since it's not really obvious how a colon
| can be escaped, and a pointer to the getcap(3) manpage for more details.
|
| Triggered by:	a question by Ceri on -questions

Approved by:	re (kensmith)
2005-10-08 17:37:29 +00:00
dougb
707cc5baa9 MFC rm.c 1.53 and rm.1 1.3[78], better handling of the -P flag
on a read-only file, and related doc change.

Approved by:	re (kensmith)
2005-10-08 17:27:37 +00:00
brueffer
fe594717e5 MFC: rev. 1.66
hptmv(4) now works on amd64.

Approved by:	re (hrs)
2005-10-08 08:39:58 +00:00
glebius
9eb8248dd9 This line fell out of the merge, too.
Approved by:	re (implicitly)
2005-10-08 07:35:10 +00:00
pjd
9afbd5e5a6 MFC: sys/kern/kern_mib.c 1.76
mp_ncpus is always (properly) initialized, even on UP kernels,
so just use it.

Approved by:	re (scottl) (approval from 30 Aug 2005)
Reminded by:	delphij
2005-10-08 07:06:49 +00:00
scottl
11bf3e6eaf Outwit gcc.
Submitted by: glebius, kensmith
Approved by: re
2005-10-08 05:29:27 +00:00
yar
0f5aca2db3 MFC:
Add an rc.d script to start the pfsync interface after all
the conventional network interfaces have been started so that
pfsync can be attached to any of the latter.

Record the dependency of rc.d/pf on the newly added rc.d/pfsync.
Also make rc.d/pf start as early as before rc.d/routing to improve
system security.

Document rc.d/pfsync on pfsync(4) and rc.conf(5).

Approved by:	re (scottl), mlaier
2005-10-08 03:32:54 +00:00
jon
aedee39383 MFC of 1.34: fix innetgr() returning false positives and negatives when reverse netgroup matching is used.
PR:		35506
Approved by:	re
2005-10-07 19:38:07 +00:00
sos
4a8dd7f589 MFC:
Add support for setting the SG list segment size.
Use this for the SiI3112 workaround to get rid of the "oversized DMA" errors.

Approved by: re@ (scottl)
2005-10-07 19:25:05 +00:00
brooks
7bbedbf320 MFC rev 1.6:
Don't print anything if we can't do any localpkg shutdown (start already
does this).

Submitted by:	Andre Albsmeier <Andre dot Albsmeier at siemens dot com>
PR:		conf/86606
Approved by:	re (kensmith)
2005-10-07 17:20:35 +00:00
nyan
e61c61f414 MFC: Switch from OLDCARD to NEWCARD on pc98.
Approved by:	re (scottl)
2005-10-07 15:56:30 +00:00
phk
2d15d5e3bc MFC:
make sure the type is set early enough for the kthread to know
	to grab Giant for vnode backed devices.

Approved by:	re@ (scottl)
2005-10-07 15:08:41 +00:00
phk
005f5c2cde MFC:
close a race in waiting for all geom events to have been
	handled.

Approved by:	re@ (scottl)
2005-10-07 15:06:27 +00:00
glebius
97d261903e Big overall MFC of polling(4) cleanup:
o First attempt on removing Giant from polling. Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-September/051848.html
o Second attempt, and big polling cleanup including:
  - Functinal approach to turning polling on/off
  - Deprecating of poll_in_trap
  - Removal of ifnet knowledge from kern_poll.c
  Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053267.html
o Improved checking of user configurable sysctls. Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053351.html
o Moving DEVICE_POLLING from opt_global.h to opt_device_polling.h:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053479.html

o All related documentation fixes.

Approved by:	re (kensmith)
Thanks to:	everyone, who helped with testing
2005-10-07 14:00:06 +00:00
glebius
77f8347d23 MFC:
Define HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
  modules along with kernel.

  After this change it is possible to embrace opt_*.h includes with ifdef
  HAVE_KERNEL_OPTION_HEADERS. And thus, avoid editing a lot of Makefiles
  in modules directory each time we introduce a new opt_xxx.h.

  Requested by:   bde

Approved by:	re (kensmith)
2005-10-07 13:55:58 +00:00
phk
01b0d42812 MFC:
make the kernels printf more paranoid about unknown %-formats

Approved by:	re@ (scottl)
2005-10-07 12:40:51 +00:00
thompsa
03bd7c8581 MFC r1.144
When bridging is enabled and an ARP request is recieved on a member interface,
 the arp code will search all local interfaces for a match. This triggers a
 kernel log if the bridge has been assigned an address.

 arp: ac🇩🇪48:18:83:3d is using my IP address 192.168.0.142!

 bridge0: flags=8041<UP,RUNNING,MULTICAST> mtu 1500
         inet 192.168.0.142 netmask 0xffffff00
         ether ac🇩🇪48:18:83:3d

 Silence this warning for 6.0 to stop unnecessary bug reports, the code will need
 to be reworked.

Approved by:	re (scottl)
2005-10-07 01:51:29 +00:00
imp
0fcbe9db41 MFC: if data is NULL, don't pass that to userland as (null)
Approved by: re@ (scottl)
2005-10-06 23:15:18 +00:00
imp
6e436f7dec MFC: if no device-name, look at subsystem
Approved by: re@ (scottl)
2005-10-06 23:12:05 +00:00
jkim
9acbd23179 MFC: Minor fixes and add amd64 support:
- Fix SMBIOS entry point structure.
- Add structure length sanity check.
- Fix revision number output.

Approved by:	re (kensmith)
2005-10-06 20:43:44 +00:00
thompsa
28e5001029 MFC: if_bridge.c r1.23
> Do not packet filter in the bridge_start() routine, locally generated packets
> are already filtered by the higher layers.

Approved by:	re (kensmith)
2005-10-06 20:43:24 +00:00
jhb
bdd96f31d9 MFC: Don't save and restore the ELCR across suspend and resume for a
particular Intel chipset.

Approved by:	re (scottl)
2005-10-06 20:21:03 +00:00
jhb
27ca7574b6 MFC: Minor fixups:
- Use if_printf() and device_printf().
- Don't zero the softc.
- Cleanup error handling in attach().
- Don't double init the callout handle.

Approved by:	re (scottl)
2005-10-06 20:20:12 +00:00
jhb
6f2511c92d MFC: Pin curthread longer during an interrupt so that we don't have to
ignore preemptions caused by fast interrupt handlers.

Approved by:	re (scottl)
2005-10-06 20:18:20 +00:00
jhb
8e6918f435 MFC: Fixup locking in rl(4) and re(4).
Approved by:	re (scottl)
2005-10-06 20:17:17 +00:00
jhb
54a8f31bcf MFC: Consolidate common code for assigning interrupts to PCI devices and
add a sledgehammer tunable to override PCI interrupt routing for any PCI
device.

Approved by:	re (scottl)
2005-10-06 20:05:04 +00:00
delphij
231bdbf078 MFC 1.280 (by des):
| Two minor optimizations of fdalloc():
|
|  - if minfd < fd_freefile (as is most often the case, since minfd is
|    usually 0), set it to fd_freefile.
|
|  - remove a call to fd_first_free() which duplicates work already done
|    by fdused().
|
| This change results in a small but measurable speedup for processes
| with large numbers (several thousands) of open files.
|
| PR:             kern/85176
| Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
|
| Revision  Changes    Path
| 1.280     +3 -1      src/sys/kern/kern_descrip.c

Approved by:	re
2005-10-06 19:23:02 +00:00
delphij
fb3babf6c0 MFC (by alc):
| Handle vm_map_wire()'s failure.
|
| Revision  Changes    Path
| 1.89      +5 -1      src/sys/kern/link_elf_obj.c

Approved by:	re (scottl)
2005-10-06 19:01:42 +00:00
delphij
72b894b4dc MFC (by alc):
| Correctly handle vm_map_wire()'s failure.  (See also revisions 1.81 and
| 1.82.)
|
| Reviewed by:    tegge
|
| Revision  Changes    Path
| 1.84      +5 -1      src/sys/kern/link_elf.c

Approved by:	re (scottl)
2005-10-06 19:00:39 +00:00
delphij
26f805ee15 MFC (by alc):
| Eliminate an unneeded reference on a vm object.  If, in fact, the nearby
| vm_map_find() fails, then the excess reference causes the vm object to be
| leaked.
|
| Reviewed by:    tegge
|
| Revision  Changes    Path
| 1.83      +0 -2      src/sys/kern/link_elf.c
| 1.88      +0 -2      src/sys/kern/link_elf_obj.c

Approved by:	re (scottl)
2005-10-06 18:58:59 +00:00
delphij
3a4a006967 MFC 1.82:
| Revert the previous change for two reasons: (1) If vm_map_find() succeeds
| but vm_map_wire() fails, then a vm object, vm map entries, and kernel_map
| free space is leaked and (2) unwiring is handled automatically by
| vm_map_remove().
|
| Suggested by:   tegge
|
| Revision  Changes    Path
| 1.82      +10 -17    src/sys/kern/link_elf.c

Approved by:	re (scottl)
2005-10-06 18:57:13 +00:00
delphij
6bfe0c82cc Forced commit to note that the previous commit was to:
MFC: Hook up the hptmv driver for amd64.

| Revision  Changes    Path
| 1.442     +1 -0      src/sys/amd64/conf/GENERIC
| 1.42      +1 -1      src/sys/amd64/conf/NOTES
| 1.76      +10 -0     src/sys/conf/files.amd64
| 1.454     +1 -0      src/sys/modules/Makefile

Approved by:    re (scottl, implicitly)
2005-10-06 18:52:26 +00:00
delphij
e0c014b695 MFC Import of the new version of the HPTMV driver from Highpoint.
The major change here is the support for amd64, as well as possible
support for PAE.  Many thanks to Highpoint for continuing to support
FreeBSD.

Obtained from:  Steve Chang @ Highpoint

Merged revisions:

| 1.3      dev/hptmv/access601.h
| 1.1      dev/hptmv/amd64-elf.raid.o.uu
| 1.3      dev/hptmv/array.h
| 1.3      dev/hptmv/atapi.h
| 1.3      dev/hptmv/command.h
| 1.9+1.10 dev/hptmv/entry.c
| 1.4      dev/hptmv/global.h
| 1.5      dev/hptmv/gui_lib.c
| 1.3      dev/hptmv/hptintf.h
| 1.6      dev/hptmv/hptproc.c
| 1.5      dev/hptmv/i386-elf.raid.o.uu
| 1.5      dev/hptmv/ioctl.c
| 1.3      dev/hptmv/mv.c
| 1.4      dev/hptmv/mvOs.h
| 1.3      dev/hptmv/mvSata.h
| 1.4      dev/hptmv/mvStorageDev.h
| 1.5      dev/hptmv/osbsd.h
| 1.3      dev/hptmv/raid5n.h
| 1.3      dev/hptmv/readme.txt
| 1.3      dev/hptmv/vdevice.h
| 1.4      modules/hptmv/Makefile

Approved by:	re (scottl)
2005-10-06 18:47:58 +00:00
delphij
bf31c9b67e MFC 1.244 (by kbyanc)
| Make getsockopt(..., SOL_SOCKET, SO_ACCEPTCONN, ...) work per IEEE Std
| 1003.1 (POSIX).
|
| Revision  Changes    Path
| 1.244     +1 -0      src/sys/kern/uipc_socket.c

Approved by:	re (scottl)
2005-10-06 18:31:38 +00:00
delphij
86fd2c676c MFC 1.12 (by netchild)
| The resource_xxx routines in subr_hints.c are called before and after the
| kenv environment in kern_environment.c switches to dynamic kenv. The prior
| call sets the static variable hintp to the static hints in subr_hints.c
| (hintmode==0).
|
| However, changes to the environment are not detected by the resource_xxx
| lookups after the change to dynamic kernel environment, so the lookup
| routines only report the old stuff of hintmode==0, even after the change to
| the dynamic kenv. This causes kenv users to see a different environment than
| the kernel routines.
|
| This is a problem in the mixer.c code that looks up initial mixer volume
| settings from the hints: If the hints are dynamic and not from the
| device.hints file, mixer.c doesn't see them, but kenv does.
|
| The patch from the PR (modified to comply to the style of the function)
| solves this.
|
| PR:             83686
| Submitted by:   Harry Coin <harrycoin@qconline.com>

Approved by:	re (scottl)
2005-10-06 18:29:30 +00:00
delphij
ca8005b80c MFC 1.154 (by rodrigc)
|  In ext2_mountfs(), check that the superblock size, SBSIZE,
|  is aligned with the sectorsize value returned by GEOM, before
|  doing a bread() of the superblock.
|  This eliminates a panic when trying the following on an empty CD-ROM drive:
|  mount_ext2fs /dev/acd0 /mnt
|
|  Reviewed by:    phk
|
|  Revision  Changes    Path
|  1.154     +12 -0     src/sys/gnu/fs/ext2fs/ext2_vfsops.c

Approved by:	re (scottl)
2005-10-06 18:27:27 +00:00
delphij
64168ac065 Complete MFC of rev. 1.215:
Fix a LOR between sched_lock and sleep queue lock.

Approved by:	re (scottl)
2005-10-06 18:24:24 +00:00
pjd
2602cc468e MFC: sbin/geom/class/mirror/gmirror.8 1.17
Add a note in example as well, that last sector is used for metadata,
so it don't provoke confusions.

Noticed by:	Victor Sudakov <sudakov@sibptus.tomsk.ru>
Approved by:	re (scottl)
2005-10-06 18:19:13 +00:00
pjd
252b0c2081 MFC: sys/geom/eli/g_eli.h 1.4
Add a __packed keyword to g_eli_metadata struct definition, so
sizeof(struct g_eli_metadata) will return the exact number of bytes needed
for storing it on the disk.
Without this change GELI was unusable on amd64 (and probably other 64-bit
archs), because sizeof(struct g_eli_metadata) was greater than 512 bytes
and geli(8) was failing on assertion.

Reported by:	Michael Reifenberger <mike@Reifenberger.com>
Reminded by:	delphij
Approved by:	re (scottl)
2005-10-06 18:17:29 +00:00
jhb
ea58985c03 MFC: Add the simple refcount API.
Approved by:	re (scottl)
2005-10-06 18:13:19 +00:00
jhb
603cac3a99 MFC: Add atomic_fetchadd(9) operation for types int and 32.
Other small updates to atomic(9) include:
- Note that arm and ppc don't provide 64-bit atomic ops.
- Update sample code.

Approved by:	re (scottl)
2005-10-06 18:12:06 +00:00
ups
94034fc30c MFC: 1.176
Don't pretend to be thread0 when calling sync().
It confuses the lock manager since in some places thread0 is
then used for vnode locking while curthread is used for vnode unlocking.

Approved by:    re (scottl@)
2005-10-06 17:53:46 +00:00