Commit graph

150538 commits

Author SHA1 Message Date
Alexander Motin 2a3510fd51 Fix protype. 2009-11-04 16:37:13 +00:00
Alexander Motin fd2cc0bde8 PMP commands use short format. PMP write doesn't return result. 2009-11-04 16:16:50 +00:00
Alexander Motin efa575b6be 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.
2009-11-04 15:40:19 +00:00
Alexander Motin c1bd46c2d3 MFp4:
- Add support for sector size > 512 bytes and physical sector of several
logical sectors, introduced by ATA-7 specification.
- Remove some obsoleted code.
2009-11-04 15:24:32 +00:00
Alexander Motin c82b245af9 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.
2009-11-04 15:10:46 +00:00
Edward Tomasz Napierala 7a172809b5 Fix build.
Submitted by:	Andrius Morkūnas <hinokind at gmail.com>
2009-11-04 08:25:58 +00:00
Edward Tomasz Napierala 3b1b09809f Revert r198874, pending further discussion. 2009-11-04 07:14:16 +00:00
Edward Tomasz Napierala da9ce28ecb Style fixes. 2009-11-04 07:04:15 +00:00
Edward Tomasz Napierala 8fafa5cecf Make sure we don't end up with VAPPEND without VWRITE, if someone calls open(2)
like this: open(..., O_APPEND).
2009-11-04 06:48:34 +00:00
Edward Tomasz Napierala 597954c813 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.
2009-11-04 06:47:14 +00:00
Alan Cox c346328f95 Eliminate an unnecessary vm include file. 2009-11-04 04:41:03 +00:00
Benno Rice 9d44cd42c1 Fix typo (noded -> nodes). 2009-11-04 04:12:56 +00:00
Alan Cox 2dd02f4773 Eliminate an unnecessary #include. (This #include should have been removed
in r188331 when vnode_pager_lock() was eliminated.)
2009-11-04 03:12:56 +00:00
Attilio Rao 06db609d4a 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
2009-11-04 01:32:59 +00:00
Jung-uk Kim 421cd2f2fb Restore color palette format if we reset video mode. 2009-11-04 01:00:28 +00:00
Jung-uk Kim 7ac3e951e3 Save/restore VGA color palette while suspending and resuming. 2009-11-04 00:58:20 +00:00
Alexander Motin 1f45f0733b Fix constants. 2009-11-03 23:26:58 +00:00
Weongyo Jeong 35e8cd5f52 fixes a typo that value should be 0 not 10. 2009-11-03 21:47:07 +00:00
Ed Schouten ca1d2f657a 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
2009-11-03 21:06:19 +00:00
Andrew Thompson 21293e7016 Belatedly add an UPDATING message for the usb ethernet ifnet naming in r188412.
MFC after:	3 days
2009-11-03 21:06:19 +00:00
Jung-uk Kim 761eeb5fff 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.
2009-11-03 20:22:09 +00:00
Jaakko Heinonen 4586315a76 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)
2009-11-03 19:05:05 +00:00
John Baldwin 9144dd07ad Fix a couple of comment typos.
MFC after:	1 week
2009-11-03 18:40:42 +00:00
Alan Cox 86684848b6 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
2009-11-03 17:15:15 +00:00
Attilio Rao 1b9d701fee 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>
2009-11-03 16:46:52 +00:00
Konstantin Belousov 1c89fc757a 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
2009-11-03 12:52:35 +00:00
Alexander Motin 6f9a51c735 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.
2009-11-03 12:03:13 +00:00
Alexander Motin a69552e4b6 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.
2009-11-03 11:47:07 +00:00
Ed Schouten 8f1c21a6e3 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.
2009-11-03 11:41:21 +00:00
Alexander Motin 8691755dff MFp4:
Improve reporting ATA Status error details.
2009-11-03 11:19:05 +00:00
Xin LI 1575bd0a6d Increase width for %CPU, RSS and VSZ columns for now. Modern systems
tend to have larger memory, larger process, and more CPU.
2009-11-03 09:28:45 +00:00
Xin LI 49fc79609a Static'ify signal handler which is not called from outside. 2009-11-03 09:25:08 +00:00
Xin LI 59bf36c3a7 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
2009-11-03 09:17:23 +00:00
Oleg Bulyzhin 5661377e37 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
2009-11-03 08:41:14 +00:00
Andrew Thompson e975f97cd0 Add more verbose output when dumping the configuration descriptor.
Submitted by:	Hans Petter Selasky
2009-11-02 23:50:12 +00:00
Andrew Thompson bd6d02e7e9 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.
2009-11-02 23:30:15 +00:00
Edwin Groothuis 1f72185627 MFV of r198828, tzcode2009q
- Cleanup unnecessary local variables in zdump.
- Fix man-page

MFC after:	1 week
2009-11-02 23:02:11 +00:00
Edwin Groothuis 68b27eaa45 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/
2009-11-02 22:32:14 +00:00
Edwin Groothuis 9cc5918d4c 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
2009-11-02 21:44:10 +00:00
Edwin Groothuis e98bf23618 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/
2009-11-02 21:39:45 +00:00
Matt Jacob 0bd051b869 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
2009-11-02 21:22:30 +00:00
John Baldwin 5ef5fd6e53 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
2009-11-02 20:18:50 +00:00
Rui Paulo 060ed74b53 Revert a functional change that snuck in. 2009-11-02 19:13:12 +00:00
Alexander Motin 99844cbf65 Add IDs for nVidia MCP65/77/79/89 SATA conntrollers. 2009-11-02 19:02:31 +00:00
Rui Paulo f8b8dab2eb Fix a non-style change that snuck in.
Spotted by: danfe
2009-11-02 18:51:24 +00:00
Pyun YongHyeon 5b6d1d9d08 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 >
2009-11-02 18:35:05 +00:00
Pyun YongHyeon bb08f03318 Add BCM5761 PHY id. 2009-11-02 18:15:11 +00:00
Alan Cox 2fafce9e4c Avoid pointless calls to pmap_protect().
Reviewed by:	kib
2009-11-02 17:45:39 +00:00
Ivan Voras 8a9c731f13 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)
2009-11-02 16:56:59 +00:00
Christian Brueffer cf6c5eebe7 Use our canonical .Dd format.
Submitted by:	Ulrich Spoerlein
2009-11-02 12:35:38 +00:00