Commit Graph

150503 Commits

Author SHA1 Message Date
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
Remko Lodder
ad8b9147e6 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.
2009-11-02 12:03:04 +00:00
Rui Paulo
99081d1c61 Big style cleanup. While there remove references to FreeBSD versions
older than 6.0.

Submitted by:	Paul B Mahol <onemda at gmail.com>
2009-11-02 11:07:42 +00:00
Remko Lodder
eabd1bcb21 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.
2009-11-02 09:56:46 +00:00
Alexander Motin
9efda2c908 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
2009-11-02 08:31:00 +00:00
Colin Percival
4054af4fb0 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
2009-11-02 07:21:13 +00:00
Andrew Thompson
0f92028501 - 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]
2009-11-01 21:48:18 +00:00
Andrew Thompson
bb9c7a8b22 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
2009-11-01 21:44:37 +00:00
Andrew Thompson
acf4080f43 Check unit number and provide string name for consdev.
Submitted by:	HPS
2009-11-01 21:41:44 +00:00
Christian Brueffer
91b010c9d9 Refine r198714, it's not as easy as just leaving the major number zero.
Submitted by:	ed
MFC after:	1 week
2009-11-01 18:25:11 +00:00
Alexander Motin
6fd3e622e2 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.
2009-11-01 13:06:15 +00:00
Christian Brueffer
94b7ebd774 Expand DESCRIPTION and a basic EXAMPLES section.
PR:		139605
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	1 week
2009-11-01 11:39:07 +00:00
Alexander Motin
f98d7a47e2 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
2009-11-01 11:31:06 +00:00
Roman Divacky
98c98d78d4 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
2009-11-01 08:20:30 +00:00
Marcel Moolenaar
8d077f48f0 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.
2009-10-31 22:27:31 +00:00
Nathan Whitehorn
156ef7611e 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.
2009-10-31 20:59:13 +00:00
Nathan Whitehorn
011db0bc81 Remove an unnecessary sync that crept in the last commit. 2009-10-31 18:04:34 +00:00
Nathan Whitehorn
e2cd4c2a65 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.
2009-10-31 17:59:24 +00:00
Nathan Whitehorn
ad26477892 Loop on blocked threads when using ULE scheduler, removing an
XXX MP comment.
2009-10-31 17:55:48 +00:00
Nathan Whitehorn
2bbd567acb Garbage collect set_user_sr(), which is declared static inline and
never called.
2009-10-31 17:46:50 +00:00
Alan Cox
e4ed417a35 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
2009-10-31 17:39:56 +00:00
Stefan Eßer
7bcfccda40 While certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010)
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)
2009-10-31 17:06:36 +00:00
Alexander Motin
25dd82a35b Allow newly added controllers to use full I/O sizes. 2009-10-31 14:19:50 +00:00
Alexander Motin
ebbb35ba70 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.
2009-10-31 13:24:14 +00:00
Christian Brueffer
a65653d16a The majors file was removed long ago, 0 should be used instead.
PR:		139230
Submitted by:	pluknet <pluknet@gmail.com>
MFC after:	1 week
2009-10-31 12:22:23 +00:00
Alexander Motin
7f8fbd60d4 MFp4:
Sync connection speed reporting with kernel.
Report speed in identify command, same as done by inquiry.
2009-10-31 10:47:47 +00:00
Alexander Motin
1e637ba677 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.
2009-10-31 10:43:38 +00:00
Ed Schouten
4c88ba2d70 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().
2009-10-31 10:38:30 +00:00
Ed Schouten
2d2a89dd2d 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
2009-10-31 10:35:41 +00:00
Alexander Motin
d521940e9a MFp4:
Ensure target/lun passed from user-level supported on this bus.
Scanning unsupported IDs causes different issues from duplicate
devices to system crash.
2009-10-31 09:03:48 +00:00
Pawel Jakub Dawidek
fd66267ffb - 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
2009-10-30 23:33:06 +00:00
Kirk McKusick
4145bb53bf 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.
2009-10-30 21:54:53 +00:00
Alexander Motin
6aca3a5d0b 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.
2009-10-30 20:28:49 +00:00
Robert Noland
d2217702c1 Fix botched git -> svn merge.
MFC after:	2 weeks
2009-10-30 18:30:13 +00:00
Robert Noland
11de9e8c79 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
2009-10-30 18:08:46 +00:00
Robert Noland
29e3ffd4f5 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
2009-10-30 18:07:22 +00:00