Commit Graph

135547 Commits

Author SHA1 Message Date
Rui Paulo
4b07bf84dd Move ASMC_FAN_FUNCS in the Macmini structure declaration one line up
so that this macro expands in the right place.

Submitted by:	Ed Schouten <ed at fxq.nl>
Approved by:	njl (mentor)
2007-11-22 23:38:24 +00:00
John Birrell
cfb5b3256b Re-enable -Werror again.
This time, change the default CFLAGS to match the simple defaults that
the tinderboxes use. That is, don't use -fno-strict-aliasing by default.

My last attempt to re-anable -Werror gave me a lesson in what strict
aliasing is all about. There was code in libthr that wasn't 64-bit clean.
The default use of -fno-strict-aliasing hid that.

By using -fno-strict-aliasing by default we were choosing to ignore
problems in code which had the potential to shoot ourselves in the
foot. Sometimes it would be the 64-bit foot. I have both feet. The left
ones are 32 bits and the right ones are 64 bits. Don't ask about my
endian orientation. :-)

The -fno-strict-aliasing compiler arg can still be used if NO_STRING_ALIASING
is define in make.

We are early in the FreeBSD 8 development, so we have the opportunity to
wait and see if this works for us. I am sure that people will complain.
We can easily revert this. All I ask is that we take sides: clean code or
not. YMMV.

Note that by using -fno-strict-aliasing the build won't actually break.
Only where WARNS is set (and -Werror is used) will a compiler warning break
the build. The use of WARNS levels implies (to me at least) that the
developer has taken some care to make the code pass basic checks. This
commit makes those checks just a little bit more strict.
2007-11-22 23:21:12 +00:00
Kris Kennaway
e6d64a0f15 Remove remaining Giant acquisition around vn_fullpath1. This was missed
in r1.106 and has not been required for some years now.

Reviewed by:  jeff
MFC After:    1 week
2007-11-22 21:26:25 +00:00
Simon L. B. Nielsen
f24c80e2ef Remove kernel and module symbol files from disc1 (and the livecd if it
is enabled).  This saves around 80MB (for i386) on the ISO images.

Note that this is only from the install media, not the installed
system where the symbols are still installed, if part of the release.

Should anybody want the symbols which match disc1/livecd, they can
just be extracted from the kernel distribution files.

Reviewed by:	kensmith
2007-11-22 20:06:50 +00:00
Alan Cox
82cfdd5adc Remove an unnecessary call to pmap_remove_all() and the associated "XXX"
comments from vnode_pager_setsize().  This call was introduced in
revision 1.140 to address a problem that no longer exists.
Specifically, pmap_zero_page_area() has replaced a (possibly)
problematic implementation of page zeroing that was based on
vm_pager_map(), bzero(), and vm_pager_unmap().
2007-11-22 20:01:38 +00:00
Joseph Koshy
e805d32b8e - Correct a documentation bug: handles returned from a PMC_OP_PMCALLOCATE
request are 32 bit values, and are not necessarily small.
- Note that the PMC_F_KGMON flag is currently unimplemented.
- Tweak description of an EINVAL error return.
- Add an "AUTHORS" section.
2007-11-22 14:09:26 +00:00
Attilio Rao
557f5e51e9 Cache the value of c_lock as it can change, in the struct,
while the global callout spinlock is not held, and can lead to PF#.

Reported by: dougb, Mark Atkinson <atkin901 at yahoo dot com>
Tested by: dougb
Diagnosed by: jhb
2007-11-22 12:15:54 +00:00
Ruslan Ermilov
c9f54e819c Fix comments. 2007-11-22 10:06:42 +00:00
Pyun YongHyeon
6a087a8722 Fix function prototype for device_shutdown method. 2007-11-22 02:45:00 +00:00
Tai-hwa Liang
e7356456ed Nuking the temporary pointer once it is properly tracked in local storage.
This should fix the double free() bug where there's no tailing newline(\n)
character:

	current# echo -n test | tail
	testAssertion failed: (run->magic == ARENA_RUN_MAGIC), function
	arena_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2448.
	Abort (core dumped)

Reviewed by:	kib
MFC after:	3 days
2007-11-22 01:51:46 +00:00
Alan Cox
ddd6e7d2ab When reactivating a cached page, reset the page's pool to the default
pool.  (Not doing this before was a performance pessimization but not
a cause for panic.)
2007-11-21 23:22:10 +00:00
Bjoern A. Zeeb
9ad0173df1 Make TSO work with IPSEC compiled into the kernel.
The lookup hurts a bit for connections but had been there anyway
if IPSEC was compiled in. So moving the lookup up a bit gives us
TSO support at not extra cost.

PR:		kern/115586
Tested by:	gallatin
Discussed with:	kmacy
MFC after:	2 months
2007-11-21 22:30:14 +00:00
Robert Watson
c6fa9175a7 Alphabetize pts before pty.
MFC after:	3 days
2007-11-21 21:42:55 +00:00
Max Laier
228f6ee12e Bring back pf_if.c revs 1.8 and 1.6 also lost during last import:
- Use correct time for tzero when compiled in
 - Don't use bogus interface addresses on ptp-interfaces with :0

MFC after:	3 days
2007-11-21 16:08:06 +00:00
Mike Makonnen
016fb9d9c7 Instead of manually freeing the packet options structure (and not even doing
a good job of it) in the copypktopts() function, just call ip6_clearpktopts()
directly. Otherwise, the callers of this function would end up freeing the
memory twice.

Reviewed by: jinmei
PR:	     kern/116360
2007-11-21 16:01:42 +00:00
Max Laier
b7484bf1b9 Cleanup pf interface mangement - esp. remove EVENTHANDLER before unloading
the coresponding code.  This was lost during 4.1 import.

Reported by:	ru
MFC after:	3 days
2007-11-21 14:18:14 +00:00
Ruslan Ermilov
c87e4fcd08 Take out em_poll() prototype from under EM_FAST_IRQ control.
Reported by:	tindebox compiling a LINT kernel
2007-11-21 12:55:33 +00:00
Max Laier
7b8d9f5cb3 Avoid excessive error message printout.
PR:		bin/118150
Reported by:	keramida
MFC after:	3 days
2007-11-21 12:52:26 +00:00
Ariff Abdullah
46e5fdd5af * Fix support for followings:
o Acer Aspire 4520 laptop
    - jack sensing / automute
  o Toshiba Satellite A135-S4527 laptop
    - jack sensing / automute
      Tested by: lioux
  o Apple Macbook 3 (is it?)
    - require gpio0 (for speakers) and ovref50 (for headphone)
      to make it works
    - jack sensing / automute
      Tested by: Ed Schouten
* Add Nvidia MCP67 controller ids.
* Be sensible about simmilar controller with multiple pci ids.
* Connect unused DAC/ADC to stream#0 rather than forcing each of them
  managing their own stream.

MFC after:	3 days
2007-11-21 11:39:27 +00:00
Ruslan Ermilov
a59df282a4 Correct a path for obsolete liblwres.so.10.
Reported by:	Alexey Shuvaev on -current
2007-11-21 10:49:33 +00:00
Max Laier
fb63048c8a Reloop OpenBSD rev. 1.563:
In pf_test_fragment(), ignore protocol-specific criteria for packets of
  different protocols.

Reported by:	des
Obtained from:	OpenBSD
MFC after:	3 days
2007-11-21 10:12:52 +00:00
David Xu
4877aaebc1 Reuse nwaiter member field to record number of waiters, in sem_post(),
this should reduce the chance having to do a syscall when there is no
waiter in the semaphore.
2007-11-21 06:01:02 +00:00
Kevin Lo
d618552420 Fix NULL dereference in rum_txeof()
PR: kern/117820
2007-11-21 05:51:43 +00:00
David Xu
73ba600faa Remove warning level and aliasing restrictions. 2007-11-21 05:29:57 +00:00
Andrew Thompson
5c0d5fddf5 Use the safer callout_init_rw() to allow the softclock to grab the
rwlock for us.
2007-11-21 05:28:49 +00:00
David Xu
9e1ddd5fa0 Convert ceiling type to unsigned integer before comparing, fix compiler
warnings.
2007-11-21 05:25:27 +00:00
David Xu
922d56f9de Add some function prototypes. 2007-11-21 05:23:54 +00:00
David Xu
6fdfcacb4a Remove umtx_t definition, use type long directly, add wrapper function
_thr_umtx_wait_uint() for umtx operation UMTX_OP_WAIT_UINT, use the
function in semaphore operations, this fixed compiler warnings.
2007-11-21 05:21:58 +00:00
David Xu
110de0cf17 Add function UMTX_OP_WAIT_UINT, the function causes thread to wait for
an integer to be changed.
2007-11-21 04:21:02 +00:00
Scott Long
8611774e5e Extend critical section coverage in the low-level interrupt handlers to
include the ithread scheduling step.  Without this, a preemption might
occur in between the interrupt getting masked and the ithread getting
scheduled.  Since the interrupt handler runs in the context of curthread,
the scheudler might see it as having a such a low priority on a busy system
that it doesn't get to run for a _long_ time, leaving the interrupt stranded
in a disabled state.  The only way that the preemption can happen is by
a fast/filter handler triggering a schduling event earlier in the handler,
so this problem can only happen for cases where an interrupt is being
shared by both a fast/filter handler and an ithread handler.  Unfortunately,
it seems to be common for this sharing to happen with network and USB
devices, for example.  This fixes many of the mysterious TCP session
timeouts and NIC watchdogs that were being reported.  Many thanks to Sam
Lefler for getting to the bottom of this problem.

Reviewed by: jhb, jeff, silby
2007-11-21 04:03:51 +00:00
John Birrell
3e636fa0e5 Use an intermediate pointer to avoid a strict aliasing warning.
Note that ULong in this code is actually defined as an unsigned integer across
all arches so that the gdtoa() function always processes 32 bit data
despite the unfortunate naming of "ULong".
2007-11-21 01:10:42 +00:00
Pyun YongHyeon
8463d7a051 Add MSI support for 88E8058(Yukon EC Ultra). Unlike other Yukon II
family 88E8058 supports only one MSI message. Teach msk(4) to handle
that case.

Tested by:	Ed Schouten < ed AT fxq DOT nl >
2007-11-21 00:42:42 +00:00
Mike Makonnen
84f2123154 Enclose entire header in #ifndef _LIBDISK_H_ 2007-11-20 22:48:32 +00:00
Xin LI
eaf4d76326 Mark old shared library versions as obsolete. 2007-11-20 22:12:52 +00:00
Jack F Vogel
559930e525 One nit, FAST handling is now in #ifdef's for compatibility
between RELEASES, but we want it on by default in 7 and later,
add that define, and take out a fragment left from a workaround
being removed.
2007-11-20 22:06:01 +00:00
Jack F Vogel
f6b1d9cab8 Driver version 6.7.3
- Bring HEAD up to the latest shared code
 - Fix TSO problem using limited MSS and forwarding
 - Dual lock implementation
 - New device support
 - For my ease, this code can compile in either 6.x or later
 - brings this driver in sync with the 6.3
2007-11-20 21:41:22 +00:00
David E. O'Brien
bb2dbe1b93 Addition style(9) change. 2007-11-20 21:25:58 +00:00
David E. O'Brien
091abe405c style(9) 2007-11-20 19:50:45 +00:00
Robert Watson
4a0ace6d5c Annotate two possible bugs in a comment: (1) we allocate and explicitly
prepend a data mbuf in front of a header mbuf without moving the header
to the new mbuf, and (2) a possible alignment problem on architectures
with strict alignment as reported in kern/4184.

PR:	kern/4184 (1)
2007-11-20 18:50:54 +00:00
Robert Watson
1392e6723c Add additional robustness to at_aarpinput() by testing for broadcast
addresses as the source of an AARP request.  While this PR was submitted
in the context of work in OpenBSD to port netatalk (in 1997), I've
synchronized the code more to our ARP input routine, which had similar
requirements.

Submitted by:	Denton Gentry
PR:		kern/4184
MFC after:	1 week
2007-11-20 18:35:57 +00:00
Jung-uk Kim
1de9b7e4c9 Check battery presence first before trying to get battery information.
PR:		kern/117591
Tested by:	Jessica Mahoney (root at varusonline dot com)
2007-11-20 18:35:36 +00:00
Robert Watson
965b55e2b4 Test that p_textvp is non-NULL be dereferencing, as no executable vnode is
set for kernel processes.

Reported by:	Skip Ford <skip at menantico dot com>
MFC after:	3 days
2007-11-20 18:03:09 +00:00
Gabor Kovesdan
521a179014 - Add callout_init_rw.9 to MLINKS of timeout.9
Forgotten by:	gabor
Reminded by:	ru
2007-11-20 14:13:49 +00:00
Gabor Kovesdan
53b41930df - Document newly added callout_init_rw function
Requested by:	attilio
Reviewed by:	attilio
2007-11-20 12:21:36 +00:00
Pyun YongHyeon
d1414bebe4 Add 88E8058 to the list of supported hardware. 2007-11-20 07:53:52 +00:00
Pyun YongHyeon
75ef16df96 Add device id for 88E8058(Yukon EC Ultra) which is found on 3rd
generation MacBooks.
Unfortunately 88E8058 supports one MSI message so msk(4) needs more
generic way to handle the MSI capability.

PR:	118110
2007-11-20 07:47:32 +00:00
Pyun YongHyeon
431e606d74 Make phy respond only at address 0. This makes phy driver attached
only at address 0 which is supposed to be the only valid phy address
on Marvell PHY. The more correct solution would be masking PHY
address ranges allowable in PHY probe routine. Unfortunately,
FreeBSD has no way to retrict the PHY address ranges or to pass special
flags to PHY driver.
This change assumes that PHY hardwares attached to msk(4) would be
Marvell made 88E11xx PHY.

With this changes the phantom phys attached on 88E8036(Yukon FE)
should disappear.

Reported by:	Oleg Lomaka  < oleg AT lomaka DOT org DOT ua >
Tested by:	Oleg Lomaka  < oleg AT lomaka DOT org DOT ua >
2007-11-20 07:33:01 +00:00
Pyun YongHyeon
e4a5f4e04b o Don't hardcode that Yukon FE has 16KB SRAM. In fact, Yukon FE has
only 4KB SRAM.
 o Rework setting Tx/Rx RAM buffer size. Give receiver 2/3 of memory
   and round it down to the multiple of 1024. The RAM buffer size of
   Yukon II should be multiple of 1024. This fixes bogus RAM buffer
   configuration used in Yukon FE.

Reported by:	Oleg Lomaka  < oleg AT lomaka DOT org DOT ua >
Tested by:	Oleg Lomaka  < oleg AT lomaka DOT org DOT ua >
2007-11-20 07:07:33 +00:00
Mike Silbersack
1b67beea13 Comment out the syncache's test which ensures that hosts which negotiate TCP
timestamps in the initial SYN packet actually use them in the rest of the
connection.  Unfortunately, during the 7.0 testing cycle users have already
found network devices that violate this constraint.

RFC 1323 states 'and may send a TSopt in other segments' rather than
'and MUST send', so we must allow it.

Discovered by: Rob Zietlow
Tracked down by: Kip Macy
PR: bin/118005
2007-11-20 06:56:04 +00:00
Pyun YongHyeon
cfd540e7db Drop maintaing hardware feature(bug) lists for Yukon II. We don't have
publicly available datasheet for Yukon II and don't know what
bug/workaround exist for the specific hardware revision. Also I don't
think the vendor will release hardware errata in near future.
The hardware feature lists were not used at all except setting water
mark registers. Since msk(4) should know exact chip model/revision
number to decide which hardware capability could be used the extra
feature lists were redundant.
2007-11-20 06:52:29 +00:00