]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoFix build.
Edward Tomasz Napierala [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.
Edward Tomasz Napierala [Wed, 4 Nov 2009 07:14:16 +0000 (07:14 +0000)]
Revert r198874, pending further discussion.

14 years agoStyle fixes.
Edward Tomasz Napierala [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)
Edward Tomasz Napierala [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
Edward Tomasz Napierala [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.
Alan Cox [Wed, 4 Nov 2009 04:41:03 +0000 (04:41 +0000)]
Eliminate an unnecessary vm include file.

14 years agoFix typo (noded -> nodes).
Benno Rice [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
Alan Cox [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 Rao [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.
Jung-uk Kim [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.
Jung-uk Kim [Wed, 4 Nov 2009 00:58:20 +0000 (00:58 +0000)]
Save/restore VGA color palette while suspending and resuming.

14 years agoFix constants.
Alexander Motin [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 Jeong [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 Schouten [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.
Andrew Thompson [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:
Jung-uk Kim [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:
Jaakko Heinonen [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.
John Baldwin [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
Alan Cox [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 Rao [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
Konstantin Belousov [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:
Alexander Motin [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:
Alexander Motin [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 Schouten [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:
Alexander Motin [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
Xin LI [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.
Xin LI [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
Xin LI [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 Bulyzhin [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.
Andrew Thompson [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
Andrew Thompson [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 Groothuis [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 agoVendor import of tzcode2009q:
Edwin Groothuis [Mon, 2 Nov 2009 22:32:14 +0000 (22:32 +0000)]
Vendor import of tzcode2009q:

- Add more references in tz-art.htm
- Cleanup unnecessary local variables in zdump.

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years agoMFV of tzdata2009q:
Edwin Groothuis [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 agoVendor import of tzdata2009q:
Edwin Groothuis [Mon, 2 Nov 2009 21:39:45 +0000 (21:39 +0000)]
Vendor import 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.

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years agoUnbreak SBus cards which have been broken (apparently) for a while.
Matt Jacob [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
John Baldwin [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.
Rui Paulo [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.
Alexander Motin [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.
Rui Paulo [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
Pyun YongHyeon [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.
Pyun YongHyeon [Mon, 2 Nov 2009 18:15:11 +0000 (18:15 +0000)]
Add BCM5761 PHY id.

14 years agoAvoid pointless calls to pmap_protect().
Alan Cox [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
Ivan Voras [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.
Christian 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 Lodder [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
Rui Paulo [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 Lodder [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,
Alexander Motin [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
Colin Percival [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]
Andrew Thompson [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
Andrew Thompson [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.
Andrew Thompson [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.
Christian 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:
Alexander Motin [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.
Christian 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:
Alexander Motin [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
Roman Divacky [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 Moolenaar [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
Nathan Whitehorn [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.
Nathan Whitehorn [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
Nathan Whitehorn [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
Nathan Whitehorn [Sat, 31 Oct 2009 17:55:48 +0000 (17:55 +0000)]
Loop on blocked threads when using ULE scheduler, removing an
XXX MP comment.

14 years agoGarbage collect set_user_sr(), which is declared static inline and
Nathan Whitehorn [Sat, 31 Oct 2009 17:46:50 +0000 (17:46 +0000)]
Garbage collect set_user_sr(), which is declared static inline and
never called.

14 years agoCorrect an error in vm_fault_copy_entry() that has existed since the first
Alan Cox [Sat, 31 Oct 2009 17:39:56 +0000 (17:39 +0000)]
Correct an error in vm_fault_copy_entry() that has existed since the first
version of this file.  When a process forks, any wired pages are immediately
copied because copy-on-write is not supported for wired pages.  In other
words, the child process is given its own private copy of each wired page
from its parent's address space.  Unfortunately, to date, these copied pages
have been mapped into the child's address space with the wrong permissions,
typically VM_PROT_ALL.  This change corrects the permissions.

Reviewed by: kib

14 years agoWhile certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010)
Stefan Eßer [Sat, 31 Oct 2009 17:06:36 +0000 (17:06 +0000)]
While certain supported Symbios/LSI SCSI chips (532c89653c100053c1010)
do support 64bit addresses, the current SCRIPTS code supports only 32bit
addresses causing data corruption for buffer addresses >4GB. This problem
affects 64bit machines with more than 4GB RAM or amd64 with 4GB and
memory hole remapping.
Work-around this problem with a bus_dma tag that requests bounce-buffers
for addresses >4GB. This causes some overhead, but given the maximum SCSI
bus speed of 160MB/s compared, the effect should hardly be noticeable.
The problem was reported by Mike Watters (mike at mwatters net) who also
verified that this fix cures the problem.

Since this change is a NOOP on systems with less than 4GB RAM and fixes
data corruption (in RAM and on disk) on systems with more than 4GB, I hope
that this change is accepted for 8.0.

MFC after: 3 days (pending approval)

14 years agoAllow newly added controllers to use full I/O sizes.
Alexander Motin [Sat, 31 Oct 2009 14:19:50 +0000 (14:19 +0000)]
Allow newly added controllers to use full I/O sizes.

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 13:24:14 +0000 (13:24 +0000)]
MFp4:
- Remove most of direct relations between ATA(4) peripherial and controller
levels. It makes logic more transparent and is a mandatory step to wrap
ATA(4) controller level into ATA-native CAM SIM.
- Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger
I/O transaction sizes without additional cost.

14 years agoThe majors file was removed long ago, 0 should be used instead.
Christian Brueffer [Sat, 31 Oct 2009 12:22:23 +0000 (12:22 +0000)]
The majors file was removed long ago, 0 should be used instead.

PR: 139230
Submitted by: pluknet <pluknet@gmail.com>
MFC after: 1 week

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 10:47:47 +0000 (10:47 +0000)]
MFp4:
Sync connection speed reporting with kernel.
Report speed in identify command, same as done by inquiry.

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 10:43:38 +0000 (10:43 +0000)]
MFp4:
- Reduce code duplication in ATA XPT and PMP driver.
- Move PIO size setting from ada driver to ATA XPT. It is XPT business
to negotiate transfer details. ada driver is now stateless.
- Report PIO size to SIM. It is required for correct PATA SIM operation.
- Tune PMP scan timings. It workarounds some problems with SiI.
- If reset hapens during PMP initialization - restart it.
- Introduce early-initialized periph drivers, which are used during initial
scan process. Use it for xpt, probe, aprobe and pmp. It gives pmp chance
to finish scan before mountroot and numerate devices in right order.

14 years agoUnobfuscate unit number handling in apm(4).
Ed Schouten [Sat, 31 Oct 2009 10:38:30 +0000 (10:38 +0000)]
Unobfuscate unit number handling in apm(4).

There is no need to use the lower 4 bits of the unit number to store the
device type number. Just use 0 and 1 to distinguish them. devfs also
guarantees that there can never be an open call on a device that has a
unit number different to 0 and 1, so there is no need to check for this
in open().

14 years agoTurn unused structure fields of cdevsw into spares.
Ed Schouten [Sat, 31 Oct 2009 10:35:41 +0000 (10:35 +0000)]
Turn unused structure fields of cdevsw into spares.

d_uid, d_gid and d_mode are unused, because permissions are stored in
cdevpriv nowadays. d_kind doesn't seem to be used at all. We no longer
keep a list of cdevsw's, so d_list is also unused.

uid_t and gid_t are 32 bits, but mode_t is 16 bits, Because of alignment
constraints of d_kind, we can safely turn it into three 32-bit integers.
d_kind and d_list is equal in size to three pointers.

Discussed with: kib

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 09:03:48 +0000 (09:03 +0000)]
MFp4:
Ensure target/lun passed from user-level supported on this bus.
Scanning unsupported IDs causes different issues from duplicate
devices to system crash.

14 years ago- zfs_zaccess() can handle VAPPEND too, so map V_APPEND to VAPPEND and call
Pawel Jakub Dawidek [Fri, 30 Oct 2009 23:33:06 +0000 (23:33 +0000)]
- zfs_zaccess() can handle VAPPEND too, so map V_APPEND to VAPPEND and call
  zfs_access() instead of vaccess() in this case as well.
- If VADMIN is specified with another V* flag (unlikely) call both
  zfs_access() and vaccess() after spliting V* flags.

This fixes "dirtying snapshot!" panic.

PR: kern/139806
Reported by: Carl Chave <carl@chave.us>
In co-operation with: jh
MFC after: 3 days

14 years agoWhen reading input from a file or device (via -f option) set the
Kirk McKusick [Fri, 30 Oct 2009 21:54:53 +0000 (21:54 +0000)]
When reading input from a file or device (via -f option) set the
input to be in non-buffering mode so that input lines are logged
as they occur rather than being saved up until a buffer's worth of
input has been logged.

14 years agoAdd support for different request block format used by Gen-IIe Marvell SATA.
Alexander Motin [Fri, 30 Oct 2009 20:28:49 +0000 (20:28 +0000)]
Add support for different request block format used by Gen-IIe Marvell SATA.
This adds support for Marvell 6042/7042 chips and Adaptec 1430SA controller.

14 years agoFix botched git -> svn merge.
Robert Noland [Fri, 30 Oct 2009 18:30:13 +0000 (18:30 +0000)]
Fix botched git -> svn merge.

MFC after: 2 weeks

14 years agoCleanup in r600_blit
Robert Noland [Fri, 30 Oct 2009 18:08:46 +0000 (18:08 +0000)]
Cleanup in r600_blit

 - Don't bother to assign vb until we know we have enough space
 - Add variables for sx2, sy2, dx2, dy2 so that these aren't
   calculated over and over, also reduce chance of errors.
 - Use switch to assign color/format

MFC after: 3 days

14 years agoA bit of cleanup work on radeon_freelist_get()
Robert Noland [Fri, 30 Oct 2009 18:07:22 +0000 (18:07 +0000)]
A bit of cleanup work on radeon_freelist_get()

  * Fix the main loop to search all buffers before sleeping.
  * Remove dead code

MFC after: 3 days

14 years agoSome general cleanup of scatter/gather memory allocation
Robert Noland [Fri, 30 Oct 2009 18:02:10 +0000 (18:02 +0000)]
Some general cleanup of scatter/gather memory allocation

 - We don't need to check malloc return values with M_WAITOK
 - remove variables that we don't really need
 - cleanup the error paths by just calling drm_sg_cleanup()
 - fix drm_sg_cleanup() to be safe to call at any time

MFC after: 2 weeks

14 years agoUse system specified memory barriers rather than rolling our own.
Robert Noland [Fri, 30 Oct 2009 16:59:58 +0000 (16:59 +0000)]
Use system specified memory barriers rather than rolling our own.

14 years agoFix blitter support for RS880 chips
Robert Noland [Fri, 30 Oct 2009 16:55:31 +0000 (16:55 +0000)]
Fix blitter support for RS880 chips

MFC after: 3 days

14 years agoAdd support for Adaptec 39320LPE adapters.
Christian Brueffer [Fri, 30 Oct 2009 16:23:56 +0000 (16:23 +0000)]
Add support for Adaptec 39320LPE adapters.

PR: 124202
Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
Reviewed by: gibbs
MFC after: 1 week

14 years agoMake procstat -k work on PowerPC by avoiding mistakenly using signed
Nathan Whitehorn [Fri, 30 Oct 2009 16:00:34 +0000 (16:00 +0000)]
Make procstat -k work on PowerPC by avoiding mistakenly using signed
compares with a low address (0x1000) and a high address
(the KVA kernel stack).

14 years agoAdd notes pointing out that bsdiff does not store file hashes and
Colin Percival [Fri, 30 Oct 2009 11:13:00 +0000 (11:13 +0000)]
Add notes pointing out that bsdiff does not store file hashes and
bspatch thus does not verify file hashes, and that consequently it
is recommended that users store hashes separately and verify files
before and after running bspatch.

Requested by: BugMagnet
MFC after: 1 week

14 years agoTrapsignal() and postsig() call kern_sigprocmask() with both process
Konstantin Belousov [Fri, 30 Oct 2009 10:10:39 +0000 (10:10 +0000)]
Trapsignal() and postsig() call kern_sigprocmask() with both process
lock and curproc->p_sigacts->ps_mtx. Reschedule_signals may need to have
ps_mtx locked to decide and wakeup a thread, causing recursion on the
mutex.

Inform kern_sigprocmask() and reschedule_signals() about lock state
of the ps_mtx by new flag SIGPROCMASK_PS_LOCKED to avoid recursion.

Reported and tested by: keramida
MFC after: 1 month

14 years agoAdd missing ATA kernel options dependencies.
Alexander Motin [Thu, 29 Oct 2009 20:53:26 +0000 (20:53 +0000)]
Add missing ATA kernel options dependencies.

MFC after: 3 days

14 years ago- Numerous whitespace and style fixes.
John Baldwin [Thu, 29 Oct 2009 18:03:16 +0000 (18:03 +0000)]
- Numerous whitespace and style fixes.
- More descriptive error messages when failing to parse components during
  attach.

14 years agoImprove round robin stream scheduler and cleanup some code.
Michael Tuexen [Thu, 29 Oct 2009 17:40:33 +0000 (17:40 +0000)]
Improve round robin stream scheduler and cleanup some code.

Approved by: rrs (mentor)
MFC after: 3 days

14 years agoWhen fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
John Baldwin [Thu, 29 Oct 2009 17:34:02 +0000 (17:34 +0000)]
When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
and sum them to form the total counts.

PR: bin/135893
Submitted by: Mikolaj Golub  to my trociny of gmail
MFC after: 1 week

14 years agoAdd additional featuresState.fBits entries to simplify compiling and
Ed Maste [Thu, 29 Oct 2009 17:21:41 +0000 (17:21 +0000)]
Add additional featuresState.fBits entries to simplify compiling and
testing Adaptec's vendor driver.

Submitted by: Adaptec, driver 17517

14 years agoRename aac_srb32 to aac_srb, to match Adaptec's vendor driver.
Ed Maste [Thu, 29 Oct 2009 17:14:18 +0000 (17:14 +0000)]
Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver.

14 years agoRevert part of r198363, there is no "device cam", it is
Christian Brueffer [Thu, 29 Oct 2009 15:59:27 +0000 (15:59 +0000)]
Revert part of r198363, there is no "device cam", it is
included in "device scbus".

MFC after: 3 days

14 years agoRename aac_fast_intr to aac_filter to reflect its current use. Eliminate
Ed Maste [Thu, 29 Oct 2009 14:53:45 +0000 (14:53 +0000)]
Rename aac_fast_intr to aac_filter to reflect its current use.  Eliminate
the fallback of using the filter as an interrupt handler, as it is no
longer needed.

Discussed with: scottl, jhb

14 years agoTrapsignal() calls kern_sigprocmask() when delivering catched signal
Konstantin Belousov [Thu, 29 Oct 2009 14:34:24 +0000 (14:34 +0000)]
Trapsignal() calls kern_sigprocmask() when delivering catched signal
with proc lock held.

Reported and tested by: Mykola Dzham  freebsd at levsha org ua
MFC after: 1 month

14 years agoTurn off Altivec data-stream prefetching before going into power-save
Nathan Whitehorn [Thu, 29 Oct 2009 14:22:09 +0000 (14:22 +0000)]
Turn off Altivec data-stream prefetching before going into power-save
mode on those CPUs that need it.

14 years agoDefine identify fields described in CF specification.
Alexander Motin [Thu, 29 Oct 2009 13:52:34 +0000 (13:52 +0000)]
Define identify fields described in CF specification.

14 years agoInclude the output of the ddb(4) capture buffer.
John Baldwin [Thu, 29 Oct 2009 13:45:33 +0000 (13:45 +0000)]
Include the output of the ddb(4) capture buffer.

Submitted by: Mikolaj Golub  to my trociny of gmail
MFC after: 3 days

14 years agoWhen extracting the capture buffer from a crashdump, only read the valid
John Baldwin [Thu, 29 Oct 2009 13:44:58 +0000 (13:44 +0000)]
When extracting the capture buffer from a crashdump, only read the valid
portion of the capture buffer (db_capture_bufoff vs db_capture_bufsize).
This could result in outputting garbage (e.g. lots of 'p' characters if
DIAGNOSTIC is enabled) after the end of the capture buffer.  While here,
fix a spelling nit.

Reported by: Mikolaj Golub  to my trociny of gmail
MFC after: 3 days