Commit Graph

148707 Commits

Author SHA1 Message Date
Sam Leffler
a34dbf45de o remove hack to write UUE+RTOIE in the uart's IER; force them with hints
o honor hints for the rclk
2009-06-22 22:46:37 +00:00
Andre Oppermann
bc05b2f6fa Add m_mbuftouio() helper function to copy(out) an arbitrary
long mbuf chain into an arbitrary large uio in a single step.
It is a functional mirror image of m_uiotombuf().

This function is supposed to be used instead of hand rolled code
with the same purpose and to concentrate it into one place for
potential further optimization or hardware assistance.
2009-06-22 22:20:38 +00:00
Xin LI
0622974ab2 done method is supposed to return int. 2009-06-22 22:09:18 +00:00
Joel Dahl
2014806da9 Start documenting some of the new sound stuff. More is on the way.
Probably also needs some more mdoc love.

Reviewed by:	ariff
2009-06-22 21:51:29 +00:00
Xin LI
c9f1e38a85 free(3) won't mess with errno so return it as-is.
Submitted by:	Jaakko Heinonen <jh saunalahti fi>
2009-06-22 21:49:55 +00:00
Andre Oppermann
4ad1c464fe In sbappendstream_locked() demote all incoming packet mbufs (and
chains) to pure data mbufs using m_demote().  This removes the
packet header and all m_tag information as they are not meaningful
anymore on a stream socket where mbufs are linked through m->m_next.
Strictly speaking a packet header can be only ever valid on the first
mbuf in an m_next chain.

sbcompress() was doing this already when the mbuf chain layout lent
itself to it (e.g. header splitting or merge-append), just not
consistently.

This frees resources at socket buffer append time instead of at
sbdrop_internal() time after data has been read from the socket.

For MAC the per packet information has done its duty and during
socket buffer appending the policy of the socket itself takes over.
With the append the packet boundaries disappear naturally and with
it any context that was based on it.  None of the residual information
from mbuf headers in the socket buffer on stream sockets was looked at.
2009-06-22 21:46:40 +00:00
Navdeep Parhar
16daf36814 Fix cxgb's ifmedia ioctl handling. Also fixed a comment.
Reviewed by:	kmacy
Approved by:	gnn (mentor)
2009-06-22 21:42:57 +00:00
Marko Zec
fa057b15bd V_irtualize flowtable state.
This change should make options VIMAGE kernel builds usable again,
to some extent at least.

Note that the size of struct vnet_inet has changed, though in
accordance with one-bump-per-day policy we didn't update the
__FreeBSD_version number, given that it has already been touched
by r194640 a few hours ago.
Reviewed by:	bz
Approved by:	julian (mentor)
2009-06-22 21:19:24 +00:00
Andrew Thompson
599ce1c3ba Fix length check for ugen control transfer.
Submitted by:	Sylvestre Gallon, HPS
2009-06-22 21:09:52 +00:00
Sam Leffler
c1919f47a1 hook arm_post_filter to ACK GPIO interrupts; this fixes the interrupt
storm observed on the GPS+RS485 uarts on Gateworks Cambria boards

Reviewed by:	cognet
2009-06-22 20:57:51 +00:00
Sam Leffler
dbae7bff65 always define Cambria GPS+RS485 mappings as they are no longer conditional 2009-06-22 20:42:28 +00:00
Sam Leffler
55ca456dcd map the optional GPS and RS485 uart's on the Gateworks Cambria board
(may want to make these conditional)
2009-06-22 20:41:02 +00:00
Sam Leffler
a8c053089c add ixp425_set_gpio to program the gpio interrupt type 2009-06-22 20:38:55 +00:00
Sam Leffler
ad0be1f829 rewrite arm_get_next_irq to always make forward progress (should be optimized) 2009-06-22 20:36:22 +00:00
Sam Leffler
73c424b8cb kill stray whitespace 2009-06-22 20:34:50 +00:00
Sam Leffler
9b3a6692c8 move logic to ACK a GPIO to a separate function 2009-06-22 20:33:59 +00:00
Sam Leffler
a47a6c96f2 swap order in ddb show gpio printf 2009-06-22 20:31:06 +00:00
Sam Leffler
e311b18967 make type use consistent 2009-06-22 20:30:02 +00:00
John Baldwin
e47a833f38 Regen. 2009-06-22 20:24:03 +00:00
John Baldwin
773fa740c9 Include definitions for the audit identifiers for compat system calls in
sysproto.h.  This makes it possible to use SYSCALL_MODULE() for compat
system calls that live in kernel modules.
2009-06-22 20:14:10 +00:00
John Baldwin
0b0fe06a5e Fix a typo in a comment. 2009-06-22 20:12:40 +00:00
John Baldwin
d456f534c9 Enable MSI in the MSI capability registers any time that the first message
in an MSI group is enabled, not just if the address/data pair are not
initialized.

Reported by:	rnoland
MFC after:	1 week
2009-06-22 20:08:06 +00:00
Andre Oppermann
0cb6db1d21 Update m_demote:
- remove HT_HEADER test (MT_HEADER == MT_DATA for some time now)
- be more pedantic about m_nextpkt in other than first mbuf
- update m_flags to be retained
2009-06-22 19:35:39 +00:00
Alan Cox
ce1b857f33 Validate the page in one place, dev_pager_getpages(), rather than doing it
in two places, dev_pager_getfake() and dev_pager_updatefake().

Compare a pointer to "NULL" rather than "0".
2009-06-22 19:09:48 +00:00
Bjoern A. Zeeb
3952a5abc9 Updates after r194640:
- shrink size guards for vnet_net.
  vnet_rtable does not need size guards as it is self-contained.
- remove a bunch of defines from vnet.h no longer valid.
2009-06-22 17:56:07 +00:00
Bjoern A. Zeeb
b58ea5f310 Move virtualization of routing related variables into their own
Vimage module, which had been there already but now is stateful.

All variables are now file local; so this further limits the global
spreading of routing related things throughout the kernel.

Add a missing function local variable in case of MPATHing.

Reviewed by:	zec
2009-06-22 17:48:16 +00:00
Jung-uk Kim
435f8ce5b8 Add a missing return in NULL mutex case.
Submitted by:	Pawel Worach (pawel dot worach at gmail dot com)
2009-06-22 17:46:55 +00:00
Xin LI
6ac937c89c Split tolower/toupper code from usual xlat16 kiconv table, and make it
possible to do tolower/toupper independently without code conversion.

Submitted by:	imura (but bugs are mine)
Obtained from:	http://people.freebsd.org/~imura/kiconv/
		(1_kiconv_wctype_kern.diff, 1_kiconv_wctype_user.diff)
2009-06-22 17:09:46 +00:00
Xin LI
c90c7d6946 Add prototypes when the library is compiled static. 2009-06-22 17:00:20 +00:00
Luigi Rizzo
f40a82debd fix wrong name for the iso! 2009-06-22 16:06:38 +00:00
Rafal Jaworowski
400b1bbfe8 Bump PowerPC loader(8) version to reflect extensions it has recently grown. 2009-06-22 15:57:12 +00:00
Rafal Jaworowski
f2396192d9 Keep file list sorted. 2009-06-22 15:53:41 +00:00
Rafal Jaworowski
f07ef6e4e3 DS1553 RTC module driver. On the MPC8555CDS system it hangs off of the LBC bus.
Obtained from:	Semihalf
2009-06-22 15:48:47 +00:00
Luigi Rizzo
c3f674da2a Add code to generate a bootable ISO image, so we are finally
free from the 2.88MB that we had using El Torito emulation.

The --iso option was already there, just didn't do anything before.

Submitted by:	Marta Carbone
MFC after:	3 days
2009-06-22 15:45:26 +00:00
Rafal Jaworowski
757cb6dbdf Integrated I2C controller driver (found in MPC85xx and other SOC parts).
Obtained from:	Freescale, Semihalf
2009-06-22 15:34:32 +00:00
Bjoern A. Zeeb
f987f19301 Collect all VIMAGE_GLOBALS variables in one place.
No longer export rt_tables as all lookups go through
rt_tables_get_rnh().

We cannot make rt_tables (and rtstat, rttrash[1]) static as
netstat -r (-rs[1]) would stop working on a stripped
VIMAGE_GLOBALS kernel.

Reviewed by:		zec
Presumably broken by:	phk 13.5y ago in r12820 [1]
2009-06-22 15:07:12 +00:00
Rong-En Fan
be5888e34c - Fall-back to /etc/termcap.small if there is no /usr/share/misc/termcap
(i.e. /etc/termcap). This can be useful when using /rescue/vi while /usr
  is not (or unable to be) mounted. The termcap.small can be found in
  src/etc/termcap.small.

PR:		bin/80256 (audit-trail)
Submitted by:	Brian Candler <B.Candler at pobox.com>, Alex Kozlov <spam at rm-rf.kiev.ua>
MFC after:	1 month
2009-06-22 15:00:15 +00:00
Scott Long
571e8e20da Change cam_periph_ioctl() to take 'cmd' and a u_long instead of an
int.  All of its callers pass in cmd as a u_long, so this has
always been a dangerous type demotion.  It was spooted by clang/llvm
trying to do a type promotion and sign extension within
cam_periph_ioctl.

Submitted by:	rdivacky
2009-06-22 14:43:48 +00:00
Robert Watson
8896f83a58 Add a new function, ifa_ifwithaddr_check(), which rather than returning
a pointer to an ifaddr matching the passed socket address, returns a
boolean indicating whether one was present.  In the (near) future,
ifa_ifwithaddr() will return a referenced ifaddr rather than a raw
ifaddr pointer, and the new wrapper will allow callers that care only
about the boolean condition to avoid having to free that reference.

MFC after:	3 weeks
2009-06-22 10:59:34 +00:00
Ed Schouten
f863f9cbd9 Remove unneeded stores back into the function arguments.
Submitted by:	Christoph Mallon
2009-06-22 10:56:08 +00:00
Bjoern A. Zeeb
bed56bb51b After the update to fxp(4) in r194573 we should no longer need
this DELAY(100) hack introduced in r56938.

Thanks to:	yongari
MFC after:	6 weeks
X-MFC note:	not before the fxp(4) changes
2009-06-22 10:27:20 +00:00
Robert Watson
cc18b1dbf0 Add a global rwlock, at_ifaddr_rw, to protect the global netatalk
address lists, at_ifaddr_list.  Acquire the lock, and use ifaddr
refcounts where necessary, to close most known address-related
races in netatalk.

Annotate one potential race in at_control() where we acquire an
ifaddr reference, drop the global lock, and scrub the address from
the ifnet before re-acquiring the global lock, which could allow
for a writer-writer race.

MFC after:	3 weeks
2009-06-22 10:23:54 +00:00
Konstantin Belousov
8af8ad6811 Move definitions of AT_* constants from the middle of the open(2) flags
enumeration.

Noted by:	bde
2009-06-22 10:11:35 +00:00
Konstantin Belousov
a18a95db4a O_NOFOLLOW shall be in flags, not in cmode.
Noted by:	bde
2009-06-22 10:08:48 +00:00
Bjoern A. Zeeb
173de0f9cc Remove a hack from r186086 so that IPsec via loopback routes continued
working. It was targeted for stable/7 compatibility and actually never
did anything in HEAD.

Reminded by:	rwatson
X-MFC after:	never
2009-06-22 09:24:46 +00:00
Alan Cox
0f6766f3da Eliminate dead code. These definitions should have been deleted with the
introduction of i686_mem.c in r45405.

Merge adjacent #ifdef _KERNEL/#endif blocks.
2009-06-22 04:21:02 +00:00
Robert Watson
5bf423734c Add ipx_ifaddr locking to ipx_control(), which should close most
remaining potential races in ifconfig's management of IPX addresses.

This is largely accomplished by dropping a global write lock for the
IPX address list over the body of in_control(), although there are
some places we bump the refcount on an ifaddr of interest while
calling out to the routing code or link layer code, which might
require revisiting.

Annotate one as a potential race if two simultaneous delete ioctls
are issued for the same IPX addresses at once.

MFC after:	3 weeks
2009-06-21 21:42:29 +00:00
Olivier Houchard
4943d6b39d Disable write-back until I figure out what's wrong with it on the i81342.
There's no need to disable the MMU once we're done inflating the kernel.
2009-06-21 21:38:12 +00:00
Robert Watson
a0afe699ba Introduce basic locking of global IPX address list 'ipx_ifaddr' using
a new rwlock, ipx_ifaddr_rw, wrapped with macros.  This locking is
necessary but not sufficient, in isolation, to satisfy the stability
requirements of a fully parallel IPX input path during interface
reconfiguration.

MFC after:	3 weeks
2009-06-21 21:04:12 +00:00
Alan Cox
ef327c3ee7 Implement a mechanism within vm_phys_alloc_contig() to defer all necessary
calls to vdrop() until after the free page queues lock is released.  This
eliminates repeatedly releasing and reacquiring the free page queues lock
each time the last cached page is reclaimed from a vnode-backed object.
2009-06-21 20:29:14 +00:00