Commit Graph

66879 Commits

Author SHA1 Message Date
Søren Schmidt
350d133a64 Fix clearing of nVidia interrupts. 2008-04-10 20:40:25 +00:00
Takanori Watanabe
76f3d08d26 Don't break identity mapping set up for ACPI resume path.
With this change, BSP processor context seems to be recovered.
2008-04-10 18:38:31 +00:00
Alan Cox
f4d2c7f13e Correct pmap_copy()'s method for extracting the physical address of a
2/4MB page from a PDE.  Specifically, change it to use PG_PS_FRAME,
not PG_FRAME, to extract the physical address of a 2/4MB page from a
PDE.

Change the last argument passed to pmap_pv_insert_pde() from a
vm_page_t representing the first 4KB page of a 2/4MB page to the
vm_paddr_t of the 2/4MB page.  This avoids an otherwise unnecessary
conversion from a vm_paddr_t to a vm_page_t in pmap_copy().
2008-04-10 16:04:50 +00:00
Jung-uk Kim
824d24a83e - Add ASUS G2K laptop support.
- Add DLED and GLED found on newer ASUS laptops.
- Turn on BLED, TLED, and WLED by default as other OSes.

Reviewed by:	philip
MFC after:	3 days
2008-04-10 15:17:41 +00:00
Søren Schmidt
9f82379c24 Add experimental support for SATA Port Multipliers
Support is working on the Silicon Image SiI3124/3132.
Support is working on some AHCI chips but far from all.

Remember this is WIP, so test reports and (constructive) suggestions are welcome!
2008-04-10 13:05:05 +00:00
Marcel Moolenaar
bf8ad5a884 Fix copy-n-paste typos in free text. 2008-04-10 02:37:26 +00:00
Pyun YongHyeon
b7e548dc72 Add support for MCP73 chips.
Tested by:	"Daan Vreeken [PA4DAN]" ( Danovitsch AT vitsch DOT net )
MFC after:	1 week
2008-04-10 01:25:09 +00:00
Pyun YongHyeon
1375f576a9 It seems that RealTek 8129/8139 chip reports invalid length of
received frame under certain conditions. wpaul said the length
0xfff0 is special meaning that indicates hardware is in the
process of copying a packet into host memory. But it seems
there are other cases that hardware is busy or stuck in bad
situation even if the received frame length is not 0xfff0.
To work-around this condition, add a check that verifys that
recevied frame length is in valid range. If received length is out
of range reinitialize hardware to recover from stuck condition.

Reported by:	Mike Tancsa ( mike AT sentex DOT net )
Tested by:	Mike Tancsa
Obtained from:	OpenBSD
MFC after:	1 week
2008-04-10 01:06:05 +00:00
Xin LI
82e45205c8 Add memrchr(3).
Obtained from:	OpenBSD
2008-04-10 00:12:44 +00:00
Florent Thoumie
0d06f230fd Add support for Verizon v740 to ubsa(4).
PR:		usb/122610
Submitted by:	Randi Harper <randi@freebsdgirl.com>
MFC after:	3 days
2008-04-09 22:20:28 +00:00
Marius Strobl
a6c165e468 - Add support for IPI_PREEMPT. [1]
- Add my copyright to mp_machdep.c for having implemented support for
  USIII and up and some fixes.

Obtained from:	sun4v (modulo style(9) bugs) [1]
2008-04-09 21:14:01 +00:00
Pawel Jakub Dawidek
b03d720760 - Use LK_TYPE_MASK where needed. Actually after sys/sys/lockmgr.h:1.69 it is
no longer needed, but for now we still want to be consistent with other
  similar checks in the tree.
- Call ASSERT_VOP_ELOCKED() only when vget() returns 0.

Reviewed by:	jeff
2008-04-09 20:19:55 +00:00
Sam Leffler
6c6eaea6dd Do image loading in a context known to have a root directory:
o create a private task queue thread that sets up root and current
  directories (hooking mountroot event as needed); this is necessary
  because task queue threads are parented from proc0 and it does not
  have a reference to rootvnode (lost when / mounting moved to init)
o bounce image load + unload requests through the private task q so
  we can load images even when the request is made from a thread that
  does not have sufficient context (e.g. task q thread)
o add a check in the task q thread to fail requests before root is
  mounted (just in case)

Reviewed by:	jhb, mlaier, luigi (glance)
MFC after:	1 month
2008-04-09 19:07:48 +00:00
Alexander Motin
8f9ac44aa7 Add memory barriers to the node locking operations.
Add some comments.
2008-04-09 19:03:19 +00:00
Sam Leffler
c5876e1889 fix locking botch
MFC after:	1 week
2008-04-09 18:40:10 +00:00
John Baldwin
9f88822361 Revert the previous change and let PROBE_KEYBOARD function identical to -P
in boot2/gptboot.
2008-04-09 17:59:17 +00:00
Roman Divacky
872cbe6466 Remove using magic value of -1 to distinguish between linux_open()
and linux_openat(). Instead just pass AT_FDCWD into linux_common_open()
for the linux_open() case. This prevents passing -1 as a dirfd to
openat() from succeeding which is wrong.

Suggested by:	rwatson, kib
Approved by:	kib (mentor)
2008-04-09 16:42:50 +00:00
Doug Rabson
5b0981f086 Fix a problem which stopped this from starting up on a kernel compiled
without the INET6 option.
2008-04-09 15:43:19 +00:00
Peter Grehan
2aa95aceb6 Include <sys/types.h> before <sys/systm.h> to get typedefs required
by new atomic.h. Fixes tinderbox LINT build.
2008-04-09 08:50:37 +00:00
Bjoern A. Zeeb
b835b6fe2b Take the route mtu into account, if available, when sending an
ICMP unreach, frag needed.  Up to now we only looked at the
interface MTU. Make sure to only use the minimum of the two.

In case IPSEC is compiled in, loop the mtu through ip_ipsec_mtu()
to avoid any further conditional maths.

Without this, PMTU was broken in those cases when there was a
route with a lower MTU than the MTU of the outgoing interface.

PR:		kern/122338
Tested by:	Mark Cammidge  mark peralex.com
Reviewed by:	silence on net@
MFC after:	2 weeks
2008-04-09 05:17:18 +00:00
Marcel Moolenaar
34aec6b9f8 Unbreak after removal of SI_SUB_MOUNT_ROOT. 2008-04-09 03:32:48 +00:00
Marcel Moolenaar
c563d53362 Reimplement atomic_add, atomic_clear, atomic_set and atomic_subtract
so that all implemented variants have proper prototypes. The 8-bit,
16-bit and 64-bit variants are not implemented.

This really fixes the current build breakages caused by type casting
and struct aliasing rules.
2008-04-09 01:00:35 +00:00
Jung-uk Kim
fb4865e7de Clean up and fix style(9) nits. 2008-04-08 19:09:45 +00:00
Jung-uk Kim
ff0af72c39 - Add write(2) support for psm(4) in native operation level. Now arbitrary
commands can be written to /dev/psm%d and status can be read back from it.
- Reflect the change in psm(4) and bump version for ports.

MFC after:	1 week
2008-04-08 17:55:26 +00:00
Sam Leffler
00c71fb7c3 o add a mountroot event handler that fires when / is mounted; this information
was lost when root started being mounted by init
o remove SI_SUB_MOUNT_ROOT since it's no longer meaningful

MFC after:	2 weeks
2008-04-08 17:53:33 +00:00
Sam Leffler
175611b668 change taskqueue_start_threads to create threads instead of proc's
Reviewed by:	jhb
2008-04-08 17:48:02 +00:00
Marcel Moolenaar
ca6f63a1ed Quick fix for the kernel build breakage in netgraph and the
aliasing warning in libthr. A more elaborate fix is in the
works that makes sure that all variants have proper inline
functions with proper types.
2008-04-08 16:34:50 +00:00
Yoshihiro Takahashi
f2ca4c3ad4 Always set the bell_pitch to 800. This catch up with the sysbeep() argument
changing.
2008-04-08 13:10:57 +00:00
Konstantin Belousov
a3526bf049 Bump __FreeBSD_version after the implementation of the openat() and
related syscalls both for the native FreeBSD ABI and linuxolator.
2008-04-08 12:57:26 +00:00
Bjoern A. Zeeb
902827f6f3 In some situations we were not clearing pending link state attentions.
Because of this we were not getting further interrupts for link state
changes, thus never went into iface UP state and thus could not transmit.

The only way out of this was an incoming packet generating an rx interrupt
and making us call into bge_link_upd.

Up to rev. 1.101, in bge_start_locked, we only returned instantly
if there was 'no link AND nothing queued for tx'. So with a packet queued
for tx, we hit the register scrubbing at the end of bge_start_locked
and were out fine. We simply lost a packet or two but got the interrupts
need to get into UP state.
With rev. 1.102 this was turned into 'if there is no link OR there is
nothing to send' (correct behaviour) and as long as there is no link
we never hit the register scrubbing and consequently never got the link UP.

What we do now is force an interrupt at the end of bge_ifmedia_upd_locked
so we will call bge_link_upd, clear the link state attention and get
further interrupts.
This helps to get the iface UP on an idle network or at least to get
it UP faster not depending on an rx intr anymore.
In case you could not get a DHCP lease or it took very long,
it was because of this.

It is unknown which chips are affected by this. ASIC rev. 0x2003 was the
most popular trouble candidate.
At least the fiber cards should have been working fine.

Which register to scrub is currently under discussion. The comitted
solution was tested and found to work for a lot of setups. It might
not help with MSI.
The reason why we end up in such a situation is entirely unknown.

PR:		kern/111804
Tested by:	phk, scottl at Y!
MFC after:	14 days
2008-04-08 11:51:17 +00:00
Kevin Lo
97344c5281 Remove some long-dead code
Reviewed by: cognet
2008-04-08 10:24:42 +00:00
Konstantin Belousov
50ad4fc65c Regenerate 2008-04-08 09:51:19 +00:00
Konstantin Belousov
48b05c3f82 Implement the linux syscalls
openat, mkdirat, mknodat, fchownat, futimesat, fstatat, unlinkat,
    renameat, linkat, symlinkat, readlinkat, fchmodat, faccessat.

Submitted by:	rdivacky
Sponsored by:	Google Summer of Code 2007
Tested by:	pho
2008-04-08 09:45:49 +00:00
Weongyo Jeong
590ed12305 Add a couple of missing wireless NIC driver modules.
Approved by:	thompsa (mentor)
2008-04-08 01:47:33 +00:00
John Baldwin
98fb26bf86 Add PCI ID's for ICH8 USB controllers.
MFC after:	1 week
PR:		usb/116574
Submitted by:	Dave Grochowski  malus.x of gmail
2008-04-07 19:12:22 +00:00
Andre Oppermann
3a4018c4e8 Remove TCP options ordering assumptions in tcp_addoptions(). Ordering
was changed in rev. 1.161 of tcp_var.h.  All option now test for sufficient
space in TCP header before getting added.

Reported by:	Mark Atkinson <atkin901-at-yahoo.com>
Tested by:	Mark Atkinson <atkin901-at-yahoo.com>
MFC after:	1 week
2008-04-07 19:09:23 +00:00
Andre Oppermann
5b2e33eab5 Remove now unnecessary comment. 2008-04-07 18:50:05 +00:00
Andre Oppermann
c343c524e1 Use #defines for TCP options padding after EOL to be consistent.
Reviewed by:	bz
2008-04-07 18:43:59 +00:00
John Baldwin
d227204d2d Revert back to probing Host-PCI bridges in the order we encounter them in
the tree rather than sorting them by their address on PCI bus 0.

Reported by:	kan
2008-04-07 18:35:11 +00:00
Pawel Jakub Dawidek
58e9afacb4 Correct function name in panic().
Reported by:	kensmith
2008-04-07 18:12:37 +00:00
Attilio Rao
e0f62984c1 - Use a different encoding for lockmgr options: make them encoded by
bit in order to allow per-bit checks on the options flag, in particular
  in the consumers code [1]
- Re-enable the check against TDP_DEADLKTREAT as the anti-waiters
  starvation patch allows exclusive waiters to override new shared
  requests.

[1] Requested by:	pjd, jeff
2008-04-07 14:46:38 +00:00
Rui Paulo
b75dfbe80d Actually, I was looking at the wrong Linux .c file. Set INIT2 to its
previous value.
While there, lower the delay for the misterious key.
2008-04-07 12:58:43 +00:00
Robert Watson
7a3244ccb7 Add further TCP inpcb locking assertions to some TCP input code paths.
MFC after:	1 month
2008-04-07 12:41:45 +00:00
Rui Paulo
4fb9bf66ad * Add missing #else in the #ifdef DEBUG section.
* Fix the login in asmc_init().
* Change the INIT2 constant to reflect the same change in the Linux driver.
2008-04-07 12:09:59 +00:00
Rui Paulo
2208c50409 "Prettyfy" numbers in hexadecimal. No functional change. 2008-04-07 11:38:42 +00:00
Rui Paulo
01b18fc48a Remove isa_if.h. 2008-04-07 11:26:13 +00:00
Rui Paulo
4470f0f388 The SMC is represented on the acpi tables, so we can completely remove
dependency on isa. We are now an acpi child.

Also:
	* Add compile time debugging activation
	* Increase the delay for the SMS init flag.
2008-04-07 11:22:12 +00:00
Rui Paulo
e0c098c888 Add opt_intr_filter.h. 2008-04-07 11:08:45 +00:00
Alan Cox
109d493230 Update pmap_page_wired_mappings() so that it counts 2/4MB page mappings. 2008-04-07 07:38:02 +00:00
Robert Watson
a7a91e6592 Maintain and observe a ZBUF_FLAG_IMMUTABLE flag on zero-copy BPF
buffer kernel descriptors, which is used to allow the buffer
currently in the BPF "store" position to be assigned to userspace
when it fills, even if userspace hasn't acknowledged the buffer
in the "hold" position yet.  To implement this, notify the buffer
model when a buffer becomes full, and check that the store buffer
is writable, not just for it being full, before trying to append
new packet data.  Shared memory buffers will be assigned to
userspace at most once per fill, be it in the store or in the
hold position.

This removes the restriction that at most one shared memory can
by owned by userspace, reducing the chances that userspace will
need to call select() after acknowledging one buffer in order to
wait for the next buffer when under high load.  This more fully
realizes the goal of zero system calls in order to process a
high-speed packet stream from BPF.

Update bpf.4 to reflect that both buffers may be owned by userspace
at once; caution against assuming this.
2008-04-07 02:51:00 +00:00