Commit Graph

129125 Commits

Author SHA1 Message Date
Xin LI
ca7d624355 On amd64 platform, use linux32 headers so 32-bit Linux applications
would be able to work with aac(4).

This approach is used by some other drivers as well.  However, we
need a more generic way to do this in order to avoid having to
special case headers in individual drivers for each platform.

Obtained from:	Adaptec (version b11518)
Approved by:	scottl
2006-12-20 17:10:53 +00:00
Ruslan Ermilov
c8c3587578 Markup cosmetics. 2006-12-20 16:57:13 +00:00
Ruslan Ermilov
44fce1caa1 Document some details better, making it easier to translate. 2006-12-20 15:34:01 +00:00
Yaroslav Tykhiy
a9e42d31b7 Syscons cannot be stopped, so provide a no-op stop method.
The default stop method from rc.subr isn't suited for this
case and produces a bogus warning: "syscons not running".

Suggested by:	matteo
2006-12-20 12:59:50 +00:00
Bruce Evans
5b01e77c64 In bge_txeof(), cancel the watchdog timeout if all descriptors have
been handled instead of when at least one descriptor was just handled.
For bge, it is normal to get a txeof when only a small fraction of the
queued tx descriptors have been handled, so the bug broke the watchdog
in a usual case.
2006-12-20 12:03:21 +00:00
Ruslan Ermilov
0f07cf12ac Be more accurate in the description of the -I option:
signaling to a process doesn't necessarily kill it.
2006-12-20 11:57:22 +00:00
Yaroslav Tykhiy
51f1dbba96 Improve rc.d conformance:
- don't play a needless trick with prestart, just use start method;
- provide no-op stop method so that we don't get bogus "abi not running" error.
2006-12-20 11:37:15 +00:00
Bruce Evans
b848e03260 Avoid a race and a pessimization in bge_intr():
- moved the synchronizing bus read to after the bus write for the first
  interrupt ack so that it actually synchronizes everything necessary.

  We were acking not only the status update that triggered the interrupt
  together with any status updates that occurred before we got around
  to the bus write for the ack, but also any status updates that occur
  after we do the bus write but before the write reaches the device.
  The corresponding race for the second interrupt ack resulted in
  sometimes returning from the interrupt handler with acked but
  unserviced interrupt events.  Such events then remain unserviced
  until further events cause another interrupt or the watchdog times
  out.

  The race was often lost on my 5705, apparently since my 5705 has broken
  event coalescing which causes a status update for almost every packet,
  so another status update is quite likely to occur while the interrupt
  handler is running.  Watchdog timeouts weren't very noticeable,
  apparently because bge_txeof() has one of the usual bugs resetting the
  watchdog.

- don't disable device interrupts while bge_intr() is running.  Doing this
  just had the side effects of:
  - entering a device mode in which different coalescing parameters apply.
    Different coalescing parameters can be used to either inhibit or
    enhance the chance of getting another status update while in the
    interrupt handler.  This feature is useless with the current
    organization of the interrupt handler but might be useful with a
    taskqueue handler.
  - giving a race for ack+reenable/return.  This cannot be handled
    by simply rearranging the order of bus accesses like the race for
    ack+keepenable/entry.  It is necessary to sync the ack and then
    check for new events.
  - taking longer, especially with the extra code to avoid the race on
    ack+reenable/return.

Reviewed by:	ru, gleb, scottl
2006-12-20 11:14:45 +00:00
Konstantin Belousov
cc570216bb In rev. 1.514, iodone on async buffer may happen before code checks the
vnode v_flag. For cluster buffers this would result in dereferencing NULL
b_vp. To prevent the panic, cache relevant vnode flag before calling
bstrategy.

Reported by:	Peter Holm, kris
Tested by:	Peter Holm
Reviewed by: tegge
Pointy hat to:	kib
2006-12-20 09:22:31 +00:00
Colin Percival
6d3d33dd7a Remove -F option from getopts string -- this option has never done
anything apart from invoking usage(), and apparently slipped in by
accident.

Approved by:	kientzle
MFC after:	3 days
2006-12-20 06:56:25 +00:00
Yaroslav Tykhiy
b8115f0517 Make grammar a bit more consistent in this document. 2006-12-20 06:21:51 +00:00
Yaroslav Tykhiy
736304033d Allow for module-path being a semicolon-separated list of dirs.
This is consistent with kern.module_path sysctl and also compensates
for the unconventional syntax of asf(8) where the last of multiple
arguments is the output file, which prevents us from using the
traditional Unix syntax "foo file ..." to specify multiple module
dirs.

Submitted by:	emaste
MFC after:	1 week
2006-12-20 06:20:04 +00:00
David Xu
74c751131b get LIBPTHREAD_ADAPTIVE_SPIN early, so it can be used for some global
mutexes.
2006-12-20 05:05:44 +00:00
David Xu
842a092b74 Check environment variable PTHREAD_ADAPTIVE_SPIN, if it is set, use
it as a default spin cycle count.
2006-12-20 04:43:34 +00:00
David Xu
4e32b7b3cc Add a lwpid field into per-cpu structure, the lwpid represents current
running thread's id on each cpu. This allow us to add in-kernel adaptive
spin for user level mutex. While spinning in user space is possible,
without correct thread running state exported from kernel, it hardly
can be implemented efficiently without wasting cpu cycles, however
exporting thread running state unlikely will be implemented soon as
it has to design and stablize interfaces. This implementation is
transparent to user space, it can be disabled dynamically. With this
change, mutex ping-pong program's performance is improved massively on
SMP machine. performance of mysql super-smack select benchmark is increased
about 7% on Intel dual dual-core2 Xeon machine, it indicates on systems
which have bunch of cpus and system-call overhead is low (athlon64, opteron,
and core-2 are known to be fast), the adaptive spin does help performance.

Added sysctls:
    kern.threads.umtx_dflt_spins
        if the sysctl value is non-zero, a zero umutex.m_spincount will
        cause the sysctl value to be used a spin cycle count.
    kern.threads.umtx_max_spins
        the sysctl sets upper limit of spin cycle count.

Tested on: Athlon64 X2 3800+, Dual Xeon 5130
2006-12-20 04:40:39 +00:00
Martin Blapp
cd1b20d58a Back out rev. 1.266. The real cause for the recent panics has been fixed
in rev. 1.267 and there is no need to keep this test.
2006-12-20 02:49:59 +00:00
Marius Strobl
1d545c7a44 - Use the re_tick() callout instead of if_slowtimo() for driving
re_watchdog() in order to avoid races accessing if_timer.
- Use bus_get_dma_tag() so re(4) works on platforms requiring it.
- Remove invalid BUS_DMA_ALLOCNOW when creating the parent DMA tag
  and the tags that are used for static memory allocations.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
- Remove an unused variable in re_intr().
2006-12-20 02:13:59 +00:00
Marius Strobl
3e0e67263b Fix a bug originally introduced in rev. 1.74; don't reloaded the
watchdog timer in dc_txeof() in case there are still unhandled
descriptors as dc_poll() invokes dc_poll() unconditionally.
Otherwise this would result in the watchdog timer constantly being
being reloaded and thus circumvent that the watchdog ever fires in
the DEVICE_POLLING case.

Pointed out by:	bde
2006-12-20 01:49:56 +00:00
Jung-uk Kim
45ee6ab350 Partially back out rev. 1.148 and use new ETHER_BPF_MTAP() macro for VLAN.
Remaining changes are cosmetic.
2006-12-20 01:12:07 +00:00
Peter Grehan
bd8e6f87c8 Remove bogus increment of re-hashed PTEG index. This snuck in with r1.12 of
pmap.c, and is potentially the cause of hangs reported on machines with a
small amount of memory. On machines with sufficient RAM, and without a lot
of processes running, this situation would probably never occur.

Testing is still incomplete, but it is obviously wrong so remove the
offending code now.

The issue of what to do when both the primary and secondary hash overflow
is still open.

Reported by:	Dan Kresja at windriver dot com, via alc
2006-12-20 01:10:21 +00:00
Jung-uk Kim
1beb06dd0d Use BMSR for link status in one more place and clean up more. 2006-12-20 00:34:12 +00:00
Jung-uk Kim
d56df7ca25 - Do not depend on auto negotiation for link speed/duplex status.
- Read link status from BMSR instead of auxilary status register.
- Clean up style(9) nits.
2006-12-20 00:08:47 +00:00
Jung-uk Kim
f7c6b0a8c6 Clear full-duplex when half-duplex flag is set. This actually makes
'mediaopt half-duplex' working as it should.  It is now equivalent of
'-mediaopt full-duplex'.
2006-12-19 22:50:49 +00:00
Martin Blapp
b472f371b2 Giant might have been temporarily dropped while waiting for proctree_lock, allowing for an
intervening tty_close() that cleared tp->t_session.

Submitted by:	tegge
MFC:		1 day
2006-12-19 22:34:32 +00:00
John-Mark Gurney
87a1c270c6 add a missing the...
MFC after:	3 days
2006-12-19 20:20:39 +00:00
Bruce M Simpson
8f435158a3 Remove dependency on deprecated if_watchdog ABI.
Tested with a Sitecom RT2661 based card.
2006-12-19 17:37:41 +00:00
Ariff Abdullah
303f62b8a2 Fix distorted sound on Fujitsu Siemens AMILO Pa 1510.
Reported/Tested by:	infofarmer
2006-12-19 16:52:09 +00:00
Erwin Lansing
db8e6345c3 - Add geography and spanish ports categories
- Use "related to" instead of "relating to" consistently [1]

Submitted by:   Rostislav Krasny <rosti.bsd@gmail.com> [1]
Reviewed by:    simon
MFC after:      3 days
2006-12-19 16:46:44 +00:00
Martin Blapp
e0b43fcf44 Add the tp->t_refcnt validity check back. There are still some race
conditions where tp->t_refcnt can go to zero.
2006-12-19 16:46:13 +00:00
David Xu
d733ccfbc2 Remove unused sysctls. 2006-12-19 13:06:01 +00:00
Pawel Jakub Dawidek
ce0d4ed4c2 Use pipe_direct_write() optimization only if the data is in process' memory.
This fixes sending data through pipe from the kernel.

Fix suggested by:	rwatson
2006-12-19 12:52:22 +00:00
Ruslan Ermilov
5eccbe45a7 The -r option can also cause the files to be extended (not
necessarily truncated).
2006-12-19 11:20:34 +00:00
Ruslan Ermilov
fe0e364354 Refine markup and add the EXIT STATUS section where appropriate. 2006-12-19 10:34:14 +00:00
Oleg Bulyzhin
5dda808582 - Add missing callout_drain() call.
- Synchronize bge_tick() with callout_reset/callout_stop() calls.
- Avoid using bge_tick() inside bge_link_upd(), use mii_pollstat() instead.

MFC after:	2 month
2006-12-19 08:57:46 +00:00
Oleg Bulyzhin
25ff664232 - Fix autonegotiation timer.
- Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE defines instead of hardcoded value.
- Fix some comments.
- style(9)

MFC after:	2 month
2006-12-19 08:41:48 +00:00
Craig Rodrigues
3244bb8a12 For big-endian version of getulong() macro, cast result to u_int32_t.
This macro was written expecting a 32-bit unsigned long, and
doesn't work properly on 64-bit systems.  This bug caused vn_stat()
to return incorrect values for files larger than 2gb on msdosfs filesystems
on 64-bit systems.

PR:		106703
Submitted by:	Axel Gonzalez <loox e-shell net>
MFC after:	3 days
2006-12-19 02:31:58 +00:00
Craig Rodrigues
d01e83878b Fix get_ulong() macro on AMD64 (or any little-endian 64-bit platform).
This bug caused vn_stat() to fail on files larger than 2gb on msdosfs
filesystems on AMD64.

PR:		106703
Tested by:	Axel Gonzalez <loox e-shell net>
MFC after:	3 days
2006-12-19 01:55:45 +00:00
Matt Jacob
06cacb29ca Restore revision 1.126 that got accidentally nuked. 2006-12-18 23:53:39 +00:00
Matt Jacob
805e1f828c Add back some CAM_NEW_TRAN code to make backporting to RELENG_6 easier. 2006-12-18 23:50:30 +00:00
Takanori Watanabe
747e146437 Remove stall comment.
Pointed out by:Ed Maste.
2006-12-18 18:57:41 +00:00
Giorgos Keramidas
7810d9c616 Spell "Kensington Thinking Mouse" correctly. 2006-12-18 18:48:28 +00:00
Peter Edwards
977e36e94a Clean bound and non-bound pthread structures consistently before
they become candidates for reuse.  Without this fix, some of the
state from a thread structure's previous incarnation could interfere
with its new one. Specifically, a non-bound thread started as
"suspended" (see pthread_attr_setcreatesuspend_np()) might not get
scheduled at all when resumed, as the "active" flag would be set
spuriously.

Reviewed by: deischen@, davidxu@
MFC after: 1 week
2006-12-18 17:08:07 +00:00
Jung-uk Kim
7c929cf95b - Remove stale VPD support and its comment and get device name from VPD API.
- Do not repeatedly read vendor/device IDs while probing.
- Remove redundant bzero(3) for softc.  device_get_softc(9) does it for free[1].

Reviewed by:	glebius
Suggested by:	glebius[1]
2006-12-18 16:40:04 +00:00
Ruslan Ermilov
b35e435f6e Use a standard section name. 2006-12-18 15:45:01 +00:00
Ruslan Ermilov
c03c456567 Improve markup. 2006-12-18 15:36:31 +00:00
Takanori Watanabe
7b7b6f4497 Oops, I forget to add amd64 as ACPI arch. 2006-12-18 14:38:31 +00:00
Pawel Jakub Dawidek
15c7f46bcf For consistency use 'unsigned' instead of 'u_int'. 2006-12-18 11:12:00 +00:00
Kip Macy
de87749b4a remove unneeded operations in tsb_set_tte_real - the function is
only used early in initialization so SMP safeness isn't really an
issue
2006-12-18 07:46:59 +00:00
Kip Macy
2d74924b65 add an interface for passing the entire kernel size up front to the
loader so that it can memory can be allocated aligned at the beginning of
the desired large page
2006-12-18 07:35:14 +00:00
Kip Macy
118b944e8d add new large page sizes for use by shared loader 2006-12-18 07:28:59 +00:00