Commit Graph

125675 Commits

Author SHA1 Message Date
stefanf
7d273f1844 Convert macros to use C99's syntax for macros with a variable number of
arguments.
2006-07-20 09:47:15 +00:00
stefanf
42f73871a9 Remove unused variables. 2006-07-20 09:38:46 +00:00
stefanf
372c92d219 Don't use "implicit int". Move the opening { of the functions to the next
line while there.
2006-07-20 09:11:08 +00:00
yongari
df16853b7f Since resetting hardware takes a very long time and results in link
renegotiation, we only initialize the hardware only when it is
absolutely required. Process SIOCGIFADDR ioctl in em(4) when we know
an IPv4 address is added. Handling SIOCGIFADDR in a driver is
layering violation but it seems that there is no easy way without
rewritting hardware initialization code to reduce settle time after
reset.

This should fix a long standing bug which didn't send ARP packet when
interface address is changed or an alias address is added. Another
effect of this fix is it doesn't need additional delays anymore when
adding an alias address to the interface.
While I'm here add a new if_flags into softc which remembers current
prgroammed interface flags and make use of it when we have to program
promiscuous mode.

Tested by:	Atanas <atanas AT asd DOT aplus DOT net>
Analyzed by:	rwatson
Discussed with:	-stable
2006-07-20 04:18:45 +00:00
yongari
4865b8aa7c Protect EEPROM access with the driver lock. 2006-07-20 04:01:54 +00:00
yongari
fd96b482f1 Honor IFF_DRV_OACTIVE in em_start_locked(). 2006-07-20 03:57:58 +00:00
jhb
0c5c6f316e Regen. 2006-07-19 19:03:21 +00:00
jhb
1dccc9f17a Add conditional VFS Giant locking to svr4_sys_resolvepath() and mark it
MPSAFE.
2006-07-19 19:03:03 +00:00
jhb
3d1ab82c48 Make svr4_sys_waitsys() a lot less ugly and mark it MPSAFE.
- If the WNOWAIT flag isn't specified and either of WEXITED or WTRAPPED is
  set, then just call kern_wait() and let it do all the work.  This means
  that this function no longer has to duplicate the work to teardown
  zombies that is done in kern_wait().  Instead, if the above conditions
  aren't true, then it uses a simpler loop to implement WNOWAIT and/or
  tracing for only stopped or continued processes.  This function still
  has to duplicate code from kern_wait() for the latter two cases, but
  those are much simpler.
- Sync the code to handle the WCONTINUED and WSTOPPED cases with the
  equivalent code in kern_wait().
- Fix several places that would return with the proctree lock still held.
- Lock the current process to prevent lost wakeup races when blocking.
2006-07-19 19:01:10 +00:00
jhb
70424c0f30 Add a mutex to protect the list of interrupt config hooks. We do assume
that the only remove hook operation that can occur while processing the
hooks is to remove the currently executing hook.  This should be safe as
the existing code has assumed this already for a long time now.

Reviewed by:	scottl
MFC after:	1 week
2006-07-19 18:53:56 +00:00
jhb
7863d70730 Whitespace fix after s/dev_t/struct cdev */. 2006-07-19 18:52:33 +00:00
jhb
5ee36b60d1 Call change_dir() instead of duplicating the code in fchdir(). 2006-07-19 18:30:33 +00:00
jhb
947b8c9fbd Don't free the sockaddr in kern_bind() and kern_connect() as not all
callers pass a sockaddr allocated via malloc() from M_SONAME anymore.
Instead, free it in the callers when necessary.
2006-07-19 18:28:52 +00:00
jhb
de5f3a26d7 Disable the pager for 'panic' and 'call' to be paranoid. 2006-07-19 18:26:53 +00:00
jhb
35822ba820 Initialize svr4_head during MOD_LOAD rather than on demand. 2006-07-19 18:26:09 +00:00
mr
d4972b28e6 Reflect the additional support of C7 CPU's in padlock(4).
Submitted by:	brueffer
MFC after:	1 day
2006-07-19 16:31:09 +00:00
rwatson
8ccc47a963 Add a test case for closing a UDPv6 socket that has been connected to
the IPv6 loopback address.

Warns ?= 2.
2006-07-19 12:54:14 +00:00
rwatson
42d0cba86a Add very basic regression test for netinet6: create and close raw,
UDP, and TCP IPv6 sockets.
2006-07-19 12:10:33 +00:00
nyan
62b2a75f53 The pcn does not work on NEC SV-98/2-B05 and B06.
Submitted by:	Chiharu Shibata
MFC after:	3 days
2006-07-19 11:49:22 +00:00
des
3ba8214f48 Add CPUTYPE support for Via C3 and C3-2 processors.
MFC after:	2 weeks
2006-07-19 11:27:19 +00:00
brueffer
f34ac3f2f6 - Bring kern.random output closer to reality
- Remove kern.random.sys.burst, it's no longer available
- Document kern.random.sys.harvest.swi (1)

PR:		100167 (1)
MFC after:	3 days
2006-07-19 10:49:43 +00:00
stefanf
fe8bf26aef Remove an unused variable. 2006-07-19 10:46:38 +00:00
yongari
50e3fae196 Convert sk(4) to use the new bus_alloc_resources() API and
bus_{read,write}_* macros.

Submitted by:	Antoine Brodin <antoine.brodin AT laposte DOT net>
Reviewed by:	imp (initial version)
2006-07-19 04:12:59 +00:00
ups
ee0a5eb928 Fix race conditions on enumerating pcb lists by moving the initialization
( and where appropriate the destruction) of the pcb mutex to the init/finit
functions of the pcb zones.
This allows locking of the pcb entries and race condition free comparison
of the generation count.
Rearrange locking a bit to avoid extra locking operation to update the generation
count in in_pcballoc(). (in_pcballoc now returns the pcb locked)

I am planning to convert pcb list handling from a type safe to a reference count
model soon. ( As this allows really freeing the PCBs)

Reviewed by:	rwatson@, mohans@
MFC after:	1 week
2006-07-18 22:34:27 +00:00
jhb
9adb8df481 Remove unnecessary locking for td_dupfd (it requires no locks). 2006-07-18 22:31:33 +00:00
jhb
4e36804678 Update comment. 2006-07-18 22:29:54 +00:00
cognet
b684c494c5 Add -EB to ${LD} too if we're making a big endian kernel, not anything in
kernel makefiles uses SYSTEM_LD.
2006-07-18 21:16:39 +00:00
imp
0414a72510 Add new kernel config option. NO_SYSCTL_DESCR to omit the descriptions for
the sysctls.  This saves a lot of space in the resulting kernel which is
important for embedded systems.  This change was done in a ABI compatible
way.  The pointer is still there, it just points to an empty string instead
of the description.

MFC After: 3 days
2006-07-18 17:00:51 +00:00
stefanf
ad319e77f4 Remove break after return. 2006-07-18 10:19:46 +00:00
stefanf
92077a1d25 Document that the pathname(s) following the options need not be given if
-f pathname was specified.
2006-07-18 07:39:22 +00:00
stefanf
b75bbd4bdf Fix type mismatch between char * and unsigned char *. C guarantees that
the values of the characters here are positive, so it's safe to index arrays
with them.
2006-07-18 07:29:42 +00:00
stefanf
ba64bc870a The variables i and tot don't need to be static. 2006-07-18 07:16:25 +00:00
stefanf
b180846aaa Remove break after return. 2006-07-18 07:10:30 +00:00
stefanf
2f68e34906 Drop two unnecessary casts. 2006-07-18 07:03:43 +00:00
alc
f0337456d9 MFamd64
pmap_clear_ptes() is already convoluted.  This will worsen with the
 implementation of superpages.  Eliminate it and add pmap_clear_write().

There are no functional changes.  Checked by: md5
2006-07-18 03:17:12 +00:00
rwatson
3f582797ac Fix build of uma_core.c when DDB is not compiled into the kernel by
making uma_zone_sumstat() ifdef DDB, as it's only used with DDB now.

Submitted by:	Wolfram Fenske <Wolfram.Fenske at Student.Uni-Magdeburg.DE>
2006-07-18 01:13:18 +00:00
cognet
c601d0f319 Make sure we use REDUCE32 on the result of do_cksum(), as in_cksum_skip()
expects this. If we do not, this could result in wrong checksums.

MFC after:	1 day
2006-07-18 00:07:05 +00:00
gallatin
3780baa5cb Firmware loading improvements:
- Copy ethernet firmware down in small chunks so as to avoid bugs
  in early versions of the bootstrap firmware.
- Attempt to "adopt" the running firmware if we cannot load a suitable
  firmware image via firmware(9).
- Separate firmware validation into its own routine, and check the
  major/minor driver/firmware ABI version.
2006-07-17 22:17:05 +00:00
cognet
34956b2cd0 If we can't defrag a packet, re-queue it instead of dropping it. 2006-07-17 21:36:08 +00:00
cognet
68d3bbc684 #if => #ifdef 2006-07-17 21:20:00 +00:00
cognet
6f4a8fcf1d Fix comments. 2006-07-17 21:18:03 +00:00
cognet
010b2aa1be at91_spi won't compile without spibus, so add it. 2006-07-17 21:17:20 +00:00
obrien
1926f541c8 VarAdd() already does the debug printing, so Var_Set() only needs to do it
in the case the var already exists.
2006-07-17 21:05:27 +00:00
stefanf
bd869cbeea Separate functions with a newline. 2006-07-17 21:00:42 +00:00
stefanf
8d9a675f53 style.Makefile(5): Remove -Wall from CFLAGS. 2006-07-17 20:53:25 +00:00
stefanf
3eec5dce88 Remove duplicated assignment. 2006-07-17 20:48:36 +00:00
stefanf
f16a2dfec0 Use variadic macros that comply with C99. Keep the GCC-style ones if
DEBUG is defined and GCC is used.
2006-07-17 20:39:08 +00:00
marcel
444a271f09 Move default GEOM classes from files.ia64, where they were marked
standard, to the DEFAULTS file.
2006-07-17 20:02:51 +00:00
jhb
cd6451f0ca Chain the bus_dmamap_load() calls when mapping a command with a data CCB
instead of doing the first load with the BUS_DMA_NOWAIT flag.  On 4.x with
PAE and > 4gb of RAM this proved disastrous if there weren't enough bounce
pages as amr_mapcmd() would return failure but the callback would later
fire once enough bounce pages were available and would then overwrite
another command's S/G list.

MFC after:	3 days
Submitted by:	scottl (4.x version)
Reviewed by:	scottl (port from 4.x to HEAD)
2006-07-17 19:45:47 +00:00
obrien
431401cbc0 whitespace fixing 2006-07-17 19:16:12 +00:00