Commit Graph

116832 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
7edcac16df Reduce diffs from boot0cfg.c (no functional change). 2005-07-15 14:37:40 +00:00
Lukas Ertl
7ad68986b8 *) Implement round-robin reads for multiplex volumes.
*) Plug a possible memory leak. [1]

[1] obtained from: pjd@.
2005-07-15 13:38:06 +00:00
Andrey A. Chernov
e775a53b59 Add -mno-sse3 for prescott/nocona 2005-07-15 12:29:31 +00:00
Andrey A. Chernov
63ecaee8d6 Add -mno-sse3 for prescott/nocona 2005-07-15 12:22:14 +00:00
Andrey A. Chernov
64b3210d91 Add -mno-sse3 for prescott/nocona 2005-07-15 11:45:30 +00:00
Maxim Sobolev
9c007cf29e Document the fact that if MAP_FIXED request has been successful it
replaces any previous mapping to the same address.

Obtained from:	IEEE Std 1003.1, 2004 Edition
2005-07-15 11:37:25 +00:00
Robert Watson
e86bb57bbf Provide more documentation on caller-owned storage in struct memory_type,
as well as documenting MEMSTAT_MAXCALLER.

MFC after:	1 week
2005-07-15 11:28:21 +00:00
Robert Watson
ccf4e07e83 Increase the number of caller memory storage slots from 2 or 4 to
MEMSTAT_MAXCALLER (8), and expose MEMSTAT_MAXCALLER via memstat.h so
that applications can check their assumptions about how many slots
are available.

Remove 'spare' memory storage in struct malloc_type, since we now
don't expose the data structure internals to applications and rely
on accessor methods, this approach to ABI stability isn't required.

MFC after:	7 days
2005-07-15 11:19:55 +00:00
Robert Watson
e916e57bf0 Hook up libmemstat(3) to the library list in mdoc.local. This will cause
the library description (specifically, -lmemstat) to render properly in
the libmemstat.3 man page.

Submitted by:	ru
MFC after:	1 week
2005-07-15 10:27:35 +00:00
Robert Watson
09df0a9a09 Add a section on the allocator name space and its interactions with
memstat_mtl_find().

MFC after:	10 days
2005-07-15 10:23:55 +00:00
Robert Watson
3ab4da680f Re-spell wronge less wrongly as wrong.
Submitted by:	jkoshy
MFC after:	1 week
2005-07-15 10:13:50 +00:00
George V. Neville-Neil
ba7be0a934 Fix for PR 82974. We were not checking that the route looked up in
the case of an RTM_CHANGE was specific, i.e. that it matched completely.  This
led to a route change of a non-existent route changing the default route
as the radix code would simply back track to that point and hand that
route back to the routing socket code.

PR: 82974
Reviewed by: Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw>
             Ben Kaduk <minimarmot@gmail.com>
             Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net>
Obtained from:	OpenBSD with modifications.
MFC after: 2 weeks
2005-07-15 09:18:34 +00:00
Poul-Henning Kamp
dfa5ad9421 Attempt gctl verb "write MBR" when updating.
This should solve the problem of modifying the MBR while running.
2005-07-15 08:04:32 +00:00
Poul-Henning Kamp
de78c288db Attempt gctl verb "write MBR" when updating.
This should solve the problem of modifying a busy MBR.
2005-07-15 08:02:51 +00:00
Poul-Henning Kamp
1c3cf26412 Implement a gctl handler and the verb "write MBR" which can be used to
update metadata and bootcode while the MBR is in use.

MFC candidate
2005-07-15 08:00:44 +00:00
Poul-Henning Kamp
a976a7a3c0 Decouple vttest from the tree so we can remove <sgtty.h>
This program probably should live in src/tools or ports anyway.
2005-07-15 07:44:57 +00:00
Poul-Henning Kamp
879e5da3b4 Switch to contemporary TTY interface. 2005-07-15 07:41:26 +00:00
Warner Losh
49fd8f11fe Use the new cis scanning code to look for the proper MAC address. The
offset varies between models of these cards.

# this gets the MAC address right for my CEM-2, but it doesn't detect
# the media attached correctly.
2005-07-15 06:46:04 +00:00
Warner Losh
730b64121c Fix a couple of leaking situations when errors happen. 2005-07-15 06:08:26 +00:00
Warner Losh
d55dc24982 Fix the xircom match routine. In it we were always return a match
when the base vendor/id didn't match.  Some cards woudl bogusly match
and would cause other downstream problems.
2005-07-15 06:05:11 +00:00
Takanori Watanabe
f35f3346a2 Add options for sl811.
Pointed out by: nyan
2005-07-15 05:12:49 +00:00
Warner Losh
f83fe7ce90 Don't wait for the printer to become ready before allowing the open to
succeed.  There are many printers that return status over the read
channel, and if we wait for the status to become ready, then we can't
find the status automatically.  Linux doesn't wait, nor does it ever
seem to really check the status in any meaningful way...  If there
really is a problem, the writes to the bulk out endpoint will still
fail (like they would if the printer was ready and then ran out of
paper or became unready).

In addition, there are a number of printers being made that emulate
the 'status' byte by returning '0' always rather than '0x18'.  This
fixes the EBUSY on open timeouts on those printer as well.

Reviewed by: the defining silence on usb@
2005-07-15 04:19:42 +00:00
Warner Losh
ce71e8d87f s/_us// 2005-07-15 04:11:42 +00:00
Warner Losh
d224ede0da Move to using tsleeps in the cardbus reset case as well. This
eliminates the last of the DELAYs in pccbb.
2005-07-15 03:25:22 +00:00
Garance A Drosehn
e9651b673d Correct one regression test (which was expected an incorrect answer), and
add a few more tests.  This matches bug fixes recently committed to 'env'.
2005-07-15 02:31:15 +00:00
Warner Losh
fdcac9ba83 Note non-support of modem side of DMF650TX card 2005-07-15 02:01:38 +00:00
Warner Losh
33d6891bc8 Add support for the DLink DMF650TX Ethernet+56k modem PC Card. This
gets the ethernet part of the card working, while putting appropriate
hooks in place for the modem code.  Other ed based lan/modem combo
cards should be easy to add.  Please send me info on any you'd like to
see support added.

Note: The 650 isn't a strictly conforming multi-function card, so
special support is needed. :-(
2005-07-15 01:54:59 +00:00
Warner Losh
4943ad2699 Mention the PC Card devices known to work with this driver, as well
as some of the bugs there with.
2005-07-15 01:50:22 +00:00
Warner Losh
5e2f32718d Add real support for obtaining the silicom MAC address from the
apporpriate place in the CIS, now that we have the CIS scanning code.
2005-07-15 01:48:38 +00:00
Warner Losh
faf98cda63 Insert missing int i; 2005-07-15 01:43:08 +00:00
Maksim Yevmenkin
f9e566779c kbdmux(4) keyboard multiplexer integration
o Add minimal kbdmux(4) man page to the source tree (more details to follow);

o Hook up kbdmux(4) to the build.

This concludes the first part of the kbdmux(4) keyboard multiplexer
integration. It now should be possible to use kbdmux(4), however one
must configure kbdmux(4) by hand (i.e. load kbdmux(4) module and use
kbdcontrol(1) to add/remove slave keyboards to/from kbdmux(4)).

MFC after:	1 week
2005-07-14 23:04:23 +00:00
Maksim Yevmenkin
4673ea01e3 kbdmux(4) keyboard multiplexer integration
o Slightly change KBADDKBD and KBRELKBD ioctl() interface. Instead of passing
  keyboard index pass keyboard_info_t structure with populated 'kb_unit' and
  'kb_name' fields. Keyboard index is not very user-friendly and is not very
  easy to obtain. Keyboard driver name and unit, on the other hand, is much
  more user friendly and known almost all the time;

o Move definition of keyboard_info_t structure up;

o Teach kbdcontrol(1) how to attach/detach keyboards to/from the keyboard
  multiplexor;

o Update kbdcontrol(1) man page and document new functionality.

To attach/detach keyboard to/from keyboard multiplexor one needs to use
keyboard device name (i.e. ukbd0).

MFC after:	1 week
2005-07-14 22:43:20 +00:00
Max Laier
2e37c5a333 Print newly exported pfsync statistics with netstat(8).
Requested by:	glebius
MFC after:	1 week
2005-07-14 22:42:35 +00:00
Max Laier
6de8d9dc52 Export pfsyncstats via sysctl "net.inet.pfsync" in order to print them with
netstat (seperate commit).

Requested by:	glebius
MFC after:	1 week
2005-07-14 22:22:51 +00:00
John Baldwin
b9d3b80521 Convert a remaining !fs.map->system_map to
fs.first_object->flags & OBJ_NEEDGIANT test that was missed in an earlier
revision.  This fixes mutex assertion failures in the debug.mpsafevm=0
case.

Reported by:	ps
MFC after:	3 days
2005-07-14 21:18:07 +00:00
Warner Losh
fd4e475233 Omnibus power and interrupt fixes:
o Don't busy wait on powerup.  Instead, use the power up interrupt to wait
  for the card to power up.  Don't wait when we're turning the card off,
  since no interrupt happens in that case.
o Convert many of the long DELAYs to tsleeps.  We do not run before
  the timer have stared, so DELAY isn't necessary.  More DELAYs can likely
  be eliminated in the future.
o When powering up the card, don't do anything if the card is already
  powered up (before we'd power cycle it).  This means that for most
  cards we power them up once and then never change the power.
o On card eject, mask (by clearing) the CD bit.  Before we set it, which
  was wrong.  We don't want to see any CD events past the first one since
  they need to be debounced.

With these changes, I can insert/eject 16bit cards without glitching xmms'
sound output.  Something very important to the development of better pccard
drivers :-)
2005-07-14 20:46:59 +00:00
Warner Losh
2bb5d7f9ac Also provide the function type in the nomatch routine. 2005-07-14 20:40:42 +00:00
Christian Brueffer
f0ea72a038 - Remove MLINKS to nonexistant manpages
- Change some section numbers to match reality
- For MLINKS to manpages from ports, mention which port installs them

MFC after:	3 days
2005-07-14 20:29:08 +00:00
Max Laier
52023244de Move eventhandler for 'ifnet_departure_event' at the end of the progress.
Some of the (IPv6) cleanup functions send packets to inform peers of the
departure.  These packets confused users of ifnet_departure_event (pf at the
moment).

PR:		kern/80627
Tested by:	Divacky Roman
MFC after:	1 week
2005-07-14 20:26:43 +00:00
Paul Saab
0e38f5365b Fixes for NFS crashes on architectures that require strict alignment.
- Fix nfsm_disct() so that after pulling up data, the remaining data
  is aligned if necessary.
- Fix nfs_clnt_tcp_soupcall() to bcopy() the rpc length out of the
  mbuf (instead of casting m_data to a uint32).

Submitted by:	Pyun YongHyeon
Reviewed by:	Mohan Srinivasan
2005-07-14 20:08:27 +00:00
Robert Watson
37b40e499e Properly combine per-CPU UMA cache allocation and free counts with the
global counters maintained in the zone.

MFC after:	1 week
2005-07-14 20:01:04 +00:00
Jung-uk Kim
3e709972e1 Scan static SMBIOS structures and export the following environment
variables to loader:

hint.smbios.0.enabled		"YES" when SMBIOS is detected

hint.smbios.0.bios.vendor	BIOS vendor
hint.smbios.0.bios.version	BIOS version
hint.smbios.0.bios.reldate	BIOS release date

hint.smbios.0.system.maker	System manufacturer
hint.smbios.0.system.product	System product name
hint.smbios.0.system.version	System version number

hint.smbios.0.planar.maker	Base board manufacturer
hint.smbios.0.planar.product	Base board product name
hint.smbios.0.planar.version	Base board version number

hint.smbios.0.chassis.maker	Enclosure manufacturer
hint.smbios.0.chassis.version	Enclosure version

These strings can be used to detect hardware quirks and to set appropriate
flags.  For example, Compaq R3000 series and some HP laptops require

	hint.atkbd.0.flags="0x9"

to boot.  See amd64/67745 for more detail.

Note: Please do not abuse this feature to resolve general problem when it
      can be fixed programmatically.  This must be used as a last resort.

PR:		kern/81449
Approved by:	anholt (mentor)
2005-07-14 19:52:22 +00:00
Kelly Yancey
9c044e0fd0 Remove superfluous semicolon at the end of the __strong_reference() macro
definition.
2005-07-14 19:30:49 +00:00
Robert Watson
b7eb47e290 Add a new flag '-k' to ifconfig(8), indicating that it is alright to
print potentially sensitive keying material to stdout.  With the new
802.11 support, ifconfig(8) is now capable of printing 802.11 keys,
and did by default for the root user, which is undesirable in some
environments.  Now it will not print keying material unless requested
(and available to the user).

MFC after:	1 week
2005-07-14 18:33:21 +00:00
Robert Watson
1189affa8b Hook libmemstat(3) up to the build. 2005-07-14 17:59:50 +00:00
Maksim Yevmenkin
dfa494399b kbdmux(4) keyboard multiplexer integration
o Add sys/dev/kbdmux/kbdmux.c to the source tree

o Add sys/modules/kbdmux/Makefile to the source tree

These are not yet connected to the build. Man page and other changes to follow.

MFC after:	1 week
2005-07-14 17:48:04 +00:00
Scott Long
1b3a4f4e7b Check the vendor and device, not subvendor and subdevice, when looking for
channel devices.  This should fix Dell 2450/2550/2650 systems that have RAID
enabled.  This will likely not fix 2400 systems though as I don't have the
appropriate PCI Id info for them.

MFC After: 3 day
2005-07-14 17:43:00 +00:00
Robert Watson
0cddce4989 Add libmemstat(3), a library for use by debugging and monitoring
applications in tracking kernel memory statistics.  It provides an
abstracted interface to uma(9) and malloc(9) statistics, wrapped
around the recently added binary stream sysctls for the allocators.

Using this interface, it is easy to build monitoring tools, query
specific memory types for usage information, etc.  Facilities are
provided for binding caller-provided data to memory types,
incremental updates of memory types, and queries that span multiple
allocators.

Support for additional allocators is (relatively) easy to add.

The API for libmemstat(3) will probably change some over time as
consumers are written, and requirements evolve.  It is written to
avoid encoding ABIs for data structure layout into consuming
applications for this reason.

MFC after:	1 week
2005-07-14 17:40:02 +00:00
Robert Watson
7a52a97eb3 Introduce a new sysctl, vm.zone_stats, which exports UMA(9) allocator
statistics via a binary structure stream:

- Add structure 'uma_stream_header', which defines a stream version,
  definition of MAXCPUs used in the stream, and the number of zone
  records in the stream.

- Add structure 'uma_type_header', which defines the name, alignment,
  size, resource allocation limits, current pages allocated, preferred
  bucket size, and central zone + keg statistics.

- Add structure 'uma_percpu_stat', which, for each per-CPU cache,
  includes the number of allocations and frees, as well as the number
  of free items in the cache.

- When the sysctl is queried, return a stream header, followed by a
  series of type descriptions, each consisting of a type header
  followed by a series of MAXCPUs uma_percpu_stat structures holding
  per-CPU allocation information.  Typical values of MAXCPU will be
  1 (UP compiled kernel) and 16 (SMP compiled kernel).

This query mechanism allows user space monitoring tools to extract
memory allocation statistics in a machine-readable form, and to do so
at a per-CPU granularity, allowing monitoring of allocation patterns
across CPUs in order to better understand the distribution of work and
memory flow over multiple CPUs.

While here, also export the number of UMA zones as a sysctl
vm.uma_count, in order to assist in sizing user swpace buffers to
receive the stream.

A follow-up commit of libmemstat(3), a library to monitor kernel memory
allocation, will occur in the next few days.  This change directly
supports converting netstat(1)'s "-mb" mode to using UMA-sourced stats
rather than separately maintained mbuf allocator statistics.

MFC after:	1 week
2005-07-14 16:35:13 +00:00
Robert Watson
773df9ab16 In addition to tracking allocs in the zone, also track frees. Add
a zone free counter, as well as a cache free counter.

MFC after:	1 week
2005-07-14 16:17:21 +00:00