Commit Graph

127129 Commits

Author SHA1 Message Date
Ruslan Ermilov
7d9ffd6204 Spelling. 2006-09-29 22:51:04 +00:00
Andre Oppermann
1038b3fbdc Back out rev. 1.152 as it was breaking vlan tag insertion when vlan tag
stripping was disabled due to being in promisc mode.  This is a hardware
bug.  Update comment to explicitly state the reason the manual vlan tag
insertion in this case.  See rev. 1.53 for further information as well.

Noticed by:	jhb
2006-09-29 21:38:12 +00:00
Ruslan Ermilov
c4baa2453c Markup nit. 2006-09-29 21:17:10 +00:00
Ruslan Ermilov
cab4aede58 Fix WARNS=2 warnings. 2006-09-29 20:57:38 +00:00
Ruslan Ermilov
6dcf625c41 Fix most of the WARNS=2 warnings. 2006-09-29 20:27:41 +00:00
John Baldwin
f3088510e2 Oops, add return values for the smap command function. We must have the
warnings set weird or something because gcc didn't warn about this at all.

Submitted by:	ru
2006-09-29 20:07:16 +00:00
Ruslan Ermilov
bc84aa4ba3 Markup fixes. 2006-09-29 17:57:04 +00:00
Ruslan Ermilov
b3e2f7a6d8 Sync usage() with manpage's SYNOPSIS. 2006-09-29 17:36:38 +00:00
Ruslan Ermilov
24bffe0613 Line up usage output. 2006-09-29 17:28:01 +00:00
Ruslan Ermilov
7bd89ff038 Fix usage(). 2006-09-29 17:23:14 +00:00
Ruslan Ermilov
37085ccacf Sync usage() with manpage's SYNOPSIS. 2006-09-29 17:17:53 +00:00
Ruslan Ermilov
36610ce416 Sync usage() with manpage's SYNOPSIS. 2006-09-29 17:04:03 +00:00
Ruslan Ermilov
ae67ba29a4 Language tweak. 2006-09-29 16:51:29 +00:00
Ruslan Ermilov
d20241a618 Sync usage() and SYNOPSIS. 2006-09-29 16:46:01 +00:00
Andre Oppermann
6a7c943c59 Remove stone-aged and irrelevant "#ifndef notdef". 2006-09-29 16:44:45 +00:00
Bruce M Simpson
910e1364b6 Nits.
Submitted by:	ru
2006-09-29 16:16:41 +00:00
Ruslan Ermilov
34cd417b64 Whitespace nit. 2006-09-29 16:10:28 +00:00
Ruslan Ermilov
f6385e481e Sync utility's usage() with manpage's SYNOPSIS. 2006-09-29 16:07:44 +00:00
Bruce M Simpson
2d20d32344 Push removal of mrouted down to the rest of the tree. 2006-09-29 15:45:11 +00:00
Ruslan Ermilov
9af8612e8c Don't run install-info under lockf if not installing in parallel.
Requested by:	rwatson
2006-09-29 15:36:19 +00:00
Ruslan Ermilov
cb29445a92 Markup fixes. 2006-09-29 15:20:48 +00:00
Ariff Abdullah
18f453658f Fix pointer dereference before NULL pointer checking.
Noticed by:	netchild
CID:		243889
Found by:	Coverity Prevent (TM)
2006-09-29 14:08:53 +00:00
Andre Oppermann
bb2690b330 Small style and comment adjustments.
Reviewed by:	jfv
2006-09-29 13:54:04 +00:00
Andre Oppermann
7a6e967aa0 Remove manual vlan header insertion in em_encap(). It is unnecessary as the
generic vlan_start() takes care of it when vlan hardware insertion is disabled.

In em_set_promisc() add a note that BPF may also be enabled without going into
promisc mode.

Reviewed by:	jfv
2006-09-29 13:47:38 +00:00
Andre Oppermann
299b40dcd5 Change em_transmit_checksum_setup() to deal with already inserted vlan headers,
IP options and add skeleton IPv6 support.  The new code structure can also be
easily enhanced to support new/more protocols (SCTP) in the future.

Reviewed by:	jfv
2006-09-29 13:37:26 +00:00
Andre Oppermann
404138281a Change em_tso_setup() to deal with already inserted vlan headers, IP options
and add skeleton IPv6 support.  The new code structure can also be easily
enhanced to support new/more protocols (SCTP) and IP fragmentation in the
future.

In em_encap() only try to do TSO if 'dotso' is true.

Reviewed by:	jfv
2006-09-29 13:33:30 +00:00
Andre Oppermann
6c9d400d37 Only advertize IFCAP_TSO4 capabilities. IPv6 is not yet supported.
Reviewed by:	jfv
2006-09-29 13:17:16 +00:00
Andre Oppermann
5c335b1cc8 Handle all error cases from bus_dmamap_load_mbuf_sg(). Those are:
- EFBIG means the mbuf chain was too long and bus_dma ran out of segments.
   Defragment the mbuf chain and try again. (Already existed, not changed.)
 - ENOMEM means bus_dma could not obtain enough bounce buffers at this point
   in time.  Defer sending and try again later.
 - All other errors, in particular EINVAL, are fatal and prevent the mbuf
   chain from ever going through.  Drop it and report error.
 - Checking (nsegs == 0) is unnecessary as bus_dmamap_load_mbuf_sg() always
   reports an error if it is < 1.

This prevents broken packets from clogging the interface queue indefinately.

Discussed with:	scottl
Reviewed by:	jfv
2006-09-29 13:12:38 +00:00
Bruce M Simpson
aa805a5eb7 Remove mrouted from -CURRENT.
Discussed with:	fenner, net@
2006-09-29 10:40:53 +00:00
Bruce M Simpson
13b3ebf134 Remove mrouted and its utilities from the base system.
They may now be obtained from ports.

Discussed with:	fenner, net@
2006-09-29 10:39:23 +00:00
Ruslan Ermilov
60206ede14 Belatedly document the size change of "struct x?tcpcb". 2006-09-29 10:14:37 +00:00
Martin Blapp
9b206de5a0 Free tty struct after last close. This should fix the pty-leak by numbers.
Remove workarounds for tty_refcount beeing 0, this will be fixed differently
later.
2006-09-29 09:53:19 +00:00
Martin Blapp
e4936f3763 Free tty struct after last close. This should fix the pty-leak by numbers.
Remove workarounds for tty_refcount beeing 0, this will be fixed differently
later.

Back out rev 1.145 since we initialize the tty struct from scratch and bad
things can't happen anymore.
2006-09-29 09:52:57 +00:00
Ruslan Ermilov
a861847014 SNDCTL_TMR_{START,STOP,CONTINUE} don't take an argument. 2006-09-29 09:28:22 +00:00
Ruslan Ermilov
f77472e6dc The SNDCTL_DSP_NONBLOCK ioctl doesn't take an argument, from
what I can tell by browsing the Internet (Linux, OSS, etc.).
2006-09-29 09:10:54 +00:00
Maxim Konovalov
c24384096d o Check for a required "pathname" argument presence.
PR:		bin/95146
Submitted by:	candy-sendpr@kgc.co.jp
MFC after:	3 weeks
2006-09-29 08:00:40 +00:00
Maxim Konovalov
acc03ac6bb o Convert w/spaces to tabs in the previous commit. 2006-09-29 06:46:31 +00:00
Mike Silbersack
d4bdcb16cc Rather than autoscaling the number of TIME_WAIT sockets to maxsockets / 5,
scale it to min(ephemeral port range / 2, maxsockets / 5) so that people
with large gobs of memory and/or large maxsockets settings will not
exhaust their entire ephemeral port range with sockets in the TIME_WAIT
state during periods of heavy load.

Those who wish to tweak the size of the TIME_WAIT zone can still do so with
net.inet.tcp.maxtcptw.

Reviewed by: glebius, ru
2006-09-29 06:24:26 +00:00
Ruslan Ermilov
64941e9d80 Move the -l option processing to where it belongs.
Overall still not kosher but better matches style(9).
2006-09-29 06:06:39 +00:00
Luoqi Chen
5a8e64ee60 Do not chdir(2) until after setuid(2), otherwise "su - username" would fail
when root doesn't have the permission to enter target user's home directory.
If set, PAM environment variable HOME will be used in chdir(2) instead of
pwd->pw_dir, this allows pam_chroot module to continue to function.
2006-09-29 04:41:37 +00:00
Ken Smith
a9a5d47c85 Fix two minor style(9) nits in v1.313 which were noticed during an
MFC review.  alc@ will be MFCing V1.313 plus style fix to RELENG_6.
2006-09-29 00:20:56 +00:00
Matteo Riondato
9e0573fdc2 Set txrx_error to 1 when we reach abort. This makes the program correctly set the exit code.
The PR has further details on this.

PR:		bin/103206
Submitted by:	John Hickey <jjh-freebsd@daedalian.us>
MFC after:	3 days
2006-09-28 21:22:21 +00:00
John Baldwin
d64e328e3c Tweak the code to handle intercepting BIOS calls to int 0x15 to shave
another 16 bytes off of BTX (and thus boot2):
- Compare against the value of %eax that is saved on the stack instead of
  loading it into %eax (which requires saving the current %eax on the
  stack).
- Use %ch to examine the keyboard flag state in the BIOS to see if
  Ctrl-Alt-Del is pressed instead of %al so we don't have to save %eax on
  the stack anymore.

MFC after:	1 week
2006-09-28 19:42:10 +00:00
John Baldwin
4b9657e974 Optimize the int 15/87 handler for space to shave another 16 bytes off of
BTX (and thus boot2):
- Don't bother saving %eax, %ebx, or %ecx as it is not necessary.
- Use a more compact sequence to load the base value out of a GDT entry
  by loading the contiguous low 24 bits into the upper 24 bits of %eax,
  loading the high 8 bits into %al, and using a ror to rotate the bits
  (2 mov's and a ror) rather than loading the pieces in smaller chunks
  (3 mov's and a shl).
- Use movzwl + leal instead of movl + movw + shll + addl.
- Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where
  it's ok to trash %eax.  xchgl %eax, foo is a 1-byte opcode whereas the
  mov is a 2-byte opcode.
- Use movzwl rather than xorl + movw.

MFC after:	1 week
2006-09-28 19:38:02 +00:00
John Baldwin
c4f7c44bb3 Add an 'smap' command that dumps out the BIOS SMAP.
MFC after:	1 week
2006-09-28 19:07:13 +00:00
John Baldwin
64786948cc Ignore a sub-topic match if it is inside the command description.
Otherwise, merge-help can get confused by a command description that
includes a word that starts with a capital S.

MFC after:	1 week
2006-09-28 19:06:20 +00:00
Andre Oppermann
2c30ec0a1f When tcp_output() receives an error upon sending a packet it reverts parts
of its internal state to ignore the failed send and try again a bit later.
If the error is EPERM the packet got blocked by the local firewall and the
revert may cause the session to get stuck and retry indefinitely.  This way
we treat it like a packet loss and let the retransmit timer and timeouts
do their work over time.

The correct behavior is to drop a connection that gets an EPERM error.
However this _may_ introduce some POLA problems and a two commit approach
was chosen.

Discussed with:	glebius
PR:		kern/25986
PR:		kern/102653
2006-09-28 18:02:46 +00:00
Ariff Abdullah
7699548f1b Various fixups, especially for the upcomming High Definition Audio
commit.

1) sys/dev/sound/pcm/sound.h
   sys/dev/sound/pcm/channel.c
   * Be more specific: SD_F_SOFTVOL -> SD_F_SOFTPCMVOL
2) sys/dev/sound/pcm/mixer.[ch]
   * Implement
       mix_setparentchild()
       mix_setrealdev()
       mix_getparent()
       mix_getchild()
     The purpose of these functions is implement relative volume
     adjustment, such as to tie two or more mixer device into a
     single logical device. Usefull for the upcoming HDA driver
     and few AC97 codec (such as AD1981B) where the master volume
     "vol" need to be implemented using this logical manner.
3) sys/dev/sound/pcm/ac97_patch.[ch]
   * Patch for AD1981B codec to enable (automuting) headphone jack sense.
4) sys/dev/sound/pcm/ac97.c
   * Implement proper logical master volume for AD9181B codec
     through various mix_set{parentchild,realdev}(). Tie both
     "ogain" (headphone volume) and "phone" (speaker/lineout) to
     a logical "vol".
5) sys/dev/sound/pcm/usb/uaudio_pcm.c
   * ditto, for "vol" -> { "pcm" }.

MFC after:	1 month
2006-09-28 17:29:00 +00:00
John Baldwin
add92b34d1 A couple of simple tweaks that trim BTX by 6 bytes. Since BTX is
16-byte aligned within boot2 however, this actually trims boot2 by 16
bytes.
2006-09-28 16:30:36 +00:00
Ollivier Robert
3fa694fea6 This commit was generated by cvs2svn to compensate for changes in r162735,
which included commits to RCS files with non-trunk default branches.
2006-09-28 16:02:34 +00:00