Commit Graph

174574 Commits

Author SHA1 Message Date
marius
07ac74d257 - 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
des
d905bcbba9 I appreciate the logic behind using a (void) cast to indicate that the
return value is intentionally ignored, but frankly, all it does is
get in the way of the code.

Also fix a few other incorrect casts, such as (void *)malloc(foo) and
passing signed values to %x.
2011-10-08 12:28:06 +00:00
des
e7179d16fc Fix casting. 2011-10-08 12:21:51 +00:00
des
cd04cd4a49 Whitespace. 2011-10-08 12:10:16 +00:00
brueffer
6ddde1235a 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
des
5f806d203a C has had swicth statements for 40 years or so. It's about time we
started using them.
2011-10-08 11:51:48 +00:00
des
3aeaeac999 Sort and line up. 2011-10-08 11:39:00 +00:00
brueffer
2c3684636b 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
des
db03f845e1 1) Some of the #defines or enums for which we auto-generate naming
functions may be wider than int, so use intmax_t throughout.  Also
   add missing casts in printf() calls.

2) Clean up some of the auto-generated code to improve readability.

3) Auto-generate kdump_subr.h.  Note that this requires a semi-ugly hack
   in the Makefile to make sure it is generated before make(1) tries to
   build kdump.c, or preprocess it for 'make depend'.

MFC after:	3 weeks
2011-10-08 09:57:29 +00:00
brueffer
2e76e4f6aa 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
ed
3eeda85437 Remove extraneous WARNS=7.
WARNS above 6 has no use. Also, all of usr.bin is also built with
WARNS=6 by default.

Discussed with:	edwin
2011-10-08 07:20:12 +00:00
stas
a554b0aa74 - Add a couple of more sed subsitutions needed to get the correct
libtool.m4.  With these fixes libtool will correctly indentify the
  system as ELF (and not a.out).
- While here, change the substitutions so they're still correctly
  match freebsd1.x, freebsd2.x etc.
2011-10-08 00:01:17 +00:00
yongari
a4a1ec6b64 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
stas
9b1ae764a6 - ${WRKSRC} might be missing when the autotools fixup is running.
Account for this.

Reported by:	Mykola Dzham <i@levsha.me>
2011-10-07 23:43:51 +00:00
jceel
5364f65380 Add myself.
Approved by:	wkoszek (mentor)
2011-10-07 23:12:33 +00:00
qingli
efcb5e88f9 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
des
650dd4c77f Mention tdsignal(9).
MFC after:	1 week
2011-10-07 22:14:18 +00:00
marius
7a6e7c47a2 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
brueffer
8905963622 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
brueffer
18a321c149 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
qingli
d0874dfb45 Remove the reference held on the loopback route when the interface
address is being deleted. Only the last reference holder deletes the
loopback route. All other delete operations just clear the IFA_RTSELF
flag.

PR:		kern/159601
Submitted by:	pluknet
Reviewed by:	discussed on net@
MFC after:	3 days
2011-10-07 18:01:34 +00:00
andre
f1deb54a54 Prevent TCP sessions from stalling indefinitely in reassembly
when reaching the zone limit of reassembly queue entries.

When the zone limit was reached not even the missing segment
that would complete the sequence space could be processed
preventing the TCP session forever from making any further
progress.

Solve this deadlock by using a temporary on-stack queue entry
for the missing segment followed by an immediate dequeue again
by delivering the contiguous sequence space to the socket.

Add logging under net.inet.tcp.log_debug for reassembly queue
issues.

Reviewed by:	lsteward (previous version)
Tested by: 	Steven Hartland <killing-at-multiplay.co.uk>
MFC after:	3 days
2011-10-07 16:39:03 +00:00
kib
1134edae2b Remove unused define.
MFC after:	1 month
2011-10-07 16:09:44 +00:00
ed
1659a97623 Fix whitespace inconsistencies found in homegrown Symbol.maps. 2011-10-07 15:05:24 +00:00
andre
94a8deed4e Add back the IP header length to the total packet length field on
raw IP sockets.  It was deducted in ip_input() in preparation for
protocols interested only in the payload.

On raw sockets the IP header should be delivered as it at came in
from the network except for the byte order swaps in some fields.

This brings us in line with all other OS'es that provide raw
IP sockets.

Reported by: Matthew Cini Sarreo <mcins1-at-gmail.com>
MFC after: 3 days
2011-10-07 13:43:01 +00:00
rmacklem
2540f21345 Remove an extraneous "already" from a comment introduced by r226081.
Submitted by:	bf1783 at googlemail.com
MFC after:	3 days
2011-10-07 13:16:21 +00:00
des
0caa0a85dd Add a -x option that causes ssh-agent(1) to exit when all clients have
disconnected.

MFC after:	1 week
2011-10-07 13:10:16 +00:00
des
c5fa84a478 Load the ECDSA key if there is one.
MFC after:	1 week
2011-10-07 12:58:33 +00:00
ed
e229f3cc32 Simply let teken_stress use arc4random.
This makes it run quite a bit faster, since it makes system calls less
often.
2011-10-07 12:42:03 +00:00
ed
193a5b8d44 Tab should not blank cells.
It seems I was under the impression that a tab differs from a single
forward tabulation, namely that it blanks the underlying cells. This
seems not to be the case. They are identical.

This should fix applications like jove(1) that use tabs instead of
explicit cursor position setting.

Reported by:	Brett Glass <brett lariat net>
MFC after:	3 days, after it's tested
2011-10-07 12:21:50 +00:00
jonathan
9c782bcdf6 Change one printf() to log().
As noted in kern/159780, printf() is not very jail-friendly, since it can't be easily monitored by jail management tools. This patch reports an error via log() instead, which, if nobody is watching the log file, still prints to the console.

Approved by: mentor (rwatson)
Submitted by: Eugene Grosbein <eugen@eg.sd.rdtc.ru>
MFC after: 5 days
2011-10-07 09:51:12 +00:00
marius
df7e5429bc Merge from r225950:
Set the sense residual properly.

Reviewed by:	ken
2011-10-07 08:59:54 +00:00
adrian
43d046c97a Begin implementing correct MIPS24K sampling mode behaviour.
* Add the interrupt bit in the configuration register
* Correctly set the counter register for the sampling overflow
  interrupt. The interrupt is asserted when bit 31 is set.
  So set the overflow value at 0x80000000 and subtract the
  programmed value as appropriate.
2011-10-07 06:13:38 +00:00
obrien
a2b5592dae Increase MSGBUF_SIZE.
The previous size lead to truncated /var/run/dmesg.boot when booted with "-v".
2011-10-07 06:00:00 +00:00
obrien
4b04845b06 Disallow various debug.kdb sysctl's when securelevel is raised.
PR:	161350
2011-10-07 05:47:30 +00:00
nwhitehorn
10aa664dd0 Work around some behavior of gpart that I absolutely do not understand in
order to make every operation of the partition editor fully revertable.
Under *no circumstances* will it any longer touch the disks until the user
presses Finish and confirms it.

MFC after:	3 days
2011-10-07 01:40:30 +00:00
delphij
3774d99430 Return proper errno when we hit error when doing sanity check.
This fixes dtrace crashes when module is not compiled with CTF
data.

Submitted by:	Paul Ambrose ambrosehua at gmail.com
MFC after:	1 week
2011-10-07 01:37:58 +00:00
rmacklem
7adae26f0f A crash reported on freebsd-fs@ on Sep. 23, 2011 under the subject
heading "kernel panics with RPCSEC_GSS" appears to be caused by a
corrupted tailq list for the client structure. Looking at the code, calls
to the function svc_rpc_gss_forget_client() were done in an SMP unsafe
manner, with the svc_rpc_gss_lock only being acquired in the function
and not before it. As such, when multiple threads called
svc_rpc_gss_forget_client() concurrently, it could try and remove the
same client structure from the tailq lists multiple times.
The patch fixes this by moving the critical code into a separate
function called svc_rpc_gss_forget_client_locked(), which must be
called with the lock held. For the one case where the caller would
have no interest in the lock, svc_rpc_gss_forget_client() was retained,
but a loop was added to check that the client structure is still in
the tailq lists before removing it, to make it safe for multiple
concurrent calls.

Tested by:	clinton.adams at gmail.com (earlier version)
Reviewed by:	zkirsch
MFC after:	3 days
2011-10-07 01:15:04 +00:00
jkim
f3e29d5483 Use the caculated length instead of maximum length. 2011-10-06 21:55:05 +00:00
jkim
5bf71ef7d8 Remove a now-defunct variable. 2011-10-06 21:40:08 +00:00
jkim
f18be12037 Use uint32_t instead of u_int32_t. Fix style(9) nits. 2011-10-06 21:17:46 +00:00
jkim
40f14199fb Make sure to ignore the leading NULL byte from Linux abstract namespace. 2011-10-06 21:09:28 +00:00
jkim
bd4e9fe2ca Restore the original socket address length if it was not really AF_INET6. 2011-10-06 20:48:23 +00:00
jkim
55a4bbebe3 Retern more appropriate errno when Linux path name is too long. 2011-10-06 20:28:08 +00:00
jkim
cf76cae978 Inline do_sa_get() function and remove an unused return value. 2011-10-06 20:20:30 +00:00
jkim
9a911728e7 Unroll inlined strnlen(9) and make it easier to read. No functional change. 2011-10-06 19:59:14 +00:00
kib
e2b10ad687 Remove no longer needed BUGS section.
MFC after:	1 month
2011-10-06 17:35:38 +00:00
kib
ab59605ce7 Convert MIPS to the syscallenter/syscallret system call sequence handlers.
This was the last architecture used custom syscall entry sequence.

Reviewed, debugged, tested and approved by:	jchandra
MFC after:	1 month
2011-10-06 17:34:43 +00:00
wxs
0d289d32e4 Fix a typo in a comment.
Approved by:	kib@
2011-10-06 16:13:47 +00:00
melifaro
12aa836655 Add myself.
Approved by:       kib (mentor)
2011-10-06 15:10:48 +00:00