Commit Graph

109343 Commits

Author SHA1 Message Date
christos
a73f7b01d5 - Add O_CLOEXEC to open(2)
- Add fd_set_exclose() to encapsulate uses of FIO{,N}CLEX, O_CLOEXEC, F{G,S}ETFD
- Add a pipe1() function to allow passing flags to the fd's that pipe(2)
  opens to ease implementation of linux pipe2(2)
- Factor out fp handling code from open(2) and fhopen(2)
2011-04-10 15:45:33 +00:00
tsutsui
ef54da0a01 Fix hangup on the first floppy access since 2008.
Problem was reported by isaki@.

On X680x0 (and most other machines other than ISA FDC),
the ready line from FDD is connected to FDC and fdc driver can
be notified of the ready state after fd_set_motor() by interrupts.
In this case no need to use callout(9) to wait the FDD motor stabilized,
and the callout(9) method used in ISA fdc(4) driver rather caused
infinite unhandled interrupts since callout(9) was no longer invoked
during interrupt storm after vmlocking2 merge, I guess.

Should be pulled up to netbsd-5.
2011-04-10 15:23:06 +00:00
jakllsch
b8a6ae2e64 Fix regression introduced in 1.72.
(Attach arguments need to be copied before using the copy.)
2011-04-10 15:02:01 +00:00
christos
2b7317d2ba revert previous. breaks things in subtle ways (ntpdate gets stuck on boot,
shell processes get stuck on ^C)
2011-04-10 14:37:20 +00:00
ahoka
4e870ad59c Fix locking and simplify some error path. 2011-04-10 12:48:09 +00:00
ahoka
9491044f6b Add some KASSERTs and a few more debug printf 2011-04-10 10:56:37 +00:00
christos
871e737d11 Make lwpid part of siginfo so that it can be passed to userland. 2011-04-10 00:04:37 +00:00
christos
47f11362ae Preserve SB_ASYNC on the accepted socket. From: Dmitry Matveev
http://mail-index.netbsd.org/tech-net/2011/02/17/msg002457.html
2011-04-09 23:03:59 +00:00
christos
8dffb314e4 make this compile again. 2011-04-09 22:09:05 +00:00
martin
c655df0d1c PR kern/43664:
mlelstv pointed out that we sometimes may use checksums on loopback
interfaces. Make the test consistent with the code path selecting
the checksum operation before invoking fragmentation.
2011-04-09 21:00:53 +00:00
christos
cd9ad85fe1 - little KNF
- use struct copy instead of memcpy
- snprintf("%s") -> strlcpy
- fix NUL termination
2011-04-09 20:53:39 +00:00
martin
8a8f4ef60a We do not do checksums on loopback interfaces, not even if fragmenting.
Fixes PR kern/43664.
2011-04-09 20:34:36 +00:00
phx
73e37f5358 Set D-Link DSM-G600 power LED to solid green on start. 2011-04-09 19:56:20 +00:00
jdc
342707d5db Add EDID and video mode setting support to FFB.
Add definitions for registers related to video modes, and to DDC.  Rename
other registers to be more descriptive.
Add i2c bus routines to read the EDID data via DDC.
Add routines to calculate, and to set, the video mode.

Note, that interlaced and stereo video modes are not supported.

Thanks to Michael Lorenz and Jared McNeill for advice and encouragement,
and to Martin Husemann for testing.
2011-04-09 19:31:14 +00:00
jdc
1271f8ec3a Add a new function - sort_modes() - to sort video modes in an approximate
order of preference.

The preferred mode is placed first.  If there is no preferred mode, then
the first mode with highest resolution is placed first.  Other modes are
then sorted on difference from the first mode by refresh rate, aspect
ratio, then size.
2011-04-09 18:22:31 +00:00
jdc
25950f6e19 Remove duplicate video modes.
When parsing the established and the detailed timings, check to see if this
mode already exists in our mode list.  If the mode exists when parsing
established timings, then do nothing (we already have this exact mode).  If
the mode exists when parsing detailed timings, then replace our timings with
the timings from the monitor.
2011-04-09 18:18:28 +00:00
martin
4aa7a8f48e Add a few KASSERT to verify we do not accidently use minor(NODEV) as an
index into the pt_softc array.
2011-04-09 12:07:06 +00:00
martin
07a55fd03e KNF, add a comment and an assertion. 2011-04-09 07:02:57 +00:00
martin
4dafc2b43a In ttymalloc() explicitly initialize t_dev to NODEV.
In ptcwakeup() do not bother to wake up a client side if it has not been
opened yet.
The old code would spuriously wakeup the client minor(0) [i.e. ttyp0
typically] or crash the kernel if that wasn't open, see PR kern/40688.
(Old names used to match the PR and test case, adjust names for
/dev/ptm[x] resp. /dev/pts/* accordingly)
2011-04-09 06:34:06 +00:00
joerg
406d512bfa Do not ignore errors from genprom. 2011-04-09 00:26:52 +00:00
sborrill
933ebb282e Revert previous couple of commits. bge_setvlan() is only called by
bge_init() and so does not get called when a vlan child is added. Calling
bge_setvlan() from bge_ifflags_cb() doesn't work either as it appears that
the callback is called before ec_capenable is updated by if_vlan.c.
2011-04-08 17:45:10 +00:00
sborrill
fef6e6696d Fix typo in previous commit that would have stopped relevant bit being set. 2011-04-08 15:49:37 +00:00
dyoung
225e55bc85 There's no isa/ under cats/; update Makefile to reflect that. 2011-04-08 14:58:46 +00:00
nisimura
1a92bd3dae Minor format knots; sort a model list in alphabetical order and adjust
spacing.
2011-04-08 14:09:24 +00:00
sborrill
bfaa893b9f PR kern/38871
Fix LAN on bge(4), alc(4). Flag VLAN capability in ec_capenable as used by network
card drivers.
2011-04-08 13:56:51 +00:00
yamt
18a0ef4a04 simplify code a little. no functional changes. 2011-04-08 11:15:11 +00:00
yamt
500e2272be - ensure that the promoted page is on the queue even when later pmap_enter
failed.
- don't activate a page twice.
- remove an argument which is used only for an assertion.
- assertions and comments.
2011-04-08 10:42:51 +00:00
yamt
09f62f3554 comment 2011-04-08 10:36:58 +00:00
yamt
22f6580cf6 implement timer_create of CLOCK_MONOTONIC 2011-04-08 10:35:37 +00:00
phx
36ed4e1e88 QNAP support.
Note about the D-Link firmware.
2011-04-08 08:29:07 +00:00
isaki
6291bfee46 Poll the next medium on both drive of #0 and #1. 2011-04-07 13:38:21 +00:00
matt
bbaf07c722 Add a cp15 trapper to emulate the mrc/mcr instructions for the thread id
registers.
2011-04-07 11:02:24 +00:00
matt
f77463e13f Add a define for pcb_user_pid_rw 2011-04-07 11:01:49 +00:00
matt
3c5c08e46b Add __lwp_getprivate_fast 2011-04-07 10:20:29 +00:00
matt
a9de2ef0c9 Don't use the pcb anymore since the user read-only thread and process id
value is now grabbed from l_private.
2011-04-07 10:07:11 +00:00
matt
b6591ab3ce Fetch user read-only thread and process id from l->l_private, not the pcb.
(need to g/c the pcb field formerly used for this).
2011-04-07 10:03:47 +00:00
dyoung
9eb9a91423 Increase SYMTAB_SPACE so that this kernel will build. 2011-04-07 04:02:29 +00:00
dyoung
3f56488c0d Fix more const pci_attach_args fallout. 2011-04-07 04:01:40 +00:00
matt
558221d2a2 Fix bogus idepth on OEA. 2011-04-07 02:05:02 +00:00
matt
1a61b7e897 Get rid of cpu_lwp_setprivate since it's not needed on powerpc. 2011-04-07 02:04:06 +00:00
macallan
713b73c8c5 add mode setting support
If we find a monitor via DDC we switch to its preferred mode if it reports one,
otherwise stick with whatever the firmware set up.
2011-04-07 01:20:31 +00:00
macallan
0c7466a2ae defflag CRMFB_DEBUG 2011-04-07 01:07:31 +00:00
jym
d833e65927 Alright, set xvif(4) syntax once and for all. Tested with ipf(4) under
XEN3_DOM0 amd64.

Fixes PR misc/39376.

See http://mail-index.netbsd.org/port-xen/2011/04/06/msg006603.html
2011-04-06 23:51:55 +00:00
phx
e08320b5eb Enable all known RTC drivers. The correct RTC will automatically be chosen as
an I2C device, depending on the NAS model.
2011-04-06 18:12:15 +00:00
tsutsui
c2d1bbc260 Move intr_init() (which initializes evcnt(9) for interrupts)
from early machdep.c:mach_init() to autoconf.c:cpu_configure().

evcnt_init() isn't called yet when mach_init() is invoked from locore.S
and interrupts won't be enabled before cpu_configure(9).

Problem reported by Erik Bertelsen on port-pmax:
http://mail-index.NetBSD.org/port-pmax/2011/04/06/msg000093.html
2011-04-06 15:31:08 +00:00
tsutsui
56f894e4bc Make this compile with options DEBUG. (PRId64 for time_t) 2011-04-06 14:51:12 +00:00
tsutsui
3a5aec4b4e Sync with mipsX_subr.S:
>> Rename kernel_tlb_miss to kern_tlb_miss (everything else kern_xxx)
2011-04-06 14:12:36 +00:00
tsutsui
a46a76ec3e Sync with locore_mips1.S:
>> Load pc into ta0 instead of ra and then saving to ta0.
2011-04-06 14:04:32 +00:00
tsutsui
fb48dc859c Fix build error in previous:
>> ../arch/mips/mips/locore.S:632: Error: register value used as expression
2011-04-06 13:30:33 +00:00
jruoho
e4898fb179 Include stdint(3) for user space. Fixes PR # 39744. 2011-04-06 08:15:44 +00:00