]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoMark if_cnw as IFF_NEEDSGIANT, because it does.
rwatson [Mon, 18 Jul 2005 17:58:59 +0000 (17:58 +0000)]
Mark if_cnw as IFF_NEEDSGIANT, because it does.

MFC after: 1 day

19 years agoLock down netnatm and mark as MPSAFE:
rwatson [Mon, 18 Jul 2005 16:55:46 +0000 (16:55 +0000)]
Lock down netnatm and mark as MPSAFE:

- Introduce a subsystem mutex, natm_mtx, manipulated with accessor macros
  NATM_LOCK_INIT(), NATM_LOCK(), NATM_UNLOCK(), NATM_LOCK_ASSERT().  It
  protects the consistency of pcb-related data structures.  Finer grained
  locking is possible, but should be done in the context of specific
  measurements (as very little work is done in netnatm -- most is in the
  ATM device driver or socket layer, so there's probably not much
  contention).

- Remove GIANT_REQUIRED, mark as NETISR_MPSAFE, remove
  NET_NEEDS_GIANT("netnatm").

- Conditionally acquire Giant when entering network interfaces for
  ifp->if_ioctl() using IFF_LOCKGIANT(ifp)/IFF_UNLOCKGIANT(ifp) in order
  to coexist with non-MPSAFE atm ifnet drivers..

- De-spl.

MFC after: 2 weeks
Reviewed by: harti, bms (various versions)

19 years agoAdd support for AVM BlueFRITZ! USB Bluetooth Adapter v2.0. It appears that
emax [Mon, 18 Jul 2005 16:34:49 +0000 (16:34 +0000)]
Add support for AVM BlueFRITZ! USB Bluetooth Adapter v2.0. It appears that
there are at least two versions of the adapter. Version 1 (product ID 0x2200)
of the adapter does not work with ng_ubt(4) and require special driver and
firmware. Version 2 (product ID 0x3800) seems to work just fine, except it
does not have bDeviceClass, bDeviceSubClass and bDeviceProtocol set to required
(by specification) values. This change forces ng_ubt(4) to attach to the
version 2 adapter.

Obtained from: Marcel Holtmann <marcel at holtmann dot org>
Submitted by: Rainer Goellner <rainer at jabbe dot de>

19 years agoBump MEMSTAT_MAXCALLER to 16. memtop(8) seems to be able to happily
rwatson [Mon, 18 Jul 2005 14:14:17 +0000 (14:14 +0000)]
Bump MEMSTAT_MAXCALLER to 16.  memtop(8) seems to be able to happily
consume that many slots to track snapshot-to-snapshot changes and
running totals.  And 16 is a nice round number.

MFC after: 1 week

19 years agoAdd another regression tests for msdosfs which covers msdosfs_conv.c rev 1.45.
imura [Mon, 18 Jul 2005 12:15:24 +0000 (12:15 +0000)]
Add another regression tests for msdosfs which covers msdosfs_conv.c rev 1.45.

Requested by: silby

19 years agoModify "netstat -mb" to use libmemstat(3) when acting on a live system,
rwatson [Mon, 18 Jul 2005 08:34:15 +0000 (08:34 +0000)]
Modify "netstat -mb" to use libmemstat(3) when acting on a live system,
with a number of positive benefits:

- Start using UMA(9) statistics for mbufs and clusters, which avoids
  using the mbuf allocator statistics which suffer from races under
  load on SMP.  This should eliminate "negative" mbuf counts in
  netstat -mb.

- We are now able to track cached (free) mbufs and clusters and count
  it towards memory allocated by the network stack.

- We are now also able to track memory allocated to mbuf tags since
  libmemstat(3) can also query malloc(9).  We don't print this except
  as part of the total (for now - #if 0).

- We are now able to track mbuf/cluster/packet allocation failures,
  although they are not currently printed (#if 0).

- Don't print out sfbuf statistics when running on a kernel core, as
  currently that code is able only to query sysctl for statistics.

MFC after: 1 week

19 years agoRegen:
sheldonh [Mon, 18 Jul 2005 07:43:35 +0000 (07:43 +0000)]
Regen:

* Hart: rev 533 of pcidevs.txt (2005-06-29)
* Boemler: vendors.txt (2005-07-12)

Approved by: re (kensmith)

19 years agoFix for a NFS soft mounts bug where if the number of retries exceeds
ps [Mon, 18 Jul 2005 02:12:17 +0000 (02:12 +0000)]
Fix for a NFS soft mounts bug where if the number of retries exceeds
the max rexmits, the request was not being bounced back with a
ETIMEDOUT error.

Reported by: Oliver Lehmann
Submitted by: Mohan Srinivasan

19 years agoremove myself as maintainer
wosch [Sun, 17 Jul 2005 21:19:28 +0000 (21:19 +0000)]
remove myself as maintainer

19 years agoremove myself as maintainer.
wosch [Sun, 17 Jul 2005 21:18:09 +0000 (21:18 +0000)]
remove myself as maintainer.

19 years agoI believe that this tsleep was placed here in 1.28 to try to solve the
imp [Sun, 17 Jul 2005 20:16:22 +0000 (20:16 +0000)]
I believe that this tsleep was placed here in 1.28 to try to solve the
problems we were having properly mapping the CIS attr space on some
cards.  Those problems have been solved other ways, so this kludge is
no longer necessary.  Remove it and have pccards come up a whole
second faster.

19 years agoThe Sony i.LINK CXD1947 device is a firewire bridge, but it doesn't
imp [Sun, 17 Jul 2005 19:59:07 +0000 (19:59 +0000)]
The Sony i.LINK CXD1947 device is a firewire bridge, but it doesn't
implement the OHCI programming interface.  Thus it probes, but fails
to attach because of an invalid OHCI version.  Rather than count on
the downstream tests properly failing, print a message that this
chipset isn't supported and fail the probe.

19 years agoo The ricoh bridge needs us to turn off the function interrupts for
imp [Sun, 17 Jul 2005 19:40:05 +0000 (19:40 +0000)]
o The ricoh bridge needs us to turn off the function interrupts for
  16-bit cards when we're powering them up.  Other bridges may have
  similar issues, so we do this for all of them by setting the
  interrupt in the PCIC register 3 to be 0 (done always anyway)
  and turning on the bit in the bridge control register to route these
  interrupts via the ISA bus (or via the interrupt configured in the
  PCIC register 3).  '0' means disable completely.  There's a small
  chance this may interfere with the o2micro power hacks, but I'll
  wait for reports to come in from o2micro users.
o Expand some of the comments about why we do certain things.

# this gets rid of the interrupt storm warnings on my 505TS.  I think
# that we may need to do something similar on suspend, but I'm unsure
# since I don't have a laptop that supports suspened/resume with a
# ricoh chipset in it.

19 years agoRename a bit to make it clearer that it enables routing of the function
imp [Sun, 17 Jul 2005 19:31:39 +0000 (19:31 +0000)]
Rename a bit to make it clearer that it enables routing of the function
interrupts to the ISA bus.

19 years agoAdd LIBMEMSTAT tp bsd.libnames.mk.
rwatson [Sun, 17 Jul 2005 18:38:40 +0000 (18:38 +0000)]
Add LIBMEMSTAT tp bsd.libnames.mk.

MFC after: 1 week

19 years agoDefine four constants, MBUF_{,MEM,CLUSTER,PACKET,TAG}_MEM_NAME, which
rwatson [Sun, 17 Jul 2005 14:04:03 +0000 (14:04 +0000)]
Define four constants, MBUF_{,MEM,CLUSTER,PACKET,TAG}_MEM_NAME, which
are string names for their respective UMA zones and malloc types, and
are passed into uma_zcreate() and MALLOC_DEFINE().  Export them
outside of _KERNEL in mbuf.h so that netstat can reference them.

Change the names to improve consistency, with each zone/type
associated with the mbuf allocator being prefixed mbuf_.

MFC after: 1 week

19 years agoAdd __BEGIN_DECLS and __END_DECLS to make libmemstat(3) more C++-friendly.
rwatson [Sun, 17 Jul 2005 13:54:46 +0000 (13:54 +0000)]
Add __BEGIN_DECLS and __END_DECLS to make libmemstat(3) more C++-friendly.

MFC after: 1 week

19 years agosync function prototype with reality.
charnier [Sun, 17 Jul 2005 13:33:04 +0000 (13:33 +0000)]
sync function prototype with reality.

19 years agoBefore calling g_orphan_provider(), add G_PF_WITHER flag, so GEOM will know
pjd [Sun, 17 Jul 2005 13:15:02 +0000 (13:15 +0000)]
Before calling g_orphan_provider(), add G_PF_WITHER flag, so GEOM will know
to destroy it.

PR: kern/81758
Submitted by: trasz <trasz@buziaczek.pl>
MFC after: 3 days

19 years agoCheck that we have first fragment before pulling up TCP/UDP header.
glebius [Sun, 17 Jul 2005 08:09:59 +0000 (08:09 +0000)]
Check that we have first fragment before pulling up TCP/UDP header.

19 years agoThe CD interrupt should only be enabled after we've initialized the
imp [Sun, 17 Jul 2005 07:48:28 +0000 (07:48 +0000)]
The CD interrupt should only be enabled after we've initialized the
card.  Mask it while we're doing power things, as the PC Card standard
suggests.  Also, poll the POWER_CYCLE bit 10x a second as well as
providing a timeout for power cycle interrupt to happen.

The Ricoh '475 that I have doesn't seem to generate an interrupt for
power at the present time, so the polling is necessary for reasons as
yet unknown.  This results in an interrupt storm warning that I'm
still trying to quantify (the o2micro trick doesn't work to mitigate
this storm).  At the very least, this should help those users that
lost pccards on boot with the prior rev of this code.  My VAIO
PCG-505TS is now happier, but more investigation is necessary.

19 years ago[1] unix2doschr()
imura [Sun, 17 Jul 2005 07:10:05 +0000 (07:10 +0000)]
[1] unix2doschr()
 If a character cannot be converted to DOS code page,
 unix2doschr() returned `0'. As a result, unix2dosfn()
 was forced to return `0', so we saw a file which was
 composed of these characters as `Invalid argument'.
 To correct this, if a character can be converted to
 Unicode, unix2doschr() now returns `1' which is a magic
 number to make unix2dosfn() know that the character
 must be converted to `_'.

[2] unix2dosfn()
 The above-mentioned solution only works if a file
 has both of Unicode name and DOS code page name.
 Unicode name would not be recorded if file name
 can be settled within 11 bytes (DOS short name)
 and if no conversion from Unix charset to DOS code
 page has occurred. Thus, FreeBSD can create a file
 which has only short name, but there is no guarantee
 that the short name contains allways valid characters
 because we leave it to people by using mount_msdosfs(8)
 to select which conversion is used between DOS code
 page and unix charset.
 To avoid this, Unicode file name should be recorded
 unless a character is an ascii character. This is
 the way Windows XP do.

PR: 77074 [1]
MFC after: 1 week

19 years agoUse LK_CANRECURSE since when a PMC-owning process performs an exec,
jkoshy [Sun, 17 Jul 2005 04:18:06 +0000 (04:18 +0000)]
Use LK_CANRECURSE since when a PMC-owning process performs an exec,
the new text vnode is already locked by itself.

MFC after: 3 days

19 years agoRemove confusing "single C char locales" phrase; arguments to these
tjr [Sun, 17 Jul 2005 04:11:06 +0000 (04:11 +0000)]
Remove confusing "single C char locales" phrase; arguments to these
functions and must now be either an unsigned char or EOF, regardless of
locale.

19 years agoRemove confusing "single C char locales" phrase; arguments to tolower()
tjr [Sun, 17 Jul 2005 03:37:00 +0000 (03:37 +0000)]
Remove confusing "single C char locales" phrase; arguments to tolower()
and toupper() must now be either an unsigned char or EOF, regardless of
locale.

19 years agoAdd additional sub-systems to the warning users get when they build a
obrien [Sun, 17 Jul 2005 03:27:36 +0000 (03:27 +0000)]
Add additional sub-systems to the warning users get when they build a
kernel that has become GPL infected.

19 years agoCatch up with menus.c revision 1.399.
obrien [Sun, 17 Jul 2005 03:24:11 +0000 (03:24 +0000)]
Catch up with menus.c revision 1.399.

19 years agosnd_ess needs snd_sbc to compile.
brueffer [Sat, 16 Jul 2005 19:17:34 +0000 (19:17 +0000)]
snd_ess needs snd_sbc to compile.

Noticed by: oliver

19 years agoRevert last commit: It fixed make universe but broke regular kernel make.
phk [Sat, 16 Jul 2005 14:02:47 +0000 (14:02 +0000)]
Revert last commit: It fixed make universe but broke regular kernel make.

19 years agoUse mp_maxid in preference to MAXCPU when creating exports of UMA
rwatson [Sat, 16 Jul 2005 11:03:06 +0000 (11:03 +0000)]
Use mp_maxid in preference to MAXCPU when creating exports of UMA
per-CPU cache statistics.  UMA sizes the cache array based on the
number of CPUs at boot (mp_maxid + 1), and iterating based on MAXCPU
could read off the end of the array (into the next zone).

Reported by: yongari
MFC after: 1 week

19 years agoImprove canonicalization of copyrights. Order copyrights by order of
rwatson [Sat, 16 Jul 2005 09:51:52 +0000 (09:51 +0000)]
Improve canonicalization of copyrights.  Order copyrights by order of
assertion (jeff, bmilekic, rwatson).

Suggested ages ago by: bde
MFC after: 1 week

19 years agoMove the unlocking of the zone mutex in sysctl_vm_zone_stats() so that
rwatson [Sat, 16 Jul 2005 09:40:34 +0000 (09:40 +0000)]
Move the unlocking of the zone mutex in sysctl_vm_zone_stats() so that
it covers the following of the uc_alloc/freebucket cache pointers.
Originally, I felt that the race wasn't helped by holding the mutex,
hence a comment in the code and not holding it across the cache access.
However, it does improve consistency, as while it doesn't prevent
bucket exchange, it does prevent bucket pointer invalidation.  So a
race in gathering cache free space statistics still can occur, but not
one that follows an invalid bucket pointer, if the mutex is held.

Submitted by: yongari
MFC after: 1 week

19 years agoDocument IODATA USB-RSAQ3 USB-Serial Adapter as a supported device.
hrs [Sat, 16 Jul 2005 09:18:58 +0000 (09:18 +0000)]
Document IODATA USB-RSAQ3 USB-Serial Adapter as a supported device.

MFC after: 3 days

19 years agoAdd missing reference to ukbdmap.h
phk [Sat, 16 Jul 2005 09:18:03 +0000 (09:18 +0000)]
Add missing reference to ukbdmap.h

Fixes build of ukbd module under "make universe"

19 years agoUse better Korean translation for `trap'
jkim [Sat, 16 Jul 2005 05:40:14 +0000 (05:40 +0000)]
Use better Korean translation for `trap'

Requested by: many Korean users from bsdforum.or.kr
Submitted by: perky
Approved by: anholt (mentor)

19 years agoIncrease the flags field for kegs from a 16 to a 32 bit value;
silby [Sat, 16 Jul 2005 02:23:41 +0000 (02:23 +0000)]
Increase the flags field for kegs from a 16 to a 32 bit value;
we have exhausted all 16 flags.

19 years agoTeach libmemstat(3) about UMA(9) failure statistics.
rwatson [Fri, 15 Jul 2005 23:39:21 +0000 (23:39 +0000)]
Teach libmemstat(3) about UMA(9) failure statistics.

Requested by: victor cruceru <victor dot cruceru at gmail dot com>
MFC after: 1 week

19 years agoTrack UMA(9) allocation failures by zone, and export via sysctl.
rwatson [Fri, 15 Jul 2005 23:34:39 +0000 (23:34 +0000)]
Track UMA(9) allocation failures by zone, and export via sysctl.

Requested by: victor cruceru <victor dot cruceru at gmail dot com>
MFC after: 1 week

19 years agoNote the events of 0707, lest we forget.
ceri [Fri, 15 Jul 2005 20:11:39 +0000 (20:11 +0000)]
Note the events of 0707, lest we forget.

19 years agoConvert the atomic_ptr() operations over to operating on uintptr_t
jhb [Fri, 15 Jul 2005 18:17:59 +0000 (18:17 +0000)]
Convert the atomic_ptr() operations over to operating on uintptr_t
variables rather than void * variables.  This makes it easier and simpler
to get asm constraints and volatile keywords correct.

MFC after: 3 days
Tested on: i386, alpha, sparc64
Compiled on: ia64, powerpc, amd64
Kernel toolchain busted on: arm

19 years agoFix typos and use consistent section names in manual pages:
hrs [Fri, 15 Jul 2005 17:35:26 +0000 (17:35 +0000)]
Fix typos and use consistent section names in manual pages:

 s/SYSCTLS/SYSCTL VARIABLES/
 s/TUNABLES/LOADER TUNABLES/
 s/CAVEAT/CAVEATS/
 s/DESCIPTION/DESCRIPTION/

Reviewed by: ru
MFC after: 3 days

19 years agoNew release notes:
hrs [Fri, 15 Jul 2005 16:38:52 +0000 (16:38 +0000)]
New release notes:
New sysctls: kern.malloc_stats and vm.zone_stats,
mpt(4) improvements,
ifconfig(8) -k flag,
libmemstat(3) added,
libpcap updated to v0.9.1, and
tcpdump updated to v3.9.1.

19 years agoMerged from boot0cfg.
nyan [Fri, 15 Jul 2005 15:32:52 +0000 (15:32 +0000)]
Merged from boot0cfg.
  - Update the mkrdev function.
  - Attempt gctl verb "write MBR" when updating.

19 years agoMerged from src/sbin/fdisk.
nyan [Fri, 15 Jul 2005 15:31:19 +0000 (15:31 +0000)]
Merged from src/sbin/fdisk.
  - Attempt gctl verb "write MBR" when updating.

19 years agoMerged from geom_mbr.c revisions 1.62 and 1.66.
nyan [Fri, 15 Jul 2005 15:29:45 +0000 (15:29 +0000)]
Merged from geom_mbr.c revisions 1.62 and 1.66.
  - Implement a gctl handler and the verb "write MBR".

19 years agoFix loder(1) to work with libraries. This can be useful to
ru [Fri, 15 Jul 2005 15:21:12 +0000 (15:21 +0000)]
Fix loder(1) to work with libraries.  This can be useful to
sort long DPADD lists automatically.  While here, recognize
`W' as the global symbol.  This has been tested since 2004.

19 years agoTrim the old relnotes items.
hrs [Fri, 15 Jul 2005 15:15:20 +0000 (15:15 +0000)]
Trim the old relnotes items.

19 years agoUpdate version numbers to 7-CURRENT.
hrs [Fri, 15 Jul 2005 15:14:22 +0000 (15:14 +0000)]
Update version numbers to 7-CURRENT.

19 years agoPass -i to pwd_mkdb(8) to ignore locking failures. This can be useful
ru [Fri, 15 Jul 2005 14:52:29 +0000 (14:52 +0000)]
Pass -i to pwd_mkdb(8) to ignore locking failures.  This can be useful
for NFS installing world/kernel to another machine.

19 years agoMake the `distrib-dirs' target official and working properly
ru [Fri, 15 Jul 2005 14:38:54 +0000 (14:38 +0000)]
Make the `distrib-dirs' target official and working properly
when cross-building (installing).  (This is useful for NFS
installing world/kernel to another architecture machine.)

19 years agoAdd myself to FreeBSD calendar
garga [Fri, 15 Jul 2005 14:38:01 +0000 (14:38 +0000)]
Add myself to FreeBSD calendar

Approved by: flz (mentor), Ken Smith (re)

19 years agoReduce diffs from boot0cfg.c (no functional change).
nyan [Fri, 15 Jul 2005 14:37:40 +0000 (14:37 +0000)]
Reduce diffs from boot0cfg.c (no functional change).

19 years ago*) Implement round-robin reads for multiplex volumes.
le [Fri, 15 Jul 2005 13:38:06 +0000 (13:38 +0000)]
*) Implement round-robin reads for multiplex volumes.

*) Plug a possible memory leak. [1]

[1] obtained from: pjd@.

19 years agoAdd -mno-sse3 for prescott/nocona
ache [Fri, 15 Jul 2005 12:29:31 +0000 (12:29 +0000)]
Add -mno-sse3 for prescott/nocona

19 years agoAdd -mno-sse3 for prescott/nocona
ache [Fri, 15 Jul 2005 12:22:14 +0000 (12:22 +0000)]
Add -mno-sse3 for prescott/nocona

19 years agoAdd -mno-sse3 for prescott/nocona
ache [Fri, 15 Jul 2005 11:45:30 +0000 (11:45 +0000)]
Add -mno-sse3 for prescott/nocona

19 years agoDocument the fact that if MAP_FIXED request has been successful it
sobomax [Fri, 15 Jul 2005 11:37:25 +0000 (11:37 +0000)]
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

19 years agoProvide more documentation on caller-owned storage in struct memory_type,
rwatson [Fri, 15 Jul 2005 11:28:21 +0000 (11:28 +0000)]
Provide more documentation on caller-owned storage in struct memory_type,
as well as documenting MEMSTAT_MAXCALLER.

MFC after: 1 week

19 years agoIncrease the number of caller memory storage slots from 2 or 4 to
rwatson [Fri, 15 Jul 2005 11:19:55 +0000 (11:19 +0000)]
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

19 years agoHook up libmemstat(3) to the library list in mdoc.local. This will cause
rwatson [Fri, 15 Jul 2005 10:27:35 +0000 (10:27 +0000)]
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

19 years agoAdd a section on the allocator name space and its interactions with
rwatson [Fri, 15 Jul 2005 10:23:55 +0000 (10:23 +0000)]
Add a section on the allocator name space and its interactions with
memstat_mtl_find().

MFC after: 10 days

19 years agoRe-spell wronge less wrongly as wrong.
rwatson [Fri, 15 Jul 2005 10:13:50 +0000 (10:13 +0000)]
Re-spell wronge less wrongly as wrong.

Submitted by: jkoshy
MFC after: 1 week

19 years agoFix for PR 82974. We were not checking that the route looked up in
gnn [Fri, 15 Jul 2005 09:18:34 +0000 (09:18 +0000)]
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

19 years agoAttempt gctl verb "write MBR" when updating.
phk [Fri, 15 Jul 2005 08:04:32 +0000 (08:04 +0000)]
Attempt gctl verb "write MBR" when updating.

This should solve the problem of modifying the MBR while running.

19 years agoAttempt gctl verb "write MBR" when updating.
phk [Fri, 15 Jul 2005 08:02:51 +0000 (08:02 +0000)]
Attempt gctl verb "write MBR" when updating.

This should solve the problem of modifying a busy MBR.

19 years agoImplement a gctl handler and the verb "write MBR" which can be used to
phk [Fri, 15 Jul 2005 08:00:44 +0000 (08:00 +0000)]
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

19 years agoDecouple vttest from the tree so we can remove <sgtty.h>
phk [Fri, 15 Jul 2005 07:44:57 +0000 (07:44 +0000)]
Decouple vttest from the tree so we can remove <sgtty.h>

This program probably should live in src/tools or ports anyway.

19 years agoSwitch to contemporary TTY interface.
phk [Fri, 15 Jul 2005 07:41:26 +0000 (07:41 +0000)]
Switch to contemporary TTY interface.

19 years agoUse the new cis scanning code to look for the proper MAC address. The
imp [Fri, 15 Jul 2005 06:46:04 +0000 (06:46 +0000)]
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.

19 years agoFix a couple of leaking situations when errors happen.
imp [Fri, 15 Jul 2005 06:08:26 +0000 (06:08 +0000)]
Fix a couple of leaking situations when errors happen.

19 years agoFix the xircom match routine. In it we were always return a match
imp [Fri, 15 Jul 2005 06:05:11 +0000 (06:05 +0000)]
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.

19 years agoAdd options for sl811.
takawata [Fri, 15 Jul 2005 05:12:49 +0000 (05:12 +0000)]
Add options for sl811.
Pointed out by: nyan

19 years agoDon't wait for the printer to become ready before allowing the open to
imp [Fri, 15 Jul 2005 04:19:42 +0000 (04:19 +0000)]
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@

19 years agos/_us//
imp [Fri, 15 Jul 2005 04:11:42 +0000 (04:11 +0000)]
s/_us//

19 years agoMove to using tsleeps in the cardbus reset case as well. This
imp [Fri, 15 Jul 2005 03:25:22 +0000 (03:25 +0000)]
Move to using tsleeps in the cardbus reset case as well.  This
eliminates the last of the DELAYs in pccbb.

19 years agoCorrect one regression test (which was expected an incorrect answer), and
gad [Fri, 15 Jul 2005 02:31:15 +0000 (02:31 +0000)]
Correct one regression test (which was expected an incorrect answer), and
add a few more tests.  This matches bug fixes recently committed to 'env'.

19 years agoNote non-support of modem side of DMF650TX card
imp [Fri, 15 Jul 2005 02:01:38 +0000 (02:01 +0000)]
Note non-support of modem side of DMF650TX card

19 years agoAdd support for the DLink DMF650TX Ethernet+56k modem PC Card. This
imp [Fri, 15 Jul 2005 01:54:59 +0000 (01:54 +0000)]
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. :-(

19 years agoMention the PC Card devices known to work with this driver, as well
imp [Fri, 15 Jul 2005 01:50:22 +0000 (01:50 +0000)]
Mention the PC Card devices known to work with this driver, as well
as some of the bugs there with.

19 years agoAdd real support for obtaining the silicom MAC address from the
imp [Fri, 15 Jul 2005 01:48:38 +0000 (01:48 +0000)]
Add real support for obtaining the silicom MAC address from the
apporpriate place in the CIS, now that we have the CIS scanning code.

19 years agoInsert missing int i;
imp [Fri, 15 Jul 2005 01:43:08 +0000 (01:43 +0000)]
Insert missing int i;

19 years agokbdmux(4) keyboard multiplexer integration
emax [Thu, 14 Jul 2005 23:04:23 +0000 (23:04 +0000)]
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

19 years agokbdmux(4) keyboard multiplexer integration
emax [Thu, 14 Jul 2005 22:43:20 +0000 (22:43 +0000)]
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

19 years agoPrint newly exported pfsync statistics with netstat(8).
mlaier [Thu, 14 Jul 2005 22:42:35 +0000 (22:42 +0000)]
Print newly exported pfsync statistics with netstat(8).

Requested by: glebius
MFC after: 1 week

19 years agoExport pfsyncstats via sysctl "net.inet.pfsync" in order to print them with
mlaier [Thu, 14 Jul 2005 22:22:51 +0000 (22:22 +0000)]
Export pfsyncstats via sysctl "net.inet.pfsync" in order to print them with
netstat (seperate commit).

Requested by: glebius
MFC after: 1 week

19 years agoConvert a remaining !fs.map->system_map to
jhb [Thu, 14 Jul 2005 21:18:07 +0000 (21:18 +0000)]
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

19 years agoOmnibus power and interrupt fixes:
imp [Thu, 14 Jul 2005 20:46:59 +0000 (20:46 +0000)]
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 :-)

19 years agoAlso provide the function type in the nomatch routine.
imp [Thu, 14 Jul 2005 20:40:42 +0000 (20:40 +0000)]
Also provide the function type in the nomatch routine.

19 years ago- Remove MLINKS to nonexistant manpages
brueffer [Thu, 14 Jul 2005 20:29:08 +0000 (20:29 +0000)]
- 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

19 years agoMove eventhandler for 'ifnet_departure_event' at the end of the progress.
mlaier [Thu, 14 Jul 2005 20:26:43 +0000 (20:26 +0000)]
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

19 years agoFixes for NFS crashes on architectures that require strict alignment.
ps [Thu, 14 Jul 2005 20:08:27 +0000 (20:08 +0000)]
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

19 years agoProperly combine per-CPU UMA cache allocation and free counts with the
rwatson [Thu, 14 Jul 2005 20:01:04 +0000 (20:01 +0000)]
Properly combine per-CPU UMA cache allocation and free counts with the
global counters maintained in the zone.

MFC after: 1 week

19 years agoScan static SMBIOS structures and export the following environment
jkim [Thu, 14 Jul 2005 19:52:22 +0000 (19:52 +0000)]
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)

19 years agoRemove superfluous semicolon at the end of the __strong_reference() macro
kbyanc [Thu, 14 Jul 2005 19:30:49 +0000 (19:30 +0000)]
Remove superfluous semicolon at the end of the __strong_reference() macro
definition.

19 years agoAdd a new flag '-k' to ifconfig(8), indicating that it is alright to
rwatson [Thu, 14 Jul 2005 18:33:21 +0000 (18:33 +0000)]
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

19 years agoHook libmemstat(3) up to the build.
rwatson [Thu, 14 Jul 2005 17:59:50 +0000 (17:59 +0000)]
Hook libmemstat(3) up to the build.

19 years agokbdmux(4) keyboard multiplexer integration
emax [Thu, 14 Jul 2005 17:48:04 +0000 (17:48 +0000)]
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

19 years agoCheck the vendor and device, not subvendor and subdevice, when looking for
scottl [Thu, 14 Jul 2005 17:43:00 +0000 (17:43 +0000)]
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

19 years agoAdd libmemstat(3), a library for use by debugging and monitoring
rwatson [Thu, 14 Jul 2005 17:40:02 +0000 (17:40 +0000)]
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

19 years agoIntroduce a new sysctl, vm.zone_stats, which exports UMA(9) allocator
rwatson [Thu, 14 Jul 2005 16:35:13 +0000 (16:35 +0000)]
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