]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years ago- Replace rcsid with __FBSDID.
jkim [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
gnn [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
jhb [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 [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.
rdivacky [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.
rdivacky [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.
flz [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 [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
rwatson [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.
ru [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.
kib [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
dfr [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
imp [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.
kan [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.
kan [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
cokane [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.
jkim [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.
dougb [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:
jhb [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:
jhb [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:
jhb [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
mlaier [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().
dfr [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
dfr [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
rwatson [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 [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
imp [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
imp [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
mav [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:
mav [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.
mav [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 [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 [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 [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.
mav [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.
mav [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
alc [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.
jb [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 [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 [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 [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 [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 [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.
hrs [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:
hrs [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.
jb [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 [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 [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
jhb [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.
jhb [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.
jhb [Fri, 30 May 2008 18:26:37 +0000 (18:26 +0000)]
Trim an extra semi-colon.

16 years agoFix build with DEBUG defined.
jhb [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
dfr [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.
flz [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
qingli [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
dfr [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 [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 [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 [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
davidxu [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 [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
davidxu [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.
jhb [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:
mr [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
rwatson [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 [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
rwatson [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.
davidxu [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
rwatson [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
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
rwatson [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.
obrien [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,
obrien [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.

16 years agoImport of Binutils from the FSF 2.15 branch (just post-.0 release).
obrien [Thu, 29 May 2008 02:29:59 +0000 (02:29 +0000)]
Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.

16 years agoopt_ah.h is not constructed by config, it always comes from
sam [Thu, 29 May 2008 00:16:58 +0000 (00:16 +0000)]
opt_ah.h is not constructed by config, it always comes from
the hal so don't let KERNBUILDDIR control whether or not we
copy it into the build dir

16 years agocorrect rx radiotap channel flags construction for 11n frames
sam [Thu, 29 May 2008 00:14:35 +0000 (00:14 +0000)]
correct rx radiotap channel flags construction for 11n frames

16 years agoCleanup power handling and fix suspend/resume:
sam [Thu, 29 May 2008 00:10:48 +0000 (00:10 +0000)]
Cleanup power handling and fix suspend/resume:
o do not put the chip into full sleep in ath_stop as it gains
  nothing and causes many parts to hang in ath_detach because we
  may touch the chip during vap teardown; this may also fix issues
  with unloading the module
o add a note in ath_detach to explain ath_hal_detach puts the
  chip in low power mode; this is useful to know as it means
  unloading the module will place a pci device in the lowest
  possible power state
o leave an #ifdef notyet marker for powering down the chip when
  a device is marked down; we can't do that until we handle all
  the ways the driver may be entered and touch the chip
o fix resume by reloading the h/w key cache as it's been clobbered
  (for pci) by the socket being powered off; for station mode we
  directly stop+init the chip and then simulate a beacon miss to
  get the upper layers sync'd up; for other configs we must brute
  force stop+start the vaps so they go through the state machine

16 years agoclose a race on detach by reordering bpfdetach and taskqueue_free
sam [Wed, 28 May 2008 23:55:11 +0000 (23:55 +0000)]
close a race on detach by reordering bpfdetach and taskqueue_free

16 years agosend EAPOL frames at the same rate used for mgt frames
sam [Wed, 28 May 2008 23:41:40 +0000 (23:41 +0000)]
send EAPOL frames at the same rate used for mgt frames

16 years agomisc cleanups for stricter compilation
sam [Wed, 28 May 2008 23:37:37 +0000 (23:37 +0000)]
misc cleanups for stricter compilation

16 years agoupdate copyright year and nuke dual-gpl bits that should've removed long ago
sam [Wed, 28 May 2008 23:36:47 +0000 (23:36 +0000)]
update copyright year and nuke dual-gpl bits that should've removed long ago

16 years agoAdd ieee80211_crypto_reload_keys to push all keys known
sam [Wed, 28 May 2008 23:33:29 +0000 (23:33 +0000)]
Add ieee80211_crypto_reload_keys to push all keys known
to net80211 back into the device; intended for use on resume
by devices that lose the contents of their h/w key table.

16 years agoAdd a mac address to the key definition as otherwise we lose the
sam [Wed, 28 May 2008 23:32:00 +0000 (23:32 +0000)]
Add a mac address to the key definition as otherwise we lose the
address specified in the ioctl and for drivers that need the address
to locate a key (e.g. for delete).

Note this changes net80211-private api's but not the driver callback;
may want to change that in the future.

Reviewed by: sephe, thompsa

16 years agoSplit s/w crypt/mic attributes to allow future hackery; this change
sam [Wed, 28 May 2008 23:25:36 +0000 (23:25 +0000)]
Split s/w crypt/mic attributes to allow future hackery; this change
should be a noop.

16 years agomissing piece of last commit; add RESUME flag bit definition
sam [Wed, 28 May 2008 23:20:27 +0000 (23:20 +0000)]
missing piece of last commit; add RESUME flag bit definition

16 years agoAdd support to talk to the LSI ioctl path on with FreeBSD 32 bit app's
ambrisko [Wed, 28 May 2008 23:19:27 +0000 (23:19 +0000)]
Add support to talk to the LSI ioctl path on with FreeBSD 32 bit app's
on amd64.  Note the only difference is the iovec32 part so I use the
native structure for everything else.

Also I plan to MFC all the changes in -current to 7-stable and 6-stable
shortly since I've been running them.  This does not include the cam
changes.

MFC after: 3 days

16 years agoAdd ieee80211_suspend_all and ieee80211_resume_all for
sam [Wed, 28 May 2008 23:19:20 +0000 (23:19 +0000)]
Add ieee80211_suspend_all and ieee80211_resume_all for
brute force suspend/resume handling of vaps.

16 years agoDon't override the txpower cap installed by ieee80211_alloc_node;
sam [Wed, 28 May 2008 23:18:17 +0000 (23:18 +0000)]
Don't override the txpower cap installed by ieee80211_alloc_node;
we use ic_txpowlimit (for now) to initialize all new sta entries.

16 years agoSimplify some contorted logic that wrongly left ISCAN_DISCARD set
sam [Wed, 28 May 2008 23:15:24 +0000 (23:15 +0000)]
Simplify some contorted logic that wrongly left ISCAN_DISCARD set
in certain cases causing the current ap to be lost from the scan cache.

Obtained from: Atheros (original bug)

16 years agoRevise lock name handling:
sam [Wed, 28 May 2008 23:10:53 +0000 (23:10 +0000)]
Revise lock name handling:
o construct a name for the com lock as done for other locks
o pass the device name to IEEE80211_LOCK_INIT so the mtx name
  is constructed as foo_com_lock
o introduce *_LOCK_OBJ macro's to hide the lock contents and
  minimize redundant code

16 years agoFix checking if a variable name is LINENO. As STPUTC changes the pointer if it
stefanf [Wed, 28 May 2008 21:44:32 +0000 (21:44 +0000)]
Fix checking if a variable name is LINENO.  As STPUTC changes the pointer if it
needs to enlarge the buffer, we must not keep a pointer to the beginning.

PR: ports/123879

16 years agoAdd a module for cnw(4) and build it on i386.
jhb [Wed, 28 May 2008 20:26:25 +0000 (20:26 +0000)]
Add a module for cnw(4) and build it on i386.

16 years agoRemove redundant checks from fcntl()'s F_DUPFD.
ed [Wed, 28 May 2008 20:25:19 +0000 (20:25 +0000)]
Remove redundant checks from fcntl()'s F_DUPFD.

Right now we perform some of the checks inside the fcntl()'s F_DUPFD
operation twice. We first validate the `fd' argument. When finished,
we validate the `arg' argument. These checks are also performed inside
do_dup().

The reason we need to do this, is because fcntl() should return different
errno's when the `arg' argument is out of bounds (EINVAL instead of
EBADF). To prevent the redundant locking of the PROC_LOCK and
FILEDESC_SLOCK, patch do_dup() to support the error semantics required
by fcntl().

Approved by: philip (mentor)

16 years agoGrr, restore some useful comments that were only in the NetBSD code.
jhb [Wed, 28 May 2008 19:47:08 +0000 (19:47 +0000)]
Grr, restore some useful comments that were only in the NetBSD code.

16 years agoRemove NetBSD and FreeBSD 4.x code from this driver in preparation for
jhb [Wed, 28 May 2008 19:44:46 +0000 (19:44 +0000)]
Remove NetBSD and FreeBSD 4.x code from this driver in preparation for
adding locking, etc.

16 years agoWork-around a compiler optimization bug, that broke libthr. Massive
marcel [Wed, 28 May 2008 16:41:02 +0000 (16:41 +0000)]
Work-around a compiler optimization bug, that broke libthr. Massive
inlining resulted in constant propagation to the extend that cmpval
was known to the compiler to be URWLOCK_WRITE_OWNER (= 0x80000000U).
Unfortunately, instead of zero-extending the unsigned constant, it
was sign-extended. As such, the cmpxchg instruction was comparing
0x0000000080000000LU to 0xffffffff80000000LU and obviously didn't
perform the exchange.
But, since the value returned by cmpxhg equalled cmpval (when zero-
extended), the _thr_rtld_lock_release() function thought the exchange
did happen and as such returned as if having released the lock. This
was not the case. Subsequent locking requests found rw_state non-zero
and the thread in question entered the kernel and block indefinitely.

The work-around is to zero-extend by casting to uint64_t.

16 years agoChange the fix in the rev. 1.179 to use nfsrv_lockedpair_nd().
kib [Wed, 28 May 2008 16:23:17 +0000 (16:23 +0000)]
Change the fix in the rev. 1.179 to use nfsrv_lockedpair_nd().

Tested by: pho
MFC after: 3 days

16 years agoInitialize vfslocked prior to calling nfsm_srvmtofh where it was forgotten.
kib [Wed, 28 May 2008 16:21:32 +0000 (16:21 +0000)]
Initialize vfslocked prior to calling nfsm_srvmtofh where it was forgotten.

Reported by: Andrew Edwards <aedwards sandvine com>
Tested by: pho
MFC after: 3 days

16 years agoRemove unused 'xl_unit' member from softc.
jhb [Wed, 28 May 2008 15:34:29 +0000 (15:34 +0000)]
Remove unused 'xl_unit' member from softc.

16 years agoUse PKG_INSTALL_VERSION for the distfile name instead of current date.
flz [Wed, 28 May 2008 14:51:01 +0000 (14:51 +0000)]
Use PKG_INSTALL_VERSION for the distfile name instead of current date.

X-MFC after: pkg_install sync on -STABLE branches