Commit Graph

26245 Commits

Author SHA1 Message Date
Cameron Grant
8e81760b1a the turtle beach santacruz implements ac97 eapd in an inverted sense -
inform the ac97 code of this.
2001-06-23 18:00:06 +00:00
Jonathan Lemon
f962cba5c3 Replace bzero() of struct ip with explicit zeroing of structure members,
which is faster.
2001-06-23 17:44:27 +00:00
Cameron Grant
f00f162a5f add defines and ifdefs so this code will compile on 4.x
add spls so this code will work on 4.x
2001-06-23 17:36:51 +00:00
Cameron Grant
79bb7d52b3 move a private struct definition from ac97.h to ac97.c
add proper handling of cards which take eapd=1 to mean 'produce sound'
instead of 'external amplifier power down'
2001-06-23 17:32:40 +00:00
Ruslan Ermilov
c73d99b567 Add netstat(1) knob to reset net.inet.{ip|icmp|tcp|udp|igmp}.stats.
For example, ``netstat -s -p ip -z'' will show and reset IP stats.

PR:		bin/17338
2001-06-23 17:17:59 +00:00
Cameron Grant
6fe615f6bb add sndstat.c so module users have /dev/sndstat again 2001-06-23 17:09:38 +00:00
Mitsuru IWASAKI
4eb77744b5 Add sysctl interface (Read-only) for temprature, AC-line and Battery.
Patches for acpi_cmbat.c submitted by Munehiro Matsuda.
2001-06-23 10:38:25 +00:00
KATO Takenori
b7494481a0 Merged from sys/i386/isa/npx.c revision 1.102. 2001-06-23 08:39:13 +00:00
KATO Takenori
a655f750be Merged from sys/i386/i386/machdep.c revisions 1.456 and 1.457. 2001-06-23 08:30:13 +00:00
KATO Takenori
4f2114cb40 Removed pcm and sbc devices. 2001-06-23 08:18:55 +00:00
KATO Takenori
7bc0575ab0 Merged from sys/conf/files.i386 revisions 1.362 and 1.363. 2001-06-23 08:10:50 +00:00
KATO Takenori
b6da22604e Merged from sys/boot/i386/btx/btx/btx.s revision 1.25. 2001-06-23 08:04:14 +00:00
Nicolas Souchu
3ae3f8b0be Convert inb/outb to bus_space.
Submitted by:	jcm@FreeBSD-uk.eu.org
2001-06-23 06:52:54 +00:00
Nicolas Souchu
334a17f09a Translate various ppbus sequences into microsequences to limit
overhead of abstraction layers.

Submitted by:	jcm@FreeBSD-uk.eu.org
2001-06-23 06:51:52 +00:00
Mike Silbersack
08517d530e Eliminate the allocation of a tcp template structure for each
connection.  The information contained in a tcptemp can be
reconstructed from a tcpcb when needed.

Previously, tcp templates required the allocation of one
mbuf per connection.  On large systems, this change should
free up a large number of mbufs.

Reviewed by:	bmilekic, jlemon, ru
MFC after: 2 weeks
2001-06-23 03:21:46 +00:00
Brooks Davis
1d3771386f Fix a number of bugs in the implementation of the WEP related status
functions in ifconfig.  "ifconfig an0" should output the correct
status now.  Also, make the read and write functions both more
robust and more consistant.  This should stop most of the incorrect
size complaints and eliminate the possiability of panics from firmware
that increases resource sizes.

PR:		kern/27826
Reviewed by:	imp, jlemon
Submitted by:	Doug Ambrisko <ambrisko@ambrisko.com>
		David Wolfskill <dhw@whistle.com>
2001-06-22 23:35:24 +00:00
John Baldwin
1df95969b5 - Lock CURSIG() with the proc lock to close the signal race with psignal.
- Grab Giant around ktrace points.
- Clean up KTR_PROC tracepoints to not display the value of
  sched_lock.mtx_lock as it isn't really needed anymore and just obfuscates
  the messages.
- Add a few if conditions to replace gotos.
- Ensure that every msleep KTR event ends up with a matching msleep resume
  KTR event (this was broken when we didn't do a mi_switch()).
- Only note via ktrace that we resumed from a switch once rather than twice
  in several places in msleep().
- Remove spl's rom asleep and await as the proc lock and sched_lock provide
  all the needed locking.
- In mawait() add in a needed ktrace point for noting that we are about to
  switch out.
2001-06-22 23:11:26 +00:00
John Baldwin
87f9ffb805 - Lock CURSIG with the proc lock and don't release the proc lock until
after grabbing the sched lock to close a race.
- Lock ktrace points with Giant.
2001-06-22 23:06:38 +00:00
John Baldwin
06c836bbca - Grab the proc lock around CURSIG and postsig(). Don't release the proc
lock until after grabbing the sched_lock to avoid CURSIG racing with
  psignal.
- Don't grab Giant for addupc_task() as it isn't needed.

Reported by:	tegge (signal race), bde (addupc_task a while back)
2001-06-22 23:05:11 +00:00
John Baldwin
2ad7d3049a - Change CURSIG() and postsig() to require that the proc lock is held
rather than grabbing it and releasing it themselves.  This allows callers
  of these functions to get the lock to close race conditions.
- Grab Giant around ktrace in postsig.
- Count the switches performed on SIGSTOP's as involuntary context switches
  in the resource usage stats.

Reported by:	tegge (signal race), bde (missing csw stats)
2001-06-22 23:02:37 +00:00
David E. O'Brien
73325acbbc People wanted this bumped for the Bzip2 import. 2001-06-22 22:38:12 +00:00
Peter Wemm
1a6d55cecd Make the hw.physmem and hw.usermem variables unsigned so that they dont
come up as negative on machines with >2GB ram.
2001-06-22 22:07:01 +00:00
John Baldwin
49f886f5d3 Be conservative and always perform an mb after an atomic_cmpset operation. 2001-06-22 21:13:20 +00:00
John Baldwin
6d541bf1ae - Protect all accesses to nsw_[rw]count{,_{,a}sync} with the pbuf mutex.
- Don't drop the vm mutex while grabbing the pbuf mutex to manipulate
  said variables.
2001-06-22 21:12:19 +00:00
Matt Jacob
2f7f966cb8 int -> size_t fix 2001-06-22 19:54:38 +00:00
Matt Jacob
d4d79f279c Make hostid an unsigned long (matches kern_mib.c change)
PR:		kern/21132
MFC after:	1 month
2001-06-22 19:51:45 +00:00
Matt Jacob
8f5a1742c2 Temporary fix at least- define NCPU_PRESENT which will be mp_npcus for
SMP kernels, one (1) for non-SMP.
2001-06-22 16:03:23 +00:00
Jim Pirzyk
f83ae79fbe changed hostid from long to unsigned long to be able to store values > 2GB
on i386 platforms.  Also changed SYSCTL type from INT to ULONG and removed
comment about it.

PR:		kern/21132
MFC after:	1 month
2001-06-22 16:03:14 +00:00
John Baldwin
f4a395d6e4 Doh, missed a printf -> db_printf in the previous commit. 2001-06-22 15:37:48 +00:00
Bosko Milekic
08442f8a82 Introduce numerous SMP friendly changes to the mbuf allocator. Namely,
introduce a modified allocation mechanism for mbufs and mbuf clusters; one
which can scale under SMP and which offers the possibility of resource
reclamation to be implemented in the future. Notable advantages:

 o Reduce contention for SMP by offering per-CPU pools and locks.
 o Better use of data cache due to per-CPU pools.
 o Much less code cache pollution due to excessively large allocation macros.
 o Framework for `grouping' objects from same page together so as to be able
   to possibly free wired-down pages back to the system if they are no longer
   needed by the network stacks.

 Additional things changed with this addition:

  - Moved some mbuf specific declarations and initializations from
    sys/conf/param.c into mbuf-specific code where they belong.
  - m_getclr() has been renamed to m_get_clrd() because the old name is really
    confusing. m_getclr() HAS been preserved though and is defined to the new
    name. No tree sweep has been done "to change the interface," as the old
    name will continue to be supported and is not depracated. The change was
    merely done because m_getclr() sounds too much like "m_get a cluster."
  - TEMPORARILY disabled mbtypes statistics displaying in netstat(1) and
    systat(1) (see TODO below).
  - Fixed systat(1) to display number of "free mbufs" based on new per-CPU
    stat structures.
  - Fixed netstat(1) to display new per-CPU stats based on sysctl-exported
    per-CPU stat structures. All infos are fetched via sysctl.

 TODO (in order of priority):

  - Re-enable mbtypes statistics in both netstat(1) and systat(1) after
    introducing an SMP friendly way to collect the mbtypes stats under the
    already introduced per-CPU locks (i.e. hopefully don't use atomic() - it
    seems too costly for a mere stat update, especially when other locks are
    already present).
  - Optionally have systat(1) display not only "total free mbufs" but also
    "total free mbufs per CPU pool."
  - Fix minor length-fetching issues in netstat(1) related to recently
    re-enabled option to read mbuf stats from a core file.
  - Move reference counters at least for mbuf clusters into an unused portion
    of the cluster itself, to save space and need to allocate a counter.
  - Look into introducing resource freeing possibly from a kproc.

Reviewed by (in parts): jlemon, jake, silby, terry
Tested by: jlemon (Intel & Alpha), mjacob (Intel & Alpha)
Preliminary performance measurements: jlemon (and me, obviously)
URL: http://people.freebsd.org/~bmilekic/mb_alloc/
2001-06-22 06:35:32 +00:00
Matt Jacob
ed37c8743e Move check against CAM_NEW_TRAN_CODE ahead of the file that might include
the option file that would define it.
2001-06-22 01:02:41 +00:00
Dima Dorfman
ba23229ef8 Don't set CONSPEED to the default and deobfuscate the comment.
PR:		28296
Submitted by:	bde, Giorgos Keramidas <keramida@ceid.upatras.gr>
2001-06-21 19:50:11 +00:00
George C A Reid
733a4ea771 Use the M_ZERO flag to malloc(9)
Reviewed by:	cg
MFC after:	1 week
2001-06-21 19:45:59 +00:00
Matt Jacob
0e300eff0a Don't dereference NULL regs pointer (should mapping I/O ports fail, as
they did for me on an alpha)

Approved by:	gibbs@freebsd.org
MFC after:	2 days
2001-06-21 16:18:27 +00:00
Munechika SUMIKAWA
a96c00661a - Renumber KAME local ICMP types and NDP options numberes beacaues they
are duplicated by newly defined types/options in RFC3121
- We have no backward compatibility issue. There is no apps in our
  distribution which use the above types/options.

Obtained from:	KAME
MFC after:	2 weeks
2001-06-21 07:08:43 +00:00
Peter Wemm
47f1082c4f Remove -DNEW_LINKERSET, it is not used here anymore. This is now native. 2001-06-21 00:08:23 +00:00
John Baldwin
ad6c5bbede Don't lock around swap_pager_swap_init() that is only called once during
the pagedaemon's startup code since it calls malloc which results in lock
order reversals.
2001-06-20 23:34:06 +00:00
John Baldwin
fbd26f7594 Fix some lock order reversals where we called free() while holding a proc
lock.  We now use temporary variables to save the process argument pointer
and just update the pointer while holding the lock.  We then perform the
free on the cached pointer after releasing the lock.
2001-06-20 23:10:06 +00:00
Joerg Wunsch
80909a7db8 Cosmetics:
. staticize out_fdc(), there's no longer an ft(4) driver sharing its use
. remove in_fdc(), has been used by ft(4) last time, long since obsoleted
  by fd_in()
. move the declaration of fd_clone() to where most of the other function
  declarations are
. de-__P()ify fd_clone(), it's been the only _P()ed function in the
  entire file
2001-06-20 20:21:55 +00:00
Bosko Milekic
f5eece3fb9 Change m_devget()'s outdated and unused `offset' argument to actually mean
something: offset into the first mbuf of the target chain before copying
the source data over.

Make drivers using m_devget() with a first argument "data - ETHER_ALIGN"
to use the offset argument to pass ETHER_ALIGN in. The way it was previously
done is potentially dangerous if the source data was at the top of a page
and the offset caused the previous page to be copied (if the
previous page has not yet been appropriately mapped).

The old `offset' argument in m_devget() is not used anywhere (it's always
0) and dates back to ~1995 (and earlier?) when support for ethernet trailers
existed. With that support gone, it was merely collecting dust.

Tested on alpha by: jlemon
Partially submitted by: jlemon
Reviewed by: jlemon
MFC after: 3 weeks
2001-06-20 19:48:35 +00:00
John Baldwin
2e1aacccac Preemption by an interrupt thread is an involuntary switch, not a voluntary
one.

Pointy-hat to:	me
2001-06-20 18:26:41 +00:00
Jim Pirzyk
3398752a77 Applied the patch to fix HARP ATM that was broken when KAME IPv6 came
into FreeBSD.

PR:		kern/23620
Submitted by:	rh@matriplex.com
MFC after:	1 month
2001-06-20 17:09:14 +00:00
Ian Dowse
11fbe665c0 The serial console break-to-debugger support only functioned while
the console device was open. At other times, the interrupts that
are used to detect the break signal or ~^B sequence were disabled,
so these events would not be noticed until the next open (e.g. the
next kernel printf). This was mainly a problem while there was no
getty running on the console, such as during bootup or shutdown.

For serial consoles with break-to-debugger support, we now enable
the generation of interrupts at attach time, and we leave them
enabled while the device is closed.

Reviewed by:	bde (I've since made chages as per his suggestions)
2001-06-20 16:47:23 +00:00
Dag-Erling Smørgrav
0e79fe6f0e Constify (silence warnings introduced by last commit to sys/module.h) 2001-06-20 16:08:45 +00:00
Brian Somers
4b65cac846 Allow individual ports to use alternate pin settings (swap dsr & cd)
via the new DIGIIO_SETALTPIN ioctl, and allow the port's ALTPIN setting
to be queried via DIGIIO_GETALTPIN.

The initial state and lock devices are normally used to set and/or
lock ALTPIN settings although the device itself may also be used.

ALTPIN settings are applied per-device and apply to both the callin
and callout device at the same time.
2001-06-20 14:52:08 +00:00
Brian Somers
4a48819fbc Add DIGIIO_SETALTPIN and DIGIIO_GETALTPIN ioctl values 2001-06-20 14:51:58 +00:00
Hajimu UMEMOTO
ff2428299f made sure to use the correct sa_len for rtalloc().
sizeof(ro_dst) is not necessarily the correct one.
this change would also fix the recent path MTU discovery problem for the
destination of an incoming TCP connection.

Submitted by:	JINMEI Tatuya <jinmei@kame.net>
Obtained from:	KAME
MFC after:	2 weeks
2001-06-20 12:32:48 +00:00
Brian Somers
a48de39daf Close a race where we were releasing the unit resource at the start
of tunclose() rather than the end, and tunopen() grabbed that unit
before tunclose() finished (one process is allocating it while another
is freeing it!).

It may be worth hanging some sort of rw mutex around all specinfo
calls where d_close and the detach handler get a write lock and all
other functions get a read lock.  This would guarantee certain levels
of ``atomicity'' (is that a word?) that people may expect (I believe
Solaris does something like this).
2001-06-20 10:06:28 +00:00
Warner Losh
bd947818c1 Revert last change: it was unintended at this time. 2001-06-20 06:24:28 +00:00
Warner Losh
24236dfc83 Add new entries for:
TI1210, TI4410 and TI4450
and fix what looks like a typo in the OZ6860 entry.

Obtained from: NetBSD
2001-06-20 06:21:17 +00:00