79113 Commits

Author SHA1 Message Date
bz
0b955144bd 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
mav
36c08d5066 MFC r207222:
Move PI_TAG_ABLE check from ada driver to ATA XPT.
2010-05-02 12:50:29 +00:00
mav
f162992d8b 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
mav
3ec514bd21 MFC r205358:
Enable MSI by default for SiI3124.
2010-05-02 12:44:11 +00:00
mav
a4ca641c46 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
mav
492b3028cd 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
imp
6231a81f24 Revert 207494: it was only for testing purposes. 2010-05-02 06:24:17 +00:00
imp
822c9ce183 Ooops. Bump the version to 600009, not 600008. 2010-05-02 06:23:15 +00:00
imp
01384213a7 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
weongyo
a1bb956efc MFC r207176:
ifp->if_ipackets++ when RX packet interrupts are occurred.
2010-05-01 23:25:53 +00:00
pjd
3bcbc02a08 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
rmacklem
3ff47db4d9 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
bschmidt
84c319279e Remove 2 empty files, leftovers from previous MFCs.
Approved by:	rpaulo (mentor)
2010-04-30 18:39:07 +00:00
bschmidt
c8089716b6 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
bschmidt
2e0405635a 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
rmacklem
e7d6f4713b 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
thompsa
e5f1285e7a 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
thompsa
454602a9ae MFC r207079
Properly name the sxlocks, mutexes and condvars.
2010-04-29 22:48:19 +00:00
thompsa
4ad8d144a3 MFC r207078
Use SX_DUPOK rather than making the string unique.
2010-04-29 22:47:01 +00:00
thompsa
ef43ecae04 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
thompsa
c4a3a58edd 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
mjacob
fa60432685 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
jfv
a5107a3ecf Only enable MAGIC WOL by default, MCAST causes
systems to just wakeup immediately in many
environments.
2010-04-28 18:28:08 +00:00
rpaulo
f038d069e2 MFC r206617:
Make this code a little more portable by wrapping the mtx calls
  into macros.
2010-04-28 15:15:06 +00:00
kib
79c3d79534 MFC r207008:
Provide compat32 shims for kinfo_proc sysctl.

MFC r207016:
Fix typo.
2010-04-28 10:03:54 +00:00
kib
32a0d07245 MFC r207007:
Extract the code to copy-out struct rusage32 from struct rusage
into the new function.
2010-04-28 09:59:28 +00:00
delphij
248d9cd26d MFC r206637:
When an underlying ioctl(2) handler returns an error, our ioctl(2)
interface considers that it hits a fatal error, and will not copyout
the request structure back for _IOW and _IOWR ioctls, keeping them
untouched.

The previous implementation of the SIOCGIFDESCR ioctl intends to
feed the buffer length back to userland.  However, if we return
an error, the feedback would be defeated and ifconfig(8) would
trap into an infinite loop.

This commit changes SIOCGIFDESCR to set buffer field to NULL to
indicate the previous ENAMETOOLONG case.

Reported by:	bschmidt
2010-04-28 00:49:24 +00:00
gallatin
54971ffe88 MFC 206662: Cleanup if_media handling in mxge(4) 2010-04-27 15:38:58 +00:00
bms
4ce0f3b585 MFC 206452:
Fix a few issues related to the legacy 4.4 BSD multicast APIs.

  IPv4 addresses can and do change during normal operation. Testing by
  pfSense developers exposed an issue where OpenOSPFD was using the IPv4
  address to leave the OSPF link-scope multicast groups on a dynamic
  OpenVPN tun interface, rather than using RFC 3678 with the interface
  index, which won't be raced when the interface's addresses change.

  In inp_join_group():
   If we are already a member of an ASM group, and IP_ADD_MEMBERSHIP or
   MCAST_JOIN_GROUP ioctls are re-issued, return EADDRINUSE as per the
   legacy 4.4BSD multicast API. This bends RFC 3678 slightly, but does
   not violate POLA for apps using the old API.
   It also stops us falling through to kicking IGMP state transactions
   in what is otherwise a no-op case.
   [This has already been dealt with in HEAD, but make it explicit before
    we MFC the change to 8.]

  In inp_leave_group():
   Fix a bogus conditional.
   Move the ifp null check to ioctls MCAST_LEAVE* in the switch..case
   where it actually belongs.
   If an interface was specified, by primary IPv4 address, for ioctl
   IP_DROP_MEMBERSHIP or MCAST_LEAVE_GROUP (an ASM full leave operation),
   then and only then should we look up the ifp from the IPv4 address in
   mreqs.imr_interface.
   If not, we fall through to imo_match_group() as before, but only in
   the IP_DROP_MEMBERSHIP case.

  With these changes, the legacy 4.4BSD multicast API idempotence should
  be mostly preserved in the SSM enabled IPv4 stack.

  [Note: this is not a straight svn merge as head and 8 differ slightly]

Found by:	ermal (with pfSense)
2010-04-27 13:50:15 +00:00
bms
57486a00dd MFC 206454:
When embedding the scope ID in MLDv1 output, check if the scope of the address
  being embedded is in fact link-local, before attempting to embed it.

  Note that this operation is a side-effect of trying to avoid recursion on
  the IN6 scope lock.

PR:		144560
Submitted by:	Petr Lampa
2010-04-27 13:27:51 +00:00
kib
7550515288 MFC r206992:
As was done in r155238 for i386 and in r155239 for amd64, clear the carry
flag for ia32 binary executed on amd64 host in get_mcontext().
2010-04-27 10:50:09 +00:00
kib
135cee2c86 MFC r206547:
Handle a case in kern_openat() when vn_open() change file type from
DTYPE_VNODE.
2010-04-27 10:47:54 +00:00
rmacklem
54d63f7da1 MFC: r206880
For the experimental NFS client doing an NFSv4 mount,
set the NFSCLFLAGS_RECVRINPROG while doing recovery from an expired
lease in a manner similar to r206818 for server reboot recovery.
This will prevent the function that acquires stateids for I/O
operations from acquiring out of date stateids during recovery.
Also, fix up mutex locking on the nfsc_flags field.
2010-04-27 01:00:22 +00:00
jkim
48dc09c70a MFC: r204773
Merge ACPICA 20100304.

MFC:	r204874
Update module Makefile for ACPICA 20100304.

MFC:	r204877
Allow ACPI module build on amd64.  Although we strongly recommend building
it into kernel, there is no need to prevent it from building at all.

MFC:	r204916
- Allow users to enable dumping Debug objects without ACPI debugger.
Setting the new sysctl MIB "debug.acpi.enable_debug_objects" to a non-zero
value enables us to print Debug object when something is written to it.
- Allow users to disable interpreter slack mode.  Setting the new tunable
"debug.acpi.interpreter_slack" to zero disables some workarounds for common
BIOS mistakes and enables strict ACPI implementations by the specification.

MFC:	r204920
Since the interpreter slack mode is a tunable now, enable a local hack only
when it is set.  Note the default behaviour does not change by this change.

MFC:	r204965
Fix white spaces.

MFC:	r206117
Merge ACPICA 20100331 (and four additional upstream patches).
2010-04-26 20:55:03 +00:00
jkim
37e727cf81 MFC: r206384
Allocate memory for VBE info block with malloc(9), not as static local.
2010-04-26 19:19:29 +00:00
yongari
c573e9426f MFC r207071:
Intialize interrupt moderation control register. The magic value
  was chosen by lots of trial and errors. The chosen value shows
  good interrupt moderation without additional latency.
  Without this change, controller can generate more than 140k
  interrupts per second under high network load.

  Submitted by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-04-26 18:07:55 +00:00
yongari
1516719260 MFC r206876:
With r206844, CSUM_TCP is also set for CSUM_TSO case. Modify
  drivers to take into account for the change. Basically CSUM_TSO
  should be checked before checking CSUM_TCP.
2010-04-26 18:02:12 +00:00
yongari
c95c8abe44 MFC r206672:
Fix include path.
2010-04-26 17:54:49 +00:00
yongari
6834582d3b MFC r206625:
Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet.
  This driver was written by Alexander Pohoyda and greatly enhanced
  by Nikolay Denev. I don't have these hardwares but this driver was
  tested by Nikolay Denev and xclin.

  Because SiS didn't release data sheet for this controller, programming
  information came from Linux driver and OpenSolaris. Unlike other open
  source driver for SiS190/191, sge(4) takes full advantage of TX/RX
  checksum offloading and does not require additional copy operation in
  RX handler.
  The controller seems to have advanced offloading features like VLAN
  hardware tag insertion/stripping, TCP segmentation offload(TSO) as
  well as jumbo frame support but these features are not available
  yet. Special thanks to xclin <xclin<> cs dot nctu dot edu dot tw>
  who sent fix for receiving VLAN oversized frames.
2010-04-26 17:03:56 +00:00
jh
d882f11f9e MFC r206859:
Fix ddb(4) "show geom addr" command when INVARIANTS is enabled. Don't
assert that the topology lock is held when g_valid_obj() is called from
debugger.
2010-04-26 16:20:18 +00:00
imp
edfae4ce2b MFC r206916
Make sure that we free the passed in data message if we don't actually
  insert it onto the queue.  Also, fix a mtx leak if someone turns off
  devctl while we're processing a messages.

  MFC after:	5 days
2010-04-25 19:13:08 +00:00
rmacklem
45f887198c MFC: r206818
Avoid extraneous recovery cycles in the experimental NFS client
when an NFSv4 server reboots, by doing two things.
1 - Make the function that acquires a stateid for I/O operations
    block until recovery is complete, so that it doesn't acquire
    out of date stateids.
2 - Only allow a recovery once every 1/2 of a lease duration, since
    the NFSv4 server must provide a recovery grace period of at
    least a lease duration. This should avoid recoveries caused
    by an out of date stateid that was acquired for an I/O op.
    just before a recovery cycle started.
2010-04-25 01:56:31 +00:00
mjacob
57f649f865 This is an MFC of 204050.
Don't try and re-use a handle, even if the firmware tells you that's what is logged in.

PR:             kern/144026
2010-04-24 23:20:51 +00:00
mjacob
f718d46fe9 This is an MFC of 205252.
We actually can generate a host number.
2010-04-24 23:10:13 +00:00
mjacob
69e134968f This is an MFC of 205236
Put gone device timer into a structure tag that can hold more than 32 seconds. Oops.

Untangle some of the confusion about what role means when it's in the FCPARAM/SDPARAM
or isp_fc/isp_spi structures. This fixed a problem about seeing targets appear if you've
turned off autologin and find them, or rather don't, via camcontrol rescan.
2010-04-24 23:05:56 +00:00
attilio
cae97f8fd8 MFC r206482, r206879:
- Introduce a blessed list for sxlocks that prevents the deadlkres to
  panic on those ones. Populate this list with getblk and so_snd_sx and
  so_rcv_sx.
- Fix ticks counter wrap-up

Sponsored by:	Sandvine Incorporated
2010-04-24 00:53:41 +00:00
attilio
2647f6f353 MFC r206421:
Default the machdep.lapic_allclocks to be enabled in order to cope with
broken atrtc.
Now if you want more correct stats on profhz and stathz it may be
disabled by setting to 0.

Sponsored by:	Sandvine Incorporated
2010-04-24 00:49:19 +00:00
mjacob
df94da6bff This is an MFC of 205847, 204071 and 196580
------
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).

------------------------------------------------------------------------

- Style fixes.
- Prefer strlcpy() over strncpy().

------------------------------------------------------------------------

There's no need for checking result of M_WAITOK allocation.
2010-04-23 16:49:18 +00:00
mjacob
782b9b4388 This is an MFC of 205412.
Add 'rotate' and 'getactive' verbs to provide some control and information
about what the currently active path is.
2010-04-23 16:26:10 +00:00
rmacklem
9344b56026 MFC: r206690
Add mutex lock calls to 2 cases in the experimental NFS client's
renew thread where they were missing.
2010-04-23 00:34:59 +00:00