Commit Graph

76150 Commits

Author SHA1 Message Date
Navdeep Parhar
b302b77ca7 Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6
layers with non-sleepable locks held.  Don't (potentially) sleep in
those situations.
2010-01-20 03:40:43 +00:00
John Baldwin
13c18821fa Move the examples for the 'hints' and 'env' keywords from various GENERIC
kernel configs into NOTES.

Reviewed by:	imp
2010-01-19 17:20:34 +00:00
Ed Schouten
91bfd816f2 Recommit r193732:
Remove __gnu89_inline.

  Now that we use C99 almost everywhere, just use C99-style in the pmap
  code. Since the pmap code is the only consumer of __gnu89_inline, remove
  it from cdefs.h as well. Because the flag was only introduced 17 months
  ago, I don't expect any problems.

  Reviewed by:    alc

It was backed out, because it prevented us from building kernels using a
7.x compiler. Now that most people use 8.x, there is nothing that holds
us back. Even if people run 7.x, they should be able to build a kernel
if they run `make kernel-toolchain' or `make buildworld' first.
2010-01-19 15:31:18 +00:00
Ruslan Ermilov
5beb779d64 Removed NO_UNDEF.
Nudged by:	trasz
2010-01-19 11:42:15 +00:00
Andrew Thompson
83fcb81283 Use the iflladdr_event event to keep the mac address on the vap in sync with
the parent wirless interface. If the user passed in a mac address or it was
autogenerated then flag this to avoid trashing it on update.

This will fix wlan+lagg in a post vap world.
2010-01-19 05:00:57 +00:00
Andrew Thompson
6117727b6c Do not hold the lock over if_setlladdr() as it calls into the interface driver
init routine.
2010-01-19 04:29:42 +00:00
Weongyo Jeong
07f8d9afd2 Product ID of D-Link DWA-120 after loading the firmware is incorrect. 2010-01-19 01:26:40 +00:00
Weongyo Jeong
97ac268fcb removes a hack to attach TRENDnet TEW-504UB/EU that I think this issue
is solved with r202607.  Now idProduct of all uath(4) devices should be
decreased after loading the firmware.
2010-01-19 01:11:27 +00:00
Weongyo Jeong
984485a02e Fixes a firmware bug that in some devices (e.g. Netgear WG111T or
TRENDnet TEW-504UB/EU) idProduct didn't be decreased after loading the
firmware.

Pointed by:	Steven Friedrich <freebsd at insightbb.com>
Reviewed by:	sam
2010-01-19 01:04:44 +00:00
Wojciech A. Koszek
edfe497ed4 Let us to use our libusb(3) in Linuxolator.
With this change, Linux binaries can work with our libusb(3) when
it's compiled against our header files on GNU/Linux system -- this
solves the problem with differences between /dev layouts.

With ported libusb(3), I am able to use my USB JTAG cable with Linux
binaries that support it.

Reviewed by:	thompsa
2010-01-18 22:46:06 +00:00
Edward Tomasz Napierala
e73a17cf23 Undo r169961, removing WITH_GCC3, added as a temporary workaround three
years ago.
2010-01-18 21:56:08 +00:00
Andrew Thompson
ea4ca115b7 Declare a new EVENTHANDLER called iflladdr_event which signals that the L2
address on an interface has changed. This lets stacked interfaces such as
vlan(4) detect that their lower interface has changed and adjust things in
order to keep working. Previously this situation broke at least vlan(4) and
lagg(4) configurations.

The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due to the
risk of a loop.

PR:		kern/142927
Submitted by:	Nikolay Denev
2010-01-18 20:34:00 +00:00
Marius Strobl
0424a37bea Add epic(4) also here.
MFC after:	3 days
2010-01-18 20:25:29 +00:00
Ulf Lilleengen
2ab38c399e Revert parts of r202283:
- Return EOPNOTSUPP before EROFS to be consistent with other filesystems.
- Fix setting of the nodump flag for users without PRIV_VFS_SYSFLAGS privilege.

Submitted by:	jh@
2010-01-18 19:09:16 +00:00
Ed Schouten
081a0db343 Remove a dead initialization.
Spotted by:	scan-build (uqs)
2010-01-18 18:58:03 +00:00
Warner Losh
73f0e8eb9c Add a warning if we're inw'ing from an odd address. This could happen
due to a bug and might be the real basis for the cardbus workaround
hack.
2010-01-18 17:53:44 +00:00
Warner Losh
9103854246 Fix indentation nit. 2010-01-18 17:52:57 +00:00
Andriy Gapon
bfd1961beb acpi_ec: remove redundant acpi_disabled check in probe method
MFC after:	4 days
2010-01-18 11:33:58 +00:00
Andriy Gapon
943124d3f0 acpi_ec: clean up 'private' ivar when freeing memory to which it points
This is not only a prudent thing to do, but also makes sure that probe
method is not confused by non-NULL 'private', if the previous attach
attempt fails for any reason.

PR:		kern/142561
Tested by:	Alex Goncharov <alex-goncharov@comcast.net>
MFC after:	4 days
2010-01-18 10:30:11 +00:00
Marcel Moolenaar
fec3038524 Add command-line option -dev to set the default value of the currdev
variable. This is to be used by the EFI boot manager.

While here, re-factor the code a little bit and bump the version to
2.1.
2010-01-18 06:48:24 +00:00
Attilio Rao
a7ccec946b - Allow clock subsystem to be compiled without the apic support [0]
- ATPIC, on pc98 is never defined somewhere, differently from i386.
  Turn its compilation to be conditional as i386 does. [1]

[0] Reported by:	nyan
[1] Submitted by:	nyan
2010-01-17 23:23:35 +00:00
Konstantin Belousov
b9f180d1de When a vnode-backed vm object is referenced, it increments the vnode
reference count, and decrements it on dereference. If referenced object
is deallocated, object type is reset to OBJT_DEAD. Consequently, all
vnode references that are owned by object references are never released.
vunref() the vnode in vm object deallocation code for OBJT_VNODE
appropriate number of times to prevent leak.

Add an assertion to the vm_pageout() to make sure that we never get
reference on the vnode but then do not execute code to release it.

In collaboration with:	pho
Reviewed by:	alc
MFC after:	3 weeks
2010-01-17 21:26:14 +00:00
Konstantin Belousov
d2f334bfc9 Add new function vunref(9) that decrements vnode use count (and hold
count) while vnode is exclusively locked.

The code for vput(9), vrele(9) and vunref(9) is merged.

In collaboration with:	pho
Reviewed by:	alc
MFC after:	3 weeks
2010-01-17 21:24:27 +00:00
Michael Tuexen
cd55430963 Get rid of a lot of duplicated code for NR-SACK handle.
Generalize the SACK to code handle also NR-SACKs.
2010-01-17 21:00:28 +00:00
Randall Stewart
e34b217f91 Bug fix: If the allocation of a socket failed and we
freed the inpcb, it was possible to not set the
proper flags on the pcb (i.e. the socket is not there).
This is HIGHLY unlikely since no one else should be
able to find the socket.. but for consistency we
do the proper loop thing to make sure that we
mark the socket as gone on the PCB.
2010-01-17 19:47:59 +00:00
Randall Stewart
0812a4d5e6 Pulls out another leaked windows ifdef that somehow
made its way through the scrubber.
2010-01-17 19:40:21 +00:00
Randall Stewart
a10c3242c7 This change syncs up the socketAPI stream-reset
values to match those in linux and the I-D
just released to the IETF.
2010-01-17 19:35:38 +00:00
Randall Stewart
92cf719944 More leaked ifdefs for APPLE and its mobility stuff. 2010-01-17 19:24:30 +00:00
Randall Stewart
33141385fc Remove another set of "leaked" ifdefs that somehow found
their way into FreeBSD.
2010-01-17 19:21:50 +00:00
Randall Stewart
58ac2d97b7 Remove strange APPLE define that leaked
through the scrubber scripts. Scripts are
now fixed so this won't happen again.
2010-01-17 19:17:16 +00:00
Bjoern A. Zeeb
4dcc55a363 Garbage collect references to the no longer implemented tcp_fasttimo().
Discussed with:	rwatson
MFC after:	5 days
2010-01-17 13:07:52 +00:00
Bjoern A. Zeeb
592bcae802 Add ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control
whether to use source address selection (default) or the primary
jail address for unbound outgoing connections.

This is intended to be used by people upgrading from single-IP
jails to multi-IP jails but not having to change firewall rules,
application ACLs, ... but to force their connections (unless
otherwise changed) to the primry jail IP they had been used for
years, as well as for people prefering to implement similar policies.

Note that for IPv6, if configured incorrectly, this might lead to
scope violations, which single-IPv6 jails could as well, as by the
design of jails. [1]

Reviewed by:	jamie, hrs (ipv6 part)
Pointed out by:	hrs [1]
MFC After:	2 weeks
Asked for by:	Jase Thew (bazerka beardz.net)
2010-01-17 12:57:11 +00:00
Hajimu UMEMOTO
416458131a Change 'me' to match any IPv6 address configured on an interface in
the system as well as any IPv4 address.

Reviewed by:	David Horn <dhorn2000__at__gmail.com>, luigi, qingli
MFC after:	2 weeks
2010-01-17 08:39:48 +00:00
Xin LI
35daa28f30 Expose stripe offset and stripe size through libgeom and geom(8) userland
utilities.

Reviewed by:	pjd, mav (earlier version)
2010-01-17 06:20:30 +00:00
Michael Tuexen
5661a9ed70 Get rid of support of an old version of the SCTP-AUTH draft.
Get rid of unused MD5 code.

MFC after: 1 week
2010-01-16 20:04:17 +00:00
Antoine Brodin
abae4e8ac6 Do not build netgraph kernel modules if WITHOUT_NETGRAPH is set in src.conf
Submitted by:	bf
MFC after:	2 weeks
2010-01-16 17:08:22 +00:00
Attilio Rao
bf16ecdd2c Unbreak the build for pc98. Specify the newly introduced, for ia32,
DEV_ATPIC also for pc98.

Pointy hat to:	me
2010-01-16 12:24:12 +00:00
Edward Tomasz Napierala
b3f9d8c804 Add gmountver, disk mount verification GEOM class.
Note that due to e.g. write throttling ('wdrain'), it can stall all the disk
I/O instead of just the device it's configured for.  Using it for removable
media is therefore not a good idea.

Reviewed by:	pjd (earlier version)
2010-01-16 09:52:49 +00:00
Matt Jacob
78a235dd3f Amazingly we've been freeing a handle and using that which it refers to
for years. Bad!

MFC after:	1 week
2010-01-15 20:08:08 +00:00
Pyun YongHyeon
261f04d654 Don't free mbuf chains when bge(4) fails to collapse the mbuf
chains. This part of code is to enhance performance so failing the
collapsing should not free TX frames. Otherwise bge(4) will
unnecessarily drop frames which in turn can freeze the network
connection.

Reported by:	Igor Sysoev (is <> rambler-co dot ru)
Tested by:	Igor Sysoev (is <> rambler-co dot ru)
2010-01-15 17:55:18 +00:00
Attilio Rao
a26cb6d547 Handling all the three clocks (hardclock, softclock, profclock) with the
LAPIC may lead to aliasing for softclock and profclock because frequencies
are sized in order to fit mainly hardclock.
atrtc used to take care of the softclock and profclock and it does still
do, if the LAPIC can't handle the clocks properly.

Revert the change when the LAPIC started taking charge of all three of
them and let atrtc handle softclock and profclock if not explicitly
requested. Such request can be made setting != 0 the new tunable
machdep.lapic_allclocks or if the new device ATPIC is not present
within the i386 kernel config (atrtc is linked to atpic presence).

Diagnosed by:	Sandvine Incorporated
Reviewed by:	jhb, emaste
Sponsored by:	Sandvine Incorporated
MFC:		3 weeks
2010-01-15 16:04:30 +00:00
Alexander Leidinger
2883eb1ce1 Whitespace change to be able to provide the correct commit log for r202364:
---snip---
Add video clipping support but with the caveats below.

Background info:

Video clipping allows the user to provide either a series of clip rectangles
or a clip bitmap to the driver and have the driver mask the video according
to the clipping specs provided.

Adding support for clipping to the FreeBSD Linux emulator is problematic
because it seems that this feature is not supported by many drivers and
therefore it is ignored by many applications. Unfortunately, when not
using it, rather than passing in a null clipping list, some apps leave the
clipping fields uninitialized, casuing random values to be passed in. In
the case where the driver does not use the clipping info, this is not a
problem (although it is bad form). But the Linux emulator does not know
which drivers will use this and which won't, so the Linux emulator must
try to handle this clip list, and deal gracefully with cases where the
values seem to be uninitialized.

Video clipping info is passed in using the VIDIOCSWIN ioctl in two fields
in the video_window structure: the integer clipcount and the pointer clips.

How the linuxulator handles this from this commit on:

    * if (clipcount == VIDEO_CLIP_BITMAP)
      The clips variable is a void * pointer to a 128*625 byte
      (1024*625 bit) memory area containing a bitmap of the clipping area.
      The pointer in the video_window structure is copied, but no
      video_clip structures are copied.
    * if (clipcount > 0 && clipcount <= 16384)
      The clips variable is pointer to a list of video_clip structures. Up
      to clipcount structures are copied and passed to the driver.
      The upper limit of 16384 was imposed here so that user code that does
      not properly initialize clipcount falls through below and no attempt
      is made to copy an uninitialized list. This value was found by
      examining Linux drivers that support the clip list.
    * else
      The clipcount is either negative (but not VIDEO_CLIP_BITMAP), zero or
      positive (> 16384).
      All these cases are treated as invalid data. Both the clipcount field
      and clips pointer are forced to zero/NULL and passed to the driver.

It should be noted that, at the time of developing this V4L emulator code,
the pwc(4) V4L driver does not support clipping.

Submitted by:	J.R. Oldroyd <fbsd@opal.com>
MFC after:	1 month
---snip---
2010-01-15 15:38:31 +00:00
Alexander Leidinger
0f6800b944 This is v4l support for the linuxulator. This allows to access FreeBSD
native devices which support the v4l API from processes running within
the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd driver.

Not tested is firmware upload, framebuffer stuff and video tuner stuff
due to lack of hardware.
The clipping part (VIDIOCSWIN) needs a little bit of further work (partly
in progress, but can not be tested due to lack of a suitable device).

The submitter tested this sucessfully with Skype and flash apps on amd64 and
i386 with the multimedia/pwcbsd driver.

Submitted by:	J.R. Oldroyd <fbsd@opal.com>
2010-01-15 14:58:19 +00:00
Olivier Houchard
59a5c7f90e Do not free the dmamap if it is still busy.
Submitted by:	Mark Tinguely
MFC after:	3 days
2010-01-15 12:39:48 +00:00
Brooks Davis
9126964cdb Only allocate the space we need before calling kern_getgroups instead
of allocating what ever the user asks for up to "ngroups_max + 1".  On
systems with large values of kern.ngroups this will be more efficient.

The now redundant check that the array is large enough in
kern_getgroups() is deliberate to allow this change to be merged to
stable/8 without breaking potential third party consumers of the API.

Reported by:	bde
MFC after:	28 days
2010-01-15 07:18:46 +00:00
Brooks Davis
3ef5ae2dde Since all other comparisons involving ngroups_max use
"ngroups_max + 1", use ">= ngroups_max+1" instead of the equivalent
"> ngroups_max" to reduce confusion.
2010-01-15 07:05:00 +00:00
Rui Paulo
79ea426498 Fix bugs introduced in previous commit: off-by-one in add_meshconf() and
big-endian bug on verify_meshconf()
2010-01-14 19:23:41 +00:00
Pyun YongHyeon
cb2ed75f7e Add check for fiber mode for BCM5714 PHY. This PHY supports both
copper and fiber interfaces over GMII so an explicit check is
necessary to know whether it was configured for fiber interface.
This change make BCM5715S work.

Tested by:	olli
MFC after:	1 week
2010-01-14 19:14:24 +00:00
Pyun YongHyeon
ea3b412711 For controllers that has dual mode PHY(copper or fiber) interfaces
over GMII, make sure to enable GMII. With this change brgphy(4) is
used to handle the dual mode PHY. Since we still don't have a sane
way to pass PHY specific information to mii(4) layer special
handling is needed in brgphy(4) to determine which mode of PHY was
configured in parent interface.
This change make BCM5715S work.

Tested by:	olli
Obtained from:	OpenBSD
MFC after:	1 week
2010-01-14 19:08:43 +00:00
Christian Brueffer
1aa1169d6b Build iwi(4) and iwifw(4) modules on amd64 as well.
PR:		113117
Submitted by:	"O. Hartmann" <ohartman@zedat.fu-berlin.de>
MFC after:	1 week
2010-01-14 16:49:22 +00:00
John Baldwin
ca6c375670 Update the ident for the XENHVM kernel config to match the filename.
MFC after:	1 week
2010-01-14 15:07:18 +00:00
Ulf Lilleengen
e09c00cada Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summer
of Code 2009:

- BSDL block and inode allocation policies for ext2fs. This involves the use
  FFS1 style block and inode allocation for ext2fs. Preallocation was removed
  since it was GPL'd.
- Make ext2fs MPSAFE by introducing locks to per-mount datastructures.
- Fixes for kern/122047 PR.
- Various small bugfixes.
- Move out of gnu/ directory.

Sponsored by:   Google Inc.
Submitted by:	Aditya Sarawgi <sarawgi.aditya AT SPAMFREE gmail DOT com>
2010-01-14 14:30:54 +00:00
Marcel Moolenaar
646420c8dc Add ioctl requests to /dev/io on ia64 for reading and writing
EFI variables. The primary reason for this is that it allows
sysinstall(8) to add a boot menu item for the newly installed
FreeBSD image.
2010-01-14 02:48:39 +00:00
Marcel Moolenaar
684b17831f Fix previous commitr:. efi_var_set() was copied from efi_var_get(),
but wasn't actually changed.
2010-01-14 02:38:46 +00:00
Marcel Moolenaar
259565ce68 Add wrappers for the RT Variable Services. While here, translate the
EFI status into a standard errno value and change efi_set_time() to
return a standard error.

MFC after:	1 week
2010-01-14 02:14:21 +00:00
Andrew Thompson
f644abcf6e Grammar nits.
Submitted by:	Ben Kaduk
2010-01-14 01:16:20 +00:00
Pyun YongHyeon
ba84b911c4 Add BCM5754 PHY id that is found on Dell Studio XPS 16.
Tested by:	scf
MFC after:	1 week
2010-01-14 00:36:49 +00:00
Xin LI
f7d1b2eb75 o Add PCI ID for BCM 5756.
o Don't enable BGE_FLAG_BER_BUG on both 5722 and 5756, and based
   on their PCI IDs rather than their chip IDs.

Reported by:	several PC-BSD users via kmoore
Reviewed by:	yongari, imp, jhb, davidch
Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2010-01-13 22:39:39 +00:00
Alexander Motin
1d676e56c6 Hide from default sndstat some information not used on daily basis,
to make it readable by average user with average screen size.
2010-01-13 22:22:16 +00:00
Ed Schouten
d3e4b91f9c Remove the 1000 pseudo terminal limit from pts(4).
Even with the old utmp format, we could in fact go to pts/9999, because
ut_line wasn't guaranteed to be null terminated there.
2010-01-13 21:22:23 +00:00
Andrew Thompson
9b6ffc1f49 Update to Fredrik's latest uhso driver. This changes port detection, adds
comments and other code nits.

Submitted by:	Fredrik Lindberg <fli@shapeshifter.se>
2010-01-13 20:54:18 +00:00
Ed Schouten
279d8efe8d Complete the migration towards utmpx.
- Add a notice to UPDATING, explaining users may need to recompile
  applications that use the old database.
- Bump __FreeBSD_version.
2010-01-13 19:25:03 +00:00
Jaakko Heinonen
5364a38dba - Fix some style bugs in tmpfs_mount(). [1]
- Remove a stale comment about tmpfs_mem_info() 'total' argument.

Reported by:	bde [1]
2010-01-13 14:17:21 +00:00
Andrew Thompson
941e286383 Add a driver by Fredrik Lindberg for Option HSDPA USB devices. These differ
from standard 3G wireless units by supplying a raw IP/IPv6 endpoint rather than
using PPP over serial. uhsoctl(1) is used to initiate and close the WAN
connection.

Obtained from:	Fredrik Lindberg <fli@shapeshifter.se>
2010-01-13 03:16:31 +00:00
Rui Paulo
651e41a42c Update mesh code to to D4.0. 2010-01-12 22:22:27 +00:00
Warner Losh
e78e34c963 Place proper svn:keywords tag on all these files. They were created
somehow without them on projects/mips, and that mistake was propigated
over to head.

Submitted by:	rpaulo@
2010-01-12 21:17:36 +00:00
Rui Paulo
ac20bf57a9 Add a regular comment explaining what this file is. 2010-01-12 20:55:12 +00:00
Rui Paulo
9dfb2a64ad Fix svn properties and remove a P4 keyword. 2010-01-12 20:52:41 +00:00
Alexander Motin
b7d561a3f1 Make OSS_GETVERSION ioctl supported also for DSP devices,
same as 4Front and Linux do.

MFC after:	1 month
2010-01-12 20:10:40 +00:00
Alexander Motin
d6b230d20a Make default recording source choosing more intelligent.
Change default recording level from 0 to 75.
It should increase chances for things to work just out of the box.
2010-01-12 19:41:07 +00:00
Brooks Davis
93833c1db6 Declare the kern.ngroups sysctl to be read-only, but tunable at boot for
better error reporting.

Submitted by:	Matthew Fleming <matthew dot fleming at isilon dot com>
MFC After:	1 month
2010-01-12 18:20:20 +00:00
Gavin Atkinson
7964930201 Spell "Hz" correctly wherever it is user-visible.
PR:		bin/142566
Submitted by:	N.J. Mann   njm njm.me.uk
Approved by:	ed (mentor)
MFC after:	2 weeks
2010-01-12 17:59:58 +00:00
Alexander Motin
481ad2f5b4 Align buffer size to LCM of 128bytes, required by hardware, and alignment of
current format. This fixes problems with non-power-of-2 number of channels.

Enable 5.1 formats support, as they are working fine now.
2010-01-12 16:40:13 +00:00
Alexander Motin
2fdb5f0b86 Make OSS_GETVERSION ioctl really work. It has 'M' group, not 'P',
as different nearby ones, and was grabbed by MIXER_xxx() handler.

While there, replace '(cmd & MIXER_xxx(0)) == MIXER_xxx(0)' expressions
with more correct '(cmd & ~0xff) == MIXER_READ(0)'. Use of bit operations
to compare numeric fields doesn't looks sane.

MFC after:	1 month
2010-01-12 11:11:25 +00:00
Brooks Davis
412f9500e2 Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic
kern.ngroups+1.  kern.ngroups can range from NGROUPS_MAX=1023 to
INT_MAX-1.  Given that the Windows group limit is 1024, this range
should be sufficient for most applications.

MFC after:	1 month
2010-01-12 07:49:34 +00:00
Xin LI
51b1ec310c Report ZFS filesystem version instead of the zpool version when we say it.
Reported by:	Yuri Pankov (on -fs@)
Submitted by:	delphij
Approved by:	pjd
MFC after:	1 week
2010-01-11 23:15:11 +00:00
Alexander Motin
fbf9cd2256 Add multichannel (4.0 and 7.1) playback support. 5.1 mode support blocked
now due to unidentified synchonization problem. For 7.1 soundcards 5.1
support handled correctly via software upmix done by sound(4).

Stereo stream is no more duplicated to all ports. If you loose sound, check
you are using right connectors. Front speakers connector is usually green,
center/LFE - orange, rear - black, side - gray.
2010-01-11 22:57:52 +00:00
Kirk McKusick
53298164b8 Cast 64-bit quantity to intptr_t rather than int so as to work properly
with 64-bit architectures (such as amd64).

Reported by:	bz
2010-01-11 22:42:06 +00:00
Bjoern A. Zeeb
fe0518e9ee Change DDB show prison:
- name some columns more closely to the user space variables,
  as we do for host.* or allow.* (in the listing) already.
- print pr_childmax (children.max).
- prefix hex values with 0x.

MFC after:	3 weeks
2010-01-11 22:34:25 +00:00
Andrew Gallatin
5769c5efb0 Use better default RSS hash (src + dst, rather than just src port)
MFC after:3 days
2010-01-11 22:28:40 +00:00
Andrew Gallatin
669f23dee5 Update mxge(4) firmware to 1.4.48b (latest available) from Myricom.
Pertinant highlights from Myricom CHANGES file include:

- Make sure invalid external smbus activity cannot affect performance
- Fix to avoid a bug where the link could sometimes stay reported as
   up on after unplugging the cable.
- For 8B NIC, make smbus connection passive at init to avoid
   possible address conflicts
- Increase number of slices to 17 for multi-slice fw
- Fix a bug where packets dropped because of link_overflow could
     be occasionally reported as bad_crc32
- Add selectable failover strategy for dual-port chip: symmetric or primary/backup
- On failover, send RARP broadcast to make the change immediately
  known to the network
- Change endianess for PCI Device Serial Number
- For dual-port NICs, time to failover is now a few microsecs
    instead of a few millisecs.

MFC after:	3 days
2010-01-11 22:25:09 +00:00
Andrew Gallatin
51bc2092fe Fix reporting of 10G Twinax media
Reported by: mjacob
MFC after: 3 days
2010-01-11 22:08:59 +00:00
Bjoern A. Zeeb
bef916f99c Adjust a comment to reflect reality, as we have proper source
address selection, even for IPv4, since r183571.

Pointed out by:	Jase Thew (bazerka beardz.net)
MFC after:	3 days
2010-01-11 21:21:30 +00:00
Kirk McKusick
e268f54cb4 Background:
When renaming a directory it passes through several intermediate
states. First its new name will be created causing it to have two
names (from possibly different parents). Next, if it has different
parents, its value of ".." will be changed from pointing to the old
parent to pointing to the new parent. Concurrently, its old name
will be removed bringing it back into a consistent state. When fsck
encounters an extra name for a directory, it offers to remove the
"extraneous hard link"; when it finds that the names have been
changed but the update to ".." has not happened, it offers to rewrite
".." to point at the correct parent. Both of these changes were
considered unexpected so would cause fsck in preen mode or fsck in
background mode to fail with the need to run fsck manually to fix
these problems. Fsck running in preen mode or background mode now
corrects these expected inconsistencies that arise during directory
rename. The functionality added with this update is used by fsck
running in background mode to make these fixes.

Solution:

This update adds three new fsck sysctl commands to support background
fsck in correcting expected inconsistencies that arise from incomplete
directory rename operations. They are:

setcwd(dirinode) - set the current directory to dirinode in the
    filesystem associated with the snapshot.
setdotdot(oldvalue, newvalue) - Verify that the inode number for ".."
    in the current directory is oldvalue then change it to newvalue.
unlink(nameptr, oldvalue) - Verify that the inode number associated
    with nameptr in the current directory is oldvalue then unlink it.

As with all other fsck sysctls, these new ones may only be used by
processes with appropriate priviledge.

Reported by:    	jeff
Security issues:	rwatson
2010-01-11 20:44:05 +00:00
Marcel Moolenaar
409a390c33 Use io(4) for I/O port access on ia64, rather than through sysarch(2).
I/O port access is implemented on Itanium by reading and writing to a
special region in memory. To hide details and avoid misaligned memory
accesses, a process did I/O port reads and writes by making a MD system
call. There's one fatal problem with this approach: unprivileged access
was not being prevented. /dev/io serves that purpose on amd64/i386, so
employ it on ia64 as well. Use an ioctl for doing the actual I/O and
remove the sysarch(2) interface.

Backward compatibility is not being considered. The sysarch(2) approach
was added to support X11, but support for FreeBSD/ia64 was never fully
implemented in X11. Thus, nothing gets broken that didn't need more work
to begin with.

MFC after:	1 week
2010-01-11 18:10:13 +00:00
Warner Losh
fe1748059f Correct a path in an include I missed earlier
Remove references to if_watchdog.  The rge_watchdog routine was empty anyway.
2010-01-11 17:29:20 +00:00
Warner Losh
3274f529db Fix bug in cfe_enumenv(). The CFE API to invoke is CFE_CMD_ENV_ENUM
and not CFE_CMD_ENV_SET.

Submitted by:	neel@
2010-01-11 17:16:06 +00:00
Warner Losh
0287b24426 Remove redundant interrupt mapper code. We don't need to disable the
interrupt sources feeding into a hardintr anymore. The
mips_mask_hard_irq() function does that for us while an interrupt is
being processed.

Submitted by:	neel@
2010-01-11 17:14:46 +00:00
Warner Losh
474dfef751 Get sb_zbpci.c compiling again after the macros PCI_BUSMAX,
PCI_SLOTMAX and PCI_FUNCMAX were moved to pcireg.h.

Submitted by:	neel@
2010-01-11 17:14:10 +00:00
Alan Cox
ac24a8ea24 Simplify pmap_init(). Additionally, correct a harmless misbehavior on i386.
Specifically, where locore had created large page mappings for the kernel,
the wrong vm page array entries were being initialized.  The vm page array
entries for the pages containing the kernel were being initialized instead
of the vm page array entries for page table pages.

MFC after:	1 week
2010-01-11 16:01:20 +00:00
Alan Cox
418f8af3a9 Eliminate an unused declaration. 2010-01-11 15:51:13 +00:00
Warner Losh
9965153d75 Attempt to cope with the dev/rmi -> mips/rmi/dev move. 2010-01-11 04:49:44 +00:00
Warner Losh
e93f9d43a8 Cope with the octeon1->cavium move. 2010-01-11 04:40:38 +00:00
Warner Losh
c64639d5dd Cope with the octeon1->cavium move. Note: none of this junk belongs here. 2010-01-11 04:38:37 +00:00
Warner Losh
a6ec986223 Cope with the move and if_timer going way. 2010-01-11 04:29:26 +00:00
Warner Losh
18f323353c Merge from projects/mips to head by hand:
Defintions for cavium uart (do they belong here?)
2010-01-11 04:13:06 +00:00
Warner Losh
05ace0e870 Merge from projects/mips to head by hand:
copy over cfe_env.c...
2010-01-11 03:43:18 +00:00
Warner Losh
c15423bb79 This was somehow copied to the wrong place :(. Remove the spare copy. 2010-01-11 00:41:14 +00:00
Warner Losh
f403c751b9 Move this to the right location. Grump. 2010-01-11 00:40:19 +00:00
Andrew Thompson
e191eb5a50 Add the Globetrotter GE40x.
Submitted by:	Mike Tancsa
2010-01-11 00:18:40 +00:00