Commit Graph

75329 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Konstantin Belousov
0c740f704f 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
Xin LI
0919a8fb99 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
Andrew Gallatin
953a22892c MFC 206662: Cleanup if_media handling in mxge(4) 2010-04-27 15:38:58 +00:00
Bruce M Simpson
3db0099738 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
Bruce M Simpson
300cdd3c94 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
Konstantin Belousov
ea5e5dda7b 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
Konstantin Belousov
3b23a422c3 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
Rick Macklem
91f671cf92 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
Jung-uk Kim
44dd6ac245 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
Jung-uk Kim
9a4f7ef713 MFC: r206384
Allocate memory for VBE info block with malloc(9), not as static local.
2010-04-26 19:19:29 +00:00
Pyun YongHyeon
3e1961268e 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
Pyun YongHyeon
ed0af45af3 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
Pyun YongHyeon
ddf5d37989 MFC r206672:
Fix include path.
2010-04-26 17:54:49 +00:00
Pyun YongHyeon
ffb1296f2c 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
Jaakko Heinonen
ab28e40a31 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
Warner Losh
39fc973d89 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
Rick Macklem
a862e504da 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
Matt Jacob
417e0e58bf 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
Matt Jacob
4c35d8e092 This is an MFC of 205252.
We actually can generate a host number.
2010-04-24 23:10:13 +00:00
Matt Jacob
fbcd5da22b 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 Rao
47fd5bf73a 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 Rao
a2bef3670a 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
Matt Jacob
a956023126 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
Matt Jacob
2ef84ecad4 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