]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoRevert the previous change to pthread_once() stub in libc. It is actually
John Baldwin [Fri, 20 Nov 2009 20:43:34 +0000 (20:43 +0000)]
Revert the previous change to pthread_once() stub in libc.  It is actually
a feature that libstdc++ depends on to simulate the behavior of libc's
internal '__isthreaded' variable.  One benefit of this is that _libc_once()
is now private to _once_stub.c.

Requested by: kan

14 years agoOnly Tx checksum offloading is supported now. Remove experimental
Pyun YongHyeon [Fri, 20 Nov 2009 20:43:16 +0000 (20:43 +0000)]
Only Tx checksum offloading is supported now. Remove experimental
code sneaked in r199611.

14 years agoAdd __FBSDID.
Pyun YongHyeon [Fri, 20 Nov 2009 20:40:34 +0000 (20:40 +0000)]
Add __FBSDID.

14 years agoAdd IPv4/TCP/UDP Tx checksum offloading support. It seems the
Pyun YongHyeon [Fri, 20 Nov 2009 20:33:59 +0000 (20:33 +0000)]
Add IPv4/TCP/UDP Tx checksum offloading support. It seems the
controller also has support for IP/TCP checksum offloading for Rx
path. But I failed to find to way to enable Rx MAC to compute the
checksum of received frames.

14 years agoBecause we know received bytes including CRC there is no reason to
Pyun YongHyeon [Fri, 20 Nov 2009 20:25:21 +0000 (20:25 +0000)]
Because we know received bytes including CRC there is no reason to
call m_adj(9). The controller also seems to have a capability to
strip CRC bytes but I failed to activate this feature except for
loopback traffic.

14 years agoAdd initial endianness support. It seems the controller supports
Pyun YongHyeon [Fri, 20 Nov 2009 20:18:53 +0000 (20:18 +0000)]
Add initial endianness support. It seems the controller supports
both big-endian and little-endian format in descriptors for Rx path
but I couldn't find equivalent feature in Tx path. So just stick to
little-endian for now.

14 years agoRemove unnecessary structure packing.
Pyun YongHyeon [Fri, 20 Nov 2009 20:12:37 +0000 (20:12 +0000)]
Remove unnecessary structure packing.

14 years agoReplace gmt_is_set and the gmt_mutex lock with a pthread_once_t variable and
John Baldwin [Fri, 20 Nov 2009 19:21:33 +0000 (19:21 +0000)]
Replace gmt_is_set and the gmt_mutex lock with a pthread_once_t variable and
an init routine run on the first invocation via _once().

MFC after: 1 week

14 years agoAdd an internal _once() method. This works identical to pthread_once(3)
John Baldwin [Fri, 20 Nov 2009 19:19:51 +0000 (19:19 +0000)]
Add an internal _once() method.  This works identical to pthread_once(3)
with the additional property that it is safe for routines in libc to use
in both single-threaded and multi-threaded processes.  Multi-threaded
processes use the pthread_once() implementation from the threading library
while single-threaded processes use a simplified "stub" version internal
to libc.  The libc stub-version of pthread_once() now also uses the
simplified "stub" version as well instead of being a nop.

Reviewed by: deischen, Matthew Fleming @ Isilon
Suggested by: alc
MFC after: 1 week

14 years agoCorrect copyright date in the BPF regression test.
Jung-uk Kim [Fri, 20 Nov 2009 19:01:09 +0000 (19:01 +0000)]
Correct copyright date in the BPF regression test.

14 years agoAdjust BPF JIT compiler regression tests to catch up with r199603.
Jung-uk Kim [Fri, 20 Nov 2009 18:53:38 +0000 (18:53 +0000)]
Adjust BPF JIT compiler regression tests to catch up with r199603.

14 years ago- Allocate scratch memory on stack instead of pre-allocating it with
Jung-uk Kim [Fri, 20 Nov 2009 18:49:20 +0000 (18:49 +0000)]
- Allocate scratch memory on stack instead of pre-allocating it with
the filter as we do from bpf_filter()[1].
- Revert experimental use of contigmalloc(9)/contigfree(9).  It has no
performance benefit over malloc(9)/free(9)[2].

Requested by: rwatson[1]
Pointed out by: rwatson, jhb, alc[2]

14 years agoAlways allocate PCI/ISA interrupts as shareable so that shared
Marcel Moolenaar [Fri, 20 Nov 2009 17:59:50 +0000 (17:59 +0000)]
Always allocate PCI/ISA interrupts as shareable so that shared
interrupts don't cause driver attach failures.

14 years agoFix minor memory leak in a function.
Alexander Leidinger [Fri, 20 Nov 2009 15:28:38 +0000 (15:28 +0000)]
Fix minor memory leak in a function.

MFC after: 1 week

14 years agoFix minor resource leak in a function which was introduced by changing an
Alexander Leidinger [Fri, 20 Nov 2009 15:27:00 +0000 (15:27 +0000)]
Fix minor resource leak in a function which was introduced by changing an
err() to a return in r106254.

MFC after: 1 week

14 years agotsec: Use IFQ_DRV macros for managing interface packet queue.
Rafal Jaworowski [Fri, 20 Nov 2009 13:28:06 +0000 (13:28 +0000)]
tsec: Use IFQ_DRV macros for managing interface packet queue.

This lets tsec(4) work with ALTQ.

Submitted by: Marcin Ligenza
MFC after: 1 week

14 years agoAlways use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to
John Baldwin [Fri, 20 Nov 2009 12:48:35 +0000 (12:48 +0000)]
Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to
fully support booting from large volumes.

Tested by: Emil Smolenski  ambsd of raisa.eu.org
Submitted by: Matt Reimer  mattjreimer of gmail (most of the C bits)
MFC after: 1 week

14 years agoremove volume alignment (was previously not correctly implemented)
Andrew Thompson [Fri, 20 Nov 2009 09:00:38 +0000 (09:00 +0000)]
remove volume alignment (was previously not correctly implemented)

Submitted by: HPS
Reported by: Jaakko Heinonen

14 years agoSync to P4
Andrew Thompson [Fri, 20 Nov 2009 08:57:25 +0000 (08:57 +0000)]
Sync to P4
 - fix a transfer cancelling bug/segfault [1]
 - correct a return code in the transfer cancel function.
 - add new API function, libusb20_tr_bulk_intr_sync().

Submitted by: HPS
Reported by: Robert Jenssen [1]

14 years agoNo need to include opt_kstack_pages.h, because KSTACK_PAGES is
Marcel Moolenaar [Fri, 20 Nov 2009 07:40:02 +0000 (07:40 +0000)]
No need to include opt_kstack_pages.h, because KSTACK_PAGES is
already defined through genassym.c

14 years agoAdd a seatbelt to the Nested TLB Fault handler to give us a chance
Marcel Moolenaar [Fri, 20 Nov 2009 03:14:54 +0000 (03:14 +0000)]
Add a seatbelt to the Nested TLB Fault handler to give us a chance
to panic when we have an unexpected TLB fault while interrupt
collection is disabled. Use a token rather than the actual address
of the restart point to avoid the need for the movl instruction.
The token is arbitrary. For the drummers: it's based on a single
paradiddle.

14 years agoMove interface reinitialization down after disabling WOL in resume
Pyun YongHyeon [Thu, 19 Nov 2009 23:14:40 +0000 (23:14 +0000)]
Move interface reinitialization down after disabling WOL in resume
path.

14 years agoMinimize interface reinitialization by checking IFF_DRV_RUNNING
Pyun YongHyeon [Thu, 19 Nov 2009 23:12:44 +0000 (23:12 +0000)]
Minimize interface reinitialization by checking IFF_DRV_RUNNING
flag. This fixes unnecessary interface UP/DOWNs during getting an
IP address via DHCP.

Tested by: Warren Block ( wblock<> wonkity dot com )

14 years agoFix copy & paste error and remove extra space before colon.
Pyun YongHyeon [Thu, 19 Nov 2009 22:59:52 +0000 (22:59 +0000)]
Fix copy & paste error and remove extra space before colon.

Pointed out by: danfe

14 years agoUse capability pointer to access PCIe registers rather than
Pyun YongHyeon [Thu, 19 Nov 2009 22:53:41 +0000 (22:53 +0000)]
Use capability pointer to access PCIe registers rather than
directly access them at fixed address. Frequently the register
offset could be changed if additional PCI capabilities are added to
controller.
One odd thing is ET_PCIR_L0S_L1_LATENCY register. I think it's PCIe
link capabilities register but the location of the register does
not match with PCIe capability pointer + offset. I'm not sure it's
shadow register of PCIe link capabilities register.

14 years ago- Hook into the existing stat timer to drive the transmit watchdog instead
John Baldwin [Thu, 19 Nov 2009 22:14:23 +0000 (22:14 +0000)]
- Hook into the existing stat timer to drive the transmit watchdog instead
  of using if_watchdog and if_timer.
- Reorder detach to call ether_ifdetach() before anything else in tl(4)
  and wb(4).

14 years ago- Add a private timer to drive the transmit watchdog instead of using
John Baldwin [Thu, 19 Nov 2009 22:06:40 +0000 (22:06 +0000)]
- Add a private timer to drive the transmit watchdog instead of using
  if_watchdog and if_timer.
- Fix some issues in detach for sn(4), ste(4), and ti(4).  Primarily this
  means calling ether_ifdetach() before anything else.

14 years agoUse bus_{read,write}_4 rather than bus_space_{read,write}_4.
Pyun YongHyeon [Thu, 19 Nov 2009 22:06:19 +0000 (22:06 +0000)]
Use bus_{read,write}_4 rather than bus_space_{read,write}_4.

14 years ago- Initialize callout before it is used in atestop() during attach.
John Baldwin [Thu, 19 Nov 2009 22:04:02 +0000 (22:04 +0000)]
- Initialize callout before it is used in atestop() during attach.
- Reorder detach so that ether_ifdetach() is called first.  This removes
  the race that ATE_FLAG_DETACHING closed, so that flag can be removed.
- Trim a duplicate clearing of IFF_DRV_RUNNING.

Reviewed by: imp

14 years agostyle(9)
Pyun YongHyeon [Thu, 19 Nov 2009 21:53:21 +0000 (21:53 +0000)]
style(9)

14 years agoFix compile after previous "harmless" commit.
John Baldwin [Thu, 19 Nov 2009 21:47:54 +0000 (21:47 +0000)]
Fix compile after previous "harmless" commit.

Pointy hat to: jhb

14 years agoRemove extra spce at the EOL.
Pyun YongHyeon [Thu, 19 Nov 2009 21:46:58 +0000 (21:46 +0000)]
Remove extra spce at the EOL.

14 years agoAdd MSI support.
Pyun YongHyeon [Thu, 19 Nov 2009 21:45:06 +0000 (21:45 +0000)]
Add MSI support.

14 years agoDestroy driver mutex in device detach.
Pyun YongHyeon [Thu, 19 Nov 2009 21:39:43 +0000 (21:39 +0000)]
Destroy driver mutex in device detach.

14 years agoRemove support code for FreeBSD 6.x versions.
Pyun YongHyeon [Thu, 19 Nov 2009 21:08:33 +0000 (21:08 +0000)]
Remove support code for FreeBSD 6.x versions.

14 years agoRemove commented out reference to if_watchdog and an assignment of zero to
John Baldwin [Thu, 19 Nov 2009 20:59:40 +0000 (20:59 +0000)]
Remove commented out reference to if_watchdog and an assignment of zero to
if_timer.

Reviewed by: scottl

14 years agoRemove complex macros that were used to compute bits values.
Pyun YongHyeon [Thu, 19 Nov 2009 20:57:35 +0000 (20:57 +0000)]
Remove complex macros that were used to compute bits values.
Although these macros may have its own strength, its complex
definition make hard to read the code.

Approved by: delphij

14 years agoSeveral fixes to this driver:
John Baldwin [Thu, 19 Nov 2009 19:35:15 +0000 (19:35 +0000)]
Several fixes to this driver:
- Overhaul the locking to avoid recursion and add missing locking in a few
  places.
- Don't schedule a task to call vge_start() from contexts that are safe to
  call vge_start() directly.  Just invoke the routine directly instead
  (this is what all of the other NIC drivers I am familiar with do).  Note
  that vge(4) does not use an interrupt filter handler which is the primary
  reason some other drivers use tasks.
- Add a new private timer to drive the watchdog timer instead of using
  if_watchdog and if_timer.
- Fixup detach by calling ether_ifdetach() before stopping the interface.

14 years agoSeveral fixes to these drivers. Note that these two drivers are actually
John Baldwin [Thu, 19 Nov 2009 19:25:47 +0000 (19:25 +0000)]
Several fixes to these drivers.  Note that these two drivers are actually
just two different attachments (EISA and PCI) to a single driver.
- Add real locking.  Previously these drivers only acquired their lock
  in their interrupt handler or in the ioctl routine (but too broadly in
  the latter).  No locking was used for the stack calling down into the
  driver via if_init() or if_start(), for device shutdown or detach.  Also,
  the interrupt handler held the driver lock while calling if_input().  All
  this stuff should be fixed in the locking changes.
- Really fix these drivers to handle if_alloc().  The front-end attachments
  were using if_initname() before the ifnet was allocated.  Fix this by
  moving some of the duplicated logic from each driver into pdq_ifattach().
  While here, make pdq_ifattach() return an error so that the driver just
  fails to attach if if_alloc() fails rather than panic'ing.  Also, defer
  freeing the ifnet until the driver has stopped using it during detach.
- Add a new private timer to drive the watchdog timer.
- Pass the softc pointer to the interrupt handlers instead of the device_t
  so we can avoid the use of device_get_softc() and to better match what
  other drivers do.

14 years ago- This driver used the if_watchdog timer both as a watchdog on transmit and
John Baldwin [Thu, 19 Nov 2009 18:43:43 +0000 (18:43 +0000)]
- This driver used the if_watchdog timer both as a watchdog on transmit and
  auto-negotiation.  To make this simpler and easier to understand I have
  split this out into two separate timers.  One just manages the auto-neg
  side of things and one is a transmit watchdog.  Neither uses if_watchdog.
- Call ether_ifdetach() at the start of detach.

14 years ago- Use callout_init_mtx() instead of callout_init(..., CALLOUT_MPSAFE).
John Baldwin [Thu, 19 Nov 2009 18:37:55 +0000 (18:37 +0000)]
- Use callout_init_mtx() instead of callout_init(..., CALLOUT_MPSAFE).
- Add a missing callout_drain() to detach.
- Hook into the stats timer and use that to drive the transmit watchdog
  instead of using if_watchdog.
- Run the stats timer every second to match other drivers instead of every
  other second.
- Remove dubious callout handling that stopped the timer only to start it
  again while holding the driver lock without dropping it in between the
  stop and the start.

14 years agoThis driver has two modes, a netgraph mode and an ifnet mode. In the
John Baldwin [Thu, 19 Nov 2009 18:21:51 +0000 (18:21 +0000)]
This driver has two modes, a netgraph mode and an ifnet mode.  In the
netgraph mode it used a private timer to drive the transmit watchdog.  In
the ifnet mode it used if_watchdog.  Now it always uses the private timer.

14 years agoThese drivers only set if_timer but never set if_watchdog. Just remove
John Baldwin [Thu, 19 Nov 2009 18:11:23 +0000 (18:11 +0000)]
These drivers only set if_timer but never set if_watchdog.  Just remove
the assignments to if_timer.

14 years agoAdd nanobsd example for the PC Engines ALIX board (serial console).
Michael Reifenberger [Thu, 19 Nov 2009 16:27:51 +0000 (16:27 +0000)]
Add nanobsd example for the PC Engines ALIX board (serial console).

14 years agoTune CAM ATA kernel options a bit. Move PMP support from da to scbus and
Alexander Motin [Thu, 19 Nov 2009 16:26:07 +0000 (16:26 +0000)]
Tune CAM ATA kernel options a bit. Move PMP support from da to scbus and
add ada device option, according to man page.

14 years agoProvide an effective (relocated) address when building modules metadata.
Rafal Jaworowski [Thu, 19 Nov 2009 16:25:41 +0000 (16:25 +0000)]
Provide an effective (relocated) address when building modules metadata.

This lets modules loaded dynamically in loader(8) work for U-Boot-based
platforms.

MFC after: 1 week

14 years agoFix cpuid output on E500 core.
Rafal Jaworowski [Thu, 19 Nov 2009 16:21:26 +0000 (16:21 +0000)]
Fix cpuid output on E500 core.

14 years agoAdd ada(4) man page.
Alexander Motin [Thu, 19 Nov 2009 16:19:05 +0000 (16:19 +0000)]
Add ada(4) man page.

14 years agoFix tinderbox build for i386 and sync amd64 with it.
Jung-uk Kim [Thu, 19 Nov 2009 15:45:24 +0000 (15:45 +0000)]
Fix tinderbox build for i386 and sync amd64 with it.

14 years agoExtend ddb(4) "show mount" command to print active string mount options.
Jaakko Heinonen [Thu, 19 Nov 2009 14:33:03 +0000 (14:33 +0000)]
Extend ddb(4) "show mount" command to print active string mount options.
Note that only option names are printed, not values.

Reviewed by: pjd
Approved by: trasz (mentor)
MFC after: 2 weeks

14 years agoAdapt r197136 to IPv6 stack:
Bruce M Simpson [Thu, 19 Nov 2009 13:39:07 +0000 (13:39 +0000)]
Adapt r197136 to IPv6 stack:
  Comment some flawed assumptions in in6p_join_group() about
  mixing SSM full-state and delta-based APIs.

MFC after: 1 day

14 years agoAdapt r197135 to IPv6 stack:
Bruce M Simpson [Thu, 19 Nov 2009 13:33:23 +0000 (13:33 +0000)]
Adapt r197135 to IPv6 stack:
  Don't allow joins w/o source on an existing group.
  This is almost always pilot error.

  We don't need to check for group filter UNDEFINED state at t1,
  because we only ever allocate filters with their groups, so we
  unconditionally reject such calls with EINVAL.
  Trying to change the active filter mode w/o going through IPV6_MSFILTER
  is also disallowed.

MFC after: 1 day

14 years agoAdapt r197132 to IPv6 stack:
Bruce M Simpson [Thu, 19 Nov 2009 13:30:06 +0000 (13:30 +0000)]
Adapt r197132 to IPv6 stack:
  Tighten input checking in in6p_join_group():
   * Don't try to use the source address, when its family is unspecified.
   * If we get a join without a source, on an existing inclusive
     mode group, this is an error, as it would change the filter mode.

  Fix a problem with the handling of in6_mfilter for new memberships:
   * Do not rely on im6f being NULL; it is explicitly initialized to a
     non-NULL pointer when constructing a membership.
   * Explicitly initialize *im6f to EX mode when the source address
     is unspecified.

  This fixes a problem with in_mfilter slot recycling in the join path.

MFC after: 1 day

14 years agoCorrect a comment.
Bruce M Simpson [Thu, 19 Nov 2009 13:21:37 +0000 (13:21 +0000)]
Correct a comment.

MFC after: 1 day

14 years agoAdapt r197314 to IPv6 stack:
Bruce M Simpson [Thu, 19 Nov 2009 12:21:20 +0000 (12:21 +0000)]
Adapt r197314 to IPv6 stack:
  Return ENOBUFS consistently if user attempts to exceed
  in_mcast_maxsocksrc resource limit.

MFC after: 1 day

14 years agoAdapt r197130 to IPv6 stack:
Bruce M Simpson [Thu, 19 Nov 2009 12:18:30 +0000 (12:18 +0000)]
Adapt r197130 to IPv6 stack:
  Fix an obvious logic error in the IPv4 multicast leave processing,
  where the filter mode vector was not updated correctly after the leave.

MFC after: 1 day

14 years agoAdapt the fix for IGMPv2 in r199287 for the IPv6 stack.
Bruce M Simpson [Thu, 19 Nov 2009 11:55:19 +0000 (11:55 +0000)]
Adapt the fix for IGMPv2 in r199287 for the IPv6 stack.
Only multicast routing is affected by the issue.

MFC after: 1 day

14 years agofix spelling mistake
Darren Reed [Thu, 19 Nov 2009 08:10:24 +0000 (08:10 +0000)]
fix spelling mistake

14 years agoopt_* headers are included using the quoted form.
Marcel Moolenaar [Thu, 19 Nov 2009 01:27:22 +0000 (01:27 +0000)]
opt_* headers are included using the quoted form.

14 years agoAdd a test case for very long BPF program.
Jung-uk Kim [Thu, 19 Nov 2009 00:00:31 +0000 (00:00 +0000)]
Add a test case for very long BPF program.

14 years ago- Change internal function bpf_jit_compile() to return allocated size of
Jung-uk Kim [Wed, 18 Nov 2009 23:40:19 +0000 (23:40 +0000)]
- Change internal function bpf_jit_compile() to return allocated size of
the generated binary and remove page size limitation for userland.
- Use contigmalloc(9)/contigfree(9) instead of malloc(9)/free(9) to make
sure the generated binary aligns properly and make it physically contiguous.

14 years ago- Make BPF JIT compiler working again in userland. We are limiting size of
Jung-uk Kim [Wed, 18 Nov 2009 19:26:17 +0000 (19:26 +0000)]
- Make BPF JIT compiler working again in userland.  We are limiting size of
generated native binary to page size for now.
- Update copyright date and fix some style nits.

14 years agoAdd WorldB SKU.
Rui Paulo [Wed, 18 Nov 2009 18:48:18 +0000 (18:48 +0000)]
Add WorldB SKU.

Reviewed by: sam
MFC after: 1 week

14 years agoSimplify both the invocation and the implementation of vm_fault() for wiring
Alan Cox [Wed, 18 Nov 2009 18:05:54 +0000 (18:05 +0000)]
Simplify both the invocation and the implementation of vm_fault() for wiring
pages.

(Note: Claims made in the comments about the handling of breakpoints in
wired pages have been false for roughly a decade.  This and another bug
involving breakpoints will be fixed in coming changes.)

Reviewed by: kib

14 years agoFix mistyped \n in makc's label.
Matthias Andree [Wed, 18 Nov 2009 14:47:47 +0000 (14:47 +0000)]
Fix mistyped \n in makc's label.

This and previous commit have been...
Approved by:    garga (mentor)

14 years agoAdd mandree@ and mentorship relations with garga/miwi.
Matthias Andree [Wed, 18 Nov 2009 14:46:46 +0000 (14:46 +0000)]
Add mandree@ and mentorship relations with garga/miwi.

14 years agoFix a bug where the system panics when a SHUTDOWN is received with an
Michael Tuexen [Wed, 18 Nov 2009 12:17:06 +0000 (12:17 +0000)]
Fix a bug where the system panics when a SHUTDOWN is received with an
illegal TSN.

Approved by: rrs (mentor)
MFC after: ASAP

14 years agoMake following functions be cancellation points:
David Xu [Wed, 18 Nov 2009 06:10:50 +0000 (06:10 +0000)]
Make following functions be cancellation points:
mq_receive
mq_send
mq_timereceive
mq_timedsend

14 years agolink libpthread because the librt really needs it to fully function.
David Xu [Wed, 18 Nov 2009 05:09:03 +0000 (05:09 +0000)]
link libpthread because the librt really needs it to fully function.

14 years agoFix compiler warnings.
David Xu [Wed, 18 Nov 2009 01:35:36 +0000 (01:35 +0000)]
Fix compiler warnings.

14 years agoAdd a missing .Ed tag.
Xin LI [Wed, 18 Nov 2009 01:13:15 +0000 (01:13 +0000)]
Add a missing .Ed tag.

MFC after: 2 weeks

14 years agorc.early(8) was removed as of 20090530 so remove manual page reference
Xin LI [Wed, 18 Nov 2009 00:56:05 +0000 (00:56 +0000)]
rc.early(8) was removed as of 20090530 so remove manual page reference
to it.

MFC after: 1 week

14 years agoGet rid of unused fields addr_over which is never really used,
Michael Tuexen [Tue, 17 Nov 2009 23:03:38 +0000 (23:03 +0000)]
Get rid of unused fields addr_over which is never really used,
only copied around.

Approved by: rrs (mentor)

14 years agoAdd pwait utility, which waits for any process to terminate.
Jilles Tjoelker [Tue, 17 Nov 2009 22:47:20 +0000 (22:47 +0000)]
Add pwait utility, which waits for any process to terminate.

This is similar to the Solaris utility of the same name.

Some use cases:
* rc.subr's wait_for_pids
* interactive use, e.g. to shut down the computer when some task is done
  even if the task is already running

Discussed on: hackers@

14 years ago- Unbreak build with KLD_DEBUG defined
Oleksandr Tymoshenko [Tue, 17 Nov 2009 21:56:12 +0000 (21:56 +0000)]
- Unbreak build with KLD_DEBUG defined
- Add debug.kld_debug sysctl to control KLD debugging level
- Print information about KLD dependencies with debug enabled

14 years agoUnroll copying of the registers in {g,s}et_mcontext() and limit it
Marius Strobl [Tue, 17 Nov 2009 21:08:10 +0000 (21:08 +0000)]
Unroll copying of the registers in {g,s}et_mcontext() and limit it
to the set actually restored by tl0_ret() instead of using the whole
trapframe. Additionally skip %g7 as that register is used as the
userland TLS pointer.

PR: 140523
MFC after: 1 week

14 years agoUse always LIST_EMPTY instead of sometime SCTP_LIST_EMPTY,
Michael Tuexen [Tue, 17 Nov 2009 20:56:14 +0000 (20:56 +0000)]
Use always LIST_EMPTY instead of sometime SCTP_LIST_EMPTY,
which is defined as LIST_EMPTY.

Approved by: rrs (mentor)
MFC after: 1 month

14 years agoCatch up with r144020's /Dir_FindFile/Path_FindFile/
David E. O'Brien [Tue, 17 Nov 2009 19:35:39 +0000 (19:35 +0000)]
Catch up with r144020's /Dir_FindFile/Path_FindFile/

14 years agoFix pgsignal() call after signature change in r199355.
Konstantin Belousov [Tue, 17 Nov 2009 19:24:26 +0000 (19:24 +0000)]
Fix pgsignal() call after signature change in r199355.

Reported and tested by: bf1783 googlemail com
MFC after: 1 month

14 years ago- Update Hungarian libc catalog
Gabor Kovesdan [Tue, 17 Nov 2009 18:57:44 +0000 (18:57 +0000)]
- Update Hungarian libc catalog

14 years agoUse the bus_*() routines rather than bus_space_*() for register operations.
John Baldwin [Tue, 17 Nov 2009 18:22:14 +0000 (18:22 +0000)]
Use the bus_*() routines rather than bus_space_*() for register operations.

14 years agoIt seems generation of link state change of e1000phy(4) is not
Pyun YongHyeon [Tue, 17 Nov 2009 18:19:45 +0000 (18:19 +0000)]
It seems generation of link state change of e1000phy(4) is not
reliable on some Marvell PHYs. If msk(4) know it still does not
have established link check whether msk(4) missed the link state
change by looking into polled link state.

Reported by: Mel Flynn < mel.flynn+fbsd.current <> mailing.thruhere dot net >,
Gleb Kurtsou <gleb.kurtsou <> gmail dot com >
Tested by: Gleb Kurtsou <gleb.kurtsou <> gmail dot com >

14 years agoUnify fifolog_writer usage printout with fifolog_create and
Jaakko Heinonen [Tue, 17 Nov 2009 17:38:41 +0000 (17:38 +0000)]
Unify fifolog_writer usage printout with fifolog_create and
fifolog_reader.

Approved by: trasz (mentor)

14 years agoAlways use a private timer instead of if_watchdog and if_timer to drive
John Baldwin [Tue, 17 Nov 2009 16:43:02 +0000 (16:43 +0000)]
Always use a private timer instead of if_watchdog and if_timer to drive
the transmit watchdog.  These drivers already used a private timer when
compiled to use Netgraph.  This change just makes them always use the
private timer.  Note that these drivers do not compile and are disconnected
from the build due to TTY changes.

14 years agoCatch up with r130332 which changed the default timezone from GMT to UTC.
David E. O'Brien [Tue, 17 Nov 2009 16:29:39 +0000 (16:29 +0000)]
Catch up with r130332 which changed the default timezone from GMT to UTC.
Otherwise the tzload() (when called by gmtload()) fails to locate the UTC
file and loads the posixrules.

14 years agoGarbage collect some old #ifdef'ed code from 1994 that causes vi's '%'
David E. O'Brien [Tue, 17 Nov 2009 16:26:45 +0000 (16:26 +0000)]
Garbage collect some old #ifdef'ed code from 1994 that causes vi's '%'
to be unable to find a match in Path_FindFile().

14 years agofixed two race conditions when inserting/removing SAs via PFKey,
VANHULLEBUS Yvan [Tue, 17 Nov 2009 16:00:41 +0000 (16:00 +0000)]
fixed two race conditions when inserting/removing SAs via PFKey,
which can both lead to a kernel panic when adding/removing quickly
a lot of SAs.

Obtained from: NETASQ
MFC after: 2w (MFC on 8 before 8.0 release ???)

14 years agoRemove duplicate 'ural' entry since it was added to the MI NOTES a while
John Baldwin [Tue, 17 Nov 2009 15:47:19 +0000 (15:47 +0000)]
Remove duplicate 'ural' entry since it was added to the MI NOTES a while
ago.

14 years agoUse a private callout timer to drive the transmit watchdog instead of using
John Baldwin [Tue, 17 Nov 2009 14:23:09 +0000 (14:23 +0000)]
Use a private callout timer to drive the transmit watchdog instead of using
if_watchdog and if_timer.  The driver already contained an optional stats
timer that individual attachments could use to provide a 'tick' event.  The
stats timer only ran if the tick function pointer was non-NULL and the
attachment's tick routine had to call callout_reset(), etc.  Now the driver
always schedules a stat timer and manages the callout_reset() internally.
This timer is used to drive the watchdog and will also call the attachment's
'tick' handler if one is provided.

Tested by: WATANABE Kazuhiro

14 years agoUse a private timer to run the statistics timer instead of (ab)using
John Baldwin [Tue, 17 Nov 2009 14:13:30 +0000 (14:13 +0000)]
Use a private timer to run the statistics timer instead of (ab)using
if_watchdog and if_timer.

Tested by: WATANABE Kazuhiro  CQG00620 of nifty.ne.jp

14 years agoFix a bug where queued ASCONF messags are not sent out.
Michael Tuexen [Tue, 17 Nov 2009 13:36:21 +0000 (13:36 +0000)]
Fix a bug where queued ASCONF messags are not sent out.

Approved by: rrs (mentor)
Obtained from: Irene Ruengeler
MFC after: 1 month

14 years agoFix a memory leak when destroying an SCTP stack.
Michael Tuexen [Tue, 17 Nov 2009 13:13:58 +0000 (13:13 +0000)]
Fix a memory leak when destroying an SCTP stack.
Clean up sctp_pcb_finish().
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoDo not start the iterator when there are no associations.
Michael Tuexen [Tue, 17 Nov 2009 13:11:23 +0000 (13:11 +0000)]
Do not start the iterator when there are no associations.
This fixes a bug found by Irene Ruengeler.

Approved by: rrs (mentor)
MFC after: 1 month

14 years agoDisable (temporary) the thread based interator. It does not work with vnet.
Michael Tuexen [Tue, 17 Nov 2009 13:09:50 +0000 (13:09 +0000)]
Disable (temporary) the thread based interator. It does not work with vnet.

Approved by: rrs (mentor)

14 years agoAllow the UMA to free data. This resolves the UMA related bug reported
Michael Tuexen [Tue, 17 Nov 2009 13:08:15 +0000 (13:08 +0000)]
Allow the UMA to free data. This resolves the UMA related bug reported
by Julian.

Approved by: rrs (mentor)
MFC after: 1 month

14 years agoDo not hold the lock longer than necessary.
Michael Tuexen [Tue, 17 Nov 2009 13:05:51 +0000 (13:05 +0000)]
Do not hold the lock longer than necessary.

Approved by: rrs (mentor)
MFC after: 1 month

14 years agoFix a LOR showing up with sctp_bsd_addr(): Do not hold a rt lock
Michael Tuexen [Tue, 17 Nov 2009 12:57:10 +0000 (12:57 +0000)]
Fix a LOR showing up with sctp_bsd_addr(): Do not hold a rt lock
when calling rt_newaddrmsg().

Reviewed by: qingli
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoAmong signal generation syscalls, only sigqueue(2) is allowed by POSIX
Konstantin Belousov [Tue, 17 Nov 2009 11:39:15 +0000 (11:39 +0000)]
Among signal generation syscalls, only sigqueue(2) is allowed by POSIX
to fail due to lack of resources to queue siginfo. Add KSI_SIGQ flag
that allows sigqueue_add() to fail while trying to allocate memory for
new siginfo. When the flag is not set, behaviour is the same as for
KSI_TRAP: if memory cannot be allocated, set bit in sq_kill. KSI_TRAP is
kept to preserve KBI.

Add SI_KERNEL si_code, to be used in siginfo.si_code when signal is
generated by kernel. Deliver siginfo when signal is generated by kill(2)
family of syscalls (SI_USER with properly filled si_uid and si_pid), or
by kernel (SI_KERNEL, mostly job control or SIGIO). Since KSI_SIGQ flag
is not set for the ksi, low memory condition cause old behaviour.

Keep psignal(9) KBI intact, but modify it to generate SI_KERNEL
si_code. Pgsignal(9) and gsignal(9) now take ksi explicitely. Add
pksignal(9) that behaves like psignal but takes ksi, and ddb kill
command implemented as pksignal(..., ksi = NULL) to not do allocation
while in debugger.

While there, remove some register specifiers and use ANSI C prototypes.

Reviewed by: davidxu
MFC after: 1 month

14 years agoFix small resource leak (memory).
Alexander Leidinger [Tue, 17 Nov 2009 07:29:35 +0000 (07:29 +0000)]
Fix small resource leak (memory).

Reviewed by: gad
MFC after: 1 week

14 years agoFix typo.
Christian Brueffer [Tue, 17 Nov 2009 07:06:41 +0000 (07:06 +0000)]
Fix typo.

PR: 140615
Submitted by: Andrius Morkunas <hinokind@gmail.com>
MFC after: 3 days