Commit Graph

83684 Commits

Author SHA1 Message Date
Bernhard Schmidt
a7978bab76 Fix bmiss notifications, events should be sent when NOT scanning.
MFC after:	3 days
2011-10-13 18:17:03 +00:00
Marcel Moolenaar
5f81660285 In sys_obreak() and when compiling for amd64 or ia64, when the process
is ILP32 (i.e. i386) grant execute permissions by default. The JDK 1.4.x
depends on being able to execute from the heap on i386.
2011-10-13 16:20:10 +00:00
Marcel Moolenaar
676eda08d0 In elf32_trans_prot() and when compiling for amd64 or ia64, add
PROT_EXECUTE when PROT_READ is needed. By default i386 allows
execution when reading is allowed and JDK 1.4.x depends on that.
2011-10-13 16:16:46 +00:00
Ed Schouten
97b48ffc93 Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
Gleb Smirnoff
d5378bb633 Use TAILQ_FOREACH() in the nd6_dad_find() instead of hand-rolled implementation. 2011-10-13 13:33:23 +00:00
Gleb Smirnoff
a0b5928b29 De-spl(9). 2011-10-13 13:30:41 +00:00
Gleb Smirnoff
b590b6ae80 Restore functions in6_ifaddloop() and in6_ifremloop() that were
inlined by Qing Li in his big new-ARP commit. I am going to utilize
them in my newcarp work, and also these functions left declared
in in6_var.h for all the time they were absent.

Reviewed by:	bz
2011-10-13 13:05:36 +00:00
Andrew Thompson
3cd6db794c Name these gpio pins better, they are on an external PLD and not the same as
the cpu wired gpio.
2011-10-12 20:58:54 +00:00
Andrew Thompson
bbdb7f2f2e Dont just set the pin high when turning on output, use the current value. Also
let this value be set when in input mode.
2011-10-12 20:57:21 +00:00
Navdeep Parhar
aa4b09c5c7 Make sure the inp wasn't dropped when rexmt let go of the inp and
pcbinfo locks.

Reviewed by:	andre@
MFC after:	7 days
2011-10-12 19:52:23 +00:00
Gleb Smirnoff
8d689e042f Make memguard(9) capable to guard uma(9) allocations. 2011-10-12 18:08:28 +00:00
John Baldwin
5d0d779b0e If an allocation for a specific resource range fails because it is not in
a decoded range for an ACPI Host-PCI bridge, try to allocate it from the
ACPI system resource range.  If that works, permit the resource allocation
regardless.

MFC after:	1 week
2011-10-12 14:13:32 +00:00
Robert Watson
b160c14194 Correct a bug in export of capability-related information from the sysctls
supporting procstat -f: properly provide capability rights information to
userspace.  The bug resulted from a merge-o during upstreaming (or rather,
a failure to properly merge FreeBSD-side changed downstream).

Spotted by:     des, kibab
MFC after:      3 days
2011-10-12 12:08:03 +00:00
Adrian Chadd
eb29e5f70d Fix an unused variable warning/error when invariants isn't enabled.
Reported by:	bz
2011-10-12 10:19:55 +00:00
Adrian Chadd
df46ae53f6 Don't call fixup_filename() on each witness lock call.
This has been irking me for a while. This causes significant
CPU use on bottlenecked CPUs (eg my older EEEPC w/ an earlier
Celeron CPU and my MIPS24k boards) when they're passing
a lot of traffic.

Since the file/line values are only used for printing, this
should only affect display. It should have no operational
change on the code, besides reducing CPU use.
2011-10-12 09:21:02 +00:00
Marius Strobl
6aa1145c84 - Remove unused remnants of MII bitbang'ing.
- Sprinkle const.
2011-10-11 21:52:24 +00:00
Dag-Erling Smørgrav
c601ad8eeb Add a new trace point, KTRFAC_CAPFAIL, which traces capability check
failures.  It is included in the default set for ktrace(1) and kdump(1).
2011-10-11 20:37:10 +00:00
Kirk McKusick
cd795a6e1f When unmounting a filesystem always wait for the vfs_busy lock to clear
so that if no vnodes in the filesystem are actively in use the unmount
will succeed rather than failing with EBUSY.

Reported by: Garrett Cooper
Reviewed by: Attilio Rao and Kostik Belousov
Tested by:   Garrett Cooper
PR:          kern/161016
MFC after:   3 weeks
2011-10-11 18:46:41 +00:00
Christian Brueffer
796fa5e465 Add curly braces missed in r226247.
Pointy hat to:	brueffer
Submitted by:	many
MFC after:	1 week
2011-10-11 13:40:37 +00:00
Michael Tuexen
7906f59a29 Use the most significant 6 bits of the dscp instead of the least
significant ones.
This has changed in the latest version of the socket API ID and
provides backwards compatibility and gets it in syn with the
usage of the IP_TOS socket option.

MFC after: 3 days.
2011-10-11 13:24:37 +00:00
Christian Brueffer
05ad7ad667 Properly free linux_gidset in case of an error.
CID:		4136
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-11 10:32:23 +00:00
Edward Tomasz Napierala
5c0c5a182f Make unionfs also clear VAPPEND when clearing VWRITE, since VAPPEND
is just a modifier for VWRITE.

Submitted by:	rmacklem
2011-10-10 21:32:08 +00:00
Qing Li
15d2521975 All indirect routes will fail the rtcheck, except for a special host
route where the destination IP and the gateway IP is the same. This
special case handling is only meant for backward compatibility reason.
The last commit introduced a bug in the route check logic, where a
valid special case is treated as an error. This patch fixes that bug
along with some code cleanup.

Suggested by:	gleb
Reviewed by:	kmacy, discussed with gleb
MFC after:	1 day
2011-10-10 17:41:11 +00:00
Michael Tuexen
69c59f8ba2 Get struct sctp_net_route in tune with struct route.
struct route was changed in
http://svn.freebsd.org/changeset/base/225698
and since then SCTP support was broken.
This needs to be MFCed to stable/9 to unbreak SCTP support in 9.0
MFC after: 3 days.
2011-10-10 16:31:18 +00:00
Hans Petter Selasky
1984dc56b2 Add USB mass storage quirk for device that emits errors after the automatic
no synchronize cache detection.

Submitted by:	Scott Allendorf
MFC after:	3 days
2011-10-10 16:26:06 +00:00
Hans Petter Selasky
f6c6639af8 Bugfix: The ucom detach function is sometimes called on zeroed structures.
Check for this case and just return, so that the UCOM unit number zero is
not accidentially freed.

Submitted by:	Danish FreeBSD user at EuroBSDcon 2011
MFC after:	3 days
2011-10-10 15:54:44 +00:00
Konstantin Belousov
8be736b2b3 Do not ignore block offsets.
PR:	kern/160943
Submitted by:	Craig Boston <cb severious net>
Reviewed by:	Danny Braniss <danny cs huji ac il>
MFC after:	1 week
2011-10-10 13:26:53 +00:00
Michael Tuexen
3d2443cc84 When moving an stcb to a new inp and we copy over the list of
bound addresses, update the last used address pointer.
If not, it might result in a crash if the old inp goes away.

MFC after: 3 days.
2011-10-10 12:28:47 +00:00
Alexander V. Chernikov
7aabe9d9e0 Free mbuf in case when protocol in unknown in ng_ipfw_rcvdata().
This change fixes (theoretically) possible mbuf leak introduced in
r225586. Reorder code a bit and change return codes to be more specific

Reviewed by:	glebius
Approved by:    kib (mentor)
2011-10-10 09:33:07 +00:00
Christian Brueffer
e275052c56 Add missing break statement to make sure all 3DES etypes really are treated
the same.

CID:		3624
Found with:	Coverity Prevent(tm)
Reviewed by:	dfr
MFC after:	1 week
2011-10-10 09:13:07 +00:00
Ed Schouten
231c19b1e3 Properly use the cursor to bound the position for CUP.
We must take the origin region into account when clamping the cursor
position.

MFC after:	3 days
2011-10-10 06:13:27 +00:00
Adrian Chadd
3c5ebcdc1d Fix an incorrect use of sizeof().
Obtained from:	OpenBSD sys/dev/ic/bwi.c r1.87
2011-10-10 02:54:58 +00:00
Adrian Chadd
e008215028 Update from OpenBSD: Include 0x4402 in the bbp id mapping table used on older devices.
http://bcm-specs.sipsolutions.net/BackPlane agrees.

Obtained from:	OpenBSD, sys/dev/ic/bwi.c r1.88
2011-10-10 02:49:21 +00:00
Craig Rodrigues
8d1a3b6998 Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined.  This sysctl can be queried by feature_present(3).

Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
If these utilities detect that ATA_CAM is enabled, then these utilities
will error out.  These utilities are compatible with the old ATA
driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
we give end-users an idea as to what remedies to use, and reduce the need for them
to file PR's.  For atacontrol, camcontrol must be used instead,
and for burncd, alternative utilties from the ports collection must be used
such as sysutils/cdrtools.

In future, maybe someone can re-write burncd to work with ATA_CAM,
but at least for now, we give a somewhat useful error message to end users.

PR:		160979
Reviewed by:	jh, Arnaud Lacombe <lacombar at gmail dot com>
Reported by:	Joe Barbish <fbsd8 at a1poweruser dot com>
MFC after:	3 days
2011-10-09 21:42:02 +00:00
Marius Strobl
a131219c6e Recognize the Intel(R) Centrino(R) Wireless-N 130.
PR:	161162
2011-10-09 21:36:14 +00:00
Marius Strobl
f305d1b0db In device_get_children() avoid malloc(0) in order to increase portability
to other operating systems.

PR:     154287
2011-10-09 21:21:37 +00:00
Marius Strobl
882e24b03a Prefer KOBJMETHOD_END. 2011-10-09 20:27:20 +00:00
Marius Strobl
356d17e523 Sprinkle const. 2011-10-09 20:16:51 +00:00
Michael Tuexen
629749b60c Update the inp stored in a HB-timer when moving an stcb to a new inp.
Use only this stored inp when processing a HB timeout.
This fixes a bug which results in a crash.

MFC after: 3 days.
2011-10-09 14:12:17 +00:00
Marius Strobl
4a48c68fdf Remove inphy(4), exphy(4) as well as ruephy(4) that no longer existed as a
separate config option, which was missed in r226154.
2011-10-08 21:15:39 +00:00
Alan Cox
1549ed03ff Fix the handling of an empty kmem map by sysctl_kmem_map_free(). In
the unlikely event that sysctl_kmem_map_free() was performed on an
empty kmem map, it would incorrectly report the free space as zero.

Discussed with:	avg
MFC after:	1 week
2011-10-08 18:29:30 +00:00
Marius Strobl
112a855de7 - Follow the lead of dcphy(4) and pnphy(4) and move the reminder of the PHY
drivers that only ever attach to a particular MAC driver, i.e. inphy(4),
  ruephy(4) and xlphy(4), to the directory where the respective MAC driver
  lives and only compile it into the kernel when the latter is also there,
  also removing it from miibus.ko and moving it into the module of the
  respective MAC driver.
- While at it, rename exphy.c, which comes from NetBSD where the MAC driver
  it corresponds to also is named ex(4) instead of xl(4) but that in FreeBSD
  actually identifies itself as xlphy(4), and its function names accordingly
  for consistency.
- Additionally while at it, fix some minor style issues like whitespace
  in the register headers and add multi-inclusion protection to inphyreg.h.
2011-10-08 12:33:10 +00:00
Christian Brueffer
37b14fc83c Fix an infinite loop in siba_bwn_suspend().
CID:		3536
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-08 12:09:57 +00:00
Christian Brueffer
8780431854 Remove dead code, "error" doesn't change between this check and the
previous one.

CID:		3254
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-08 10:50:48 +00:00
Christian Brueffer
709ef347b7 Remove two dublicated assignments.
CID:		9870
Found with:	Coverity Prevent(tm)
Confirmed by:	rwatson
MFC after:	1 week
2011-10-08 09:14:18 +00:00
Pyun YongHyeon
50fb449799 BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so
remove explicit checks for BCM5716.
The BCM5709 and BCM5716 chips are virtually indistinguishable by
software except for the PCI device ID.  The two chips differ in
that BCM5709 supports TCP/IP and iSCSI offload in Windows while
the BCM5716 doesn't.
While I'm here remove now unused definition of BCE_CHIP_NUM_5716
and BCE_CHIP_ID_5716_C0.

Reported by:	sbruno
Reviewed by:	davidch
Tested by:	davidch
2011-10-08 00:00:54 +00:00
Qing Li
6703e7ea10 Do not try removing an ARP entry associated with a given interface
address if that interface does not support ARP. Otherwise the
system will generate error messages unnecessarily due to the missing
entry.

PR:		kern/159602
Submitted by:	pluknet
MFC after:	3 days
2011-10-07 22:22:19 +00:00
Marius Strobl
50e66535b9 Sync with ahc(4)/ahd(4)/sym(4) etc:
Zero any sense not transferred by the device as the SCSI specification
mandates that any untransferred data should be assumed to be zero.

Reviewed by:	ken
2011-10-07 21:23:42 +00:00
Christian Brueffer
4795003bd2 Add missing va_end() in an error case to clean up after va_start()
(already done in the non-error case).

CID:		4726
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-07 21:00:26 +00:00
Christian Brueffer
8a11984e21 Add missing va_end() to clean up after va_start().
CID:		4725
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-07 20:54:12 +00:00