]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoIt's normal to see Rx FIFO overruns under high network load and
yongari [Fri, 6 Nov 2009 18:51:05 +0000 (18:51 +0000)]
It's normal to see Rx FIFO overruns under high network load and
showing the message creates other side-effects. Remove the Rx
FIFO overrun message in interrupt handler. msk(4) should recover
from the FIFO overruns without any user intervention. Users can
still check the Rx FIFO overrun counter from MAC MIB statistics
maintained in driver(dev.msk.0.stats.rx.overflows).

14 years agoRemove unnecessary header file.
yongari [Fri, 6 Nov 2009 18:36:09 +0000 (18:36 +0000)]
Remove unnecessary header file.

14 years ago- Use device_printf() instead of printf() with an explicit unit number
jhb [Fri, 6 Nov 2009 18:28:13 +0000 (18:28 +0000)]
- Use device_printf() instead of printf() with an explicit unit number
  in the PCI attach routine.
- Simplify PCI probe.
- Remove no-longer-used 'unit' from an_attach() parameters.

PR: kern/126924
Submitted by: gavin

14 years agoMake nd6_llinfo_timer() does its job, again. ln->la_expire was
ume [Fri, 6 Nov 2009 17:34:26 +0000 (17:34 +0000)]
Make nd6_llinfo_timer() does its job, again.  ln->la_expire was
greater than time_second, in most cases.

MFC after: 3 days

14 years agoSeveral years ago a feature was added to TCP that casued soreceive() to
jhb [Fri, 6 Nov 2009 16:55:05 +0000 (16:55 +0000)]
Several years ago a feature was added to TCP that casued soreceive() to
send an ACK right away if data was drained from a TCP socket that had
previously advertised a zero-sized window.  The current code requires the
receive window to be exactly zero for this to kick in.  If window scaling is
enabled and the window is smaller than the scale, then the effective window
that is advertised is zero.  However, in that case the zero-sized window
handling is not enabled because the window is not exactly zero.  The fix
changes the code to check the raw window value against zero.

Reviewed by: bz
MFC after: 1 week

14 years agoTake a step towards removing if_watchdog/if_timer. Don't explicitly set
jhb [Fri, 6 Nov 2009 14:55:01 +0000 (14:55 +0000)]
Take a step towards removing if_watchdog/if_timer.  Don't explicitly set
if_watchdog/if_timer to NULL/0 when initializing an ifnet.  if_alloc()
sets those members to NULL/0 already.

14 years agoUse device_printf() and if_printf() instead of printf() with an explicit
jhb [Fri, 6 Nov 2009 14:52:37 +0000 (14:52 +0000)]
Use device_printf() and if_printf() instead of printf() with an explicit
unit number and remove 'unit' members from softc.

14 years agoFix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
jhb [Fri, 6 Nov 2009 13:10:12 +0000 (13:10 +0000)]
Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
a page mapped by a large page in the kernel.

Submitted by: Dorr H. Clark  dclark of engr.scu.edu
MFC after: 1 week

14 years agoDocument support for more chips.
mav [Fri, 6 Nov 2009 11:17:33 +0000 (11:17 +0000)]
Document support for more chips.

14 years agoDon't call LLE_FREE() after nd6_free().
ume [Fri, 6 Nov 2009 10:07:38 +0000 (10:07 +0000)]
Don't call LLE_FREE() after nd6_free().

MFC after: 3 days

14 years agoAdd MAP_ANONYMOUS.
ed [Fri, 6 Nov 2009 07:17:31 +0000 (07:17 +0000)]
Add MAP_ANONYMOUS.

Many operating systems also provide MAP_ANONYMOUS. It's not hard to
support this ourselves, we'd better add it to make it more likely for
applications to work out of the box.

Reviewed by: alc (mman.h)

14 years agoUnbreak E500 builds. The inline assembly for the 970 CPUs
marcel [Fri, 6 Nov 2009 06:09:04 +0000 (06:09 +0000)]
Unbreak E500 builds. The inline assembly for the 970 CPUs
is invalid when compiling for BookE.

14 years agoCorrect MSI mode register bits.
yongari [Fri, 6 Nov 2009 01:11:59 +0000 (01:11 +0000)]
Correct MSI mode register bits.

14 years agoSave/restore VGA state from vga_pci.c instead of relying on vga_isa.c.
jkim [Thu, 5 Nov 2009 22:58:50 +0000 (22:58 +0000)]
Save/restore VGA state from vga_pci.c instead of relying on vga_isa.c.
It was not working because we were saving its state after the device was
powered down.  Simplify vesa_load_state() as the culprit is fixed now.

14 years agosh: Fix memory leak when using a variable in arithmetic like $((x)).
jilles [Thu, 5 Nov 2009 20:44:39 +0000 (20:44 +0000)]
sh: Fix memory leak when using a variable in arithmetic like $((x)).

MFC after: 3 weeks

14 years agoFix two memory leaks in error cases.
brueffer [Thu, 5 Nov 2009 16:30:16 +0000 (16:30 +0000)]
Fix two memory leaks in error cases.

PR: 138378
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
Approved by: mlaier
MFC after: 1 week

14 years agoStrip from messages for users external URLs the project cannot directly
attilio [Thu, 5 Nov 2009 14:34:38 +0000 (14:34 +0000)]
Strip from messages for users external URLs the project cannot directly
control.

Requested by: kib, rwatson

14 years agoRevert the spelling of Taiwan to be politically neutral in accordance
ru [Thu, 5 Nov 2009 10:01:15 +0000 (10:01 +0000)]
Revert the spelling of Taiwan to be politically neutral in accordance
with the policy published at http://www.freebsd.org/internal/i18n.html.

Requested by: core (murray)

14 years agoMFp4:
mav [Thu, 5 Nov 2009 08:55:24 +0000 (08:55 +0000)]
MFp4:
Implement device stats accounting for ATA commands.

14 years agoFix typo in kernel message. The fix is based upon the patch in the PR.
netchild [Thu, 5 Nov 2009 07:37:48 +0000 (07:37 +0000)]
Fix typo in kernel message. The fix is based upon the patch in the PR.

PR: kern/140279
Submitted by: Alexander Best <alexbestms@math.uni-muenster.de>
MFC after: 1 week

14 years agoFix gdb_cpu_getreg() to actually match GDB's register
marcel [Thu, 5 Nov 2009 06:31:50 +0000 (06:31 +0000)]
Fix gdb_cpu_getreg() to actually match GDB's register
definition.

14 years agoImplement db_trace_thread() by calling db_stack_trace_cmd() and
marcel [Thu, 5 Nov 2009 06:27:46 +0000 (06:27 +0000)]
Implement db_trace_thread() by calling db_stack_trace_cmd() and
passing a frame pointer that comes from the thread context. This
fixes DDB backtraces by not unwinding debugger functions first.

14 years agoImplement db_trace_self() by calling db_stack_trace_cmd()
marcel [Thu, 5 Nov 2009 06:23:02 +0000 (06:23 +0000)]
Implement db_trace_self() by calling db_stack_trace_cmd()
and not db_trace_thread().

14 years agoIP_TTL is an IP socket option, not a TTL value. Use IPDEFTTL
marcel [Thu, 5 Nov 2009 06:08:04 +0000 (06:08 +0000)]
IP_TTL is an IP socket option, not a TTL value. Use IPDEFTTL
instead.

14 years agoFile flags handling fixes for ext2fs:
jh [Thu, 5 Nov 2009 04:51:38 +0000 (04:51 +0000)]
File flags handling fixes for ext2fs:

- Disallow setting of flags not supported by ext2fs.
- Map EXT2_APPEND_FL to SF_APPEND.
- Map EXT2_IMMUTABLE_FL to SF_IMMUTABLE.
- Map EXT2_NODUMP_FL to UF_NODUMP.

Note that ext2fs doesn't support user settable append and immutable flags.
EXT2_NODUMP_FL is an user settable flag also on Linux.

PR: kern/122047
Reported by: Ighighi
Submitted by: Aditya Sarawgi (original version)
Reviewed by: bde
Approved by: trasz (mentor)

14 years agoCleanup code to make it WARNS=6 clean:
delphij [Wed, 4 Nov 2009 23:36:23 +0000 (23:36 +0000)]
Cleanup code to make it WARNS=6 clean:

 - ANSIfy prototypes;
 - Add __unused for parameters that is not being currently used;
 - Add a header for subrountines being called from other modules.

Reviewed by: mjacob

14 years agoTweak memory allocation for amd64 suspend/resume CPU context.
jkim [Wed, 4 Nov 2009 22:39:18 +0000 (22:39 +0000)]
Tweak memory allocation for amd64 suspend/resume CPU context.

14 years agoInclude string.h for prototype of strcmp().
delphij [Wed, 4 Nov 2009 21:12:33 +0000 (21:12 +0000)]
Include string.h for prototype of strcmp().

14 years agoMake bge_newbuf_std()/bge_newbuf_jumbo() returns actual error code
yongari [Wed, 4 Nov 2009 21:06:54 +0000 (21:06 +0000)]
Make bge_newbuf_std()/bge_newbuf_jumbo() returns actual error code
for buffer allocation. If driver know we are out of Rx buffers let
controller stop. This should fix panic when interface is run even
if it had no configured Rx buffers.

14 years agoRemove common DMA tag used for TX/RX mbufs and create Tx DMA tag
yongari [Wed, 4 Nov 2009 20:57:52 +0000 (20:57 +0000)]
Remove common DMA tag used for TX/RX mbufs and create Tx DMA tag
and Rx DMA tag separately. Previously it used a common mbuf DMA tag
for both Tx and Rx path but Rx buffer(standard ring case) should
have a single DMA segment and maximum buffer size of the segment
should be less than or equal to MCLBYTES. This change also make it
possible to add TSO with minor changes.

14 years agoCovert bge_newbuf_std to use bus_dmamap_load_mbuf_sg(9). Note,
yongari [Wed, 4 Nov 2009 20:40:38 +0000 (20:40 +0000)]
Covert bge_newbuf_std to use bus_dmamap_load_mbuf_sg(9). Note,
bge_newbuf_std still has a bug for handling dma map load failure
under high network load. Just reusing mbuf is not enough as driver
already unloaded the dma map of the mbuf. Graceful recovery needs
more work.
Ideally we can just update dma address part of a Rx descriptor
because the controller never overwrite the Rx descriptor. This
requires some Rx initialization code changes and it would be done
later after fixing other incorrect bus_dma(9) usages.

14 years agoUse correct dma tag for jumbo buffer.
yongari [Wed, 4 Nov 2009 20:19:21 +0000 (20:19 +0000)]
Use correct dma tag for jumbo buffer.

14 years agoFix not only the grammar, but also the formatting that makes the gag
dougb [Wed, 4 Nov 2009 18:40:05 +0000 (18:40 +0000)]
Fix not only the grammar, but also the formatting that makes the gag

14 years agoDo not probe video mode if we are not going to use it.
jkim [Wed, 4 Nov 2009 17:30:48 +0000 (17:30 +0000)]
Do not probe video mode if we are not going to use it.

14 years agoFix protype.
mav [Wed, 4 Nov 2009 16:37:13 +0000 (16:37 +0000)]
Fix protype.

14 years agoPMP commands use short format. PMP write doesn't return result.
mav [Wed, 4 Nov 2009 16:16:50 +0000 (16:16 +0000)]
PMP commands use short format. PMP write doesn't return result.

14 years agoMFp4:
mav [Wed, 4 Nov 2009 15:40:19 +0000 (15:40 +0000)]
MFp4:
- Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be
periph flag. May be SIM, may be CCB, but now it works fine just without it.
- Remove check unused for at least five years. If we will ever have non-BIO
devices in CAM, this check is smallest of what we will need.
- If several controllers complete requests same time, call swi_sched()
only once.

14 years agoMFp4:
mav [Wed, 4 Nov 2009 15:24:32 +0000 (15:24 +0000)]
MFp4:
- Add support for sector size > 512 bytes and physical sector of several
logical sectors, introduced by ATA-7 specification.
- Remove some obsoleted code.

14 years agoDo not unarm callout on request completion and change slot selection
mav [Wed, 4 Nov 2009 15:10:46 +0000 (15:10 +0000)]
Do not unarm callout on request completion and change slot selection
algorithm as done in ahci(4). This saves some CPU time on high request
rates.

14 years agoFix build.
trasz [Wed, 4 Nov 2009 08:25:58 +0000 (08:25 +0000)]
Fix build.

Submitted by: Andrius Morkūnas <hinokind at gmail.com>

14 years agoRevert r198874, pending further discussion.
trasz [Wed, 4 Nov 2009 07:14:16 +0000 (07:14 +0000)]
Revert r198874, pending further discussion.

14 years agoStyle fixes.
trasz [Wed, 4 Nov 2009 07:04:15 +0000 (07:04 +0000)]
Style fixes.

14 years agoMake sure we don't end up with VAPPEND without VWRITE, if someone calls open(2)
trasz [Wed, 4 Nov 2009 06:48:34 +0000 (06:48 +0000)]
Make sure we don't end up with VAPPEND without VWRITE, if someone calls open(2)
like this: open(..., O_APPEND).

14 years agoWhile VAPPEND without VWRITE makes sense for VOP_ACCESSX(9) (e.g. to check
trasz [Wed, 4 Nov 2009 06:47:14 +0000 (06:47 +0000)]
While VAPPEND without VWRITE makes sense for VOP_ACCESSX(9) (e.g. to check
for the permission to create subdirectory (ACE4_ADD_SUBDIRECTORY)), it doesn't
really make sense for VOP_ACCESS(9).  Also, many VOP_ACCESS(9) implementations
don't expect that.  Make sure we don't confuse them.

14 years agoEliminate an unnecessary vm include file.
alc [Wed, 4 Nov 2009 04:41:03 +0000 (04:41 +0000)]
Eliminate an unnecessary vm include file.

14 years agoFix typo (noded -> nodes).
benno [Wed, 4 Nov 2009 04:12:56 +0000 (04:12 +0000)]
Fix typo (noded -> nodes).

14 years agoEliminate an unnecessary #include. (This #include should have been removed
alc [Wed, 4 Nov 2009 03:12:56 +0000 (03:12 +0000)]
Eliminate an unnecessary #include.  (This #include should have been removed
in r188331 when vnode_pager_lock() was eliminated.)

14 years agoOpteron rev E family of processor expose a bug where, in very rare
attilio [Wed, 4 Nov 2009 01:32:59 +0000 (01:32 +0000)]
Opteron rev E family of processor expose a bug where, in very rare
ocassions, memory barriers semantic is not honoured by the hardware
itself. As a result, some random breakage can happen in uninvestigable
ways (for further explanation see at the content of the commit itself).

As long as just a specific familly is bugged of an entire architecture
is broken, a complete fix-up is impratical without harming to some
extents the other correct cases.
Considering that (and considering the frequency of the bug exposure)
just print out a warning message if the affected machine is identified.

Pointed out by: Samy Al Bahra <sbahra at repnop dot org>
Help on wordings by: jeff
MFC: 3 days

14 years agoRestore color palette format if we reset video mode.
jkim [Wed, 4 Nov 2009 01:00:28 +0000 (01:00 +0000)]
Restore color palette format if we reset video mode.

14 years agoSave/restore VGA color palette while suspending and resuming.
jkim [Wed, 4 Nov 2009 00:58:20 +0000 (00:58 +0000)]
Save/restore VGA color palette while suspending and resuming.

14 years agoFix constants.
mav [Tue, 3 Nov 2009 23:26:58 +0000 (23:26 +0000)]
Fix constants.

14 years agofixes a typo that value should be 0 not 10.
weongyo [Tue, 3 Nov 2009 21:47:07 +0000 (21:47 +0000)]
fixes a typo that value should be 0 not 10.

14 years agoMake /dev/klog and kern.msgbuf* MPSAFE.
ed [Tue, 3 Nov 2009 21:06:19 +0000 (21:06 +0000)]
Make /dev/klog and kern.msgbuf* MPSAFE.

Normally msgbufp is locked using Giant. Switch it to use the
msgbuf_lock. Instead of changing the tsleep() calls to msleep(), just
convert it to condvar(9).

In my opinion the locking around msgbuf_peekbytes() still remains
questionable. It looks like locks are dropped while performing copies of
multiple blocks to userspace, which may cause the msgbuf to be reset in
the mean time. At least getting it underneath from Giant should make it
a little easier for us to figure out how to solve that.

Reminded by: rdivacky

14 years agoBelatedly add an UPDATING message for the usb ethernet ifnet naming in r188412.
thompsa [Tue, 3 Nov 2009 21:06:19 +0000 (21:06 +0000)]
Belatedly add an UPDATING message for the usb ethernet ifnet naming in r188412.

MFC after: 3 days

14 years agoFix VESA color palette corruption:
jkim [Tue, 3 Nov 2009 20:22:09 +0000 (20:22 +0000)]
Fix VESA color palette corruption:

- VBE 3.0 says palette format resets to 6-bit mode when video mode changes.
We simply set 8-bit mode when we switch modes if the adapter supports it.
- VBE 3.0 also says if the mode is not VGA compatible, we must use VBE
function to save/restore palette.  Otherwise, VGA function may be used.
Thus, reinstate the save/load palette functions only for non-VGA compatible
modes regardless of its palette format.
- Let vesa(4) set VESA modes even if vga(4) claims to support it.
- Reset default palette if VESA pixel mode is set initially.
- Fix more style nits.

14 years agofdc(4) module unload fixes:
jh [Tue, 3 Nov 2009 19:05:05 +0000 (19:05 +0000)]
fdc(4) module unload fixes:

- Tear down the interrupt handler before killing the worker thread.
- Do geom withering as GEOM event to avoid acquiring the GEOM topology
  lock under Giant.

PR: kern/104079
Reviewed by: joerg
Approved by: trasz (mentor)

14 years agoFix a couple of comment typos.
jhb [Tue, 3 Nov 2009 18:40:42 +0000 (18:40 +0000)]
Fix a couple of comment typos.

MFC after: 1 week

14 years agoEliminate a bit of hackery from vm_fault(). The operations that this
alc [Tue, 3 Nov 2009 17:15:15 +0000 (17:15 +0000)]
Eliminate a bit of hackery from vm_fault().  The operations that this
hackery sought to prevent are now properly supported by vm_map_protect().
(See r198505.)

Reviewed by: kib

14 years agoSplit P_NOLOAD into a per-thread flag (TDF_NOLOAD).
attilio [Tue, 3 Nov 2009 16:46:52 +0000 (16:46 +0000)]
Split P_NOLOAD into a per-thread flag (TDF_NOLOAD).
This improvements aims for avoiding further cache-misses in scheduler
specific functions which need to keep track of average thread running
time and further locking in places setting for this flag.

Reported by: jeff (originally), kris (currently)
Reviewed by: jhb
Tested by: Giuseppe Cocomazzi <sbudella at email dot it>

14 years agoIf socket buffer space appears to be lower then sum of count of already
kib [Tue, 3 Nov 2009 12:52:35 +0000 (12:52 +0000)]
If socket buffer space appears to be lower then sum of count of already
prepared bytes and next portion of transfer, inner loop of kern_sendfile()
aborts, not preparing next mbuf for socket buffer, and not modifying
any outer loop invariants. The thread loops in the outer loop forever.

Instead of breaking from inner loop, prepare only bytes that fit into
the socket buffer space.

In collaboration with: pho
Reviewed by: bz
PR: kern/138999
MFC after: 2 weeks

14 years agoMFp4:
mav [Tue, 3 Nov 2009 12:03:13 +0000 (12:03 +0000)]
MFp4:
- Rework timeout handling, to make it more graceful for devices sharing
controller port (with PMP). Wait for other commands completion/timeout
before initiating recovery.
- Handle timeouts and fatal errors with port hard-reset. The rest of
recovery will be done by XPT on receiving async event. More gracefull
per-device soft-reset recovery can be implemented later.

14 years agoMFp4:
mav [Tue, 3 Nov 2009 11:47:07 +0000 (11:47 +0000)]
MFp4:
- Handle timeouts and fatal errors with port hard-reset. The rest of
recovery will be done by XPT on receiving async event. More gracefull
per-device soft-reset recovery can be implemented later.
- Add workaround for ATI SB600/SB700 PMP probe related bug, to speedup boot.

14 years agoJust use devname(3) to print device names.
ed [Tue, 3 Nov 2009 11:41:21 +0000 (11:41 +0000)]
Just use devname(3) to print device names.

Right now sysctl just prints the major/minor numbers of a device.
Instead of rolling our own routine for this, we'd better just call
devname(3) to perform a translation to a device name for us.

14 years agoMFp4:
mav [Tue, 3 Nov 2009 11:19:05 +0000 (11:19 +0000)]
MFp4:
Improve reporting ATA Status error details.

14 years agoIncrease width for %CPU, RSS and VSZ columns for now. Modern systems
delphij [Tue, 3 Nov 2009 09:28:45 +0000 (09:28 +0000)]
Increase width for %CPU, RSS and VSZ columns for now.  Modern systems
tend to have larger memory, larger process, and more CPU.

14 years agoStatic'ify signal handler which is not called from outside.
delphij [Tue, 3 Nov 2009 09:25:08 +0000 (09:25 +0000)]
Static'ify signal handler which is not called from outside.

14 years agoSet umask to 0x077 instead of the default. This prevents non-root user
delphij [Tue, 3 Nov 2009 09:17:23 +0000 (09:17 +0000)]
Set umask to 0x077 instead of the default.  This prevents non-root user
from reading crashinfo output, which could contain some sensitive
information.

Reviewed by: jhb
MFC after: 1 week

14 years agoFix two issues that can lead to exceeding configured pipe bandwidth:
oleg [Tue, 3 Nov 2009 08:41:14 +0000 (08:41 +0000)]
Fix two issues that can lead to exceeding configured pipe bandwidth:
- do not expire queues which are not ready to be expired.
- properly calculate available burst size.

MFC after: 3 days

14 years agoAdd more verbose output when dumping the configuration descriptor.
thompsa [Mon, 2 Nov 2009 23:50:12 +0000 (23:50 +0000)]
Add more verbose output when dumping the configuration descriptor.

Submitted by: Hans Petter Selasky

14 years agoProvide the same sanity check on the sector size in dagetcapacity as when the
thompsa [Mon, 2 Nov 2009 23:30:15 +0000 (23:30 +0000)]
Provide the same sanity check on the sector size in dagetcapacity as when the
disk is first probed. dagetcapacity is called whenever the disk is opened from
geom via d_open(), a zero sector size will cause geom to panic later on.

14 years agoMFV of r198828, tzcode2009q
edwin [Mon, 2 Nov 2009 23:02:11 +0000 (23:02 +0000)]
MFV of r198828, tzcode2009q

- Cleanup unnecessary local variables in zdump.
- Fix man-page

MFC after: 1 week

14 years agoMFV of tzdata2009q:
edwin [Mon, 2 Nov 2009 21:44:10 +0000 (21:44 +0000)]
MFV of tzdata2009q:

- New region: Asia/Novokuznetsk
- Kemerovo oblast' (Kemerovo region) in Russia will change current
  time zone on 29 March 2010
- Add historical data for Hongkong 1941 - 1980
- Syria will go to winter time in the last weekend of October 2009.

MFC after: 2 days

14 years agoUnbreak SBus cards which have been broken (apparently) for a while.
mjacob [Mon, 2 Nov 2009 21:22:30 +0000 (21:22 +0000)]
Unbreak SBus cards which have been broken (apparently) for a while.
Most of the pieces came from Marius- correct settings for channels
and resource management. The one piece missing was that you cannot
for SBus cards replace 32 bit operations with A64 operations- not
supported.

Submitted by: marius
MFC after: 3 days

14 years agoEnsure 'kvm' is always initialized. If "-M" was not specified and the
jhb [Mon, 2 Nov 2009 20:18:50 +0000 (20:18 +0000)]
Ensure 'kvm' is always initialized.  If "-M" was not specified and the
garbage value on the stack was not zero, then 'ddb capture' would try to
use the garbage value as a kvm_t pointer.

MFC after: 1 week

14 years agoRevert a functional change that snuck in.
rpaulo [Mon, 2 Nov 2009 19:13:12 +0000 (19:13 +0000)]
Revert a functional change that snuck in.

14 years agoAdd IDs for nVidia MCP65/77/79/89 SATA conntrollers.
mav [Mon, 2 Nov 2009 19:02:31 +0000 (19:02 +0000)]
Add IDs for nVidia MCP65/77/79/89 SATA conntrollers.

14 years agoFix a non-style change that snuck in.
rpaulo [Mon, 2 Nov 2009 18:51:24 +0000 (18:51 +0000)]
Fix a non-style change that snuck in.

Spotted by: danfe

14 years agoAdd a check to know whether driver is still running after
yongari [Mon, 2 Nov 2009 18:35:05 +0000 (18:35 +0000)]
Add a check to know whether driver is still running after
reacquiring driver lock in Rx handler. re(4) drops a driver lock
before passing received frame to upper stack and reacquire the
lock. During the time window ioctl calls could be executed and if
the ioctl was interface down request, driver will stop the
controller and free allocated mbufs. After that when driver comes
back to Rx handler again it does not know what was happend so it
could access free mbufs which in turn cause panic.

Reported by:  Norbert Papke < npapk <> acm dot org >
Tested by:  Norbert Papke < npapk <> acm dot org >

14 years agoAdd BCM5761 PHY id.
yongari [Mon, 2 Nov 2009 18:15:11 +0000 (18:15 +0000)]
Add BCM5761 PHY id.

14 years agoAvoid pointless calls to pmap_protect().
alc [Mon, 2 Nov 2009 17:45:39 +0000 (17:45 +0000)]
Avoid pointless calls to pmap_protect().

Reviewed by: kib

14 years agoAdd sysctl documentation strings. The descriptions are derived
ivoras [Mon, 2 Nov 2009 16:56:59 +0000 (16:56 +0000)]
Add sysctl documentation strings. The descriptions are derived
from tuning(7). One of the descriptions references tuning(7) because
it is too complex to adequatly describe here (it is not a simple
boolean sysctl) and users should be warned to that.

Reviewed by: alc, kib
Approved by: gnn (mentor)

14 years agoUse our canonical .Dd format.
brueffer [Mon, 2 Nov 2009 12:35:38 +0000 (12:35 +0000)]
Use our canonical .Dd format.

Submitted by: Ulrich Spoerlein

14 years agoDocument the WWWSUPFILE variable.
remko [Mon, 2 Nov 2009 12:03:04 +0000 (12:03 +0000)]
Document the WWWSUPFILE variable.

PR: 137723
Submitted by: Sofian Brabez <sbrabez at gmail dot com>
Approved by: imp (mentor, implicit)
MFC after: 3 days
Facilitated by: Snow B.V.

14 years agoBig style cleanup. While there remove references to FreeBSD versions
rpaulo [Mon, 2 Nov 2009 11:07:42 +0000 (11:07 +0000)]
Big style cleanup. While there remove references to FreeBSD versions
older than 6.0.

Submitted by: Paul B Mahol <onemda at gmail.com>

14 years agoExecute the start/stop process of a jail in the background.
remko [Mon, 2 Nov 2009 09:56:46 +0000 (09:56 +0000)]
Execute the start/stop process of a jail in the background.
This will prevent that the script hangs during startup, which
could cause annoying effects after rebooting for example.

PR: kern/139422
Submitted by: Andrey Groshev <greenx at yartv dot ru>
Approved by: imp (mentor, implicit)
MFC after: 3 days
Facilitated by: Snow B.V.

14 years agoThe async callback could free the device. If it is a broadcast async,
mav [Mon, 2 Nov 2009 08:31:00 +0000 (08:31 +0000)]
The async callback could free the device. If it is a broadcast async,
it doesn't hold device reference, so take our own reference.

Submitted by:   thompsa

14 years agoAttempt to reduce accidental foot-shooting by pointing out that
cperciva [Mon, 2 Nov 2009 07:21:13 +0000 (07:21 +0000)]
Attempt to reduce accidental foot-shooting by pointing out that
accept(2)ed sockets do not necessarily inherit O_NONBLOCK from
listening sockets on non-FreeBSD platforms.

Feet shot: cperciva
MFC after: 1 month

14 years ago- Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1]
thompsa [Sun, 1 Nov 2009 21:48:18 +0000 (21:48 +0000)]
- Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1]
- Don't write actual length if the actual length pointer is NULL [2]
- correct Linux Compatibility error codes for short isochronous IN transfers
  and make status field signed.

Submitted by: Leunam Elebek [1], Manuel Gebele [2]

14 years agoFix a corner case where usbd_transfer_drain() can return too early if the
thompsa [Sun, 1 Nov 2009 21:44:37 +0000 (21:44 +0000)]
Fix a corner case where usbd_transfer_drain() can return too early if the
callback has dropped the mutex, leading to a panic.

Submitted by: HPS
MFC after: 3 days

14 years agoCheck unit number and provide string name for consdev.
thompsa [Sun, 1 Nov 2009 21:41:44 +0000 (21:41 +0000)]
Check unit number and provide string name for consdev.

Submitted by: HPS

14 years agoRefine r198714, it's not as easy as just leaving the major number zero.
brueffer [Sun, 1 Nov 2009 18:25:11 +0000 (18:25 +0000)]
Refine r198714, it's not as easy as just leaving the major number zero.

Submitted by: ed
MFC after: 1 week

14 years agoMFp4:
mav [Sun, 1 Nov 2009 13:06:15 +0000 (13:06 +0000)]
MFp4:
Allow SATA1 SiI chips to do full-sized DMA. Specification tells that we may
release DMA constrants even more, but it require some additional handling.

14 years agoExpand DESCRIPTION and a basic EXAMPLES section.
brueffer [Sun, 1 Nov 2009 11:39:07 +0000 (11:39 +0000)]
Expand DESCRIPTION and a basic EXAMPLES section.

PR: 139605
Submitted by: Warren Block <wblock@wonkity.com>
MFC after: 1 week

14 years agoMFp4:
mav [Sun, 1 Nov 2009 11:31:06 +0000 (11:31 +0000)]
MFp4:
Fix reference counting bug, when device unreferenced before then
invalidated. To do it, do not handle validity flag as another
reference, but explicitly modify reference count each time flag is
modified.

Discovered by: thompsa

14 years agoReplace -iprefix with -isystem. We only need alternative header
rdivacky [Sun, 1 Nov 2009 08:20:30 +0000 (08:20 +0000)]
Replace -iprefix with -isystem. We only need alternative header
files search path and thus -isystem is sufficient. -iprefix is
meant to do something entirely different.

Approved by: ed (mentor)
OKed by: ru, kan
Tested by: make universe

14 years agoReimplement the lazy FP context switching:
marcel [Sat, 31 Oct 2009 22:27:31 +0000 (22:27 +0000)]
Reimplement the lazy FP context switching:
o   Move all code into a single file for easier maintenance.
o   Use a single global lock to avoid having to handle either
    multiple locks or race conditions.
o   Make sure to disable the high FP registers after saving
    or dropping them.
o   use msleep() to wait for the other CPU to save the high
    FP registers.

This change fixes the high FP inconsistency panics.

A single global lock typically serializes too much, which may
be noticable when a lot of threads use the high FP registers,
but in that case it's probably better to switch the high FP
context synchronuously. Put differently: cpu_switch() should
switch the high FP registers if the incoming and outgoing
threads both use the high FP registers.

14 years agoUnbreak cpu_switch(). The register allocator in my brain is clearly
nwhitehorn [Sat, 31 Oct 2009 20:59:13 +0000 (20:59 +0000)]
Unbreak cpu_switch(). The register allocator in my brain is clearly
broken. Also, Altivec context switching worked before only by accident,
but should work now by design.

14 years agoRemove an unnecessary sync that crept in the last commit.
nwhitehorn [Sat, 31 Oct 2009 18:04:34 +0000 (18:04 +0000)]
Remove an unnecessary sync that crept in the last commit.

14 years agoFix a race in casuword() exposed by csup. casuword() non-atomically read
nwhitehorn [Sat, 31 Oct 2009 17:59:24 +0000 (17:59 +0000)]
Fix a race in casuword() exposed by csup. casuword() non-atomically read
the current value of its argument before atomically replacing it, which
could occasionally return the wrong value on an SMP system. This resulted
in user mutex operations hanging when using threaded applications.

14 years agoLoop on blocked threads when using ULE scheduler, removing an
nwhitehorn [Sat, 31 Oct 2009 17:55:48 +0000 (17:55 +0000)]
Loop on blocked threads when using ULE scheduler, removing an
XXX MP comment.