Commit Graph

177865 Commits

Author SHA1 Message Date
jmallett
99e7ee266b If an Atheros device is attached to an Octeon, it's going to be by PCI. 2012-03-02 21:44:39 +00:00
jhb
d6e546f14a - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.
The tag enforces a single restriction that all DMA transactions must not
  cross a 4GB boundary.  Note that while this restriction technically only
  applies to PCI-express, this change applies it to all PCI devices as it
  is simpler to implement that way and errs on the side of caution.
- Add a softc structure for PCI bus devices to hold the bus_dma tag and
  a new pci_attach_common() routine that performs actions common to the
  attach phase of all PCI bus drivers.  Right now this only consists of
  a bootverbose printf and the allocate of a bus_dma tag if necessary.
- Adjust all PCI bus drivers to allocate a PCI bus softc and to call
  pci_attach_common() from their attach routines.

MFC after:	2 weeks
2012-03-02 20:38:04 +00:00
jmallett
6d9202e457 Unbreak SMP on stock Octeon systems -- copy the core_mask from bootinfo into
sysinfo.  This should have been done as part of replacing bootinfo with sysinfo.
2012-03-02 20:34:15 +00:00
jhb
7bf627fd71 Similar to the fixes in 226967 and 226987, purge any name cache entries
associated with the previous vnode (if any) associated with the target of
a rename().  Otherwise, a lookup of the target pathname concurrent with a
rename() could re-add a name cache entry after the namei(RENAME) lookup
in kern_renameat() had purged the target pathname.

MFC after:	2 weeks
2012-03-02 18:55:19 +00:00
andreast
867957a359 Fix typo. 2012-03-02 18:18:14 +00:00
alc
9181f45b9f Eliminate stale incorrect ARGSUSED comments.
Submitted by:	bde
2012-03-02 17:33:51 +00:00
ru
2cfd87717a Removed excessive _seekdir() call in closedir(). This saves one lseek()
syscall.  Before r5958, seekdir() was called for its side effect of
freeing memory allocated by opendir() for rewinddir(), but that revision
added _reclaim_telldir() that frees all memory allocated by telldir()
calls, making this call redundant.

This introduces a slight change.  If an application duplicated the descriptor
obtained through dirfd(), it can no longer rely on file position to be
reset to the start of file after a call to closedir().  It's believed to
be safe because neither POSIX, nor any other OS I've tested (NetBSD, Linux,
OS X) rewind the file offset pointer on closedir().

Reported by:	Igor Sysoev
2012-03-02 14:05:50 +00:00
kib
7ee846fb9d Belatedly add dl_iterate_phdr(3) to the list of installed manpages.
MFC after:	3 days
2012-03-02 13:19:56 +00:00
ru
50f29d6e48 Finally removed the stat() and fstat() calls from the opendir() code.
They were made excessive in r205424 by opening with O_DIRECTORY.
Also eliminated the fcntl() call used to set FD_CLOEXEC by opening
with O_CLOEXEC.

(fdopendir() still checks that the passed descriptor is a directory,
and sets FD_CLOEXEC on it.)

Reviewed by:	ed
2012-03-02 10:03:38 +00:00
pluknet
f90febf947 Reflect the renaming of ifmaof_ifpforaddr() to if_findmulti() in r148652.
MFC after:	1 week
2012-03-02 09:52:42 +00:00
kib
cca832bf9d Do not expose unlocked unconstructed nullfs vnode on mount list.
Lock the native nullfs vnode lock before switching the locks.

Tested by:	pho
MFC after:	1 week
2012-03-02 09:48:46 +00:00
pluknet
93f2183184 ifp->if_ioctl() has moved to u_long cmd in r36735.
Somehow that change had not reached here together with ifioctl().

MFC after:	1 week
2012-03-02 09:30:54 +00:00
mav
11e7605a3d Fix names of some Marvell SATA chips. It looks like chips with proprietary
interface supported by mvs(4) are 88SX, while AHCI-like chips are 88SE.

PR:		kern/165271
Submitted by:	Jia-Shiun Li <jiashiun@gmail.com>
MFC after:	1 week
2012-03-02 08:49:07 +00:00
hrs
c2fcac3f88 Allow to configure net.inet6.ip6.{accept_rtadv,no_radr} by the loader tunables
as well because they have to be configured before interface initialization for
AF_INET6.
2012-03-02 07:23:28 +00:00
hrs
ae62f802c7 Remove a redundant check. 2012-03-02 07:22:04 +00:00
pluknet
e2d16db0bd Kill EoL whitespaces, and minor lint. 2012-03-02 05:55:45 +00:00
mav
6db61783a3 Add ahci(4) and siis(4) to the hardware notes.
MFC after:	1 week
2012-03-02 05:16:53 +00:00
adrian
aa727b1f0f Wrap another ATH_LOCK around the scanning flag.
PR:		kern/163318
2012-03-02 03:11:53 +00:00
adrian
9d9d3e6003 Wrap the scan code state change stuff behind ATH_LOCK and the PCU fiddling
behind the PCU lock.

sc_scanning is being checked without ATH_LOCK behind held and could
in theory run from multiple threads.
2012-03-02 02:57:10 +00:00
adrian
8aaa665509 Attempt to catch scan cancellations at exactly the wrong time from occuring.
The scan code unlocks the comlock and calls into the driver.  It then
assumes the state hasn't changed from underneath it.

Although I haven't seen this particular condition trigger, I'd like to
be informed if I or anyone else sees it.

What I'm thinking may occur:

* A cancellation comes in during the scan_end call;
* the cancel flag is set;
* but it's never checked, so scandone isn't updated;
* .. and the interface stays in the STA power save mode.

It's a subtle race, if it even exists.

PR:		kern/163318
2012-03-02 02:53:43 +00:00
jhb
bdf6581a3a Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X
allocation fails.

Reviewed by:	jfv
MFC after:	2 weeks
2012-03-01 22:13:10 +00:00
davide
8636a37ecc - Add support for the Intel Sandy Bridge microarchitecture (both core and uncore counting events)
- New manpages with event lists.
- Add MSRs for the Intel Sandy Bridge microarchitecture

Reviewed by:	attilio, brueffer, fabient
Approved by:	gnn (mentor)
MFC after:	3 weeks
2012-03-01 21:23:26 +00:00
kan
daffabc4a9 Provide pre/post transfer method callbacks for icbbb
clients.

These are helful when making certain drivers work on both Linux
and FreeBSD without changing the code flow too much.

Reviewed by: kib, wlosh
MFC after: 1 month
2012-03-01 20:58:20 +00:00
hselasky
24261e9a52 Add regression test for USB enumeration.
MFC after:	1 week
2012-03-01 20:45:17 +00:00
jhb
20f70f7f55 Update the documentation on pci_get/set_powerstate(). These methods are
not ACPI-specific at all, but deal with PCI power states.  Also,
pci_set_powerstate() fails with EOPNOTSUPP if a request is made that the
underlying device does not support rather than falling back to somehow
setting D0.
2012-03-01 20:36:50 +00:00
jhb
e03043889a Sort function prototypes. 2012-03-01 20:32:02 +00:00
hselasky
aa3f6522e9 Style change: Expand redundant #if's. Remove a couple of empty lines.
MFC after:	1 week
2012-03-01 20:25:17 +00:00
jhb
87af6ebd2e Add pci_save_state() and pci_restore_state() wrappers around
pci_cfg_save() and pci_cfg_restore() for device drivers to use when
saving and restoring state (e.g. to handle device-specific resets).

Reviewed by:	imp
MFC after:	2 weeks
2012-03-01 20:20:55 +00:00
jhb
0b4e8b5716 Update for adjusted types for boundary arguments in 232356. 2012-03-01 20:19:21 +00:00
hselasky
1cdde428bf Close a detach race. Make sure all pending
CCB's get canceled at device detach.

MFC after:	1 week
2012-03-01 20:10:54 +00:00
ak
f2b9e70d48 Add myself
Approved by:	itetcu (mentor)
2012-03-01 20:03:44 +00:00
jhb
5013ab31bd - Change contigmalloc() to use the vm_paddr_t type instead of an unsigned
long for specifying a boundary constraint.
- Change bus_dma tags to use bus_addr_t instead of bus_size_t for boundary
  constraints.

These allow boundary constraints to be fully expressed for cases where
sizeof(bus_addr_t) != sizeof(bus_size_t).  Specifically, it allows a
driver to properly specify a 4GB boundary in a PAE kernel.

Note that this cannot be safely MFC'd without a lot of compat shims due
to KBI changes, so I do not intend to merge it.

Reviewed by:	scottl
2012-03-01 19:58:34 +00:00
brueffer
fbe3c228aa Add snd_hdspe(4) to the hardware notes. 2012-03-01 19:54:35 +00:00
davide
32d1cb200a Replace the three spaces with one tag.
Reported by:	pjd
Approved by:	gnn (mentor)
2012-03-01 19:17:56 +00:00
mckusick
b23f922edf This change avoids a kernel deadlock on "snaplk" when using
snapshots on UFS filesystems running with journaled soft updates.
This is the first of several bugs that need to be fixed before
removing the restriction added in -r230250 to prevent the use
of snapshots on filesystems running with journaled soft updates.

The deadlock occurs when holding the snapshot lock (snaplk)
and then trying to flush an inode via ffs_update(). We become
blocked by another process trying to flush a different inode
contained in the same inode block that we need. It holds the
inode block for which we are waiting locked. When it tries to
write the inode block, it gets blocked waiting for the our
snaplk when it calls ffs_copyonwrite() to see if the inode
block needs to be copied in our snapshot.

The most obvious place that this deadlock arises is in the
ffs_copyonwrite() routine when it updates critical metadata
in a snapshot and tries to write it out before proceeding.
The fix here is to write the data and indirect block pointer
for the snapshot, but to skip the call to ffs_update() to
write the snapshot inode. To ensure that we will never have
to update a pointer in the inode itself, the ffs_snapshot()
routine that creates the snapshot has to ensure that all the
direct blocks are allocated as part of the creation of the
snapshot.

A less obvious place that this deadlock occurs is when we hold
the snaplk because we are deleting a snapshot. In the course of
doing the deletion, we need to allocate various soft update
dependency structures and allocate some journal space. If we
hit a resource limit while doing this we decrease the resources
in use by flushing out an existing dirty file to get it to give
up the soft dependency resources that it holds. The flush can
cause an ffs_update() to be done on the inode for the file that
we have selected to flush resulting in the same deadlock as
described above when the inode that we have chosen to flush
resides in the same inode block as the snapshot inode that we hold.
The fix is to defer cleaning up any time that the inode on which
we are operating is a snapshot.

Help and review by:    Jeff Roberson
Tested by:             Peter Holm
MFC (to 9 only) after: 2 weeks
2012-03-01 18:45:25 +00:00
jh
806e8c5872 Since r199137 namei() returns EINVAL for DELETE and RENAME operations if
the last component of the pathname is ".".

Reviewed by:	kib
MFC after:	1 week
2012-03-01 18:17:45 +00:00
luigi
214b04c6bb remove some write-only variables.
There is another block of code that is now useless as the computation
is done in the kernel.
2012-03-01 17:35:16 +00:00
jamie
de23ce306e Handle the case where a boolean parameter is also a node.
PR:		bin/165515
MFC after:	2 weeks
2012-03-01 15:09:41 +00:00
ae
3cbbe36634 Note that memory should be freed after uuid_to_string(3) call.
MFC after:	1 week
2012-03-01 14:39:01 +00:00
mav
d844e42d76 Add driver for the RME HDSPe AIO/RayDAT sound cards -- snd_hdspe(4).
Cards are expensive and so rare, so leave the driver as module.

Submitted by:	Ruslan Bukin <br@bsdpad.com>
MFC after:	2 weeks
2012-03-01 13:10:18 +00:00
pluknet
3e4d13da1e Changes in ifaddr refcounting: ifa_refcnt IFAREF/IFAFREE macros
moved to ifa_ref()/ifa_free() refcounting functions.

MFC after:	1 week
2012-03-01 12:52:14 +00:00
pluknet
103c25dec9 Refine r232333 [1] and put note about ifnet refcount caller responsibility.
Spotted by:	gavin [1]
MFC after:	1 week
2012-03-01 12:30:57 +00:00
pluknet
9a76a42270 Reflect that ifa_ifwithnet() gained ignore_ptp argument.
MFC after:	1 week
2012-03-01 12:16:00 +00:00
pluknet
a540a62cbb Document ifunit_ref function.
MFC after:	1 week
2012-03-01 12:03:52 +00:00
pluknet
63c65b9bc7 Document ifnet refcount.
MFC after:	1 week
2012-03-01 11:03:39 +00:00
trasz
7ae6502efb Use proper "maxproc" name, not "nproc".
PR:		docs/162172
2012-03-01 10:21:10 +00:00
rmacklem
2d142012e7 Fix the NFS clients so that they use copyin() instead of bcopy(),
when doing direct I/O. This direct I/O code is not enabled by default.

Submitted by:	kib (earlier version)
Reviewed by:	kib
MFC after:	1 week
2012-03-01 03:53:07 +00:00
dim
4b408c2add Regenerate src.conf(5) after r232322.
MFC after:	2 weeks
2012-02-29 23:06:48 +00:00
dim
2a09710001 Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after:	2 weeks
2012-02-29 22:58:51 +00:00
thompsa
5fb3a72857 Correct the description for CTLFLAG_TUN and CTLFLAG_RDTUN, the declaring of a
system tunable has never been implemented. This flag is only used by sysctl(8)
to provide a helpful error message.

Discussed with:	dwhite, kan
2012-02-29 22:41:40 +00:00