Commit Graph

150833 Commits

Author SHA1 Message Date
John Baldwin
7cf545d0a1 - 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.
2009-11-19 22:06:40 +00:00
Pyun YongHyeon
d95121b427 Use bus_{read,write}_4 rather than bus_space_{read,write}_4. 2009-11-19 22:06:19 +00:00
John Baldwin
3064f0530b - 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
2009-11-19 22:04:02 +00:00
Pyun YongHyeon
398f1b6501 style(9) 2009-11-19 21:53:21 +00:00
John Baldwin
d31c51daa7 Fix compile after previous "harmless" commit.
Pointy hat to:	jhb
2009-11-19 21:47:54 +00:00
Pyun YongHyeon
73e338b028 Remove extra spce at the EOL. 2009-11-19 21:46:58 +00:00
Pyun YongHyeon
cc3c3b4ec4 Add MSI support. 2009-11-19 21:45:06 +00:00
Pyun YongHyeon
5b8f4900f3 Destroy driver mutex in device detach. 2009-11-19 21:39:43 +00:00
Pyun YongHyeon
696e249300 Remove support code for FreeBSD 6.x versions. 2009-11-19 21:08:33 +00:00
John Baldwin
dbd69bc565 Remove commented out reference to if_watchdog and an assignment of zero to
if_timer.

Reviewed by:	scottl
2009-11-19 20:59:40 +00:00
Pyun YongHyeon
23263665d5 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
2009-11-19 20:57:35 +00:00
John Baldwin
67e1dfa795 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.
2009-11-19 19:35:15 +00:00
John Baldwin
71098608fc 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.
2009-11-19 19:25:47 +00:00
John Baldwin
d4e576c497 - 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.
2009-11-19 18:43:43 +00:00
John Baldwin
770c8c790f - 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.
2009-11-19 18:37:55 +00:00
John Baldwin
73e7361eac 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.
2009-11-19 18:21:51 +00:00
John Baldwin
e21e2eea58 These drivers only set if_timer but never set if_watchdog. Just remove
the assignments to if_timer.
2009-11-19 18:11:23 +00:00
Michael Reifenberger
569b2f6954 Add nanobsd example for the PC Engines ALIX board (serial console). 2009-11-19 16:27:51 +00:00
Alexander Motin
9e30fbf662 Tune CAM ATA kernel options a bit. Move PMP support from da to scbus and
add ada device option, according to man page.
2009-11-19 16:26:07 +00:00
Rafal Jaworowski
035622ef18 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
2009-11-19 16:25:41 +00:00
Rafal Jaworowski
13b80c9acd Fix cpuid output on E500 core. 2009-11-19 16:21:26 +00:00
Alexander Motin
ca17f444be Add ada(4) man page. 2009-11-19 16:19:05 +00:00
Jung-uk Kim
986689c263 Fix tinderbox build for i386 and sync amd64 with it. 2009-11-19 15:45:24 +00:00
Jaakko Heinonen
10d843a446 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
2009-11-19 14:33:03 +00:00
Bruce M Simpson
1f81c2b6ff 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
2009-11-19 13:39:07 +00:00
Bruce M Simpson
604a60d1f0 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
2009-11-19 13:33:23 +00:00
Bruce M Simpson
1ee6b058a2 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
2009-11-19 13:30:06 +00:00
Bruce M Simpson
a8cf681de2 Correct a comment.
MFC after:	1 day
2009-11-19 13:21:37 +00:00
Bruce M Simpson
0dc5893ef3 Adapt r197314 to IPv6 stack:
Return ENOBUFS consistently if user attempts to exceed
  in_mcast_maxsocksrc resource limit.

MFC after:	1 day
2009-11-19 12:21:20 +00:00
Bruce M Simpson
57a9feeaad 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
2009-11-19 12:18:30 +00:00
Bruce M Simpson
7ab5a5cd1a Adapt the fix for IGMPv2 in r199287 for the IPv6 stack.
Only multicast routing is affected by the issue.

MFC after:	1 day
2009-11-19 11:55:19 +00:00
Darren Reed
7484474781 fix spelling mistake 2009-11-19 08:10:24 +00:00
Marcel Moolenaar
bcaf1959ec opt_* headers are included using the quoted form. 2009-11-19 01:27:22 +00:00
Jung-uk Kim
b78db64f58 Add a test case for very long BPF program. 2009-11-19 00:00:31 +00:00
Jung-uk Kim
ae4fdab8a8 - 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.
2009-11-18 23:40:19 +00:00
Jung-uk Kim
366652f987 - 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.
2009-11-18 19:26:17 +00:00
Rui Paulo
9c9dad53b0 Add WorldB SKU.
Reviewed by:	sam
MFC after:	1 week
2009-11-18 18:48:18 +00:00
Alan Cox
2db65ab46e 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
2009-11-18 18:05:54 +00:00
Matthias Andree
12036bce1d Fix mistyped \n in makc's label.
This and previous commit have been...
Approved by:    garga (mentor)
2009-11-18 14:47:47 +00:00
Matthias Andree
60ae714683 Add mandree@ and mentorship relations with garga/miwi. 2009-11-18 14:46:46 +00:00
Michael Tuexen
7e6206af12 Fix a bug where the system panics when a SHUTDOWN is received with an
illegal TSN.

Approved by: rrs (mentor)
MFC after: ASAP
2009-11-18 12:17:06 +00:00
David Xu
72757b75bb Make following functions be cancellation points:
mq_receive
mq_send
mq_timereceive
mq_timedsend
2009-11-18 06:10:50 +00:00
David Xu
63f1103de9 link libpthread because the librt really needs it to fully function. 2009-11-18 05:09:03 +00:00
David Xu
50f5f99be1 Fix compiler warnings. 2009-11-18 01:35:36 +00:00
Xin LI
35d9ffb960 Add a missing .Ed tag.
MFC after:	2 weeks
2009-11-18 01:13:15 +00:00
Xin LI
3b5dbf01f7 rc.early(8) was removed as of 20090530 so remove manual page reference
to it.

MFC after:	1 week
2009-11-18 00:56:05 +00:00
Michael Tuexen
0e891bcdc1 Get rid of unused fields addr_over which is never really used,
only copied around.

Approved by: rrs (mentor)
2009-11-17 23:03:38 +00:00
Jilles Tjoelker
0e5e416780 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@
2009-11-17 22:47:20 +00:00
Oleksandr Tymoshenko
3ea6157e6b - Unbreak build with KLD_DEBUG defined
- Add debug.kld_debug sysctl to control KLD debugging level
- Print information about KLD dependencies with debug enabled
2009-11-17 21:56:12 +00:00
Marius Strobl
8fe75fc879 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
2009-11-17 21:08:10 +00:00