]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoMake ppp use <termios.h>, not <sys/tty.h>.
Ed Schouten [Thu, 5 Jun 2008 17:46:32 +0000 (17:46 +0000)]
Make ppp use <termios.h>, not <sys/tty.h>.

ppp's physical.c is filled with calls to termios. For some reason, it
includes <sys/tty.h>, not <termios.h>. Even though this works with the
current version of FreeBSD, we'd better follow the standards.

Approved by: philip (mentor)

16 years agoFix faulty character to control-character conversion for CTRL().
Ed Schouten [Thu, 5 Jun 2008 17:44:18 +0000 (17:44 +0000)]
Fix faulty character to control-character conversion for CTRL().

The CTRL() macro seems to perform character to control-character
conversion (i.e. 'A' to 0x01) to lowercase characters. This is actually
not valid. If we use lowercase characters, conversions such as
CTRL('\\') and CTRL('?') will result to invalid conversions.

Because we must still support old source code that uses CTRL() (bad!),
we make CTRL() accept both forms. When the character is a lowercase
character, we perform the old style conversion.

Approved by: philip (mentor)

16 years agoFix the wait for default route change I made a few weeks ago by creating
Brooks Davis [Thu, 5 Jun 2008 17:26:47 +0000 (17:26 +0000)]
Fix the wait for default route change I made a few weeks ago by creating
a new defaultroute script that just does the wait.  The previous attempt
created a circular dependency through network_ipv6.

Pointy hat to: brooks

16 years agoAdd the missing option LK_NOWITNESS for vn_lock / VOP_LOCK operations.
Attilio Rao [Thu, 5 Jun 2008 17:07:33 +0000 (17:07 +0000)]
Add the missing option LK_NOWITNESS for vn_lock / VOP_LOCK operations.

16 years agoAdd the support for the Globetrotter Max 3.6 HSDPA Modem.
Attilio Rao [Thu, 5 Jun 2008 16:56:56 +0000 (16:56 +0000)]
Add the support for the Globetrotter Max 3.6 HSDPA Modem.

PR: usb/118374
Submitted by: Greg Rivers <gcr at tharned dot org>

16 years agoObsolete gpt(8) by replacing it with geom(8). Add the glabel and
Marcel Moolenaar [Thu, 5 Jun 2008 15:32:05 +0000 (15:32 +0000)]
Obsolete gpt(8) by replacing it with geom(8). Add the glabel and
gpart symlinks for easy access.

16 years agoAllow building a static geom(8) for release related crunched
Marcel Moolenaar [Thu, 5 Jun 2008 15:24:10 +0000 (15:24 +0000)]
Allow building a static geom(8) for release related crunched
binaries. In particular, this allows geom to be added to the
boot_crunch binary on ia64.

16 years agoOptimize the CVS bug #17168 fix by relaxing the conditions for update.
David E. O'Brien [Thu, 5 Jun 2008 15:09:53 +0000 (15:09 +0000)]
Optimize the CVS bug #17168 fix by relaxing the conditions for update.

16 years agoMake the cs(4) driver MPSAFE:
John Baldwin [Thu, 5 Jun 2008 14:49:35 +0000 (14:49 +0000)]
Make the cs(4) driver MPSAFE:
- Add a mutex to the softc to protect the softc and the device hardware.
- Add a private timer to manage transmit watchdogs rather than using
  if_timer/if_watchdog.
- Setup the interrupt handler after ether_ifattach().

Tested by: imp

16 years agoRename the ie_EE16 module to just 'ie' so that at least one of the modules
John Baldwin [Thu, 5 Jun 2008 14:45:32 +0000 (14:45 +0000)]
Rename the ie_EE16 module to just 'ie' so that at least one of the modules
for this driver is called 'ie'.  Otherwise, ifconfig(8) doesn't recognize
any of the modules as being the ie(4) driver and will always try to kldload
the driver even when it is already present in the kernel.

Reported by: Thierry Herbelot

16 years ago- Fix two calls to ieinit() in ieioctl() to call ieinit_locked() instead to
John Baldwin [Thu, 5 Jun 2008 14:43:55 +0000 (14:43 +0000)]
- Fix two calls to ieinit() in ieioctl() to call ieinit_locked() instead to
  avoid recursing on the lock.
- Use IFQ_SET_MAXLEN().

16 years ago- ncurses has been updated to 5.6-20080503
Rong-En Fan [Thu, 5 Jun 2008 13:37:40 +0000 (13:37 +0000)]
- ncurses has been updated to 5.6-20080503

16 years agoWhen devfs_allocv() committed to create new vnode, since de_vnode is NULL,
Konstantin Belousov [Thu, 5 Jun 2008 09:15:47 +0000 (09:15 +0000)]
When devfs_allocv() committed to create new vnode, since de_vnode is NULL,
the dm_lock is held while the newly allocated vnode is locked. Since no
other threads may try to lock the new vnode yet, the LOR there cannot
result in the deadlock.

Shut down the witness warning to note this fact.

Tested by: pho
Prodded by: attilio

16 years agoFix the media auto code by breaking it :-). Auto now just means 'use
Warner Losh [Thu, 5 Jun 2008 05:51:19 +0000 (05:51 +0000)]
Fix the media auto code by breaking it :-).  Auto now just means 'use
10BaseT' since it required 10BaseT to have carrier to switch to it.
This chip makes it hard to do proper auto, so we don't do it.  We
can't test carrier on things easily.

Don't insist on carrier when we set the media.  Don't report failures.
Remove a 1s! delay that appears to not be needed.

With these patches, and John Baldwin's patches, I'm able to pass
packets on my IBM EtherJet card again.

16 years agoAdd a newline after usage.
Max Laier [Wed, 4 Jun 2008 23:31:53 +0000 (23:31 +0000)]
Add a newline after usage.

16 years agoStyle(9) xe(4). The MD5 sums are different, but comparing the dissassemblies
John Baldwin [Wed, 4 Jun 2008 20:26:57 +0000 (20:26 +0000)]
Style(9) xe(4).  The MD5 sums are different, but comparing the dissassemblies
the only changes are from gcc moving some global variables around slightly.

16 years agoReplace checks for RESCUE in sources with checks for STATIC_GEOM_CLASSES
Marcel Moolenaar [Wed, 4 Jun 2008 20:07:59 +0000 (20:07 +0000)]
Replace checks for RESCUE in sources with checks for STATIC_GEOM_CLASSES
and define STATIC_GEOM_CLASSES when building the rescue binary. This way
geom can more easily be part of other crunched binaries, as it requires
only a Makefile change.

16 years agoDe-register declarations.
David Malone [Wed, 4 Jun 2008 19:50:34 +0000 (19:50 +0000)]
De-register declarations.

16 years agoGah, always reset the timer for the watchdog check.
John Baldwin [Wed, 4 Jun 2008 19:33:23 +0000 (19:33 +0000)]
Gah, always reset the timer for the watchdog check.

16 years agoFix a strict aliasing warning - I think it is really telling us
David Malone [Wed, 4 Jun 2008 19:16:54 +0000 (19:16 +0000)]
Fix a strict aliasing warning - I think it is really telling us
that the way char * and void * pointers may not be stored in the
same way.

16 years ago- Split the interrupt handler up into separate subroutines for rx, tx, and
John Baldwin [Wed, 4 Jun 2008 15:19:58 +0000 (15:19 +0000)]
- Split the interrupt handler up into separate subroutines for rx, tx, and
  MAC events.
- Use bus_*() rather than bus_space_*() and remove the bus space tag and
  handle from the softc.
- Retire unused macros for examining CIS tuples.

16 years agoRecode the colemak keymap to ISO-8859.
Philip Paeps [Wed, 4 Jun 2008 12:22:03 +0000 (12:22 +0000)]
Recode the colemak keymap to ISO-8859.

I accidently converted the file to Unicode before committing it and
kbdcontrol doesn't like that very much.

Spotted by: ed
Pointy hat to: philip
MFC after: 1 day

16 years agoAdd device IDs for Ricoh R5U870-based OEM cameras
Kevin Lo [Wed, 4 Jun 2008 10:36:24 +0000 (10:36 +0000)]
Add device IDs for Ricoh R5U870-based OEM cameras

16 years ago- update maintainer's info per src/MAINTAINERS
Rong-En Fan [Wed, 4 Jun 2008 07:38:38 +0000 (07:38 +0000)]
- update maintainer's info per src/MAINTAINERS

16 years ago- Associate myself with ncurses
Rong-En Fan [Wed, 4 Jun 2008 07:37:26 +0000 (07:37 +0000)]
- Associate myself with ncurses

16 years agoAdd link register to fatal trap printout to better diagnose NULL
Peter Grehan [Wed, 4 Jun 2008 07:32:49 +0000 (07:32 +0000)]
Add link register to fatal trap printout to better diagnose NULL
function pointer derefs.

16 years agoo Improve the probe code dealing with interrupts.
Warner Losh [Wed, 4 Jun 2008 06:07:13 +0000 (06:07 +0000)]
o Improve the probe code dealing with interrupts.
o When forced to be 10baseT, don't require that the 10baseT interface
  have link to succeed.  Still require it for IFM_AUTO, however, since it
  appears that there's no way to tell if a specific type of interface
  worked.  I'm doing a web search for a datasheet now to see if there's
  anything obvious.
o Minor incidental formatting nits, including collapsing code of the form
if (foo) {
bar();
} else {
if (baz)
bing();
}
  into:
if (foo) {
bar();
} else if (baz) {
bing();
}
  to save an indentation level.
o Remove stray reference to 3.x config file syntax.

# I believe John's patches still apply after this...

16 years ago- Replace rcsid with __FBSDID.
Jung-uk Kim [Tue, 3 Jun 2008 22:34:52 +0000 (22:34 +0000)]
- Replace rcsid with __FBSDID.
- Remove paths.h and embed it in the source.
- Remove stale alpha support.
- Clean up compiler warnings and fix style(9) bugs.

16 years agoUpdate mctest and its associated script to have a base port to listen
George V. Neville-Neil [Tue, 3 Jun 2008 20:54:46 +0000 (20:54 +0000)]
Update mctest and its associated script to have a base port to listen
on so that multiple copies can be run easily.

Update documentation with group and port arguments which are optional.

16 years ago- Change the watchdog timer logic to match other drivers that use their own
John Baldwin [Tue, 3 Jun 2008 20:40:33 +0000 (20:40 +0000)]
- Change the watchdog timer logic to match other drivers that use their own
  timer by keeping a once-a-second timer running that decrements a counter
  similar to if_timer and reset the chip if it gets down to zero via the
  decrement.
- Use IFQ_SET_MAXLEN().

16 years agocvs2svn did not delete this, even though it is empty.
Peter Wemm [Tue, 3 Jun 2008 19:27:02 +0000 (19:27 +0000)]
cvs2svn did not delete this, even though it is empty.

16 years agoFix the date in the last commit.
Roman Divacky [Tue, 3 Jun 2008 18:09:10 +0000 (18:09 +0000)]
Fix the date in the last commit.

Approved by: kib (mentor)

16 years agoSwitch to emulating Linux 2.6 on default.
Roman Divacky [Tue, 3 Jun 2008 17:50:13 +0000 (17:50 +0000)]
Switch to emulating Linux 2.6 on default.

Approved by: kib (mentor)

16 years agoExclude .svn directories from generated distfile.
Florent Thoumie [Tue, 3 Jun 2008 14:48:16 +0000 (14:48 +0000)]
Exclude .svn directories from generated distfile.

16 years agoRemove unneeded Giant locking of /dev/tty.
Ed Schouten [Tue, 3 Jun 2008 12:38:00 +0000 (12:38 +0000)]
Remove unneeded Giant locking of /dev/tty.

The Giant lock is acquired in two places in tty_tty.c. In both places,
it is unneeded.

There is no reason to specify D_NEEDGIANT on this device node. The
device node has only been designed to return ENXIO when opened. It
doesn't make any sense to lock/unlock Giant, just to return this error.
D_TTY is also unneeded. The unimplemented functions don't need to be
patched by devfs.

We don't need to lock Giant when we want to lookup the proper TTY vnode.
s_ttyvp is already protected by proctree_lock (see devfs_vnops.c).

Approved by: philip (mentor)

16 years agoAdd an XXX comment regarding a bug I introduced when modifying the behavior
Robert Watson [Tue, 3 Jun 2008 11:06:34 +0000 (11:06 +0000)]
Add an XXX comment regarding a bug I introduced when modifying the behavior
of audit log vnode rotation: on shutdown, we may not properly drain all
pending records, which could lead to lost records during system shutdown.

16 years agoFix markup.
Ruslan Ermilov [Tue, 3 Jun 2008 09:43:28 +0000 (09:43 +0000)]
Fix markup.

16 years agoAdd note about a reason to use mount(8) instead of mount_somefs.
Konstantin Belousov [Tue, 3 Jun 2008 09:05:04 +0000 (09:05 +0000)]
Add note about a reason to use mount(8) instead of mount_somefs.

Reported and proof-readed by: pho
Discussed with: rodrigc
MFC after: 3 days

16 years agoBack out the nlm_global_lock part of the last change - I forgot that only
Doug Rabson [Tue, 3 Jun 2008 08:10:58 +0000 (08:10 +0000)]
Back out the nlm_global_lock part of the last change - I forgot that only
exists in my perforce branch :(

Pointy hat: dfr

16 years agoCorrect logic error that would prevent cs pccards from working on
Warner Losh [Tue, 3 Jun 2008 05:47:28 +0000 (05:47 +0000)]
Correct logic error that would prevent cs pccards from working on
systems where the CardBus bridge was connected to a APIC.  The case
where the probe routine is told to not setup the IRQ was mishandled
but the error was masked in the case where the IRQ was a valid one
for the card.

MFC after: 1 week

16 years agoAdd device ID for AnyDATA ADU-500A EV-DO modem.
Alexander Kabaev [Tue, 3 Jun 2008 03:31:53 +0000 (03:31 +0000)]
Add device ID for AnyDATA ADU-500A EV-DO modem.

Submitted by: Oleksandr Tatmanyants
PR: 118479

16 years agoAdd vendor/device IDs for Novatel U740 repackaged by Dell.
Alexander Kabaev [Tue, 3 Jun 2008 03:13:57 +0000 (03:13 +0000)]
Add vendor/device IDs for Novatel U740 repackaged by Dell.

Submitted by: David Gilbert
PR: 122803

16 years agoUpdate if_ndis to remove the legacy if_watchdog interface and
Coleman Kane [Tue, 3 Jun 2008 00:55:48 +0000 (00:55 +0000)]
Update if_ndis to remove the legacy if_watchdog interface and
bring it more up to date. The watchdog timer, and its
associated code, is all collapsed into the ndis_tick function
that was implemented for the NDIS-subsystem watchdog. This
implementation is similar to what numerous other drivers use
to implement the watchdog.

Reviewed by: thompsa, jhb
MFC after: 2 weeks

16 years agoFix a crash when Arctic Ocean is selected.
Jung-uk Kim [Mon, 2 Jun 2008 23:37:33 +0000 (23:37 +0000)]
Fix a crash when Arctic Ocean is selected.

MFC after: 1 week

16 years agoAdd proper mime-types for files that they are relevant for.
Doug Barton [Mon, 2 Jun 2008 20:37:11 +0000 (20:37 +0000)]
Add proper mime-types for files that they are relevant for.
This is useful for things like *.pdf files that svn needs
to know about, and will probably be useful down the road
for other things.

16 years agoMake fe(4) MPSAFE:
John Baldwin [Mon, 2 Jun 2008 19:58:48 +0000 (19:58 +0000)]
Make fe(4) MPSAFE:
- Add a mutex to the softc to protect the softc and device hardware.
- Don't leak bus resources if if_alloc() fails during attach.
- Setup the interrupt handler after calling ether_ifattach().
- Use a private timer to manage the transmit watchdog.

Tested by:  WATANABE Kazuhiro  CQG00620 of nifty.ne.jp

16 years agoAdd locking and make xe(4) MPSAFE:
John Baldwin [Mon, 2 Jun 2008 19:43:24 +0000 (19:43 +0000)]
Add locking and make xe(4) MPSAFE:
- Add a mutex to protect the softc and device hardware.
- Use a callout rather than a callout_handle for the media timer.
- Use a dedicated timer for managing the tx watchdog rather than if_timer.
- Fix some resource leaks if xe_attach() fails.
- Shutdown the device before detaching the driver.
- Setup the interrupt handler after ether_ifattach().

Tested by: Ian FREISLICH  ianf of clue.co.za

16 years agoMake ie(4) MPSAFE:
John Baldwin [Mon, 2 Jun 2008 19:17:40 +0000 (19:17 +0000)]
Make ie(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device.
- Setup the interrupt handler in the common code instead of in each front
  end and do it after ether_ifattach().
- Use ie_stop() and ieinit_locked() in iereset() rather than frobbing IFF_UP
  and invoking ieioctl().
- Use DELAY() to implement a spin loop on a register with a timeout rather
  than scheduling a timeout and then doing a tight spin on the register.
  In the non-MPSAFE case this would never have worked because the spinning
  code held Giant and the timeout routine would have been blocked on Giant
  forever.  The same approach would not worke in the MPSAFE case either for
  the same reason, hence use a loop around DELAY().
- Clear IFF_DRV_(RUNNING|OACTIVE) in ie_stop() rather than in callers.
- Call ieinit_locked() directly rather than ieioctl(!) from ie_mc_reset().
- Don't leak the rx frame buffer on detach.

Tested by: Thierry Herbelot  thierry of herbelot.com

16 years agoSort IP addresses before hashing them for the signature. Otherwise carp is
Max Laier [Mon, 2 Jun 2008 18:58:07 +0000 (18:58 +0000)]
Sort IP addresses before hashing them for the signature.  Otherwise carp is
sensitive to address configuration order.

PR: kern/121574
Reported by: Douglas K. Rand, Wouter de Jong
Obtained from: OpenBSD (rev 1.114 + fixes)
MFC after: 2 weeks

16 years agoAdd a missing call to init_nsm().
Doug Rabson [Mon, 2 Jun 2008 16:00:49 +0000 (16:00 +0000)]
Add a missing call to init_nsm().

MFC after: 1 week

16 years agoWhen attempting to use the NSM state number in a lock request to detect
Doug Rabson [Mon, 2 Jun 2008 15:59:10 +0000 (15:59 +0000)]
When attempting to use the NSM state number in a lock request to detect
a client reboot, do this check before performing the lock otherwise we
will trash the new lock along with any other old locks the client held
before rebooting.

Make sure nlm_check_idle always returns with nlm_global_lock held.

MFC after: 1 week

16 years agoWhen allocating temporary storage to hold a TCP/IP packet header
Robert Watson [Mon, 2 Jun 2008 14:20:26 +0000 (14:20 +0000)]
When allocating temporary storage to hold a TCP/IP packet header
template, use an M_TEMP malloc(9) allocation rather than an mbuf
with mtod(9) and dtom(9).  This eliminates the last use of
dtom(9) in TCP.

MFC after: 3 weeks

16 years agoPush down the major/minor conversion for pts/%u to improve consistency.
Ed Schouten [Mon, 2 Jun 2008 08:40:06 +0000 (08:40 +0000)]
Push down the major/minor conversion for pts/%u to improve consistency.

In the mpsafetty branch, Linux sshd seems to work properly inside a
jail. Some small modifications had to be made to the Linux compatibility
layer.

The Linux PTY routines always expect the device major number to be 136
or higher. Our code always set the major/minor number pair to 136:0.
This makes routines like ttyname() and ptsname() fail, because we'll end
up having ambiguous device numbers.

The conversion was not performed on all *stat() routines, which meant in
some cases the numbers didn't get transformed. By pushing the conversion
into linux_driver_get_major_minor(), the transformation will take place
on all calls.

Approved by: philip (mentor), rdivacky

16 years agogetopt returns an int, not a char. Make sure that we store the
Warner Losh [Mon, 2 Jun 2008 04:50:47 +0000 (04:50 +0000)]
getopt returns an int, not a char.  Make sure that we store the
variable in an int to avoid casting to an unsigned value which causes
the comparison with -1 to fail.

PR: 123807
Submitted by: Matthew Luckie
Reviewed by: keramida@
MFC after: 1 week

16 years agoSlight simplification of the power parsing code, as well as using
Warner Losh [Sun, 1 Jun 2008 20:55:34 +0000 (20:55 +0000)]
Slight simplification of the power parsing code, as well as using
autoincrement in some places where it makes sense.  This makes this .o
about 180 bytes smaller on x86 and amd64 with no apparent functional
changes.

16 years agoIncrease LINK_TABLE_OUT_SIZE from 101 to 4001 like LINK_TABLE_IN_SIZE
Alexander Motin [Sun, 1 Jun 2008 18:34:58 +0000 (18:34 +0000)]
Increase LINK_TABLE_OUT_SIZE from 101 to 4001 like LINK_TABLE_IN_SIZE
to reduce performance degradation under heavy outgoing scan/flood.
Scalability is now much more important then several kilobytes of RAM.

Remove unneded TCP-specific expiration handeling. Before this connected
TCP sessions could never expire. Now connected TCP sessions will expire
after 24hours of inactivity.

Simplify HouseKeeping() to avoid several mul/div-s per packet. Taking into
account increased LINK_TABLE_OUT_SIZE, precision is still much more then
required.

16 years agoMake m_megapullup() more intelligent:
Alexander Motin [Sun, 1 Jun 2008 17:52:40 +0000 (17:52 +0000)]
Make m_megapullup() more intelligent:
 - to increase performance do not reallocate mbuf when possible,
 - to support up to 16K packets (was 2K max) use mbuf cluster of proper size.
This change depends on recent ng_nat and ip_fw_nat changes.

16 years agoPass really available buffer size to libalias instead of MCLBYTES constant.
Alexander Motin [Sun, 1 Jun 2008 15:13:32 +0000 (15:13 +0000)]
Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves
date into a fresh cluster that may become not so.

16 years agoUse INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL when
Philip Paeps [Sun, 1 Jun 2008 14:09:54 +0000 (14:09 +0000)]
Use INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL when
filling the table of ALTQ queues retrieved from the kernel.

It is possible for the kernel to return the queues not by pa.altq.qid order.
When this happens, pf_snmp would only partially fill its table.

PR: bin/120974
Submitted by: Mykola Dzham <i -at- levsha.org.ua>
MFC after: 3 days

16 years agoRevert the changes I made to devfs_setattr() in r179457.
Ed Schouten [Sun, 1 Jun 2008 14:02:46 +0000 (14:02 +0000)]
Revert the changes I made to devfs_setattr() in r179457.

As discussed with Robert Watson and John Baldwin, it would be better if
PTY's are created with proper permissions, turning grantpt() into a
no-op.

Bypassing security frameworks like MAC by passing NOCRED to
VOP_SETATTR() will only make things more complex.

Approved by: philip (mentor)

16 years agoTry to detect a Synaptics touchpad before IntelliMouse. Some touchpads will
Philip Paeps [Sun, 1 Jun 2008 13:44:51 +0000 (13:44 +0000)]
Try to detect a Synaptics touchpad before IntelliMouse.  Some touchpads will
pretend to be IntelliMouse (which have a few more features than generic mice)
causing the IntelliMouse probe to work and the Synaptics code never to be
called.

This should not break "real" IntelliMouse because the Synaptics detection code
is fairly specific.

PR: kern/120833
Submitted by: Eygene Ryabinkin <rea-fbsd -at- codelabs.ru>
MFC after: 1 week

16 years agoPKT_ALIAS_FOUND_HEADER_FRAGMENT result is not an error, so pass that packet.
Alexander Motin [Sun, 1 Jun 2008 12:29:23 +0000 (12:29 +0000)]
PKT_ALIAS_FOUND_HEADER_FRAGMENT result is not an error, so pass that packet.
This fixes packet fragmentation handeling.

Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves
date into a fresh cluster that sometimes may become not so.

16 years agoFix packet fragmentation support broken by copy/paste error in rev.1.60.
Alexander Motin [Sun, 1 Jun 2008 11:47:04 +0000 (11:47 +0000)]
Fix packet fragmentation support broken by copy/paste error in rev.1.60.
ip_id should be u_short, but not u_char.

16 years agoCorrect an error in pmap_promote_pde() that may result in an errant
Alan Cox [Sun, 1 Jun 2008 07:36:59 +0000 (07:36 +0000)]
Correct an error in pmap_promote_pde() that may result in an errant
promotion within the kernel's address space.  Specifically,
pmap_promote_pde() is only called when the page table page (PTP) that
is referenced by the given PDE has a full "use count", i.e., its
wire_count is 512.  Although this guarantees for a user address space
that all 512 PTEs in the PTP hold valid mappings, the same is not true
of the kernel's address space.  A kernel PTP always has a use count of
512 regardless of the state of the PTEs.  Therefore,
pmap_promote_pde() should not assume (or assert) that the first PTE in
the PTP is valid.

16 years agoMerge a recent change from the OpenSolaris source tree.
John Birrell [Sun, 1 Jun 2008 01:46:37 +0000 (01:46 +0000)]
Merge a recent change from the OpenSolaris source tree.
(Don't ask for a vendor import of this yet, we're in the early days of svn)

Instead of using cyclic timers to call the state clean and deadman callbacks,
use a callout on FreeBSD to avoid the deadlock on FreeBSD due to trying to
send interprocessor interrupts with interrupts disabled.

Reported by: ps, jhb, peter, thompsa

16 years ago5416 and similar chips grew another region in the pci clock domain
Sam Leffler [Sat, 31 May 2008 22:44:06 +0000 (22:44 +0000)]
5416 and similar chips grew another region in the pci clock domain
where register accesses do not pass through the byte-lane hardware;
extend the register op macros to deal with this

MFC after: 1 week

16 years agoDont install .svn metadata with the sendmail install.
Remko Lodder [Sat, 31 May 2008 19:15:15 +0000 (19:15 +0000)]
Dont install .svn metadata with the sendmail install.

Submitted by: marcel
Approved by: imp (mentor, implicit)
MFC after: 3 days

16 years agoRemove a quote about the instant-workstation, this port
Remko Lodder [Sat, 31 May 2008 18:07:16 +0000 (18:07 +0000)]
Remove a quote about the instant-workstation, this port
has been removed ages ago.

PR: docs/124166
Submitted by: keramida
Prodded by: novel,keramida

16 years agoImport rewritten nve device id's, which brings this more
Remko Lodder [Sat, 31 May 2008 14:17:36 +0000 (14:17 +0000)]
Import rewritten nve device id's, which brings this more
inline with if_nfe.

PR: 110883
Submitted by: Claudel <regis at claudel dot ch>
Approved by: imp (mentor, implicit)
MFC after: 1 week

16 years agoMerge back devfs changes from the mpsafetty branch.
Ed Schouten [Sat, 31 May 2008 14:06:37 +0000 (14:06 +0000)]
Merge back devfs changes from the mpsafetty branch.

In the mpsafetty branch, PTY's are allocated through the posix_openpt()
system call. The controller side of a PTY now uses its own file
descriptor type (just like sockets, vnodes, pipes, etc).

To remain compatible with existing FreeBSD and Linux C libraries, we can
still create PTY's by opening /dev/ptmx or /dev/ptyXX. These nodes
implement d_fdopen(). Devfs has been slightly changed here, to allow
finit() to be called from d_fdopen().

The routine grantpt() has also been moved into the kernel. This routine
is a little odd, because it needs to bypass standard UNIX permissions.
It needs to change the owner/group/mode of the slave device node, which
may often not be possible. The old implementation solved this by
spawning a setuid utility.

When VOP_SETATTR() is called with NOCRED, devfs_setattr() dereferences
ap->a_cred, causing a kernel panic. Change the de_{uid,gid,mode} code to
allow changes when a->a_cred is set to NOCRED.

Approved by: philip (mentor)

16 years ago- Add ARM as a platform under development.
Hiroki Sato [Sat, 31 May 2008 13:45:35 +0000 (13:45 +0000)]
- Add ARM as a platform under development.
- Bump copyright year.

16 years agoNew release notes:
Hiroki Sato [Sat, 31 May 2008 13:27:16 +0000 (13:27 +0000)]
New release notes:
syscons(4) Colemak keyboard layout support,
jme(4) for JMicron JMC250 Gigabit/JMC260 Fast Ethernet controllers,
ISDN4BSD and netatm removal,
libarchive-based cpio added and GNU cpio renamed as gcpio,
jexec(8) -j option added,
ping6(8) return value is now the same as ping(8),
tar(1) --numeric-owner, -S, and -s options added, and
pkg_create(1) -n option added.

16 years agoAdd the DTrace test kernel module so that people can run the tests.
John Birrell [Sat, 31 May 2008 09:37:40 +0000 (09:37 +0000)]
Add the DTrace test kernel module so that people can run the tests.

16 years agoDis-associate from ncurses.
Peter Wemm [Sat, 31 May 2008 08:13:58 +0000 (08:13 +0000)]
Dis-associate from ncurses.

16 years agoRemove one of my dead email addresses from a copyright message.
Peter Wemm [Sat, 31 May 2008 06:03:23 +0000 (06:03 +0000)]
Remove one of my dead email addresses from a copyright message.

16 years agoAfter probing the available frequency settings, restore the CPU to run at
John Baldwin [Fri, 30 May 2008 22:01:09 +0000 (22:01 +0000)]
After probing the available frequency settings, restore the CPU to run at
whatever frequency it started at instead of always picking the highest
frequency.  The first version of this driver attempted to do this, but it
set the speed to the first frequency in the list rather than the value it
had saved.

MFC after: 1 week
Discussed with: rpaulo, phk

16 years agoRemove various and sundry NetBSDism's in preparation for adding locking.
John Baldwin [Fri, 30 May 2008 21:48:05 +0000 (21:48 +0000)]
Remove various and sundry NetBSDism's in preparation for adding locking.

16 years agoTrim an extra semi-colon.
John Baldwin [Fri, 30 May 2008 18:26:37 +0000 (18:26 +0000)]
Trim an extra semi-colon.

16 years agoFix build with DEBUG defined.
John Baldwin [Fri, 30 May 2008 16:22:30 +0000 (16:22 +0000)]
Fix build with DEBUG defined.

Reported by: tinderbox

16 years agoCall the fcntl compatiblity wrapper from the thread library fcntl wrappers
Doug Rabson [Fri, 30 May 2008 14:47:42 +0000 (14:47 +0000)]
Call the fcntl compatiblity wrapper from the thread library fcntl wrappers
so that they get the benefit of the (limited) forward ABI compatibility.

MFC after: 1 week

16 years ago- Add long options to pkg_install.
Florent Thoumie [Fri, 30 May 2008 14:26:09 +0000 (14:26 +0000)]
- Add long options to pkg_install.
- Remove check for '-?' as it's not listed in authorized options.
- Bump PKG_INSTALL_VERSION to 20080530.

16 years agoWhen RADIX_MPATH is enabled, the route selection is not rotating
Qing Li [Fri, 30 May 2008 09:34:35 +0000 (09:34 +0000)]
When RADIX_MPATH is enabled, the route selection is not rotating
through the multipath entries. The hash value was a signed integer
and was always giving a -1 value.

PR: 123991
Submitted by: Barrett Lyon

16 years agoDon't rely on NSM to help us forget about RPC client handles for
Doug Rabson [Fri, 30 May 2008 09:34:08 +0000 (09:34 +0000)]
Don't rely on NSM to help us forget about RPC client handles for
clients that have rebooted (or otherwise changed port numbers). If the
client is broken or has no active locks, it won't notify us. Fall back
on the two minute timeout logic used by the userland rpc.lockd code.

MFC after: 1 week

16 years agoFix a panic that it's occurred when NDIS init handler returned a error
Weongyo Jeong [Fri, 30 May 2008 07:17:51 +0000 (07:17 +0000)]
Fix a panic that it's occurred when NDIS init handler returned a error
by unknown reasons.   In this case, sc->ifp is still NULL so it will
cause a page fault during calling ndis_detach()

16 years agoFix a panic that a priority value which is passed to cv_broadcastpri(9)
Weongyo Jeong [Fri, 30 May 2008 06:31:55 +0000 (06:31 +0000)]
Fix a panic that a priority value which is passed to cv_broadcastpri(9)
can be < 0.  We don't ignore a `increment' argument but at least we keep
a priority value of NDIS threads over PRI_MIN_KERN.

Reviewed by: thompsa

16 years agodon't let KERNBUILDDIR control whether we copy opt_ah.h
Sam Leffler [Fri, 30 May 2008 03:36:52 +0000 (03:36 +0000)]
don't let KERNBUILDDIR control whether we copy opt_ah.h

Submitted by: jkim

16 years agoUse a seperated hash table for mutex and rwlock, avoid wasting some time
David Xu [Fri, 30 May 2008 02:18:54 +0000 (02:18 +0000)]
Use a seperated hash table for mutex and rwlock, avoid wasting some time
on walking through idle threads sleeping on condition variables.

16 years agoThe XScale PXA255 has three generally ns16x50 compatible UARTs. One of the
Benno Rice [Fri, 30 May 2008 01:57:13 +0000 (01:57 +0000)]
The XScale PXA255 has three generally ns16x50 compatible UARTs.  One of the
variations from normal 16x50 behaviour however is the the use of a normally
unused bit of IER to control RX timeout interrupts independently of the
generally used RXRDY bit.  If this bit is not enabled, we only ever get
interrupts when the FIFO is full, never before.  This is not very useful when
the UART is being used as a console.

In order to support this without causing potential problems on more "normal"
16x50 variants, this change introduces two hints for the uart device, ier_mask
and ier_rxbits.  These can be used to override which bits get set and cleared
when we're enabling and disabling RX interrupts.

Reviewed by: marcel

16 years agoEliminate global mutex by using pthread_once's state field as
David Xu [Fri, 30 May 2008 00:02:59 +0000 (00:02 +0000)]
Eliminate global mutex by using pthread_once's state field as
a semaphore.

16 years agoUse if_printf() and if_xname and retire 'unit' from the softc.
John Baldwin [Thu, 29 May 2008 17:32:55 +0000 (17:32 +0000)]
Use if_printf() and if_xname and retire 'unit' from the softc.

16 years agoFix some bugs/complaints:
Michael Reifenberger [Thu, 29 May 2008 17:00:01 +0000 (17:00 +0000)]
Fix some bugs/complaints:
- make addr2jid static
- add -h Flag for hostname/ip-number search
- s,strncmp,strcmp, in addr2jid
- return jid only if found once

Requested by: some

16 years agoRead lock rather than write lock TCP inpcbs in monitoring sysctls. In
Robert Watson [Thu, 29 May 2008 14:28:26 +0000 (14:28 +0000)]
Read lock rather than write lock TCP inpcbs in monitoring sysctls.  In
some cases, add explicit inpcb locking rather than relying on the global
lock, as we dereference inp_socket, but also allowing us to drop the
global lock more quickly.

MFC after: 1 week

16 years agoRemove the distinction between device minor and unit numbers.
Ed Schouten [Thu, 29 May 2008 12:50:46 +0000 (12:50 +0000)]
Remove the distinction between device minor and unit numbers.

Even though we got rid of device major numbers some time ago, device
drivers still need to provide unique device minor numbers to make_dev().
These numbers are only used inside the kernel. They are not related to
device major and minor numbers which are visible in devfs. These are
actually based on the inode number of the device.

It would eventually be nice to remove minor numbers entirely, but we
don't want to be too agressive here.

Because the 8-15 bits of the device number field (si_drv0) are still
reserved for the major number, there is no 1:1 mapping of the device
minor and unit numbers. Because this is now unused, remove the
restrictions on these numbers.

The MAXMAJOR definition was actually used for two purposes. It was used
to convert both the userspace and kernelspace device numbers to their
major/minor pair, which is why it is now named UMINORMASK.

minor2unit() and unit2minor() have now become useless. Both minor() and
dev2unit() now serve the same purpose. We should eventually remove some
of them, at least turning them into macro's. If devfs would become
completely minor number unaware, we could consider using si_drv0 directly,
just like si_drv1 and si_drv2.

Approved by: philip (mentor)

16 years agoEmploy read locks on UDP inpcbs, rather than write locks, when
Robert Watson [Thu, 29 May 2008 08:27:14 +0000 (08:27 +0000)]
Employ read locks on UDP inpcbs, rather than write locks, when
monitoring UDP connections using sysctls.  In some cases, add
previously missing locking of inpcbs, as inp_socket is followed,
which also allows us to drop global locks more quickly.

MFC after: 1 week

16 years ago- Reduce function call overhead for uncontended case.
David Xu [Thu, 29 May 2008 07:57:33 +0000 (07:57 +0000)]
- Reduce function call overhead for uncontended case.
- Remove unused flags MUTEX_FLAGS_* and their code.
- Check validity of the timeout parameter in mutex_self_lock().

16 years agoRather than m_free(dtom(si)) in spx_reass(), return (1) which causes the
Robert Watson [Thu, 29 May 2008 07:18:43 +0000 (07:18 +0000)]
Rather than m_free(dtom(si)) in spx_reass(), return (1) which causes the
caller to free the mbuf without using dtom().

MFC after: 3 days

16 years agoThe SIIG 4 port serial card based on the Oxford OX16PCI954 is
Kirk McKusick [Thu, 29 May 2008 07:15:52 +0000 (07:15 +0000)]
The SIIG 4 port serial card based on the Oxford OX16PCI954 is
clocked at 10x normal speed. That is, when you set it for 9600
baud, it actually does 96000 baud. In order to make it plug and
play with other serial ports, it has to have its clock rate
reduced by a factor of 10.

Discussed with: Marcel Moolenaar
MFC after: 2 weeks

16 years agoCorrect minor comment typos, make white space use before block comments
Robert Watson [Thu, 29 May 2008 06:50:25 +0000 (06:50 +0000)]
Correct minor comment typos, make white space use before block comments
more consistent.

MFC after: 3 days

16 years agoBring these back to HEAD.
David E. O'Brien [Thu, 29 May 2008 02:43:05 +0000 (02:43 +0000)]
Bring these back to HEAD.
(I thought ncvs@ had rm'ed these MIPS files a long time ago... SVN had
better work out - else 7 more files off the vendor branch.)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r179404,
David E. O'Brien [Thu, 29 May 2008 02:29:59 +0000 (02:29 +0000)]
This commit was generated by cvs2svn to compensate for changes in r179404,
which included commits to RCS files with non-trunk default branches.