]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoEdit the interrupt name strings to shorten them. This is believed to
bde [Sun, 30 Apr 2006 01:39:46 +0000 (01:39 +0000)]
Edit the interrupt name strings to shorten them.  This is believed to
only affect amd64 and i386.  alpha uses "intr N" instead of "irqN" and
mostly has no device names.  ia64 uses only device names.

- Edit interrupt names once after they are read from the kernel and not
  every time they are displayed.
- Discard bogus trailing spaces so that the next step doesn't move things
  to oblivion.
- If an interrupt name starts with "irqN:" (as it usually does in on
  amd64 and i386), then move "irqN" to the end and strip ":", since we
  have no space for the ":" and don't want to start descriptions with
  "N" after stripping "irq" in the next step (since "N" would look like
  a count).  This step may need reworking for interrupt names containing
  several device names -- then moving the irq number to the end would
  lose it instead of losing some device names.
- Remove "irq" from an interrupt name if and only if the original name is
  too long to display.

18 years agoBacked out rev.1.49 since it had buffer overruns and only worked
bde [Sun, 30 Apr 2006 00:50:08 +0000 (00:50 +0000)]
Backed out rev.1.49 since it had buffer overruns and only worked
accidentally.

Read buffer overruns:
The size of the target array (TSOTTA == 10) is a wrong limit to use for
scanning the source string.

Write buffer overruns:
TSOTTA is also a wrong limit to use for copying to the target buffer,
since we want to add a NUL terminator afterwards.  TSOTTA was also 1
too small for holding both the desired number of visible characters
and the NUL.

Worked accidentally:
There is error in the algorithm that tends to result in the space saved
by stripping "irq" not actually being used, but some cases worked
accidentally provided "irqN" is near the end of the source string and
"N" is only 1 digit.

Starting with 5.mumble-CURRENT, "irqN" is at the beginning of the
string on all (?) arches that have it and the accidents don't happen.
E.g. on i386's, the keyboard irq is now named
"irq1: atkbd0<bogus blank padding>" by the kernel, and this name was
converted to "1: atkb" -- not only the device number but part of the
device name has been lost --, while before 5.mumble the kernel name
was "atkbd0 irq1" and systat accidentally preserved the irq number to
give "atkbd0 1".  The ":" in the string wastes precious space, and
stripping "irq" results in descriptions starting with numbers which
makes them look too much like counts.  This commit just fixes the last
problem.

18 years agovn_start_write()/vn_finished_write() is not needed here, because
pjd [Sat, 29 Apr 2006 21:57:38 +0000 (21:57 +0000)]
vn_start_write()/vn_finished_write() is not needed here, because
vn_start_write() is always called earlier in the code path and calling
the function recursively may lead to a deadlock.

Confirmed by: tegge
MFC after: 2 weeks

18 years agoAbbreviate long field descriptors at write time so that they don't get
bde [Sat, 29 Apr 2006 21:30:23 +0000 (21:30 +0000)]
Abbreviate long field descriptors at write time so that they don't get
clobbered at runtime:
    dirtybuf -> dtbuf
    desiredvnodes -> desvn
    numvnodes -> numvn
    freevnodes -> frevn
The vmstats column has only 5 characters available for descriptors, but up
to 13 were used.  The extras get clobbered at runtime by interrupt values
and/or descriptors on systems with more than 12 interrupt sources.
    %slo-z -> %sloz
This one is in the "extended" vmstats area and doesn't get clobbered now.

Removed stale documentation of desvn.

Changed a descriptor:
    tfree -> totfr
so that it is consistent with the abbreviations for other free counts
(daefr and prcfr) and thus almost decodeable.

Fixed missing documentation of tfree/totfr.  This and everything else
in the extended vmstats area is misdocumented as being in a certain
place in the vmstats column.

18 years agoAdd auto upgrade capability to mergemaster.
gordon [Sat, 29 Apr 2006 18:21:43 +0000 (18:21 +0000)]
Add auto upgrade capability to mergemaster.

An mtree description of all non-zero files that make
distribution installs (only size and md5) is built from the
temproot.  When the user completes a mergemaster run, the
mtree description file gets installed into /var/db for
safe-keeping.

When the user then decides to do a subsequent upgrade (with
the -U flag), the existing mtree description from /var/db
is called into service looking for files that are different in
DESTDIR. This is stashed away until a file that would normally
end up prompting the user to look at changes is encountered.
Since there are no user modified changes, the new file is
installed without bothering the user.

Looked at by: dougb
MFC after: 6 weeks

18 years agoFix the acpi.ko path for boot.flp.
nyan [Sat, 29 Apr 2006 14:03:17 +0000 (14:03 +0000)]
Fix the acpi.ko path for boot.flp.

PR: misc/96466
Submitted by: Nobuyuki Koganemaru
MFC after: 1 day

18 years agoPOSIX demands that set's output (when invoked without arguments) should be
stefanf [Sat, 29 Apr 2006 12:57:53 +0000 (12:57 +0000)]
POSIX demands that set's output (when invoked without arguments) should be
sorted.  Sort the variables before printing.

PR: 96415

18 years agoAdd curses ACS line graphics support for iso15 fonts
matteo [Sat, 29 Apr 2006 12:34:19 +0000 (12:34 +0000)]
Add curses ACS line graphics support for iso15 fonts
Now ncurses-based programs such as sysinstall and mc will display the
correct font for graphical lines instead of "-" and "+" characters.

Correct two special characters for cons25l1 in termcap: use real
arrows instead of ">>" and "<<".
Add a lot of additional symbols for line drawing which are taken from
the CP437 font.
Almost all of the ACS symbols are now implemented.

PR: conf/90082
Submitted by: Oliver Fromme <olli@secnetix.de>
MFC after: 1 week

18 years agoCheck the buffer size when copying the line returned by el_gets() into our
stefanf [Sat, 29 Apr 2006 10:29:10 +0000 (10:29 +0000)]
Check the buffer size when copying the line returned by el_gets() into our
own buffer.  Interactively typing in long lines (>1023 characters)
previously overflowed the buffer.  Unlike the NetBSD people I don't see the
need to subtract 8 from BUFSIZ, so I just used BUFSIZ-1.

Obtained from: NetBSD
PR: 91110

18 years agoLock giant when assigning ni_vp and keep vfslocked state valid.
kris [Sat, 29 Apr 2006 07:13:49 +0000 (07:13 +0000)]
Lock giant when assigning ni_vp and keep vfslocked state valid.

Committed for: jeff

18 years agoOops, services should be compat by default for backward compatibility.
ume [Sat, 29 Apr 2006 06:39:07 +0000 (06:39 +0000)]
Oops, services should be compat by default for backward compatibility.

18 years agoAdd support for fragmenting ipv4 packets.
thompsa [Sat, 29 Apr 2006 05:37:25 +0000 (05:37 +0000)]
Add support for fragmenting ipv4 packets.

The packet filter may reassemble the ip fragments and return a packet that is
larger than the MTU of the sending interface. There is no check for DF or icmp
replies as we can only get a large packet to fragment by reassembling a
previous fragment, and this only happens after a call to pfil(9).

Obtained from: OpenBSD (mostly)
Glanced at by: mlaier
MFC after: 1 month

18 years agoAdd newly supported databases such as services, protocols and rpc
ume [Sat, 29 Apr 2006 04:49:19 +0000 (04:49 +0000)]
Add newly supported databases such as services, protocols and rpc
into generated nsswitch.conf.

18 years agoEnglish grammar fix in comment.
ume [Sat, 29 Apr 2006 04:26:16 +0000 (04:26 +0000)]
English grammar fix in comment.

Submitted by: keramida

18 years agoFollow FreeBSD mdoc(7) conventions:
trhodes [Sat, 29 Apr 2006 01:34:03 +0000 (01:34 +0000)]
Follow FreeBSD mdoc(7) conventions:
- Remove hard sentence breaks;
- Avoid using double negatives or "sexist" language;
- Expand contractions;
- Remove a blank line;
- Some grammar changes.

Usually we do not "hard code" requests to submit bugs to the author, but
I will leave this go for now.

18 years agoCorrect sentence, forwarding non IP packets is now an option.
thompsa [Sat, 29 Apr 2006 01:19:08 +0000 (01:19 +0000)]
Correct sentence, forwarding non IP packets is now an option.

18 years agoEliminate unnecessary, recursive acquisitions and releases of the page
alc [Sat, 29 Apr 2006 00:59:15 +0000 (00:59 +0000)]
Eliminate unnecessary, recursive acquisitions and releases of the page
queues lock by free_pv_entry() and pmap_remove_pages().

Reduce the scope of the page queues lock in pmap_remove_pages().

18 years agoTypo.
keramida [Sat, 29 Apr 2006 00:43:23 +0000 (00:43 +0000)]
Typo.

18 years agoFix a couple of typos and other minor nits
keramida [Fri, 28 Apr 2006 23:21:36 +0000 (23:21 +0000)]
Fix a couple of typos and other minor nits

Reviewed by: rwatson

18 years agoMinor improvements after last revision.
keramida [Fri, 28 Apr 2006 22:37:16 +0000 (22:37 +0000)]
Minor improvements after last revision.

Reviewed by: thompsa

18 years agovn_start_write() is called only when v_type != VCHR, so corresponding
pjd [Fri, 28 Apr 2006 21:54:05 +0000 (21:54 +0000)]
vn_start_write() is called only when v_type != VCHR, so corresponding
vn_finished_write() should also be called only then.

BTW. I fixed two functions here: vn_rdwr() and vn_write(). The latter seems
to be unused.

MFC after: 3 weeks

18 years agoo Borrow from if_bridge.4: note that the bridge interface need to be upped.
maxim [Fri, 28 Apr 2006 21:45:08 +0000 (21:45 +0000)]
o Borrow from if_bridge.4: note that the bridge interface need to be upped.

PR: docs/94545
Submitted by: thompsa

18 years agoAlso check use_pty in the ptmx clone lookup; this means that when ptmx
rwatson [Fri, 28 Apr 2006 21:39:57 +0000 (21:39 +0000)]
Also check use_pty in the ptmx clone lookup; this means that when ptmx
support is turned off using the sysctl, we no longer even allow the
ptmx device to be looked up.

Foot provided by: peter

18 years agoRemove the puc-specific hacks. The puc(4) driver now properly uses
marcel [Fri, 28 Apr 2006 21:23:09 +0000 (21:23 +0000)]
Remove the puc-specific hacks. The puc(4) driver now properly uses
the rman(9) interface.

18 years agoRewrite of puc(4). Significant changes are:
marcel [Fri, 28 Apr 2006 21:21:53 +0000 (21:21 +0000)]
Rewrite of puc(4). Significant changes are:
o  Properly use rman(9) to manage resources. This eliminates the
   need to puc-specific hacks to rman. It also allows devinfo(8)
   to be used to find out the specific assignment of resources to
   serial/parallel ports.
o  Compress the PCI device "database" by optimizing for the common
   case and to use a procedural interface to handle the exceptions.
   The procedural interface also generalizes the need to setup the
   hardware (program chipsets, program clock frequencies).
o  Eliminate the need for PUC_FASTINTR. Serdev devices are fast by
   default and non-serdev devices are handled by the bus.
o  Use the serdev I/F to collect interrupt status and to handle
   interrupts across ports in priority order.
o  Sync the PCI device configuration to include devices found in
   NetBSD and not yet merged to FreeBSD.
o  Add support for Quatech 2, 4 and 8 port UARTs.
o  Add support for a couple dozen Timedia serial cards as found
   in Linux.

18 years agoThe nvidia binary blob sometimes defers tx completion notification to the
jhb [Fri, 28 Apr 2006 20:08:16 +0000 (20:08 +0000)]
The nvidia binary blob sometimes defers tx completion notification to the
OS dependent layer.  Thus, the watchdog timer can go off when the tx
engine is working fine but the OS dependent layer just hasn't been called
to cleanup finished tx transactions.  To workaround this, when the watchdog
fires, poke the binary blob to force it to flush any pending tx
completions.  If this drops the pending tx count to zero then just return
without logging a message or resetting the chip.

This reportedly fixes the 'device timeout()' errors with at least several
NF4 nve(4) parts.

Submitted by: Nathan Alexander Whitehorn <nathanw@uchicago.edu> (code)
Submitted by: dg (inspiration for comment and explanation)
MFC after: 1 week

18 years agoFix typo.
rwatson [Fri, 28 Apr 2006 19:43:44 +0000 (19:43 +0000)]
Fix typo.

MFC after: 1 month
Submitted by: Antoine Brodin <antoine dot brodin@laposte dot net>

18 years agoEnsure outbound data packets in hostap mode are delivered only to
sam [Fri, 28 Apr 2006 19:06:15 +0000 (19:06 +0000)]
Ensure outbound data packets in hostap mode are delivered only to
stations that are associated by making ieee80211_find_txnode return
NULL when a unicast frame is to be delivered to an unassociated
station.  This will be handled differently in the future but for
now putting the check here allows all drivers to immediately do
the right thing.

Reviewed by: avatar
MFC after: 1 week

18 years agoInterim fix for pmap problems I introduced with my last commit.
peter [Fri, 28 Apr 2006 19:05:08 +0000 (19:05 +0000)]
Interim fix for pmap problems I introduced with my last commit.
Remove the code to dyanmically change the pv_entry limits.  Go back
to a single fixed kva reservation for pv entries, like was done
before when using the uma zone.  Go back to never freeing pages
back to the free pool after they are no longer used, just like
before.

This stops the lock order reversal due to aquiring the kernel map
lock while pmap was locked.

This fixes the recursive panic if invariants are enabled.

The problem was that allocating/freeing kva causes vm_map_entry
nodes to be allocated/freed.  That can recurse back into pmap as
new pages are hooked up to kvm and hence all the problem.
Allocating/freeing kva indirectly allocate/frees memory.

So, by going back to a single fixed size kva block and an index,
we avoid the recursion panics and the LOR.

The problem is that now with a linear block of kva, we have no
mechanism to track holes once pages are freed.  UMA has the same
problem when using custom object for a zone and a fixed reservation
of kva.  Simple solutions like having a bitmap would work, but would
be very inefficient when there are hundreds of thousands of bits
in the map.  A first-free pointer is similarly flawed because pages
can be freed at random and the first-free pointer would be rewinding
huge amounts.  If we could allocate memory for tree strucures or
an external freelist, that would work.  Except we cannot allocate/free
memory here because we cannot allocate/free address space to use
it in.  Anyway, my change here reverts back to the UMA behavior of
not freeing pages for now, thereby avoiding holes in the map.

ups@ had a truely evil idea that I'll investigate.  It should allow
freeing unused pages again by giving us a no-cost way to track the
holes in the kva block.  But in the meantime,  this should get people
booting with witness and/or invariants again.

Footnote: amd64 doesn't have this problem because of the direct map
access method.  I'd done all my witness/invariants testing there.  I'd
never considered that the harmless-looking kmem_alloc/kmem_free calls
would cause such a problem and it didn't show up on the boot test.

18 years agoImplement the ipend() method of the serdev I/F.
marcel [Fri, 28 Apr 2006 18:29:23 +0000 (18:29 +0000)]
Implement the ipend() method of the serdev I/F.

18 years agoMinor wording and formatting fixes.
brueffer [Fri, 28 Apr 2006 13:12:40 +0000 (13:12 +0000)]
Minor wording and formatting fixes.

18 years ago- Don't hold the device sx lock when going to sleep.
pjd [Fri, 28 Apr 2006 12:18:03 +0000 (12:18 +0000)]
- Don't hold the device sx lock when going to sleep.
- Prevent possible live-lock in case of memory problems by freeing
  already completed requests first.

Reported and tested by: markus, Bradley W. Dutton <brad-fbsd-stable@duttonbros.com>
MFC after: 1 day

18 years ago- Remove dead code.
pjd [Fri, 28 Apr 2006 12:13:49 +0000 (12:13 +0000)]
- Remove dead code.
- Comment possible event miss, which isn't critical, but probably can be
  fixed by replacing the event lock usage with the queue lock.

MFC after: 2 weeks

18 years ago- Extend the nsswitch to support Services, Protocols and Rpc
ume [Fri, 28 Apr 2006 12:03:38 +0000 (12:03 +0000)]
- Extend the nsswitch to support Services, Protocols and Rpc
  databases.
- Make nsswitch support caching.

Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Sponsored by: Google Summer of Code 2005

18 years agoBe sure to not destroy device twice. This is not possible in theory, but
pjd [Fri, 28 Apr 2006 11:52:45 +0000 (11:52 +0000)]
Be sure to not destroy device twice. This is not possible in theory, but
with this change there is even no theoretical race.

MFC after: 2 weeks

18 years ago - use ath(4) in the wireless examples rather than the aging wi(4)
thompsa [Fri, 28 Apr 2006 11:48:53 +0000 (11:48 +0000)]
 - use ath(4) in the wireless examples rather than the aging wi(4)
 - make the packet filtering its own section and clarify a few points
 - note that the interfaces need to be upped [1]

PR: docs/94545 [1]

18 years agoBe sure to not destroy device twice. This is not possible in theory, but
pjd [Fri, 28 Apr 2006 11:47:28 +0000 (11:47 +0000)]
Be sure to not destroy device twice. This is not possible in theory, but
with this change there is even no theoretical race.

MFC after: 2 weeks

18 years agoAutogenerate hardware notes for rr232x(4).
brueffer [Fri, 28 Apr 2006 10:45:28 +0000 (10:45 +0000)]
Autogenerate hardware notes for rr232x(4).

18 years agoAdd a basic man page for the sysctl(9) macro interfaces. Previously man
rwatson [Fri, 28 Apr 2006 10:45:27 +0000 (10:45 +0000)]
Add a basic man page for the sysctl(9) macro interfaces.  Previously man
pages existed only for the dynamic sysctl interfaces.  There's probably
more complete and accurate content, better advice, etc, that could be added
here.

Per scottl's suggest, add a small piece of moralizing text regarding the
fact that sysctl names quickly get embedded in system configuration files,
libraries, third party applications, and even books, so renaming and
removing names after they've been published is a tricky issue.

MFC after: 1 month

18 years agoAdd a section about locking protocol for busdma.
scottl [Fri, 28 Apr 2006 08:36:49 +0000 (08:36 +0000)]
Add a section about locking protocol for busdma.

18 years agoOops, forgot to remove the old entry in the last revision.
brueffer [Fri, 28 Apr 2006 06:23:42 +0000 (06:23 +0000)]
Oops, forgot to remove the old entry in the last revision.

18 years agoInstall rr232x.4 only on i386 and amd64.
brueffer [Fri, 28 Apr 2006 06:13:19 +0000 (06:13 +0000)]
Install rr232x.4 only on i386 and amd64.

18 years agoTweak the DMA limit from rev 1.33, it was off by one byte.
silby [Fri, 28 Apr 2006 05:38:12 +0000 (05:38 +0000)]
Tweak the DMA limit from rev 1.33, it was off by one byte.

Submitted by: scottl

18 years agoSwitch all bus_dmamap_sync calls that used PREREAD to PREWRITE and all
silby [Fri, 28 Apr 2006 05:27:27 +0000 (05:27 +0000)]
Switch all bus_dmamap_sync calls that used PREREAD to PREWRITE and all
POSTWRITE to POSTREAD.

No guarantee that all busdma is usage is perfect, but this change (in
addition to scott's last two commits) makes if_bfe work with > 1GB of
memory in my laptop.

18 years agoEnable the rr232x driver for amd64.
scottl [Fri, 28 Apr 2006 05:23:10 +0000 (05:23 +0000)]
Enable the rr232x driver for amd64.

18 years agoFix a typo.
scottl [Fri, 28 Apr 2006 04:39:50 +0000 (04:39 +0000)]
Fix a typo.

18 years agoAdd a manpage for the rr232x driver.
scottl [Fri, 28 Apr 2006 04:26:00 +0000 (04:26 +0000)]
Add a manpage for the rr232x driver.

18 years agoFix a typo that slipped in right before commit.
scottl [Fri, 28 Apr 2006 04:00:50 +0000 (04:00 +0000)]
Fix a typo that slipped in right before commit.

18 years agoUnbreak pc98. Sorry...
sobomax [Fri, 28 Apr 2006 03:38:23 +0000 (03:38 +0000)]
Unbreak pc98. Sorry...

18 years agoAdd some incomplete support for Marvell Yukon EC controllers based on
sobomax [Fri, 28 Apr 2006 03:17:37 +0000 (03:17 +0000)]
Add some incomplete support for Marvell Yukon EC controllers based on
OpenBSD changes. With these changes, PHY part of the driver becomes
functional (it senses media changes and negotiates speed just fine),
previously it just hang with no PHY message, but no data goes through
interface (error message is "can not stop transfer of Tx/Rx descriptor).

Hopefully somebody with more clue/free time will be able to pick up
after me.

18 years ago - Add a BO_NEEDSGIANT flag to the bufobj. This flag forces all child
jeff [Fri, 28 Apr 2006 01:05:31 +0000 (01:05 +0000)]
 - Add a BO_NEEDSGIANT flag to the bufobj.  This flag forces all child
   buffers to go on the buf daemon's DIRTYGIANT queue.
 - Set BO_NEEDSGIANT on ffs's devvp since the ffs_copyonwrite handler
   runs in the context of the buf daemon and may require Giant.

18 years ago - Consistently track ni_dvp and ni_vp with dvfslocked and vfslocked rather
jeff [Fri, 28 Apr 2006 00:59:48 +0000 (00:59 +0000)]
 - Consistently track ni_dvp and ni_vp with dvfslocked and vfslocked rather
   than trying to optimize it into a single lock.  This adds more calls to
   lock giant with non smpsafe filesystems but is the only way to reliably
   hold the correct lock.
 - Remove an invalid assert in the mountedhere case in lookup and fix the
   code to properly deal with the scenario.  We can actually have a lookup
   that returns dp == dvp with mountedhere set with certain unmount races.

Tested by: kris
Reported by: kris/mohans

18 years agoThe alignment parameter to busdma must be a power of two, while the if_bfe
scottl [Thu, 27 Apr 2006 23:03:00 +0000 (23:03 +0000)]
The alignment parameter to busdma must be a power of two, while the if_bfe
driver was trying to use an arbitrary rx/tx ring size of the value.  Change
to using unrestricted values for alignment and boundary instead.

18 years agoSort includes.
jhb [Thu, 27 Apr 2006 22:09:18 +0000 (22:09 +0000)]
Sort includes.

18 years agoA whitespace fix.
jhb [Thu, 27 Apr 2006 22:02:27 +0000 (22:02 +0000)]
A whitespace fix.

Submitted by: bde

18 years agoDrop locking comments. ddb functions should never use locking anyway and
jhb [Thu, 27 Apr 2006 21:59:43 +0000 (21:59 +0000)]
Drop locking comments.  ddb functions should never use locking anyway and
no other ddb functions try to annotate what locking would otherwise be
appropriate in comments.

Prodded by: bde

18 years agoMFp4: reworked iwi-driver
mlaier [Thu, 27 Apr 2006 21:43:37 +0000 (21:43 +0000)]
MFp4: reworked iwi-driver

Changelog towards if_iwi.c 1.26 (some changes have been committed separately
in the mean time):

- add led support
- add firmware loading on demand
 - auto-restart firmware when it crashes
 - serialize operations sent to the firmware to reduce firmware crashes
- add power save operation support
 - remove incorrect specification of tx power control capability
- add radio on/off switch support

- improve net80211 state machine operation
 - recognize and handle beacon miss
 - handle authentication and association failures better
 - add shared key authentication
 - fix ibss mode (many changes)
 - fix wme (many changes)
- correct radiotap support (many changes)
- correct bus dma setup of s/g
- correct various locking issues
- fix monitor mode
- fix scanning (many changes)
 - recover from wedged scan requests
 - respect active channel list
- eliminate cases where interface was marked down on error
- don't treat parity errors as fatal
- reclaim mgt frames immediately from tx queue
- correct interrupt handling, ack early (from NetBSD)
- fix short/long preamble handling

Committed with RELENG_6 compat #if's, should compile in RELENG_6.  Requires
net/iwi-firmware-kmod to function.

Much work done by: sam
Tested by: many (freebsd-net), ume, luigi
MFC after: 4 weeks

18 years agoIn general, bits in the page directory entry (PDE) and the page table
alc [Thu, 27 Apr 2006 21:26:25 +0000 (21:26 +0000)]
In general, bits in the page directory entry (PDE) and the page table
entry (PTE) have the same meaning.  The exception to this rule is the
eighth bit (0x080).  It is the PS bit in a PDE and the PAT bit in a
PTE.  This change avoids the possibility that pmap_enter() confuses a
PAT bit with a PS bit, avoiding a panic().

Eliminate a diagnostic printf() from the i386 pmap_enter() that serves
no current purpose, i.e., I've seen no bug reports in the last two
years that are helped by this printf().

Reviewed by: jhb

18 years agoAdd the rr232x driver to the default kernels.
scottl [Thu, 27 Apr 2006 20:58:24 +0000 (20:58 +0000)]
Add the rr232x driver to the default kernels.

18 years agoWhen pccard_safe_quote is passed NULL for src, it shouldn't panic.
imp [Thu, 27 Apr 2006 20:47:13 +0000 (20:47 +0000)]
When pccard_safe_quote is passed NULL for src, it shouldn't panic.

Someone sent me this a while ago, but I can't find who to give them
proper credit...

18 years agoNew release notes: sab(4) removal, non-AT keyboard controller i386
bmah [Thu, 27 Apr 2006 20:33:09 +0000 (20:33 +0000)]
New release notes:  sab(4) removal, non-AT keyboard controller i386
system support, sk(4) MPSAFE.

18 years agoAdd the 'rr232x' driver for the HighPoint RocketRAID 2320 series of cards.
scottl [Thu, 27 Apr 2006 20:22:46 +0000 (20:22 +0000)]
Add the 'rr232x' driver for the HighPoint RocketRAID 2320 series of cards.
This driver was generously developed and donated by Highpoint.

It is enabled for i386 only at the moment.  I will enable it for amd64
shortly.

Obtained from: HighPoint Technologies, Inc.

18 years agoWith minidumps, the dumping partition could be smaller than physical
ps [Thu, 27 Apr 2006 19:01:54 +0000 (19:01 +0000)]
With minidumps, the dumping partition could be smaller than physical
memory, so checking the size of the partition is not necessary.

Tested by: kris

18 years agoback out for now... revert ccpu to being kern.ccpu...
jmg [Thu, 27 Apr 2006 17:57:59 +0000 (17:57 +0000)]
back out for now...  revert ccpu to being kern.ccpu...

18 years agoDon't use ", but instead use ' instead. I suppose I could have also
imp [Thu, 27 Apr 2006 17:33:25 +0000 (17:33 +0000)]
Don't use ", but instead use ' instead.  I suppose I could have also
used \".  When compiling with USB_VERBOSE, this causes syntax issues.

Noticed by:  Hans Petter Selasky

18 years agoo Add 5 Timedia single port serial cards.
marcel [Thu, 27 Apr 2006 17:08:30 +0000 (17:08 +0000)]
o  Add 5 Timedia single port serial cards.
o  While here, break long lines.

18 years agoru@ recently changed lorder to support library archives. Document
imp [Thu, 27 Apr 2006 15:48:54 +0000 (15:48 +0000)]
ru@ recently changed lorder to support library archives.  Document
this new feature prominently.  Bump date while I'm here.

18 years agoFix problem with having more than 1GM of RAM. Also fix a nearby busdma
scottl [Thu, 27 Apr 2006 14:02:58 +0000 (14:02 +0000)]
Fix problem with having more than 1GM of RAM.  Also fix a nearby busdma
problem.

Submitted by: silby

18 years agos/long/int.
davidxu [Thu, 27 Apr 2006 08:25:13 +0000 (08:25 +0000)]
s/long/int.

18 years ago- Use same priority range returned by kernel's sched_get_priority_min()
davidxu [Thu, 27 Apr 2006 08:18:23 +0000 (08:18 +0000)]
- Use same priority range returned by kernel's sched_get_priority_min()
  and sched_get_priority_max() syscalls.
- Remove unused fields from structure pthread_attr.

18 years agosk(4) now also works on sparc64 (as of yongari's recent commits).
simon [Thu, 27 Apr 2006 06:08:38 +0000 (06:08 +0000)]
sk(4) now also works on sparc64 (as of yongari's recent commits).

18 years agoUncomment sk(4) as it's now working.
yongari [Thu, 27 Apr 2006 06:03:17 +0000 (06:03 +0000)]
Uncomment sk(4) as it's now working.

18 years agoBring busdmafied sk(4) to all architectures.
yongari [Thu, 27 Apr 2006 05:59:09 +0000 (05:59 +0000)]
Bring busdmafied sk(4) to all architectures.
- MPSAFE. No more recursive lock required.
- bus_dma(9) conversion. I think it should work on all architectures.
- optimized Rx handler for each normal and jumbo frames. Previously
  sk(4) used jumbo frame management code to handle normal sized
  frames. As the handler needs an additional lock to protect jumbo
  frame management structure from races, it used two lock operations
  for each received packet. Now sk(4) uses single lock operation for
  normal frame.(Jumbo frame still needs two lock operations as before.)
  The hardware supports DMA scatter operations for Rx descriptors such
  that it's possible to take advantagee of m_cljget(9) for jumbo frames.
  However, due to a unknown reasons it resulted in poor performance on
  sparc64. So I dropped m_cljget(9) approach. This should be revisited
  since it would reduce one lock operation for jumbo frame handling.
- Tx TCP/Rx IP checksum offload support. According to the data sheet
  of SK-NET GENESIS the hardware supports Rx IP/TCP/UDP offload.
  But I couldn't make it work on my Yukon hardware. So Rx TCP/UDP was
  disabled at the moment. It seems that newer Yukon chips can support
  Tx UDP checksum offload too. But I need more documentation first.
- Added more wait time in reading VPD data. It seems that ASUS LOM
  takes a very long time to respond VPD read signal.
- Added an additional lock for MII register access callbacks.
- Added more strict received packet validation routine. Previously it
  passed corrupted packets to upper layers under certain conditions.
- A new function sk_yukon_tick() to handle auto-negotiation properly.
- Interrupt handler now checks shared interrupt source and protects
  the interrupt handler from NULL pointer dereference which was caused
  by odd status word value. The status word can returns 0xffffffff if
  cable is unplugged while Rx/Tx/auto-negotiation is in progress.
- suspend/resume support(not tested).
- Added Rx/Tx FIFO flush routine for Yukon
- Activate Tx descriptor poll timer in order to protect possible loss
  of SK_TXBMU_TX_START command. Previously the driver continuously issued
  SK_TXBMU_TX_START when it notices pending Tx descriptors not processed
  yet in interrupt handler. That approach would add additional PCI
  write access overhead under high Tx load situations and it might fail
  if the first SK_TXBMU_TX_START was lost and no interrupt is generated
  from the first SK_TXBMU_TX_START command.
- s/printf/if_printf/, s/printf/device_printf/, Axe sk_unit in softc.
- Setting multicast/station address is now safe on strict-alignment
  architectures.
- Fix long standing bug in VLAN header length setup.
- Added/corrected register definitions for Yukon.
  (Register information from Linux skge driver.)
- Added Rx status definition for Marvell Yukon/XaQti XMAC.
  (Rx status register information from Linux skge driver.)
- Update if_oerrors if we encounter watchdog error.
- callout(9) conversion

Special thanks to jkim who let me know RX status differences between
Yukon and XaQti XMAC.
It seems that there is still occasional watchdog timeout error but I
couldn't reproduce it and need more information to analyze it from
users.

Tested by: bz(amd64), me(i386, sparc64), current ML
Frank Behrens frank ! pinky ( sax $ de

18 years agoUse 115200 and not 9600 as the initial baudrate. This speeds up
marcel [Thu, 27 Apr 2006 05:43:10 +0000 (05:43 +0000)]
Use 115200 and not 9600 as the initial baudrate. This speeds up
detection of the FIFO size. Especially for large FIFOs.

18 years agoIn the case when reset via keyboard controller doesn't work for some reason
sobomax [Thu, 27 Apr 2006 05:18:26 +0000 (05:18 +0000)]
In the case when reset via keyboard controller doesn't work for some reason
(i.e. no keyboard controller present), try two other common methods for
resetting i386 machine - pci reset and port 0x92 fast reset. Only if neither
works warn user and resort to "unmap entire address space and hope for good"
hack. This makes my MacBook Pro rebooting just fine and should also help
other legacy-free hardware out there.

Also, disable interrupts unconditionally in cpu_reset_real(), since we don't
want any interference.

MFC after: 1 week

18 years agoFix build on i386
delphij [Thu, 27 Apr 2006 05:02:21 +0000 (05:02 +0000)]
Fix build on i386

18 years agoThe size of I/O ranges can be anything from 16 bytes to 2G bytes.
marcel [Thu, 27 Apr 2006 04:53:18 +0000 (04:53 +0000)]
The size of I/O ranges can be anything from 16 bytes to 2G bytes.
Lower the minimum for memory mapped I/O from 32 bytes to 16 bytes.
This fixes bus enumeration on ia64 now that the Diva auxiliary
serial port is attached to.

18 years agoCorrect DRIVER_MODULE declaration.
yongari [Thu, 27 Apr 2006 04:39:58 +0000 (04:39 +0000)]
Correct DRIVER_MODULE declaration.
skc does attach to pci bus instead of sk.

Submitted by: jmg

18 years agoo Add 2 HP Diva single port UARTs.
marcel [Thu, 27 Apr 2006 03:17:39 +0000 (03:17 +0000)]
o  Add 2 HP Diva single port UARTs.

18 years agoChange the semantics of brk_max to dynamically deal with data segment
jasone [Thu, 27 Apr 2006 01:03:00 +0000 (01:03 +0000)]
Change the semantics of brk_max to dynamically deal with data segment
bounds. [1]

Modify logic for utilizing the data segment, such that it is possible to
create huge allocations there.

Shrink the data segment when deallocating a chunk, if it is at the end of
the data segment.

Rename chunk_size to csize in huge_malloc(), in order to avoid masking a
static variable of the same name. [1]

Reported by: Paul Allen <nospam@ugcs.caltech.edu>

18 years agoThe sk(4) driver has moved to /sys/dev/sk
yongari [Thu, 27 Apr 2006 00:14:02 +0000 (00:14 +0000)]
The sk(4) driver has moved to /sys/dev/sk

18 years agoMFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries
peter [Wed, 26 Apr 2006 21:49:20 +0000 (21:49 +0000)]
MFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries
per page = effectively 12.19 bytes per pv entry after overheads).
Instead of using a shared UMA zone for 24 byte pv entries (two 8-byte tailq
nodes, a 4 byte pointer, and a 4 byte address), we allocate a page at a
time per process.  This provides 336 pv entries per process (actually, per
pmap address space) and eliminates one of the 8-byte tailq entries since
we now can track per-process pv entries implicitly.  The pointer to
the pmap can be eliminated by doing address arithmetic to find the metadata
on the page headers to find a single pointer shared by all 336 entries.
There is an 11-int bitmap for the freelist of those 336 entries.

This is mostly a mechanical conversion from amd64, except:
* i386 has to allocate kvm and map the pages, amd64 has them outside of kvm
* native word size is smaller, so bitmaps etc become 32 bit instead of 64
* no dump_add_page() etc stuff because they are in kvm always.
* various pmap internals tweaks because pmap uses direct map on amd64 but
  on i386 it has to use sched_pin and temporary mappings.

Also, sysctl vm.pmap.pv_entry_max and vm.pmap.shpgperproc are now
dynamic sysctls.  Like on amd64, i386 can now tune the pv entry limits
without a recompile or reboot.

This is important because of the following scenario.   If you have a 1GB
file (262144 pages) mmap()ed into 50 processes, that requires 13 million
pv entries.  At 24 bytes per pv entry, that is 314MB of ram and kvm, while
at 12 bytes it is 157MB.  A 157MB saving is significant.

Test-run by:  scottl (Thanks!)

18 years agoMove vm.pmap.pv_entry_count out from the PV_STATS ifdefs. It is always
peter [Wed, 26 Apr 2006 21:34:07 +0000 (21:34 +0000)]
Move vm.pmap.pv_entry_count out from the PV_STATS ifdefs.  It is always
available and is a real counter, not a statistic.

18 years agoo Add 2 NEC cards
marcel [Wed, 26 Apr 2006 21:31:31 +0000 (21:31 +0000)]
o  Add 2 NEC cards
o  Add 2 Dell cards
o  Add Quatech card
o  Add support for non-standard rclk values.
o  Update descriptions to match PCI id database.

18 years agoo Use __FBSDID
marcel [Wed, 26 Apr 2006 21:25:13 +0000 (21:25 +0000)]
o  Use __FBSDID
o  Whitespace fixes
o  Non-K&R functions

18 years agomove remaining sysctl into the kern.sched tree...
jmg [Wed, 26 Apr 2006 19:42:38 +0000 (19:42 +0000)]
move remaining sysctl into the kern.sched tree...

18 years agoOnly use the low address for stats collection.
ps [Wed, 26 Apr 2006 16:33:58 +0000 (16:33 +0000)]
Only use the low address for stats collection.

18 years agointercept public safety channels and do explicit mapping of freq->ieee
sam [Wed, 26 Apr 2006 16:02:36 +0000 (16:02 +0000)]
intercept public safety channels and do explicit mapping of freq->ieee
channel number since we're not ready at the net80211 layer to deal with them;
note this mapping has to match what's done in ieee80211_mhz2ieee

MFC after: 3 days

18 years agoback out public safety-specific channel number mapping; we can't do
sam [Wed, 26 Apr 2006 16:00:37 +0000 (16:00 +0000)]
back out public safety-specific channel number mapping; we can't do
it until we know it should be applied as otherwise we can map 11a
channels into the 2.4G range and choose the wrong item from the
chanenl array

18 years agoReconstitute struct mac_policy_ops by breaking out individual function
rwatson [Wed, 26 Apr 2006 14:18:55 +0000 (14:18 +0000)]
Reconstitute struct mac_policy_ops by breaking out individual function
pointer prototypes from it into their own typedefs.  No functional or
ABI change.  This allows policies to declare their own function
prototypes based on a common definition from mac_policy.h rather than
duplicating these definitions.

Obtained from: SEDarwin, SPARTA
MFC after: 1 month

18 years agoUse the same method for detecting actual presence of AT-style keyboard
sobomax [Wed, 26 Apr 2006 06:05:16 +0000 (06:05 +0000)]
Use the same method for detecting actual presence of AT-style keyboard
controller as we use in boot blocks (querying status register until
bit 1 goes off). If that doesn't happed during reasonable period assume
that the hardware doesn't have AT-style keyboard controller. This makes
FreeBSD working almost OOB on MacBook Pro (still there are issues with
putting second CPU core on-line, but since installation CD comes with
UP kernel with this change one should be able to install FreeBSD without
playing tricks with hints). Other legacy-free hardware (e.g. IBM NetVista
S40) should benefit from this as well, but since I don't have any I can't
verify.

It should make no difference on the ordinary i386 hardware (since in
that case that hardware already would be having an issues with A20
routines in boot blocks). I don't know much about AT-style keyboard
controller on other platforms (and don't have dedicated access to one),
therefore, the code is restricted to i386 for now. I suspect that amd64
may need this as well, but I would rather leave this decision to someone
who knows better about the platform(s) in question.

I have tested this change on as many "ordinary i386 boxes" as I can get
my hands on, and it doesn't create any false negatives on hardware with
AT-style keyboard present.

MFC after: 1 month

18 years agoIn in_pcbdrop(), fix !INVARIANTS build.
marcel [Tue, 25 Apr 2006 23:23:13 +0000 (23:23 +0000)]
In in_pcbdrop(), fix !INVARIANTS build.

18 years agohonor fixed tx antenna when sending beacon frames
sam [Tue, 25 Apr 2006 22:52:28 +0000 (22:52 +0000)]
honor fixed tx antenna when sending beacon frames

Submitted by: Michael Stevens (from netbsd)
MFC after: 1 week

18 years agoo Add IDs for Plan9, QNX4.X, Mac OS-X, Linux exteneded partitions.
maxim [Tue, 25 Apr 2006 20:42:15 +0000 (20:42 +0000)]
o Add IDs for Plan9, QNX4.X, Mac OS-X, Linux exteneded partitions.

PR: bin/96326
Submitted by: Alex Kozlov
MFC after: 2 weeks

18 years ago- Overhaul the 'ps' command in ddb to be mostly readable again. :) It is
jhb [Tue, 25 Apr 2006 20:34:04 +0000 (20:34 +0000)]
- Overhaul the 'ps' command in ddb to be mostly readable again. :)  It is
  now back to using fixed-size columns for output and each line of output
  should fit in 80 columns on both 32-bit and 64-bit architectures.  In
  general the output is close to that of the userland ps(1) with the
  exception that the 'wmesg' field is mostly similar to the "state" field
  in top(1) in that it will show either a wmesg, a lock name (prefixed with
  an *), "CPU xx" (for a running thread), or nothing if none of those three
  conditions are true.  It also respects td_name when listing threads in
  a multithreaded process.  There is a somewhat evilly-defined PTR64 macro
  I use to make account for the change in the size of the 'wchan' column
  in the formatted output (wchan is now the only pointer in the ps output
  and is available so it can be passed to 'show sleepq', 'show turnstile',
  or 'show lock').
- Add two new commands "show proc [process]" and "show thread [thread]"
  that show details about the specified process or thread (specified
  either by pid/tid or pointer), respectively.  If an address it not
  specified, it uses the current kdb thread.

18 years agoAdd some new commands to hopefully make it easier to diagnose lock-related
jhb [Tue, 25 Apr 2006 20:28:17 +0000 (20:28 +0000)]
Add some new commands to hopefully make it easier to diagnose lock-related
problems in ddb:
- "show threadchain [thread]" will start with the specified thread (or the
  current kdb thread by default) and show it's state.  If it is blocked on
  a lock, it will find the owner of the lock and show its state, etc.
- "show allchains" will find all of the threads that are blocked on a
  lock (but do not have any threads blocked on a lock they hold) and show
  the resulting thread chain.
- "show lockchain <lock>" takes a pointer to a lock_object (such as a
  mutex or rwlock).  If there is a turnstile for that lock, then it will
  display all the threads blocked on the lock.  In addition, for each
  thread blocked on the lock, it will display any contested locks they
  hold, and recurse on those locks to show any threads blocked on those
  locks, etc.

18 years agoUse db_lookup_thread() to lookup the thread for the passed in address
jhb [Tue, 25 Apr 2006 20:24:23 +0000 (20:24 +0000)]
Use db_lookup_thread() to lookup the thread for the passed in address
and change 'show locks' to only list the locks for a given thread
rather than for all the threads in the process containing a specified
thread.

18 years agoAdd two helper functions: db_lookup_thread() and db_lookup_proc(). They
jhb [Tue, 25 Apr 2006 20:22:48 +0000 (20:22 +0000)]
Add two helper functions: db_lookup_thread() and db_lookup_proc().  They
take the addr value passed to a ddb command and attempt to use it to
lookup a struct thread * or struct proc *, respectively.  Each function
first reparses the passed in value as if it was an ID entered in base 10.
For threads the ID is treated as a thread ID, for proceses the ID is
treated as a PID.  If a thread or proc matching the ID is found, it is
returned.  For db_lookup_thread(), if the check_pid argument is true and
it didn't find a thread with a matching thread ID, it will treat the ID as
a PID and look for a matching process.  If it finds one it returns the
first thread in the process.  If none of the ID lookups succeeded, then
the functions assume that the passed in address is a thread or proc
pointer, respectively.  This allows one to use tids, pids, or structure
pointers interchangeably in ddb functions that want to lookup threads or
processes if desired.

18 years agoo Replace disappeared URLs to Cisco docs by new ones, style.
maxim [Tue, 25 Apr 2006 20:01:50 +0000 (20:01 +0000)]
o Replace disappeared URLs to Cisco docs by new ones, style.
No functional changes.

18 years agoo Set to zero engine_type, engine_id and pad (cisco calls it
maxim [Tue, 25 Apr 2006 19:56:53 +0000 (19:56 +0000)]
o Set to zero engine_type, engine_id and pad (cisco calls it
sampling_interval) fields in netflow v5 header.  We do not use
them but some netflow tools show garbage.

PR: kern/96296
Submitted by: David Duchscher
Approved by: glebius
MFC after: 1 week