Commit Graph

97830 Commits

Author SHA1 Message Date
Rui Paulo
4566dd369d Improve the i.MX53 / Digi DTS:
* Fix the IPU address.
* Fix the PATA definition.
* Add another I2C.
* Add more UARTs.
* Add SATA.
2014-04-13 22:35:39 +00:00
Christian Brueffer
a1761d7335 Free buf after usage.
CID:		1199377
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 21:23:15 +00:00
Christian Brueffer
7946c49fd8 Free resources and error cases; re-indent a curly brace while here.
CID:		1199366
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 21:13:33 +00:00
Christian Brueffer
48a098e360 Add a missing comma between error message definitions.
CID:		1199266
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 18:51:39 +00:00
Nathan Whitehorn
5e1254e13b Apparently some of the i386 boot blocks are so close to full that adding
single lines to ufsread.c spills them over. Duplicate a whole bunch of
code to get file sizes into boot1.efi/boot1.c rather than modifying
ufsread.c.
2014-04-13 14:50:52 +00:00
Alexander Motin
2dfdd4ae19 Join CTL worker threads into one process for convenience.
Report their idle state as "-".
2014-04-13 11:10:36 +00:00
Alexander Motin
3710ae64b9 Report more readable state "-" for idle CAM scan thread. 2014-04-13 11:08:57 +00:00
Nathan Whitehorn
2a11027fd3 Add my copyright here. Most of this is unmodified from the original sparc64
version, but at least some indication of changes that postdate the actual
invention of EFI is probably a good idea.
2014-04-13 06:30:02 +00:00
Nathan Whitehorn
40adc3db02 Fix buildworld. I had some local bits in my build tree that caused this
to work by accident.
2014-04-13 06:24:01 +00:00
Warner Losh
3bdf775801 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
Davide Italiano
2f9e29745c Fix a panic in zfs_rename().
this is due to a wrong dereference of a vnode when it's not locked and
can be (potentially) recycled. 'sdvp' cannot be locked on zfs_rename()
entry point because the VFS can't be sure that this scenario is
LOR-free (it might violate the parent->child lock acquisition rule).
Dereference 'tdvp' instead, which is already locked on entry, and access
'sdvp' fields only when it's safe, i.e. under ZFS_ENTER scope.

While at it, remove the usage of VOP_REALVP, as long as this is a NOP
on FreeBSD.

Discussed with:	avg
Reviewed by:	pjd
2014-04-13 01:15:37 +00:00
Nathan Whitehorn
337bb26472 Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp from
the PowerPC port with all the Open Firmware bits removed and replaced by
their EFI counterparts. On the whole, I think I prefer Open Firmware.

This code is supposed to be an immutable shim that sits on the EFI system
partition, loads /boot/loader.efi from UFS and tells the real loader what
disk/partition to look at. It finds the UFS root partition by the somewhat
braindead approach of picking the first UFS partition it can find. Better
approaches are called for, but this works for now. This shim loader will
also be useful for secure boot in the future, which will require some
rearchitecture.
2014-04-13 01:14:25 +00:00
Rui Paulo
48e3689098 Fix the style of ata_interrupt_locked(). 2014-04-12 23:40:54 +00:00
Davide Italiano
4bc38a5ab0 Hide internal details of sbintime_t implementation wrapping INT64_MAX into
SBT_MAX, to make it more robust in case internal type representation will
change in the future. All the consumers were migrated to SBT_MAX and
every new consumer (if any) should from now use this interface.

Requested by:	bapt, jmg, Ryan Lortie (implictly)
Reviewed by:	mav, bde
2014-04-12 23:29:29 +00:00
Bryan Drewery
97c0df733f Use proper MFSNAMELEN for fs type.
MFC after:	2 weeks
Reviewed by:	rodrigc
Also spotted by:ambrisko
2014-04-12 21:39:17 +00:00
Marcel Moolenaar
4787115d04 Align and round the partitionable disk space to 4K by default.
Since this would also apply when recovering, make sure not to
align or round when that would have a partition fall outside
the partitionable area.
2014-04-12 20:28:39 +00:00
Andrey V. Elsukov
4fd913364f Properly release the in6_multi lock.
MFC after:	1 week
Sponsored by:	Yandex LLC
2014-04-12 02:05:31 +00:00
John Baldwin
b8c8c8c3c7 Some whitespace and style fixes.
Submitted by:	bde
2014-04-11 21:00:59 +00:00
Alexander Motin
1f6b2af297 Remove unused val argument value from SYSCTL_INT() calls. 2014-04-11 20:44:09 +00:00
Sean Bruno
739a93997c Fix insta-panic on assert of unlocked periph mtx in ciss(4) when
logical volume state changes.

Currently, I view this as a critical fix for users and will MFC this rapidly as
my testing has shown data loss when the disk is failed by removing it when
under some amount of write activity and this code panics the box.

Reviewed by:	mav@ scottl@
MFC after:	3 days
Sponsored by:	Yahoo! Inc.
2014-04-11 20:19:01 +00:00
Neel Natu
81d597b736 There is no need to save and restore the host's return address in the
'struct vmxctx'. It is preserved on the host stack across a guest entry
and exit and just restoring the host's '%rsp' is sufficient.

Pointed out by:	grehan@
2014-04-11 20:15:53 +00:00
John Baldwin
2ffb755cec The tw_pcbrele() function does not need the global timewait lock.
Submitted by:	Julien Charbon
Suggested by:	glebius
2014-04-11 19:17:45 +00:00
Alexander Motin
35263d6a48 Improve use of socket buffer upcalls.
Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups
until we have enough data to read or space to write.

Increase partial receive len from 1K to 128K to not wake up on every
received packet.

This significantly reduces locks congestion and CPU usage and improves
throughput for large I/Os on NICs without TSO and LRO.

Reviewed by:	trasz
Sponsored by:	iXsystems, Inc.
2014-04-11 18:26:08 +00:00
Tycho Nightingale
e0f210e6ef Account for the "plus 1" encoding of the CPUID Function 4 reported
core per package and cache sharing values.

Approved by:	grehan (co-mentor)
2014-04-11 18:19:21 +00:00
John Baldwin
9941de49ad Don't leak the TCP pcbinfo lock if a time wait connection is closed
in between grabbing a reference on the connection structure and obtaining
the pcbinfo lock.

Reviewed by:	Julien Charbon
2014-04-11 13:11:43 +00:00
Alexander Motin
f6e1dc83c3 Create zvol devices on zfs clone.
While big and shiny patch is not ready, it is better to have something.

PR:		kern/178999
MFC after:	1 week
2014-04-11 11:56:16 +00:00
Hans Petter Selasky
67eb1bdac2 Correct IMOD default value according to comment.
Reported by:	Daniel O'Connor <doconnor@gsoft.com.au>
MFC after:	1 week
2014-04-11 08:25:54 +00:00
Justin Hibbits
181ca73b1a Small performance optimization. Clobber only cr0, rather than the entire CR.
Discussed with:	rdivacky,nwhitehorn
MFC after:	3 weeks
2014-04-11 06:17:44 +00:00
Marius Strobl
bdc8dbd208 Refine r264257; given that I later on decided to nuke the wildcard for
the Sunix 0x1999 line of chips there actually is no need to explicitly
keep puc(4) from attaching to the single port version anymore.
2014-04-10 21:03:46 +00:00
Peter Grehan
201b1ccc22 Rework r264179.
- remove redundant code
- remove erroneous setting of the error return
  in vmmdev_ioctl()
- use style(9) initialization
- in vmx_inject_pir(), document the race condition
  that the final conditional statement was detecting,

Tested with both gcc and clang builds.

Reviewed by:	neel
2014-04-10 19:15:58 +00:00
Bruce M Simpson
d565e5f206 In if_freemulti(), relax the paranoid KASSERT() on ifma->ifma_protospec.
This KASSERT() existed as a sanity check that upper layers in the network
stack (e.g. inet, inet6) had released their reference to the underlying
driver's multicast memberships (ifmultiaddr{}). However it assumes the
lifecycle of the driver membership corresponds to the lifecycle of the
network layer membership.

In the submitter's case, ieee80211_ioctl_updatemulti() attempts to
reprogram the (parent, physical) ifnet{} memberships in response
to a change in membership on the (child, virtual) VAP ifnet, using
a batched update mechanism. These updates happen independently from
the network layer, causing a "false negative" assertion failure.

There are possibly other use cases where this KASSERT() may be triggered
by other networking stack activity (e.g. where a nesting relationship
exists between multiple ifnet{} instances). This suggests that further
review of FreeBSD's approach to nested ifnet relationships is needed.

MFC after:	6 weeks
Submitted by:	adrian@
2014-04-10 18:43:02 +00:00
John Baldwin
66eefb1eae Currently, the TCP slow timer can starve TCP input processing while it
walks the list of connections in TIME_WAIT closing expired connections
due to contention on the global TCP pcbinfo lock.

To remediate, introduce a new global lock to protect the list of
connections in TIME_WAIT.  Only acquire the TCP pcbinfo lock when
closing an expired connection.  This limits the window of time when
TCP input processing is stopped to the amount of time needed to close
a single connection.

Submitted by:	Julien Charbon <jcharbon@verisign.com>
Reviewed by:	rwatson, rrs, adrian
MFC after:	2 months
2014-04-10 18:15:35 +00:00
Bryan Drewery
1e4b22b44b Fix spelling error in g_trace() call.
Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2014-04-10 17:00:44 +00:00
Ed Maste
7a5f5e3794 Fix EFI loader object tree creation on 9.x build hosts
Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi
subdirectory was skipped altogether for gcc (since GCC does not support
a required attribute).  However, during the early buildworld stages
${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build
hosts), not the compiler that will eventually be used.  This caused
"make obj" to skip the efi subdirectory.  In later build stages
${COMPILER_TYPE} is "clang", and then the efi loader would attempt to
build in the source directory.

Sponsored by:	The FreeBSD Foundation
2014-04-10 16:53:21 +00:00
Alexander Motin
1229e83d2b Fix wrong sizes used to access PD_Type and PD_State DDF metadata fields.
This caused incorrect behavior of arrays with big-endian DDF metadata.
Little-endian (like used by Adaptec controllers) should not be harmed.
Add workaround should be enough to manage compatibility.

MFC after:	2 weeks
2014-04-10 16:00:33 +00:00
Kevin Lo
ed8023f58b Add the Asus USB-N10 NANO.
Tested by:	Kuan-Chung Chiu <buganini@gmail.com>
2014-04-10 14:37:37 +00:00
Alexander Motin
66b92c07fe Do not increment bio_data in case of BIO_DELETE.
This fixes KASSERT() panic in g_io_request().
2014-04-10 10:12:56 +00:00
Steven Hartland
43d0f063c2 Fix build breakage caused by r264295
X-MFC-With: r264295
MFC after:	1 week
2014-04-10 05:04:23 +00:00
David Xu
7d62aec6fe Add kqueue support for devctl.
Reviewed by:	kib,mjg
2014-04-10 02:30:51 +00:00
Alexander Motin
7081bb15b0 Fix three refcounter leaks and lock recursion they covered.
MFC after:	1 week
2014-04-09 19:16:40 +00:00
Sean Bruno
84cb72d1c6 Really, really, really only allow this option for amd64/i386 builds.
Submitted by:	imp@ and tinderbox
2014-04-09 18:44:54 +00:00
Alexander Motin
004008d6e6 Introduce new serialization type CTL_SERIDX_UNMAP.
Unfortunately we can't check range collisions for UNMAP commands alike
to writes, because they include multiple ranges, which are also passed
in data block, not in CDB.  As result, UNMAP commands have to be treated
as colliding with any other command accessing the media.

From the other side all UNMAPs are equal (we don't support ANCHOR flag),
so we can execute several UNMAPs same time.
2014-04-09 10:58:52 +00:00
Alexander Motin
8f5a226a3c When splitting huge unmap requests, do it on sector boundary. 2014-04-09 10:44:09 +00:00
Alexander Motin
b8a8ed5664 Remove support of LUN-based CD changers from cd(4) driver.
This code was heavily broken few months ago during CAM locking changes.
Fixing it would require almost complete rewrite.  Since there are no
known devices on market using this interface younger then ~15 years, and
they are CD, not even DVD, I don't see much reason to rewrite it.

This change does not mean those devices won't work.  They will just work
slower due to inefficient disks load/unload schedule if several LUNs
accessed same time.

Discussed with:	ken@
Silence on:	scsi@, hardware@
MFC after:	1 week
2014-04-09 08:57:57 +00:00
Hans Petter Selasky
a955cde712 Fix for infinite XHCI reset loops when the set address USB request fails.
MFC after:	2 days
2014-04-09 06:27:04 +00:00
Pyun YongHyeon
a173db2d8c Add workaround for MCP61 Ethernet controller found on MSI K9
motherboard.  PHY hardware used for the controller responded at
all possible addresses which in turn resulted in having 32 PHYs
for the controller.  If driver detects "MSI K9N6PGM2-V2 (MS-7309)"
motherboard, tell miibus(4) PHY is located at 0.

Tested by:	Chris H
2014-04-09 05:15:40 +00:00
Adrian Chadd
6ed22fae0a Add a function to check whether the given register can be accessed whilst
the chip is asleep.

It's AR5416 and later specific; I'll add a HAL method to generalise it
later.

Tested:

* AR5416, STA mode
2014-04-09 03:51:05 +00:00
Sean Bruno
4ab550cafe Spell imgact_binmisc correctly 2014-04-09 03:46:04 +00:00
Peter Wemm
eccee15da4 Bump osreldate for tracking SA-14:06 2014-04-09 01:26:58 +00:00
Alexander Motin
7e0be0226f Another fix for r264274. Last moment cosmetic changes are evil! 2014-04-08 22:36:39 +00:00