Commit Graph

86669 Commits

Author SHA1 Message Date
Gleb Smirnoff
a856ddc665 After r228571 carp_output() expects carp_softc * pointer in the mtag.
Noticed by:	thompsa
2012-05-30 07:11:27 +00:00
Alan Cox
a2efa4249e Eliminate some purely stylistic differences among the amd64, i386 native,
and i386 xen PV entry allocators.
2012-05-30 04:16:54 +00:00
Eitan Adler
30563ab45e Add support for newer garmin devices
PR:		kern/163932
Submitted by:	Bartosz Fabianowski <freebsd@chillt.de>
Approved by:	cperciva
MFC after:	1 week
2012-05-30 03:50:58 +00:00
Eitan Adler
d9b73ea9cf Add support for Sun 1040 PCI Quad Serial
PR:		kern/163450
Submitted by:	Anonymous Hardware Hacker <silicium@harmony-p.ath.cx>
Approved by:	cperciva
MFC after:	1 week
2012-05-30 03:47:51 +00:00
Jung-uk Kim
9b7d4a7f2d Fix style(9) nits, reduce unnecessary type castings, etc., for bpf_setf(). 2012-05-29 22:28:46 +00:00
Jung-uk Kim
8b04b48a7d - Save the previous filter right before we set new one.
- Reduce duplicate code and make it little easier to read.

MFC after:	2 weeks
2012-05-29 22:21:53 +00:00
Luigi Rizzo
4e7dc6ecbb add support to build netmap as a module,
but for the time being keep it disconnected from the main build.

MFC after:	3 days
2012-05-29 19:55:07 +00:00
Jung-uk Kim
6f731135ac Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
and reset statistics as it should.

MFC after:	3 days
2012-05-29 18:44:53 +00:00
Pawel Jakub Dawidek
97e9ad8ec4 Tighten up the assertion: because size can't be 0 and even if sm_space is equal
to sm_size, any 'sm_space - size' will be less than sm_size.

MFC after:	3 days
2012-05-29 18:11:45 +00:00
Pawel Jakub Dawidek
837a617728 Eliminate 'where' argument, we don't use it.
MFC after:	3 days
2012-05-29 18:09:14 +00:00
Pawel Jakub Dawidek
8ac2669cc8 Remove unused variable.
MFC after:	3 days
2012-05-29 18:05:24 +00:00
Pawel Jakub Dawidek
e21c77d804 Remove unused sysctl.
MFC after:	3 days
2012-05-29 17:53:11 +00:00
Robert Noland
cf864f03b6 Add device ids for the Winbond 83627DHG-P chip and set the registers to
trigger the keyboard reset line on timeout.

Reviewed by:	bz
MFC after:	1 week
2012-05-29 16:39:42 +00:00
Robert Noland
63fb0bb621 Fix a typo in wbwd so that CRF5 is actually written to the data register
rather than the index register.

Reviewed by:	bz
MFC after:	3 days
2012-05-29 16:25:01 +00:00
Alan Cox
0490d34982 MFi386 pmap r233433
Disable detailed PV entry accounting by default.  (A config option for
  enabling it was already introduced in r233433.)
2012-05-29 16:11:15 +00:00
Hans Petter Selasky
58a9da85fe Add quirk for Marvell based AHCI controller.
MFC after:	3 days
Suggested by:	mav @
2012-05-29 15:56:30 +00:00
Alan Cox
6516bffdef Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no
longer uses the active and inactive paging queues.  Instead, the pmap now
maintains an LRU-ordered list of pv entry pages, and pmap_pv_reclaim() uses
this list to select pv entries for reclamation.

Note: The old pmap_collect() tried to avoid reclaiming mappings for pages
that have either a hold_count or a busy field that is non-zero.  However,
this isn't necessary for correctness, and the locking in pmap_collect() was
insufficient to guarantee that such mappings weren't reclaimed.  The new
pmap_pv_reclaim() doesn't even try.

Tested by:	sbruno
MFC after:	5 weeks
2012-05-29 15:41:20 +00:00
Alexander Motin
7dc3213da1 Allow to change number of openings (used tags) for ATA/SATA devices
via `camcontrol tags ... -N ...`.  There is no need to tune it in
usual cases, but some users want to have it for debugging purposes.

MFC after:	2 weeks
2012-05-29 14:28:46 +00:00
Alexander V. Chernikov
a86227d176 Fix BPF_JITTER code broken by r235746.
Pointed by:       jkim
Reviewed by:      jkim (except locking changes)
Approved by:      (mentor)
MFC after:        2 weeks
2012-05-29 12:52:30 +00:00
Alexander Motin
2e3f592b09 Plug request and references leak caused by race between invalidated
ond probe periph destruction and new incoming probe request.

This at least caused problems with SATA Port Multipliers hot-plug.

MFC after:	2 weeks
2012-05-29 11:22:40 +00:00
Mitsuru IWASAKI
e3b56b6604 Reorder resume procedures.
DEVICE_RESUME() should be done before AcpiLeaveSleepState() because
PCI config space evaluation can be occurred during control method
executions.

This should fix one of the hang up problems on resuming.

MFC after:	3 days
2012-05-29 05:28:34 +00:00
Mitsuru IWASAKI
ffe3f1f8cc Fix the problem acpi_sleep_force() hang.
Suspending from callout cause the freeze in DEVICE_SUSPEND().
Suspend from acpi_task thread in stead.

MFC after:	3 days
2012-05-29 05:09:40 +00:00
Warner Losh
c414207ab0 Compute the master clock frequency, so we no longer need to have it
compiled into the kernel.  This allows us to boot the same kernel on
machines with different master clock frequencies, so long as we can
determine the main clock frequency accurately.  Cleanup the pmc clock
init function so it can be called in early boot so we can use the
serial port just after we call cninit.

# We have two calls to at91_pmc_clock_init for reasons unknown, that will
# be fixed later -- it is harmless for now.
2012-05-29 03:23:18 +00:00
Alan Cox
b10ed4a911 Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.c.  This new r/w lock is used primarily to synchronize access
to the TTE lists.  However, it will be used in a somewhat unconventional
way.  As finer-grained TTE list locking is added to each of the pmap
functions that acquire this r/w lock, its acquisition will be changed from
write to read, enabling concurrent execution of the pmap functions with
finer-grained locking.

Reviewed by:	attilio
Tested by:	flo
MFC after:	10 days
2012-05-29 01:52:38 +00:00
Kevin Lo
544c5e5b53 Make sure that each va_start has one and only one matching va_end,
especially in error cases.
2012-05-29 01:48:06 +00:00
Andrew Gallatin
bebda077b1 Update mxge(4) firmware to the latest version available from
Myricom (1.4.55).

MFC after:	3 days
Sponored by: Myricom, Inc.
2012-05-29 00:53:51 +00:00
Alan Cox
2444cf8fd0 A small simplification to i915_gem_pager_fault().
Reviewed by:	kib
2012-05-28 21:15:54 +00:00
Marius Strobl
577554bf92 - Correct the comments regarding the sizes of some partitions in the
DataFlash.
- Add a mapping for the Nut/OS configuration DataFlash partition according
  to the board manual (but not known to either Linux or U-Boot (patches).
2012-05-28 17:58:10 +00:00
Alan Cox
4edfd622b5 Update a comment in get_pv_entry() to reflect the changes to the
synchronization of pv_vafree in r236158.
2012-05-28 17:35:23 +00:00
Marcel Moolenaar
e9b29d1604 Catch a corner case where ssegs could be 0 and thus i would be 0 and
we index suinfo out of bounds (i.e. -1).

Approved by:	gber
2012-05-28 16:33:58 +00:00
Alexander Motin
4cfe4ccf16 Make legacy ATA to not call device_add_child() with unit number but
without driver name. This fixed legacy ATA breakage by r235978.

MFC after:	1 week
2012-05-28 14:33:15 +00:00
Konstantin Belousov
46932515ac Disable end of buffer fixup by default. New DDX does not need this, and
since batch_len is unused by Linux driver, it seems that it is sometimes
gets passed wrong. This causes command buffer corruption and GPU hung.

Old GEMified DDX drivers that needs this workaround are not supported.

MFC after:	1 month
2012-05-28 13:58:08 +00:00
Konstantin Belousov
886add7764 Fix calculation of the execution buffer end in the mapped pages
when it is spilled into the next page.

MFC after:	1 month
2012-05-28 13:55:49 +00:00
Eygene Ryabinkin
f74d5a7a20 if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row
Currently, 'ifconfig laggX down' does not remove members from this
lagg(4) interface.  So, 'service netif stop laggX' followed by
'service netif start laggX' will choke, because "stop" will leave
interfaces attached to the laggX and ifconfig from the "start" will
refuse to add already-existing interfaces.

The real-world case is when I am bundling together my Ethernet and
WiFi interfaces and using multiple profiles for accessing network in
different places: system being booted up with one profile, but later
this profile being exchanged to another one, followed by 'service
netif restart' will not add WiFi interface back to the lagg: the
"stop" action from 'service netif restart' will shut down my main WiFi
interface, so wlan0 that exists in the lagg0 will be destroyed and
purged from lagg0; the "start" action will try to re-add both
interfaces, but since Ethernet one is already in lagg0, ifconfig will
refuse to add the wlan0 from WiFi interface.

Since adding the interface to the lagg(4) when it is already here
should be an idempotent action: we're really not changing anything,
so this fix doesn't change the semantics of interface addition.

Approved by: thompsa
Reviewed by: emaste
MFC after: 1 week
2012-05-28 12:13:04 +00:00
Bjoern A. Zeeb
356ab07e2d It turns out that too many drivers are not only parsing the L2/3/4
headers for TSO but also for generic checksum offloading.  Ideally we
would only have one common function shared amongst all drivers, and
perhaps when updating them for IPv6 we should introduce that.
Eventually we should provide the meta information along with mbufs to
avoid (re-)parsing entirely.

To not break IPv6 (checksums and offload) and to be able to MFC the
changes without risking to hurt 3rd party drivers, duplicate the v4
framework, as other OSes have done as well.

Introduce interface capability flags for TX/RX checksum offload with
IPv6, to allow independent toggling (where possible).  Add CSUM_*_IPV6
flags for UDP/TCP over IPv6, and reserve further for SCTP, and IPv6
fragmentation.  Define CSUM_DELAY_DATA_IPV6 as we do for legacy IP and
add an alias for CSUM_DATA_VALID_IPV6.

This pretty much brings IPv6 handling in line with IPv4.
TSO is still handled in a different way and not via if_hwassist.

Update ifconfig to allow (un)setting of the new capability flags.
Update loopback to announce the new capabilities and if_hwassist flags.

Individual driver updates will have to follow, as will SCTP.

Reported by:	gallatin, dim, ..
Reviewed by:	gallatin (glanced at?)
MFC after:	3 days
X-MFC with:	r235961,235959,235958
2012-05-28 09:30:13 +00:00
Tim Kientzle
81174e7872 Allow the load address used by ARM ubldr to be set via Make argument.
In particular, this simplifies scripts that build system
images.
2012-05-27 16:27:04 +00:00
Alan Cox
8b0f4e0a0d Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.c.  This new r/w lock is used primarily to synchronize access
to the PV lists.  However, it will be used in a somewhat unconventional
way.  As finer-grained PV list locking is added to each of the pmap
functions that acquire this r/w lock, its acquisition will be changed from
write to read, enabling concurrent execution of the pmap functions with
finer-grained locking.

X-MFC after:	r236045
2012-05-27 16:24:00 +00:00
Ed Maste
0615959a81 Add IPPROTO_MPLS (rfc4023) IP protocol definition
There are currently no in-tree consumers; I'm adding it now for use by
vendor code.  This matches the change OpenBSD made while implementing
MPLS in gif(4).
2012-05-27 16:16:28 +00:00
Marius Strobl
0554fd516f - Fix some typos in mmc_acquire_bus() and mmc_send_csd().
- Fix some math errors in mmc_decode_csd_sd().
- Fix incorrect arguments to mmc_send_app_op_cond() in mmc_go_discovery().
- Add reporting of CSD for debug purposes.
- Add detection (and skipping) of password-locked cards.
- Add setting of block length on card if necessary.

Submitted by:	Patrick Kelsey
MFC after:	3 days
2012-05-27 16:08:58 +00:00
Martin Matuska
2182d44714 Import illumos changeset 13570:3411fd5f1589
1948 zpool list should show more detailed pool information

Display per-vdev information with "zpool list -v".
The added expandsize property has currently no value on FreeBSD.
This changeset allows adding expansion support to individual vdevs
in the future.

References:
https://www.illumos.org/issues/1948

Obtained from:	illumos (issue #1948)
MFC after:	2 weeks
2012-05-27 16:00:00 +00:00
Martin Matuska
d9727dc29c Import illumos changeset 13605:b5c2b5db80d6 (partial)
763 FMD msg URLs should refer to something visible

Replace sun.com URL's with illumos.org

References:
https://www.illumos.org/issues/763

Obtained from:	illumos (issue #763)
MFC after:	1 week
2012-05-27 12:31:57 +00:00
Rafal Jaworowski
b504a44a4b Remove redundant check, we catch ULE platform support in common
sys/kern/sched_ule.c
2012-05-27 10:32:10 +00:00
Rafal Jaworowski
17f4cae4a5 Let us manage differences of Book-E PowerPC variations i.e. vendor /
implementation specific vs. the common architecture definition.

Bring PPC4XX defines (PSL, SPR, TLB). Note the new definitions under
BOOKE_PPC4XX are not used in the code yet.

This change set is not supposed to affect existing E500 support, it's just
another reorg step before bringing support for E500mc, E5500 and PPC465.

Obtained from:	AppliedMicro, Freescale, Semihalf
2012-05-27 10:25:20 +00:00
Ed Schouten
0078e2fdeb Fix style and consistency:
- Use tabs, not spaces.
- Add tab after #define.
- Don't mix the use of BSD and ISO C unsigned integer types. Prefer the
  ISO C ones.
2012-05-27 09:34:47 +00:00
Kenneth D. Merry
c552ebe12d Work around a race condition in devfs by changing the way closes
are handled in most CAM peripheral drivers that are not handled by
GEOM's disk class.

The usual character driver open and close semantics are that the
driver gets N open calls, but only one close, when the last caller
closes the device.

CAM peripheral drivers expect that behavior to be honored to the
letter, and the CAM peripheral driver code (specifically
cam_periph_release_locked_busses()) panics if it is done incorrectly.

Since devfs has to drop its locks while it calls a driver's close
routine, and it does not have a way to delay or prevent open calls
while it is calling the close routine, there is a race.

The sequence of events, simplified a bit, is:

- devfs acquires a lock
- devfs checks the reference count, and if it is 1, continues to close.
- devfs releases the lock

- 2nd process open call on the device happens here

- devfs calls the driver's close routine

- devfs acquires a lock
- devfs decrements the reference count
- devfs releases the lock

- 2nd process close call on the device happens here

At the second close, we get a panic in
cam_periph_release_locked_busses(), complaining that peripheral
has been released when the reference count is already 0.  This is
because we have gotten two closes in a row, which should not
happen.

The fix is to add the D_TRACKCLOSE flag to the driver's cdevsw, so
that we get a close() call for each open().  That does happen
reliably, so we can make sure that our reference counts are
correct.

Note that the sa(4) and pt(4) drivers only allow one context
through the open routine.  So these drivers aren't exposed to the
same race condition.

scsi_ch.c,
scsi_enc.c,
scsi_enc_internal.h,
scsi_pass.c,
scsi_sg.c:
		For these drivers, change the open() routine to
		increment the reference count for every open, and
		just decrement the reference count in the close.

		Call cam_periph_release_locked() in some scenarios
		to avoid additional lock and unlock calls.

scsi_pt.c:	Call cam_periph_release_locked() in some scenarios
		to avoid additional lock and unlock calls.

MFC after:	3 days
2012-05-27 06:11:09 +00:00
Konstantin Belousov
371778a333 Fix ki_cow for compat32 binaries.
MFC after:	3 days
2012-05-27 05:24:53 +00:00
Bjoern A. Zeeb
c69baa7e91 Correctly get the payload length in host byte order. While we
already plan to support >64k payload here, the IPv6 header payload
length obviously is only 16 bit and the calculations need to be right.

Reported by:	dim
Tested by:	dim
MFC after:	1 day
X-MFC:		with r235958
2012-05-26 23:58:51 +00:00
Rafal Jaworowski
53a123e516 Import eSDHC driver for Freescale integrated controller.
Obtained from:	Freescale, Semihalf
Written by:	Michal Dubiel
2012-05-26 21:07:15 +00:00
Rafal Jaworowski
c49504be41 Import EHCI attachment driver for Freescale integrated controller.
Obtained from:	Freescale, Semihalf.
Written by:	Michal Dubiel
2012-05-26 21:05:11 +00:00
Rafal Jaworowski
0a67fa33d6 Move OpenPIC FDT bus glue to a shared location, so that other PowerPC
platforms can use it, not only MPC85XX.

This is just reorg, no functional changes.
2012-05-26 21:02:49 +00:00