]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoIntroduce some WITNESS improvements:
Attilio Rao [Wed, 13 Aug 2008 18:24:22 +0000 (18:24 +0000)]
Introduce some WITNESS improvements:
- Speedup the lock orderings lookup modifying the witness graph from a
  linked tree to a matrix. A table lookup caches the lock orderings in
  order to make a O(1) access for them. Any witness object has an unique
  index withing this lookup cache table.
- Reduce the lock contention on w_mtx acquiring it only when the LOR
  actually happens and not in a sane case. In order to do this don't totally
  flush lock lists (per-CPU spinlocks list and per-thread sleeplocks list)
  but check for ll_count anytime we need to have to verify allocations sanity.
- Introduce the function witness_thread_exit() in the witness namespace which
  should verify a thread doesn't hold any witness occurrence why exiting.
- Rename the sysctl debug.witness.graphs into debug.witness.fullgraph and
  add debug.witness.badstacks which prints out stacks for LOR revealed.
  This is implemented using the stack(9) support, which makes WITNESS to be
  dependent by the STACK option or by the DDB (including STACK) option.
- Fix style(9) for src/sys/kern/subr_witness.c

The hash table approach has been developed by Ilya Maykov on the behalf of
Isilon Systems which kindly released the patch.
Jeff Roberson, ported the patch to -CURRENT and fixed w_mtx contention, on the
behalf of Nokia.

Submitted by: Ilya Maykov <ivmaykov at gmail dot com> (Isilon Systems), jeff
Sponsored by: Nokia

16 years agoBump __FreeBSD_version to 800043, because of the bpf(4) change.
Ed Schouten [Wed, 13 Aug 2008 17:45:06 +0000 (17:45 +0000)]
Bump __FreeBSD_version to 800043, because of the bpf(4) change.

bpf(4) now uses cdevpriv to distinguish multiple file descriptors, where
it used to be implemented using device cloning. Ports like libpcap
properly detect the change in their configure scripts, but it doesn't
hurt to increase __FreeBSD_version.

While there, change the bpf(4) manual page to refer to /dev/bpf instead
of /dev/bpfN.

Requested by: mlaier

16 years agoFix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space
Ed Maste [Wed, 13 Aug 2008 17:32:48 +0000 (17:32 +0000)]
Fix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space
that redzone adds to the allocation for storing its metadata is at least as
large as the metadata that it will store there.

Submitted by: Nima Misaghian

16 years agoAttach the cpufreq child devices with specific orders to enforce relative
John Baldwin [Wed, 13 Aug 2008 16:09:40 +0000 (16:09 +0000)]
Attach the cpufreq child devices with specific orders to enforce relative
priority of some of the drivers that manage the same state (e.g. ichss0
vs est0).  Specifically, powernow, est, and p4tcc are added at order 10,
ichss at order 20, and smist at order 30.  Previously, some laptops were
seeing both ichss0 and est0 attaching and stomping on each other.

XXX: This isn't quite ideal, but works with the existing hacks, I think
what we really want instead is a single "speedstep0" device for CPUs
that the ichss, est, and smist drivers probe (but with differing
priorities).

MFC after: 1 week

16 years agoChange bpf(4) to use the cdevpriv API.
Ed Schouten [Wed, 13 Aug 2008 15:41:21 +0000 (15:41 +0000)]
Change bpf(4) to use the cdevpriv API.

Right now the bpf(4) driver uses the cloning API to generate /dev/bpf%u.
When an application such as tcpdump needs a BPF, it opens /dev/bpf0,
/dev/bpf1, etc. until it opens the first available device node. We used
this approach, because our devfs implementation didn't allow
per-descriptor data.

Now that we can, make it use devfs_get_cdevpriv() to obtain the private
data. To remain compatible with the existing implementation, add a
symlink from /dev/bpf0 to /dev/bpf. I've already changed libpcap to
compile with HAVE_CLONING_BPF, which makes it use /dev/bpf. There may be
other applications in the base system (dhclient) that use the loop to
obtain a valid bpf.

Discussed on: src-committers
Approved by: csjp

16 years agoo Add a quirk for Sony Handycam DCR-HC32E.
Maxim Konovalov [Wed, 13 Aug 2008 12:40:20 +0000 (12:40 +0000)]
o Add a quirk for Sony Handycam DCR-HC32E.

PR: usb/96599
Submitted by: Eugene Grosbein
MFC after: 1 week

16 years agoAdd a missing call to mtx_destroy() in clnt_reconnect_destroy().
Doug Rabson [Wed, 13 Aug 2008 12:04:54 +0000 (12:04 +0000)]
Add a missing call to mtx_destroy() in clnt_reconnect_destroy().

Submitted by: zachary.loafman at isilon.com
MFC after: 2 weeks

16 years agoFix an interop issue with Linux: If you do nothing but TCP
Doug Rabson [Wed, 13 Aug 2008 12:03:31 +0000 (12:03 +0000)]
Fix an interop issue with Linux: If you do nothing but TCP
mounts, Linux won't even bother registering nlockmgr for UDP. This
causes nlm_get_rpc to fail, which means any attempts to deliver the
GRANTED callback fail. Add code to nlm_get_rpc to try to locate the
TCP version as well. If it finds it on TCP, it establishes
a clnt_reconnect to the host.

Submitted by: zachary.loafman at isilon.com
MFC after: 2 weeks

16 years agoFix compilation of arm's AVILA.
Ed Schouten [Wed, 13 Aug 2008 09:20:52 +0000 (09:20 +0000)]
Fix compilation of arm's AVILA.

Compilation of the AVILA kernel failed because of two reasons:

- It needed curthread, which is defined through <sys/pcpu.h>.

- It still referred the softc's sc_mtx field, which has been replaced by
  sc_lock three weeks ago.

To solve the first problem, I decided to include <sys/pcpu.h> in
<sys/sx.h>, which also seems to be done by <sys/mutex.h> and
<sys/rwlock.h>. Those header files also require curthread.

Approved by: jhb

16 years agoFix VLAN hardware tag insertion/stripping on big-endian
Pyun YongHyeon [Wed, 13 Aug 2008 03:40:08 +0000 (03:40 +0000)]
Fix VLAN hardware tag insertion/stripping on big-endian
architectures.

Reported by: naddy
Tested on: sparc64
MFC after: 1 week

16 years agoFix runt TSO packet issue.
Kip Macy [Wed, 13 Aug 2008 01:32:32 +0000 (01:32 +0000)]
Fix runt TSO packet issue.

Obtained from: Chelsio Inc.
MFC after: 1 week

16 years agoAdd LRO and MAC statistics to exported sysctls.
Kip Macy [Wed, 13 Aug 2008 01:30:41 +0000 (01:30 +0000)]
Add LRO and MAC statistics to exported sysctls.

Obtained from: Chelsio Inc.
MFC after: 1 week

16 years agoChange the type of ti_traceme from a char to an int as its
Marcel Moolenaar [Wed, 13 Aug 2008 00:03:35 +0000 (00:03 +0000)]
Change the type of ti_traceme from a char to an int as its
address is passed to ps_pread for reading sizeof(int) bytes.

16 years agoMFamd64: Remove unused macros.
Jung-uk Kim [Tue, 12 Aug 2008 21:45:38 +0000 (21:45 +0000)]
MFamd64: Remove unused macros.

16 years agoUpdate copyrights and fix style(9).
Jung-uk Kim [Tue, 12 Aug 2008 21:31:31 +0000 (21:31 +0000)]
Update copyrights and fix style(9).

16 years agoReduce the scope of the vnode lock such that it does not cover
Christian S.J. Peron [Tue, 12 Aug 2008 21:27:48 +0000 (21:27 +0000)]
Reduce the scope of the vnode lock such that it does not cover
the various copyouts associated with initializing the process's
argv/env data in userspace.  It is possible that these copyout
operations can fault under memory pressure, possibly resulting
in dead locks.  This is believed to be safe since none of the
copyout_strings() operations need to interact with the vnode here.

Submitted by: Zhouyi Zhou
PR: kern/111260
Discussed with: kib
MFC after: 3 weeks

16 years agoStyle(9).
Pawel Jakub Dawidek [Tue, 12 Aug 2008 20:19:08 +0000 (20:19 +0000)]
Style(9).

16 years agoReduce number of stack usages with unused %edi.
Jung-uk Kim [Tue, 12 Aug 2008 20:12:59 +0000 (20:12 +0000)]
Reduce number of stack usages with unused %edi.

16 years agoReplace all stack usages with registers and remove unused macros.
Jung-uk Kim [Tue, 12 Aug 2008 20:10:45 +0000 (20:10 +0000)]
Replace all stack usages with registers and remove unused macros.

16 years agoImport Xen paravirtual drivers.
Kip Macy [Tue, 12 Aug 2008 20:01:57 +0000 (20:01 +0000)]
Import Xen paravirtual drivers.

MFC after: 2 weeks

16 years agoAssume OpenSolaris knows better and use their value for VM_MAX_PROM_ADDRESS.
Marius Strobl [Tue, 12 Aug 2008 20:00:28 +0000 (20:00 +0000)]
Assume OpenSolaris knows better and use their value for VM_MAX_PROM_ADDRESS.

16 years agoImport i386 xen sub-arch files.
Kip Macy [Tue, 12 Aug 2008 19:48:18 +0000 (19:48 +0000)]
Import i386 xen sub-arch files.

MFC after: 2 weeks

16 years ago- Add sys_tick and the USIII and beyond sys_tick_cmpr to state_regs[].
Marius Strobl [Tue, 12 Aug 2008 19:43:36 +0000 (19:43 +0000)]
- Add sys_tick and the USIII and beyond sys_tick_cmpr to state_regs[].
- Const'ify and static'ize as appropriate.
- Use __FBSDID().

16 years agogeli onetime command can take only one GEOM provider at a time.
Pawel Jakub Dawidek [Tue, 12 Aug 2008 19:42:03 +0000 (19:42 +0000)]
geli onetime command can take only one GEOM provider at a time.

16 years agoImport xen sub-arch includes.
Kip Macy [Tue, 12 Aug 2008 19:41:11 +0000 (19:41 +0000)]
Import xen sub-arch includes.

MFC after: 2 weeks

16 years agoRemove unnecessary locking around pointer fetch.
Konstantin Belousov [Tue, 12 Aug 2008 19:34:45 +0000 (19:34 +0000)]
Remove unnecessary locking around pointer fetch.

Requested by:   jhb

16 years agoUse expr -e instead of expr to compute NANO_MEDIASIZE for Flash devices
Antoine Brodin [Tue, 12 Aug 2008 16:59:23 +0000 (16:59 +0000)]
Use expr -e instead of expr to compute NANO_MEDIASIZE for Flash devices
larger than 2GB to prevent an overflow [1].
Make case-insensitive comparison work for siliconsystems, soekris and
transcend devices.

PR: conf/126386 [1]
Submitted by: Mark A [1]
MFC after: 1 month

16 years agoWhen generating thread-safe server code, handle procedures with void return
Doug Rabson [Tue, 12 Aug 2008 13:38:06 +0000 (13:38 +0000)]
When generating thread-safe server code, handle procedures with void return
types correctly.

16 years ago- Fix error reporting.
Stanislav Sedov [Tue, 12 Aug 2008 09:47:50 +0000 (09:47 +0000)]
- Fix error reporting.

Approved by: kib

16 years agoIncrease statistic counters for enc0 interface when enabled
VANHULLEBUS Yvan [Tue, 12 Aug 2008 09:05:01 +0000 (09:05 +0000)]
Increase statistic counters for enc0 interface when enabled
and processing IPSec traffic.

Approved by: gnn (mentor)
MFC after: 1 week

16 years agoImport OS interfaces to Xen services.
Kip Macy [Tue, 12 Aug 2008 07:36:56 +0000 (07:36 +0000)]
Import OS interfaces to Xen services.

MFC after: 2 weeks

16 years agoAdd et(4) to the list of drivers use the miibus interface
Kevin Lo [Tue, 12 Aug 2008 01:17:34 +0000 (01:17 +0000)]
Add et(4) to the list of drivers use the miibus interface

16 years agoRestore link state handling which was broken in rev 1.69.
Pyun YongHyeon [Tue, 12 Aug 2008 00:57:39 +0000 (00:57 +0000)]
Restore link state handling which was broken in rev 1.69.
Also report current link state while auto-negotiation is in
progress.
With this change link loss should be reported within a second
and drivers that rely on link state should work.

Reported by: Pete French < petefrench at ticketswitch dot com >
Tested by: Pete French < petefrench at ticketswitch dot com >
MFC after: 1 week

16 years agoRemove 'cr' at the end of line.
Pyun YongHyeon [Tue, 12 Aug 2008 00:55:03 +0000 (00:55 +0000)]
Remove 'cr' at the end of line.

16 years agoRemove whitespace at the end of line.
Pyun YongHyeon [Tue, 12 Aug 2008 00:52:10 +0000 (00:52 +0000)]
Remove whitespace at the end of line.

16 years agoRemove cxgb private lro implementation and switch to using system implementation.
Kip Macy [Tue, 12 Aug 2008 00:27:32 +0000 (00:27 +0000)]
Remove cxgb private lro implementation and switch to using system implementation.

Obtained from: Chelsio Inc.
MFC after: 1 week

16 years agoSuggections from bde@
Andrey A. Chernov [Mon, 11 Aug 2008 23:24:42 +0000 (23:24 +0000)]
Suggections from bde@
1) Split too long source lines
2) Portable code should not assume that null pointer == all-bits-0,
so back out prev. calloc() change.

Submitted by:   bde

16 years agoVendor fix for PHY problem.
Kip Macy [Mon, 11 Aug 2008 23:01:34 +0000 (23:01 +0000)]
Vendor fix for PHY problem.

Obtained from: Chelsio Inc.
MFC after: 3 days

16 years agoDecode some more "exotic" instructions including: fxsave, fxrstor, ldmxcsr,
John Baldwin [Mon, 11 Aug 2008 20:19:42 +0000 (20:19 +0000)]
Decode some more "exotic" instructions including: fxsave, fxrstor, ldmxcsr,
stmxcsr, clflush, lfence, mfence, sfence, syscall, sysret, sysenter,
sysexit, pause, monitor, mwait, and swapgs (amd64 only).

MFC after: 1 week

16 years agoMake sure we check the preselection masks present for all audit pipes.
Christian S.J. Peron [Mon, 11 Aug 2008 20:14:56 +0000 (20:14 +0000)]
Make sure we check the preselection masks present for all audit pipes.
It is possible that the audit pipe(s) have different preselection configs
then the global preselection mask.

Spotted by: Vincenzo Iozzo
MFC after: 2 weeks

16 years agoMFamd64: Decode "cmov*" instructions.
John Baldwin [Mon, 11 Aug 2008 20:10:52 +0000 (20:10 +0000)]
MFamd64: Decode "cmov*" instructions.

MFC after: 1 week

16 years agoRework Dallas Semiconductor RTC support.
Rafal Jaworowski [Mon, 11 Aug 2008 19:33:58 +0000 (19:33 +0000)]
Rework Dallas Semiconductor RTC support.

- Extend the DS1339 driver to recognize more chips in the family:
  DS1337, DS1338, DS1339 are now supported
- Provide run-time chip detection

Reviewed, tested by: stas
Obtained from: Piotr Ziecik kosmo ! semihalf dot com

16 years agoRename ds1339 -> ds133x to better fit the upcoming driver extensions.
Rafal Jaworowski [Mon, 11 Aug 2008 19:26:55 +0000 (19:26 +0000)]
Rename ds1339 -> ds133x to better fit the upcoming driver extensions.

16 years agoCorrect a few minor markup and grammar issues.
Christian Brueffer [Mon, 11 Aug 2008 08:42:31 +0000 (08:42 +0000)]
Correct a few minor markup and grammar issues.

16 years ago- Convert sc_sessions_mtx mutex to a rwlock, so in the fast path
Pawel Jakub Dawidek [Mon, 11 Aug 2008 08:41:08 +0000 (08:41 +0000)]
- Convert sc_sessions_mtx mutex to a rwlock, so in the fast path
  (glxsb_process()) we don't block others when looking for our session.
- Simplify the loop responsible for freeing sessions on detach.
- No need to drop a lock around malloc(M_NOWAIT).
- Treat ses_used as boolean.
- Avoid gotos where possible.
- Various style(9) fixes.

Reviewed by: philip, Patrick Lamaiziere <patfbsd@davenulle.org>

16 years agoAdd upgt(4) to the list of supported network interface.
Weongyo Jeong [Mon, 11 Aug 2008 04:58:06 +0000 (04:58 +0000)]
Add upgt(4) to the list of supported network interface.

16 years agoAdd an entry for the upgt(4) module.
Weongyo Jeong [Mon, 11 Aug 2008 04:54:43 +0000 (04:54 +0000)]
Add an entry for the upgt(4) module.

16 years agoConnect upgt.4 to the build.
Weongyo Jeong [Mon, 11 Aug 2008 04:48:34 +0000 (04:48 +0000)]
Connect upgt.4 to the build.

16 years agoConnect upgt(4) to the build.
Weongyo Jeong [Mon, 11 Aug 2008 04:46:14 +0000 (04:46 +0000)]
Connect upgt(4) to the build.

16 years agoAdd Conexant/Intersil PrismGT SoftMAC wireless USB driver - upgt(4).
Weongyo Jeong [Mon, 11 Aug 2008 03:57:31 +0000 (03:57 +0000)]
Add Conexant/Intersil PrismGT SoftMAC wireless USB driver - upgt(4).

This driver supports GW3887 based chipsets and works on
x86/powerpc/sparc64.  You need upgtfw kernel module before loading
upgt(4).  Please see the manpage.

Obtained from: OpenBSD

16 years agoUse device_set_desc() instead of device_set_desc_copy() as we don't
Pyun YongHyeon [Mon, 11 Aug 2008 01:49:46 +0000 (01:49 +0000)]
Use device_set_desc() instead of device_set_desc_copy() as we don't
manipulate the verbose description of a device.

16 years agoPartial back out r180952.
Pyun YongHyeon [Mon, 11 Aug 2008 01:45:05 +0000 (01:45 +0000)]
Partial back out r180952.
 pci_get_vendor() and pci_get_device() don't do configuration space
 accessses so cahcing them makes no sense.
Pointed out by: jhb, imp, des

16 years agoFix up test suite so it works again with the libarchive 1.x API.
Tim Kientzle [Mon, 11 Aug 2008 01:19:36 +0000 (01:19 +0000)]
Fix up test suite so it works again with the libarchive 1.x API.
In particular, FreeBSD 6 still uses the libarchive 1.x API and
this correction will permit MFCing new libarchive features back
to FreeBSD 6.

16 years agoCorrect test_tar_large so it works correctly with the libarchive 1.x API.
Tim Kientzle [Sun, 10 Aug 2008 21:14:26 +0000 (21:14 +0000)]
Correct test_tar_large so it works correctly with the libarchive 1.x API.

16 years agoDoc updates for changes in the default values of
David Schultz [Sun, 10 Aug 2008 19:35:09 +0000 (19:35 +0000)]
Doc updates for changes in the default values of
-ffancy-math-387 and -mmath-errno.

16 years agoMake -fno-math-errno the default. Our libm doesn't support the SysV
David Schultz [Sun, 10 Aug 2008 19:33:35 +0000 (19:33 +0000)]
Make -fno-math-errno the default. Our libm doesn't support the SysV
mistake of setting errno, and never has.  This will need to be fixed
upstream in a more generic way, but the changes are somewhat more
involved.

16 years agoMake -mfancy-math-387 the default on FreeBSD, as it is on most other
David Schultz [Sun, 10 Aug 2008 19:02:57 +0000 (19:02 +0000)]
Make -mfancy-math-387 the default on FreeBSD, as it is on most other
operating systems. Previously, gcc would inhibit the generation of
fsqrt, fsin, and several other floating point instructions, for the
benefit of the old in-kernel math emulator, which was removed over 5
years ago.

16 years agoImprove periodic/security/550.ipfwlimit a bit:
Antoine Brodin [Sun, 10 Aug 2008 18:11:24 +0000 (18:11 +0000)]
Improve periodic/security/550.ipfwlimit a bit:
- don't run it if net.inet.ip.fw.verbose = 0 as it is pointless
- handle rules without logging limit correctly [1]
(those rules show up without logamount in "ipfw -a list")

PR: conf/126060 [1]
MFC after: 1 month

16 years agoMinor typo fix, caught while skimming through the file.
Giorgos Keramidas [Sun, 10 Aug 2008 15:10:39 +0000 (15:10 +0000)]
Minor typo fix, caught while skimming through the file.

16 years agoRevert r181345.
Konstantin Belousov [Sun, 10 Aug 2008 12:15:36 +0000 (12:15 +0000)]
Revert r181345.
Move the NULL pointer check to the vfs_deleteopt() function.

Discussed with: rodrigc
MFC after: 3 days

16 years agoAll cosmetic.
Andrey A. Chernov [Sun, 10 Aug 2008 11:31:56 +0000 (11:31 +0000)]
All cosmetic.
1) Rename RANDOM_MAX to RANDOM_MAX_PLUS1 to not confuse with random()'s max
2) Use calloc() instead of zeroing fields explicitly
3) "too many lines" -> "too many delimiters" for err()

16 years agoMove sis to sys/dev/sis for consistency.
Warner Losh [Sun, 10 Aug 2008 10:00:14 +0000 (10:00 +0000)]
Move sis to sys/dev/sis for consistency.

16 years agoRead the config space of the child, not the bridge, to determine when
Warner Losh [Sun, 10 Aug 2008 09:55:14 +0000 (09:55 +0000)]
Read the config space of the child, not the bridge, to determine when
the child is out of reset... <blush>

16 years agoMove the xl driver form sys/pci to sys/dev/xl for consistency.
Warner Losh [Sun, 10 Aug 2008 09:45:52 +0000 (09:45 +0000)]
Move the xl driver form sys/pci to sys/dev/xl for consistency.

16 years agoExplain why two apparently-identical archive_read_data() calls
Tim Kientzle [Sun, 10 Aug 2008 03:13:42 +0000 (03:13 +0000)]
Explain why two apparently-identical archive_read_data() calls
really should have different return values.

16 years agoMfP4: Joerg Sonnenberger's fixes to make 'ar' and 'pax' writers
Tim Kientzle [Sun, 10 Aug 2008 02:06:28 +0000 (02:06 +0000)]
MfP4: Joerg Sonnenberger's fixes to make 'ar' and 'pax' writers
robust against multiple calls to their destroy() functions.

16 years agoAdd quirks for making uhid(4) ignore the Apple iPhone and iPhone 3G.
Henrik Brix Andersen [Sat, 9 Aug 2008 22:25:13 +0000 (22:25 +0000)]
Add quirks for making uhid(4) ignore the Apple iPhone and iPhone 3G.

Reviewed by: sam
Approved by: sam
MFC after: 3 days

16 years agofix syntax
Sam Leffler [Sat, 9 Aug 2008 21:51:57 +0000 (21:51 +0000)]
fix syntax

16 years agoSimplify session selection/allocation.
Pawel Jakub Dawidek [Sat, 9 Aug 2008 20:01:01 +0000 (20:01 +0000)]
Simplify session selection/allocation.

16 years ago- Fix freeing session on newsession failure.
Pawel Jakub Dawidek [Sat, 9 Aug 2008 19:48:59 +0000 (19:48 +0000)]
- Fix freeing session on newsession failure.
- Update copyright years.

16 years agoImplify sessions freeing loop.
Pawel Jakub Dawidek [Sat, 9 Aug 2008 19:47:19 +0000 (19:47 +0000)]
Implify sessions freeing loop.

16 years agoWe don't have to drop a lock around malloc(M_NOWAIT).
Pawel Jakub Dawidek [Sat, 9 Aug 2008 19:45:43 +0000 (19:45 +0000)]
We don't have to drop a lock around malloc(M_NOWAIT).

16 years agoWhen freeing session, restore its ID after zeroing memory.
Pawel Jakub Dawidek [Sat, 9 Aug 2008 19:43:44 +0000 (19:43 +0000)]
When freeing session, restore its ID after zeroing memory.

Bug tracked down by: Patrick Lamaiziere <patfbsd@davenulle.org>

16 years agoSessions in-use are at the end of the queue, so use TAILQ_FOREACH_REVERSE()
Pawel Jakub Dawidek [Sat, 9 Aug 2008 19:42:37 +0000 (19:42 +0000)]
Sessions in-use are at the end of the queue, so use TAILQ_FOREACH_REVERSE()
when looking for them.

Idea from: Patrick Lamaiziere <patfbsd@davenulle.org>

16 years agofix typo
Warner Losh [Sat, 9 Aug 2008 17:29:36 +0000 (17:29 +0000)]
fix typo

Submitted by: N.J. Mann

16 years agoClean up of dead code and possible unassigned variable usage.
Ivan Voras [Sat, 9 Aug 2008 16:47:30 +0000 (16:47 +0000)]
Clean up of dead code and possible unassigned variable usage.

Found by: LLVM/Clang Static Checker
Approved by: gnn (mentor)

16 years agoIt turns out that checking the first DWORD register is more reliable
Warner Losh [Sat, 9 Aug 2008 15:55:10 +0000 (15:55 +0000)]
It turns out that checking the first DWORD register is more reliable
on a variety of cards.  Adjust the comments accordingly to match the
code.  Even if the vendor chose 0xffff for the device ID, the vendor
ID can't be 0xffff, so the test is still valid from a standards
perspective.

16 years agoTypo: glxsb(4) was imported to FreeBSD 8.0, not 7.0.
Philip Paeps [Sat, 9 Aug 2008 15:09:51 +0000 (15:09 +0000)]
Typo: glxsb(4) was imported to FreeBSD 8.0, not 7.0.

Spotted by: kib

16 years agoAdd the glxsb(4) manual page.
Philip Paeps [Sat, 9 Aug 2008 14:54:19 +0000 (14:54 +0000)]
Add the glxsb(4) manual page.

Submitted by: Patrick Lamaizière <patfbsd -at- davenulle.org>
MFC after: 1 week

16 years agoAdd glxsb(4) driver for the Security Block in AMD Geode LX processors (as
Philip Paeps [Sat, 9 Aug 2008 14:52:31 +0000 (14:52 +0000)]
Add glxsb(4) driver for the Security Block in AMD Geode LX processors (as
found in Soekris hardware, for instance).  The hardware supports acceleration
of AES-128-CBC accessible through crypto(4) and supplies entropy to random(4).

TODO:

    o Implement rndtest(4) support
    o Performance enhancements

Submitted by: Patrick Lamaizière <patfbsd -at- davenulle.org>
Reviewed by: jhb, sam
MFC after: 1 week

16 years agoDelete unused files in the window(1) directory that contain a colon.
Ed Schouten [Sat, 9 Aug 2008 14:44:04 +0000 (14:44 +0000)]
Delete unused files in the window(1) directory that contain a colon.

During the import of the 4.4BSD Lite sources, four files got added to
the repository called :tt, :tty, :var and :ww. They seem to contain some
kind of debug information. These files aren't used/installed anywhere.

Unfortunately the colons in the filenames prevents us from checking out
the source tree on file systems that don't support colons (such as FAT).
Just remove these unneeded files to keep SVN happy.

Reported by: Rohit Tripathi <rohit trip gmail com>
MFC after: 3 days

16 years agoRemove unneeded D_NEEDGIANT from /dev/fd/{0,1,2}.
Ed Schouten [Sat, 9 Aug 2008 12:42:12 +0000 (12:42 +0000)]
Remove unneeded D_NEEDGIANT from /dev/fd/{0,1,2}.

There is no reason the fdopen() routine needs Giant. It only sets
curthread->td_dupfd, based on the device unit number of the cdev.

I guess we won't get massive performance improvements here, but still, I
assume we eventually want to get rid of Giant.

16 years agoNit
Dag-Erling Smørgrav [Sat, 9 Aug 2008 11:28:57 +0000 (11:28 +0000)]
Nit

16 years agoAdd sbuf_new_auto as a shortcut for the very common case of creating a
Dag-Erling Smørgrav [Sat, 9 Aug 2008 11:14:05 +0000 (11:14 +0000)]
Add sbuf_new_auto as a shortcut for the very common case of creating a
completely dynamic sbuf.

Obtained from: Varnish
MFC after: 2 weeks

16 years agoSwitch to simplified BSD license (with phk's approval), plus whitespace
Dag-Erling Smørgrav [Sat, 9 Aug 2008 10:26:21 +0000 (10:26 +0000)]
Switch to simplified BSD license (with phk's approval), plus whitespace
and style(9) cleanup.

16 years agoAdd late customize hook
Poul-Henning Kamp [Sat, 9 Aug 2008 09:37:44 +0000 (09:37 +0000)]
Add late customize hook

Submitted by:  Patrick M. Hausen
Sat on for far too long: phk

16 years agoAdd -i option to supress image building.
Poul-Henning Kamp [Sat, 9 Aug 2008 09:27:54 +0000 (09:27 +0000)]
Add -i option to supress image building.

Submitted by: keramida

16 years agoTrack /etc/ttys change to uart(4)
Poul-Henning Kamp [Sat, 9 Aug 2008 09:27:06 +0000 (09:27 +0000)]
Track /etc/ttys change to uart(4)

16 years agoAfter some intial testing, there are even slower cards than the ones
Warner Losh [Sat, 9 Aug 2008 07:41:18 +0000 (07:41 +0000)]
After some intial testing, there are even slower cards than the ones
that I have.  Wait up to 1.1s for the card to become ready.  Document
what the standards say, and use that to justify the behavior in the
code: PCI standard says that a card must respond to configuration
cycles within 2^25 cycles after reset goes high, which is
approximately 1s.  Therefore, give cards a little break and wait for
up to 1.1s for VENDOR to become valid.  Only look at the vendor part
of the ID, since only it can't be 0xffff (although in practice
vendor/device will always be != 0xfffffffff).  Include detailed
pointers to standards so epople understand why we're doing what we're
doing and why it just might be OK.  Make it clear in the timeout
message that it is just a warning, sinc we try to soldier on as best
we can anyway.

This should eliminate an error message that r181453 produced on
certain Atheros cards.

16 years agoOnly symlink booted kernel directory to /boot/kernel if user has explicitly
David E. O'Brien [Sat, 9 Aug 2008 06:35:19 +0000 (06:35 +0000)]
Only symlink booted kernel directory to /boot/kernel if user has explicitly
requested it.  This is too dangerous to just do behind the admin's back.

16 years agoIntel describes the behavior of their processors as "undefined" if two or
Alan Cox [Sat, 9 Aug 2008 05:46:13 +0000 (05:46 +0000)]
Intel describes the behavior of their processors as "undefined" if two or
more mappings to the same physical page have different memory types, i.e.,
PAT settings.  Consequently, if pmap_change_attr() is applied to a virtual
address range within the kernel map, then the corresponding ranges of the
direct map also need to be changed.  Enhance pmap_change_attr() to handle
this case automatically.

Add a comment describing what pmap_change_attr() does.

Discussed with: jhb

16 years agoVerify that the WPA flags set are actually compatible with the
Warner Losh [Sat, 9 Aug 2008 05:46:01 +0000 (05:46 +0000)]
Verify that the WPA flags set are actually compatible with the
driver's set of valid flags.  Otherwise, wpa_supplicant wouldn't
report an error for old wi cards that can't do WPA.

Reviewed by: sam@

16 years agorecognize WPS ie's
Sam Leffler [Sat, 9 Aug 2008 05:37:22 +0000 (05:37 +0000)]
recognize WPS ie's

Submitted by: "Chuck Tuffli" <chuck@tuffli.net>
MFC after: 1 week

16 years agoRather than waiting a fixed amount of time, which might not be enough
Warner Losh [Sat, 9 Aug 2008 04:08:36 +0000 (04:08 +0000)]
Rather than waiting a fixed amount of time, which might not be enough
and also holds things up, check every 20ms to see if we can read the
vendor of device 0.0.  It will be 0xffffffff until the card is out of
reset.  Always wait at least 20ms, for safety.

I think this is a better fix to the reset problem.  However, I did it
as a separate commit in case something bad happens, people can roll
back to the commit before this one to see if that gives them reliable
behavior.  I don't have FreeBSD up on enough machines to do exhaustive
testing on all known bridges...

16 years agoChange -1 to 0xfffffffful since the interface returns uint32_t.
Warner Losh [Sat, 9 Aug 2008 03:54:12 +0000 (03:54 +0000)]
Change -1 to 0xfffffffful since the interface returns uint32_t.

16 years agoWhile most bridges can bring a card out of reset in 20ms, there are
Warner Losh [Sat, 9 Aug 2008 03:37:12 +0000 (03:37 +0000)]
While most bridges can bring a card out of reset in 20ms, there are
some bridge + card combinations that take longer for reasons unknown.
Adjust the timeout to be 100ms on all !RICOH bridges, but leave RICOH
at 400ms.  The 400ms is "lore" from other open source projects, and
I've never see my ricoh bridge chips take this long.  Maybe it is the
same thing?  Maybe a bit should be read instead of a hard-wired pause?

After this adjustment, a few cards that I'd insert and get only:
cbb0: card_power: 3V
cbb0: card_power: 0V
with full debugging enabled would actually try to attach.

Reported by: sam@ (I think)
MFC after: 3 days

16 years agoOnly symlink booted kernel directory to /boot/kernel if user has explicitly
David E. O'Brien [Sat, 9 Aug 2008 01:19:00 +0000 (01:19 +0000)]
Only symlink booted kernel directory to /boot/kernel if user has explicitly
requested it.  This is too dangerous to just do behind the admin's back.

16 years agoAdd prototype defination for setfib(2) to sys/socket.h.
Xin LI [Fri, 8 Aug 2008 22:40:04 +0000 (22:40 +0000)]
Add prototype defination for setfib(2) to sys/socket.h.

16 years ago- Bump __FreeBSD_version for cpuctl(4) added.
Stanislav Sedov [Fri, 8 Aug 2008 21:36:49 +0000 (21:36 +0000)]
- Bump __FreeBSD_version for cpuctl(4) added.

Approved by: kib

16 years agoRemove variables which are assigned values and never used thereafter.
Colin Percival [Fri, 8 Aug 2008 20:42:42 +0000 (20:42 +0000)]
Remove variables which are assigned values and never used thereafter.

Found by: LLVM/Clang Static Checker
Approved by: jasone