Commit Graph

151338 Commits

Author SHA1 Message Date
Marius Strobl
4ee4735187 MFC: r206490, r206492
While SPARC V9 allows tininess to be detected either before or after
rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and
UltraSPARC processors defines that in all cases tininess is detected
before rounding therefore rounding up to the smallest normalized number
should set the underflow flag. This change is needed for using SoftFloat
on sparc64 for reference purposes.

PR:		144900
Submitted by:	Peter Jeremy
2010-05-02 16:52:23 +00:00
Marius Strobl
951139bba8 MFC: r206480
Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs.
2010-05-02 16:47:50 +00:00
Marius Strobl
9582607bb5 MFC: r206450
Correct the DCR_IPE macro to refer to the right bit. Also improve the
associated comment as besides US-IV+ these bits are only available with
US-III++, i.e. the 1.2GHz version of the US-III+.
2010-05-02 16:46:20 +00:00
Marius Strobl
2cf37e65a3 MFC: r206449
Unlike the sun4v variant, the sun4u version of SUNW,set-trap-table
actually only takes one argument.
2010-05-02 16:45:08 +00:00
Marius Strobl
4d9e1e3e1f MFC: r206448
Do as the comment suggests and determine the bus space based on the last
bus we actually mapped at rather than always based on the last bus we
encountered while moving upward in the tree. Otherwise we might use the
wrong bus space in case the bridge directly underneath the nexus doesn't
require mapping, i.e. was skipped as it's the case for ssm(4) nodes.
2010-05-02 16:40:18 +00:00
Bjoern A. Zeeb
6419e07f19 MFC r207278:
MFP4: @177254

  Add missing CURVNET_RESTORE() calls for multiple code paths, to stop
  leaking the currently cached vnet into callers and to the process.

Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
2010-05-02 16:39:15 +00:00
Bjoern A. Zeeb
7f6b24dccf MFC r207277:
Enhance the historic behaviour of raw sockets and jails in a way
  that we allow all possible jail IPs as source address rather than
  forcing the "primary". While IPv6 naturally has source address
  selection, for legacy IP we do not go through the pain in case
  IP_HDRINCL was not set. People should bind(2) for that.

  This will, for example, allow ping(|6) -S to work correctly for
  non-primary addresses.

  Reported by:  (ten 211.ru)
  Tested by:    (ten 211.ru)
2010-05-02 16:36:15 +00:00
Bjoern A. Zeeb
6377d38081 MFC r207276:
Make sure IPv6 source address selection does not change interface
  addresses while walking the IPv6 address list if in the jail case
  something is connecting to ::1.

  Reported by:  Pieter de Boer (pieter thedarkside.nl)
  Tested by:    Pieter de Boer (pieter thedarkside.nl)
2010-05-02 16:32:41 +00:00
Bjoern A. Zeeb
bca61398fd MFC r207116:
Remove one zero from the double-0.
  This code doesn't have a license to kill.
2010-05-02 15:58:25 +00:00
Bjoern A. Zeeb
8b5076c9df MFC r206989:
Avoid memory access after free.  Use the (shortend) copy for the
  ipsec mtu lookup as well.

PR:		kern/145736
Submitted by:	Peter Molnar (peter molnar.cc)
2010-05-02 15:55:29 +00:00
Jilles Tjoelker
f4eb99be97 MFC r207189: symlink(7): Add lpathconf(2) and *at system calls. 2010-05-02 13:36:23 +00:00
Alexander Motin
467965c629 MFC r207222:
Move PI_TAG_ABLE check from ada driver to ATA XPT.
2010-05-02 12:50:29 +00:00
Alexander Motin
9171d4b736 MFC r206652:
Explicitly enable PCI busmastering on attach.
Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100).
2010-05-02 12:45:22 +00:00
Alexander Motin
f40596ef9c MFC r205358:
Enable MSI by default for SiI3124.
2010-05-02 12:44:11 +00:00
Jilles Tjoelker
e96d10e414 MFC r207188: symlink(7): The ownership of symlinks is used by the system,
in at least three ways, so do not say it is ignored:
* who may delete/rename a symlink in a sticky directory
* who may do lchflags(2)/lchown(2)/lchmod(2)
* whose inode quota is charged
2010-05-02 12:43:18 +00:00
Alexander Motin
dd6a149269 MFC r207221:
Mark ATA channel as idle on timeout in non-ATA_CAM mode.
This should fix possible duplicate request completion.
2010-05-02 12:40:54 +00:00
Alexander Motin
20151ecd2e MFC r206604:
For early ALI chips do not announce I/O sizes that require unsupported
48bit DMA commands.
2010-05-02 12:39:29 +00:00
Jilles Tjoelker
03da203042 MFC r207187: kvm(3): Mention that some of the functions use sysctl(3)
instead of kmem.

Additionally, because of sysctl(3) use (which is generally good), behaviour
for crash dumps differs slightly from behaviour for live kernels and this
will probably never be fixed entirely, so weaken that claim.
2010-05-02 12:38:59 +00:00
Warner Losh
c4a95f87a9 Comment on new config version that's now required for amd64 and ia64.
Comment on the confusing error message from Apr 17th-May 2nd generated
by config(8) as well.
2010-05-02 06:34:13 +00:00
Warner Losh
16a79e54bc Revert 207494: it was only for testing purposes. 2010-05-02 06:24:17 +00:00
Warner Losh
f2c78def82 Ooops. Bump the version to 600009, not 600008. 2010-05-02 06:23:15 +00:00
Warner Losh
f459061b4c Move to the new way of specifying compat options. The backs out the
FOO = BAR form, in favor of listing the mapping in a separate file
for more compatibility with older versions of config.
2010-05-02 06:20:42 +00:00
Warner Losh
458cda3710 MFC r207265:
Require the option that's mapped be listed in the options file.  This
  will allow people with old config options to either have it just work
  (if config is new enough), or get a version error (if their config is
  about 7.0 or newer) rather than getting a cryptic error about
  duplicated options in the options file, or getting an error about an
  unknown option, at which point they'd update their config file only to
  learn they need a new config, only to learn they didn't really need to
  update their config file...  All this because our version checking was
  in the wrong place for the past decade...

  # hopefully this is the last change, and we'll be able to config with an
  # 8.0 GENERIC file on stable/8 after I merge this change and add the
  # compat options.
2010-05-02 06:18:57 +00:00
Warner Losh
0f2b463aa4 MFC r207263:
Redo how we add compat options so as to be compatible with old
  versions of config.  Remove support for the syntax OLD = NEW form the
  options file, and instead have a new file $S/conf/options-compat.
  This file will be parsed as OLD NEW on each line.  Bump version of
  config.  Since nothing in -current ever used this, there's no hazards
  for current users, so I'm not bumping the version in the
  Makefiles.$MACHINE.  No need, really, for this version bump in
  -current, but this was introduced into -stable before I realized the
  version check was ineffective there, so the verison bump doesn't hurt
  here and keeps the two branches in sync, versionwise, after the MFC.
2010-05-02 06:18:08 +00:00
Warner Losh
cf94fc20bb MFC r207260:
Move checking the version up from Makefile generation to just after
  we've parsed the config file.  Makefile generation is too late if
  we've introduce changes to the syntax of the metafiles to warn about
  version skew, since we have to try to parse them and we get an parse
  error that's rather baffling to the user rather than a 'your config is
  too old, upgrade' which we should get.

  We have to defer doing it until after we've read the user's config
  file because we define machinename there.  The version required to
  compile the kernel is encoded in Makefile.machinename.  There's no
  real reason for this to be the case, but changing it now would
  introduce some logistical issues that I'd rather avoid for the moment.
  I intend to revisit this if we're still using config in FreeBSD 10.

  This also means that we cannot introduce any config metafile changes
  that result in a syntax error or other error for the user until 9.0 is
  released.  Otherwise, we break the upgrade path, or at least reduce
  the usefulness of the error messages we generate.

  # This implies that the config file option mapping will need to be redone.
2010-05-02 06:14:36 +00:00
Weongyo Jeong
13f80c05d1 MFC r207176:
ifp->if_ipackets++ when RX packet interrupts are occurred.
2010-05-01 23:25:53 +00:00
Pawel Jakub Dawidek
badd323276 MFC r207070,r207343,r207345,r207347,r207348,r207371,r207372,r207390:
r207070:

Fix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.

Reported by:	Andrei V. Lavreniyuk <andy.lavr@reactor-xg.kiev.ua>

r207343:

Don't assume that "resource" property is in metadata.

Reported by:	Mikolaj Golub <to.my.trociny@gmail.com>

r207345:

Use WEXITSTATUS() to obtain real exit code.

r207347:

Mark temporary issues as such.

r207348:

Restart worker thread only if the problem was temporary.
In case of persistent problem we don't want to loop forever.

r207371:

Fix a problem where hastd will stuck in recv(2) after sending request to
secondary, which died between send(2) and recv(2). Do it by adding timeout
to recv(2) for primary incoming and outgoing sockets and secondary outgoing
socket.

Reported by:	Mikolaj Golub <to.my.trociny@gmail.com>
Tested by:	Mikolaj Golub <to.my.trociny@gmail.com>

r207372:

- Check if the worker process was killed by signal and restart it.
- Improve logging.

Pointed out by:	Garrett Cooper <yanefbsd@gmail.com>

r207390:

Default connection timeout is way too long. To make it shorter we have to
make socket non-blocking, connect() and if we get EINPROGRESS, we have to
wait using select(). Very complex, but I know no other way to define
connection timeout for a given socket.

Reported by:	hiroshi@soupacific.com
2010-05-01 19:16:08 +00:00
Pawel Jakub Dawidek
cde38f4240 MFC r207070:
Fix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.

Reported by:	Andrei V. Lavreniyuk <andy.lavr@reactor-xg.kiev.ua>
2010-05-01 19:12:37 +00:00
Pawel Jakub Dawidek
fde8d4bfa7 MFC r207068,r207334:
r207068:

Allow to modify directory's content even if the ZFS_NOUNLINK (SF_NOUNLINK,
sunlnk) flag is set. We only deny dirctory's removal or rename.

PR:		kern/143343
Reported by:	marck

r207334:

Backport fix for 'zfs_znode_dmu_init: existing znode for dbuf' panic from OpenSolaris.

PR:		kern/144402
Reported by:	Alex Bakhtin <alex.bakhtin@gmail.com>
Tested by:	Alex Bakhtin <alex.bakhtin@gmail.com>
Obtained from:	OpenSolaris, Bug ID 6895088
2010-05-01 19:00:33 +00:00
Jilles Tjoelker
1cadff7745 MFC r207168: builtin(1): Add missing escaping for !, . and : in the table.
This caused these commands to look differently (not bold) from the other
commands in the table (bold).
2010-05-01 14:49:20 +00:00
Jilles Tjoelker
767c29b7f2 MFC r207166: builtin(1): Mention [ sh builtin. 2010-05-01 14:41:37 +00:00
Jilles Tjoelker
5d05d542eb MFC r207153: stat: Allow -f %Sf to display the file flags symbolically.
PR:		124349
2010-05-01 14:36:04 +00:00
Jilles Tjoelker
312a3c0cba MFC r207021: ln: Allow a trailing slash when creating a link to a directory.
In the 'ln source... directory' synopsis, the basename of each source
determines the name of the created link. Determine this using basename(3)
instead of strrchr(..., '/') which is incorrect if the pathname ends in a
slash.

PR:		121568
2010-05-01 14:33:26 +00:00
Jilles Tjoelker
1577aa79c0 MFC r206773: ln: Do not delete a file by hardlinking it to itself.
Two pathnames refer to the same directory entry iff the directories match
and the final components' names match.

Example: (assuming file1 is an existing file)
  ln -f file1 file1
This now fails while leaving file1 intact. It used to delete file1 and then
complain it cannot be linked because it is gone.

With -i, this error is detected before the question is asked.
2010-05-01 14:29:33 +00:00
Rick Macklem
227b9ebe26 MFC: r207170
An NFSv4 server will reply NFSERR_GRACE for non-recovery RPCs
during the grace period after startup. This grace period must
be at least the lease duration, which is typically 1-2 minutes.
It seems prudent for the experimental NFS client to wait a few
seconds before retrying such an RPC, so that the server isn't
flooded with non-recovery RPCs during recovery. This patch adds
an argument to nfs_catnap() to implement a 5 second delay
for this case.
2010-05-01 00:50:51 +00:00
Bernhard Schmidt
7bcd12bdc7 Remove 2 empty files, leftovers from previous MFCs.
Approved by:	rpaulo (mentor)
2010-04-30 18:39:07 +00:00
Bernhard Schmidt
41d65f69f7 MFC r206443-206446, 206474-206477, 207001
r206443:
Small whitespace cleanup.

r206444 [1]:
- Rename bluetooth coexistence flags, no binary change.
- Enable DC calibration and crystal calibration on Centrino Advanced-N
  6250 parts.
- Workaround for a HW bug (does not affect 4965AGN) that may sporadically
  affect latency under some rare circumstances. From a similar commit to
  iwlwifi.
- Update sensitivity settings for 5000 series to workaround a performance
  bug in the DSP (1000 is not affected so we keep the old values for 5000).
- Update sensitivity settings for 6000 series.
- Set differential gains on 6250 too (but use a 1.0 factor, not 1.5).
- Init OFDM sensitivity with min value (which depends on the chip)
  instead of hardcoding it to 90.
- Read calibration version from ROM and set IWN_GP_DRIVER_CALIB_VER6
  bit on 6x50 if version >= 6.

r206445 [2]:
iwn4965_set_txpower() uses maxpwr from EEPROM to calculate the power to
set, it make sense to actually initialize that array.  This fixes some
issues with 4965 adapters where the TX power is crucial.

This got lost somewhere while merging with the OpenBSD code.

r206446:
Update firmware for the 6000 series Intel cards to version 9.193.4.1.

r206474:
Add some missing protoypes.

r206475:
iwn5000_reset_sched() is not used; #ifdef it.

r206476:
Hook ieee80211_media_change() to ieee80211_vap_attach().

r206477:
Declare all functions as static.

r207001 [3]:
Use correct bus_dma_tag_t for TX frames.

Approved by:	rpaulo (mentor)
Obtained from:	Openbsd [1], [2]
Reported by:	Andreas Nilsson <andrnils at gmail.com> [3]
2010-04-30 18:13:11 +00:00
Bernhard Schmidt
4ac642e550 MFC r206763-206767:
r206763:
Fix comment about ipw_assoc and remove some whitespaces; no functional
changes.

r206764:
Pass correct RSSI to ieee80211_input*().

r206765:
- Make ipw usable again by moving directly into ASSOC state.
- No need to manually switch to RUN state, assoc response takes care
  of that.

r206766:
Use iv_appie_wpa, with this commit WPA works again.

r206767:
Remove IPW_LOCK_DECL and fix various LORs.

Approved by:	rpaulo (mentor)
2010-04-30 17:08:27 +00:00
Rick Macklem
52d8bf8926 MFC: r207082
When the experimental NFS client is handling an NFSv4 server reboot
with delegations enabled, the recovery could fail if the renew
thread is trying to return a delegation, since it will not do the
recovery. This patch fixes the above by having nfscl_recalldeleg()
fail with the I/O operations returning EIO, so that they will be
attempted later. Most of the patch consists of adding an argument
to various functions to indicate the delegation recall case where
this needs to be done.
2010-04-29 23:48:09 +00:00
Andrew Thompson
31f57dc12e MFC r207080
Use a more obvious prefix for the USB control (endpoint 0) transfers rather
 than default_*.
2010-04-29 22:49:21 +00:00
Andrew Thompson
c955f36229 MFC r207079
Properly name the sxlocks, mutexes and condvars.
2010-04-29 22:48:19 +00:00
Andrew Thompson
ccd296dfa6 MFC r207078
Use SX_DUPOK rather than making the string unique.
2010-04-29 22:47:01 +00:00
Andrew Thompson
ad65806013 MFC r207077
Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
 the illusion of a tunable setting but was always turned on regardless.
2010-04-29 22:44:04 +00:00
Andrew Thompson
176b25ad5c MFC r207020, r207027, r207072.
Change usb devd events from fake attach to a notify. The ugen device is not a
 proper device_t so it faked the devctl event to appear like one, this is now a
 notify which allows more information to be passed.

 We notify for both the device attach/detach and for each usb interface. A devd
 rule can now match on the interface properties, including composite devices
 which may have a uvideo interface and also usound and possibly uhid too.

 An example to match a umass device with a scsi subclass and BBB protocol would be

 notify 100 {
 	match "system"          "USB";
 	match "subsystem"       "INTERFACE";
 	match "type"            "ATTACH";
 	match "intclass"        "0x08";
 	match "intsubclass"     "0x06";
 	match "intprotocol"     "0x50";
 	action ...
 };

 The old attach devctl event has been retained for the moment to make merging to
 8.1 easier. This was never compatible with 7.x or earlier due to the ugen regex
 change needed.

 Document the new USB notification types.
2010-04-29 22:40:12 +00:00
Matt Jacob
230a615521 This is an MFC of 205932.
nit: xpt_bus_deregister has to be called with the sim lock held.
2010-04-29 19:11:25 +00:00
Matt Jacob
140095c1b8 This is an MFC of 205847
Change how multipath labels are created and managed. This makes it easier
to support various storage boxes which really aren't active-active.

We only write the label on the *first* provider. For all other providers
we just "add" the disk. This also allows for an "add" verb.

A usage implication is that you should specificy the currently active
storage path as the first provider.

Note that this does not add RDAC-like functionality, but better allows for
autovolumefailover configurations (additional checkins elsewhere will support
this).
2010-04-29 19:06:43 +00:00
Xin LI
f347c17fa9 MFC r205938:
Sync with OpenBSD:
 - avoid coredump when there's only one token on a line;
 - Use calloc();
 - Remove a line inherited from example mdoc.

Obtained from:  OpenBSD
2010-04-29 00:28:34 +00:00
Jack F Vogel
517ac329ed Only enable MAGIC WOL by default, MCAST causes
systems to just wakeup immediately in many
environments.
2010-04-28 18:28:08 +00:00
Rui Paulo
5b478dbb2f MFC r206617:
Make this code a little more portable by wrapping the mtx calls
  into macros.
2010-04-28 15:15:06 +00:00
Konstantin Belousov
517c07c8cc MFC r207008:
Provide compat32 shims for kinfo_proc sysctl.

MFC r207016:
Fix typo.
2010-04-28 10:03:54 +00:00