75428 Commits

Author SHA1 Message Date
Konstantin Belousov
c32fbf547b MFC r207847:
For detach procfs ctl command, also clear P_STOPPED_TRACE process stop
flag, and for each thread, TDB_SUSPEND debug flag, same as it is done by
exit1() for orphaned debugee.
2010-05-17 08:11:23 +00:00
Rick Macklem
e6c7d81538 MFC: r207785
Fix typos in macros.
2010-05-17 02:01:22 +00:00
Rick Macklem
4406606105 MFC: r207764
Patch the experimental NFS client so that it works for NFSv2
by adding the necessary mapping from NFSv3 procedure numbers
to NFSv2 procedure numbers when doing NFSv2 RPCs.
2010-05-17 01:41:11 +00:00
Randall Stewart
b5889e7a0d MFC 207985
Fix an old long time bug in generating a
 fwd-tsn. This would appear when greater than
 the size of mbuf TSN's would need to be skipped.
2010-05-16 16:52:56 +00:00
Randall Stewart
31bd7e42f9 MFC 207983
More PR-SCTP bugs:
   - Make sure that when you kick the streams you add correctly
     using a 16 bit unsigned.
   - Make sure when sending out you allow FWD-TSN to skip over
     and list the ACKED chunks in the stream/seq list (so the
     rcv will kick the stream)
2010-05-16 16:51:44 +00:00
Randall Stewart
d536af657c MFC 207966 (for Michael)
Get rid of unused constants.
2010-05-16 16:50:33 +00:00
Randall Stewart
c7a8100b47 MFC of 207963
This fixes PR-SCTP issues:
  - Slide the map at the proper place.
  - Mark the bits in the nr_array ONLY if there
    is no marking.
  - When generating a FWD-TSN we allow us to skip past
    ACKED chunks too.
2010-05-16 16:45:49 +00:00
Randall Stewart
93c3efa7cf MFC of 207924:
This fixes a bug with the one-2-one model socket when a
user sets up a socket to a server sends data and closes
the socket before the server has called accept(). It used
to NOT work at all. Now we add a flag to the assoc and
defer assoc cleanup so that the accept will succeed
2010-05-16 16:42:52 +00:00
Marko Zec
49856a78b5 MFC r208036:
Increase the target buffer for performing NGM_ASCII2BINARY conversion
  from 2000 bytes to 20 Kbytes, which now matches the buffer size used for
  NGM_BINARY2ASCII conversions.

  The aim of this change is to allow for bigger binary structures to be
  managed via netgraph ASCII messages, until we come up with an API
  improvement which would get rid of such arbitrary hardcoded limits.
2010-05-16 14:53:43 +00:00
Marko Zec
7c8102300a MFC r207680:
Add an optional "persistent" flag to ng_hub and ng_bridge, which if set,
  disables automatic node shutdown when the last hook gets disconnected.

  Reviewed by:  julian
2010-05-16 14:51:36 +00:00
Martin Matuska
1f0799c218 MFC r207481, r207956:
MFC r207481 [1]:
Add sysctl and loader tunable vfs.zfs.txg.write_limit_override.
This tunable improves fine-tuning of ZFS write throttling.

MFC r207956 [2]:
Fix possible hang when replaying large truncations.
OpenSolaris onnv revision:	7904:6a124a4ca9c5

PR:		kern/146108 [1]
Suggested by:	Nikolay Denev <ndenev at gmail.com> [1]
Obtained from:	OpenSolaris (Bug ID 6761624) [2]
Approved by:	pjd, delphij (mentor)
2010-05-15 07:07:38 +00:00
Jack F Vogel
70defa90ed Missing fix in lem code to limit WOL to MAGIC,
and made code backward compatible to 7.3 with
conditionals around the buf_ring_free call.
2010-05-14 22:20:58 +00:00
Marius Strobl
331316e3a9 MFC: r207885
Include <machine/ofw_machdep.h> for OF_getscsinitid().
2010-05-14 19:18:07 +00:00
Marius Strobl
b3b31bee14 MFC: r207585
- Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES
  on Cassini using the external PCS SERDES otherwise unaligned access
  traps and other strange effects happen with some machines. Don't touch
  the MIF which is unused in that case either. These changes require the
  PHY type to use to be determined via the OFW device tree or from the
  VPD in machines without the former.
- Disable the SERDES pins of Saturn when not used in order to save power
  and ensure they are enabled otherwise.
- In cas_attach() use the correct register offset for CAS_PCS_CONF_EN.
- Add some bus space barriers missing in the PCS code path.

These changes make the Sun GigaSwift Ethernet 1.0 MMF cards as well as
the on-board interfaces found in Sun Fire B100s Blade Server work.

PR:	144867
2010-05-14 19:11:41 +00:00
Fabien Thomas
7835cb170d MFC r207761 partially:
Add a fastpath to allocate from packet zone when using m_getjcl.
 This will add support for packet zone for at least igb and ixgbe.
2010-05-14 13:48:11 +00:00
Martin Matuska
06dad5a31f MFC r207909, r207910, r207911:
MFC r207909:
Fix zfs rename (may occasionally fail with dataset busy).
OpenSolaris onnv revision:	8517:41a0783dde17

MFC r207910:
Fix possible panic with zfs destroy.
OpenSolaris onnv revision:	8779:f164e0e90508

MFC r207911:
Fix failed assertion on destroying datasets from an older pool version.
OpenSolaris onnv revision:	9390:887948510f80

PR:		kern/146471
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6784757, 6784924, 6826861)
2010-05-14 09:50:28 +00:00
Martin Matuska
2523745f14 MFC r207908:
Fix endianess bug in ZFS intent log (ZIL).

OpenSolaris onnv revision:	8109:6147a1bdd359

Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6760048)
2010-05-14 09:06:49 +00:00
Martin Matuska
5d0b90ebf4 MFC r207427:
Fix improper pool write throughput calculation.

OpenSolaris onnv revision:	9366:17553395a745

PR:		kern/146108
Obtained from:	OpenSolaris (Bug ID 6817339)
Approved by:	pjd, delphij (mentor)
2010-05-14 09:00:29 +00:00
Attilio Rao
7b7fb4910e MFC r206878, r206897, r207921:
Fix a deadlock in the shutdown code when some CPUs are performing
smp_rendezvous() (or smp_tlb_shootdown()) and are waiting for
acknowledgment.
2010-05-14 01:43:13 +00:00
Konstantin Belousov
04b7b96b05 MFC r206814 (by alc):
Remove a nonsensical test from vm_pageout_clean().  A page can't be in the
inactive queue and have a non-zero wire count.
2010-05-13 20:31:24 +00:00
Konstantin Belousov
1f93868d76 MFC elimination of several settings of PG_REFERENCED bit, that either
do not make sense or are harmful.

MFC r206761 (by alc):
Setting PG_REFERENCED on the requested page in swap_pager_getpages() is
either redundant or harmful, depending on the caller.

MFC r206768 (by alc):
In vm_object_backing_scan(), setting PG_REFERENCED on a page before
sleeping on that page is nonsensical.

MFC r206770 (by alc):
In vm_object_madvise() setting PG_REFERENCED on a page before sleeping on
that page only makes sense if the advice is MADV_WILLNEED.

MFC r206801 (by alc):
There is no justification for vm_object_split() setting PG_REFERENCED on a
page that it is going to sleep on.
2010-05-13 20:26:16 +00:00
Konstantin Belousov
ef7b0ac47b MFC r207365:
When doing kstack swapin, read as much pages in one run as possible.
2010-05-13 18:17:01 +00:00
Konstantin Belousov
83d6c6d862 MFC r206545 (by alc):
Simplify vm_thread_swapin().

Approved by:	alc
2010-05-13 18:12:44 +00:00
Navdeep Parhar
63ae3fec8b MFC r207639, r207643, r207687, r207688
r207639: Add IFCAP_LINKSTATE to cxgb
r207643: T3 hardware filters + cxgbtool interface to this functionality.
r207687: if_cxgb should not depend on the T3 firmware module directly.
r207688: various doorbell adjustments
2010-05-13 17:45:32 +00:00
Konstantin Belousov
e6ca6764e8 MFC r207364:
In swap pager, do not free the non-requested pages from the run if they are
wired. Kstack pages are wired, this change prepares swap pager for handling
of long runs of kstack pages.
2010-05-13 09:26:31 +00:00
Pyun YongHyeon
afe8083a9d MFC r207763:
Don't change PCIe maximum read request size to 2048 on RTL810x
  controllers. It caused device timeouts.

  Reported by:	McLone < mclone <> gmail dot com >
  Tested by:	McLone < mclone <> gmail dot com >
2010-05-12 17:18:07 +00:00
Pyun YongHyeon
f1702973fc MFC r207748:
It seems controller has two types of promiscuous control, one for
  unicast and the other for multicast. To receive multicast frames
  that host didn't join in promiscuous mode, driver have to set
  promiscuous mode for multicast frames as well.
  The Open Source Software Developer Manual for i8255x was not clear
  how to handle promiscuous mode.

  PR:		kern/145905
2010-05-12 17:07:19 +00:00
VANHULLEBUS Yvan
6a7674ccb2 MFC:
Set/update SA's NAT-T stuff before calling key_mature() in
key_add() and key_update(), as the SA may be used as soon as
key_mature() has been called

Obtained from: NETASQ
2010-05-12 11:49:15 +00:00
Konstantin Belousov
eb77a08756 MFC r207676:
Add definitions for Intel AESNI CPUID bits and print the capabilities
on boot.
2010-05-12 09:34:10 +00:00
Bernhard Schmidt
19e9dc44f7 MFC r207709:
Add a workaround for a bug in the firmware regarding the transition
from passive to active scans. Basicly disable it by increasing the
amount packets to be received to an amount which can't be reached
during dwell times.

Approved by:	rpaulo (mentor)
2010-05-11 17:21:54 +00:00
Konstantin Belousov
fae5687b8a MFC r207605:
Remove a comment that merely repeats code.
2010-05-11 13:35:35 +00:00
Konstantin Belousov
e11f17f35e MFC r207603
Use td_rux.rux_runtime for ki_runtime instead of redoing calculation.

MFC r207659:
Fix a mistake in r207603. td_rux.rux_runtime still needs conversion.
2010-05-11 13:33:37 +00:00
Konstantin Belousov
c193de568b MFC r207468:
Extract thread_lock()/ruxagg()/thread_unlock() fragment into utility
function ruxagg_tlock().
Convert the definition of kern_getrusage() to ANSI C.

MFC r207602:
Implement RUSAGE_THREAD. Add td_rux to keep extended runtime and ticks
information for thread to allow calcru1() (re)use.

Rename ruxagg()->ruxagg_locked(), ruxagg_tlock()->ruxagg() [1].
The ruxagg_locked() function no longer clears thread ticks nor
td_incruntime.

Not an MFC: the td_rux is added to the end of struct thread to keep
the KBI. Explicit bzero() of td_rux is added to new thread initialization
points.
2010-05-11 13:18:41 +00:00
Konstantin Belousov
56c035f313 MFC r207600:
Move definition of struct rusage_ext before struct thread.
2010-05-11 12:07:40 +00:00
Konstantin Belousov
304f5b4d40 MFC r207268:
Provide 32bit compat for SIOCGDEFIFACE_IN6.
2010-05-11 11:53:10 +00:00
Rui Paulo
82878b1182 MFC r206367, r206358, r206370, r206371, r206372, r206398, r206415,
r206416, r206417, r206418, r206418:

net80211 ratectl framework.
2010-05-11 11:08:15 +00:00
Martin Matuska
a37f3fad10 MFC r207624:
Fix deadlock during zfs receive.

OpenSolaris onnv revision:	9299:8809e849f63e

PR:		kern/146296
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6783818, 6826836)
2010-05-11 07:02:29 +00:00
Marius Strobl
7c74f96a6a MFC: r207683
- Fix broken symlinks on cross platform zfs send/recv. [1]
- Enable zfs_ace_byteswap() on FreeBSD as it works just fine (tested between
  amd64 and sparc64 in both directions by Michael Moll).

PR:		146272
Approved by:	mm, pjd
Obtained from:	OpenSolaris (onnv rev. 8283:1ca59f393041; Bug ID 6764193) [1]
2010-05-10 20:55:24 +00:00
Marius Strobl
d526c88ff1 MFC: r207570
On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.
2010-05-10 20:34:16 +00:00
Marius Strobl
f02c4538bc MFC: r207537
Add support for SPARC64 V (and where it already makes sense for other
HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the
MMU and cache handling, it doesn't add pmap optimizations possible with
these CPU, yet, though.
With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250
and likely also other models based on SPARC64 V like 450, 650 and 850.
Thanks go to Michael Moll for providing access to a PRIMEPOWER 250.
2010-05-10 20:25:51 +00:00
Marius Strobl
7b2587b9ea MFC: r207533 (partial)
Remove redundant checking of sc_leaving (uart_intr() already handles this).
2010-05-10 20:15:39 +00:00
Marius Strobl
fe353091cd MFC: r207532
Remove a soft member which was never used.
2010-05-10 20:10:45 +00:00
Pyun YongHyeon
4dd3847da5 MFC r207622-207623,207638
r207622:
  Drop driver lock before exiting from interrupt handler.

r207623:
  Make sure to check whether driver is running before processing
  received frames. Also check driver has valid ifp pointer before
  calling msk_stop() in device_shutdown handler. While I'm here
  remove unnecessary accesses to interrupt mask registers in
  device_shutdown handler because driver puts the controller into
  reset state.
  With these changes, msk(4) now survive from heavy RX traffic(1byte
  UDP frame) while reboot is in progress.

r207638:
  When VLAN hardware tagging is disabled, make sure to disable VLAN
  checksum offloading as well as TSO over VLAN.
2010-05-10 20:01:51 +00:00
Pyun YongHyeon
862e7d9d59 MFC r207628,207635:
r207628:
  Enable multi-descriptor transmisstion for fragmented mbufs. There
  is no more need to defragment mbufs. After transmitting the
  multi-fragmented frame, the controller updates only the first
  descriptor of multi-descriptor transmission so it's driver's
  responsibility to clear OWN bits of remaining descriptor of
  multi-descriptor transmission. It seems the controller behaves much
  like jme(4) controllers in descriptor handling.

r207635:
  Free entire mbuf chain instead of the first mbuf.
2010-05-10 19:47:37 +00:00
Jung-uk Kim
c4879659eb MFC: r207330, r207620
- Remove dead code.  Calculated greatest common divisor was not used at all.
- Prefer u_int32_t over unsigned int to make its intention more clearer.
- Move the function to a header file and make it a static inline function.
2010-05-10 19:21:50 +00:00
Marius Strobl
88b965f3c8 MFC: r207500
Add a hack for SPARC64 V CPUs, which set some undocumented bits in the
first data word.
2010-05-10 19:02:21 +00:00
Marius Strobl
b1aecaf73f MFC: r207287
On sparc64 obtain the initiator ID to be used for SPI HBAs from the
Open Firmware device tree in order to match what the PROM built-in
driver uses. This is especially important when netbooting Fujitsu
Siemens PRIMEPOWER250 as in that case the built-in driver isn't used
and the port facts PortSCSIID defaults to 0, conflicting with the
disk at the same address.
2010-05-10 18:56:36 +00:00
Marius Strobl
2322c15734 MFC: r207286
Replace a magic value with the appropriate macro.
2010-05-10 18:54:58 +00:00
Marius Strobl
b867320bf3 MFC: r207285
- On sparc64 obtain the initiator ID from the Open Firmware device tree
  in order to match what the PROM built-in driver uses.
- Remove some no longer used includes.
2010-05-10 18:53:32 +00:00
Marius Strobl
07805b83b9 MFC: r207281
Take advantage of OF_getscsinitid().
2010-05-10 18:51:49 +00:00