Commit Graph

139344 Commits

Author SHA1 Message Date
Alexander Motin
efc66711f9 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.
2008-06-01 17:52:40 +00:00
Alexander Motin
a9a13b54e9 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.
2008-06-01 15:13:32 +00:00
Philip Paeps
0fecb888b2 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
2008-06-01 14:09:54 +00:00
Ed Schouten
16151645c2 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)
2008-06-01 14:02:46 +00:00
Philip Paeps
be38401738 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
2008-06-01 13:44:51 +00:00
Alexander Motin
1913488d10 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.
2008-06-01 12:29:23 +00:00
Alexander Motin
aac54f0a70 Fix packet fragmentation support broken by copy/paste error in rev.1.60.
ip_id should be u_short, but not u_char.
2008-06-01 11:47:04 +00:00
Alan Cox
71e26e2c0e 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.
2008-06-01 07:36:59 +00:00
John Birrell
4ca07625aa 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
2008-06-01 01:46:37 +00:00
Sam Leffler
faaedb30ca 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
2008-05-31 22:44:06 +00:00
Remko Lodder
2227a3e9e1 Dont install .svn metadata with the sendmail install.
Submitted by:	marcel
Approved by:	imp (mentor, implicit)
MFC after:	3 days
2008-05-31 19:15:15 +00:00
Remko Lodder
6ef67a1ead Remove a quote about the instant-workstation, this port
has been removed ages ago.

PR:		docs/124166
Submitted by:	keramida
Prodded by:	novel,keramida
2008-05-31 18:07:16 +00:00
Remko Lodder
1388635ca5 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
2008-05-31 14:17:36 +00:00
Ed Schouten
34d1dcf0cc 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)
2008-05-31 14:06:37 +00:00
Hiroki Sato
33626d7564 - Add ARM as a platform under development.
- Bump copyright year.
2008-05-31 13:45:35 +00:00
Hiroki Sato
d13ecf5a60 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.
2008-05-31 13:27:16 +00:00
John Birrell
1f6d08865e Add the DTrace test kernel module so that people can run the tests. 2008-05-31 09:37:40 +00:00
Peter Wemm
875ce65b1b Dis-associate from ncurses. 2008-05-31 08:13:58 +00:00
Peter Wemm
1e6e889a83 Remove one of my dead email addresses from a copyright message. 2008-05-31 06:03:23 +00:00
John Baldwin
984c25c10b 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
2008-05-30 22:01:09 +00:00
John Baldwin
8b461b2ba1 Remove various and sundry NetBSDism's in preparation for adding locking. 2008-05-30 21:48:05 +00:00
John Baldwin
f720694bc3 Trim an extra semi-colon. 2008-05-30 18:26:37 +00:00
John Baldwin
f115052111 Fix build with DEBUG defined.
Reported by:	tinderbox
2008-05-30 16:22:30 +00:00
Doug Rabson
cd7d66a21f 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
2008-05-30 14:47:42 +00:00
Florent Thoumie
0b99032d09 - Add long options to pkg_install.
- Remove check for '-?' as it's not listed in authorized options.
- Bump PKG_INSTALL_VERSION to 20080530.
2008-05-30 14:26:09 +00:00
Qing Li
a5f2711eee 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
2008-05-30 09:34:35 +00:00
Doug Rabson
79fe3d02d7 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
2008-05-30 09:34:08 +00:00
Weongyo Jeong
e54b92f37b 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()
2008-05-30 07:17:51 +00:00
Weongyo Jeong
32e9c9dc71 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
2008-05-30 06:31:55 +00:00
Sam Leffler
e5861421aa don't let KERNBUILDDIR control whether we copy opt_ah.h
Submitted by:	jkim
2008-05-30 03:36:52 +00:00
David Xu
6e24e61797 Use a seperated hash table for mutex and rwlock, avoid wasting some time
on walking through idle threads sleeping on condition variables.
2008-05-30 02:18:54 +00:00
Benno Rice
0aefb0a63c 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
2008-05-30 01:57:13 +00:00
David Xu
1b3418b2dc Eliminate global mutex by using pthread_once's state field as
a semaphore.
2008-05-30 00:02:59 +00:00
John Baldwin
3022250a49 Use if_printf() and if_xname and retire 'unit' from the softc. 2008-05-29 17:32:55 +00:00
Michael Reifenberger
ea119c8265 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
2008-05-29 17:00:01 +00:00
Robert Watson
c28cb4d82f 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
2008-05-29 14:28:26 +00:00
Ed Schouten
06d425f92e 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)
2008-05-29 12:50:46 +00:00
Robert Watson
9622e84fcf 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
2008-05-29 08:27:14 +00:00
David Xu
850f4d66cb - 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().
2008-05-29 07:57:33 +00:00
Robert Watson
9dea35a10a 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
2008-05-29 07:18:43 +00:00
Kirk McKusick
1454b5785e 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
2008-05-29 07:15:52 +00:00
Robert Watson
bf898eb8c5 Correct minor comment typos, make white space use before block comments
more consistent.

MFC after:	3 days
2008-05-29 06:50:25 +00:00
David E. O'Brien
bd7d47734a 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.)
2008-05-29 02:43:05 +00:00
David E. O'Brien
de582f44b4 This commit was generated by cvs2svn to compensate for changes in r179404,
which included commits to RCS files with non-trunk default branches.
2008-05-29 02:29:59 +00:00
David E. O'Brien
b7e4108c6b 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.
2008-05-29 02:29:59 +00:00
Sam Leffler
cc2ee3f3db 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
2008-05-29 00:16:58 +00:00
Sam Leffler
e387d629b8 correct rx radiotap channel flags construction for 11n frames 2008-05-29 00:14:35 +00:00
Sam Leffler
d3ac945bb4 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
2008-05-29 00:10:48 +00:00
Sam Leffler
71b8507770 close a race on detach by reordering bpfdetach and taskqueue_free 2008-05-28 23:55:11 +00:00
Sam Leffler
4df6277969 send EAPOL frames at the same rate used for mgt frames 2008-05-28 23:41:40 +00:00