Commit Graph

121756 Commits

Author SHA1 Message Date
Yaroslav Tykhiy
64a17d2e86 Set IFF_BROADCAST and IFF_MULTICAST on vlan interfaces from the
beginning and simply refuse to attach to a parent without either
flag.

Our network stack cannot handle well IFF_BROADCAST or IFF_MULTICAST
on an interface changing on the fly.  E.g., IP will or won't assign
a broadcast address to an interface and join the all-hosts multicast
group on it depending on its IFF_BROADCAST and IFF_MULTICAST settings.
Should the flags alter later, IP will miss the change and keep using
bogus settings.  This can lead to evil things like supplying an
invalid broadcast address or trying to leave a multicast group that
hasn't been joined.  So just avoid touching the flags since an
interface was created.  This has no practical purpose.

Discussed with:	-net, glebius, oleg
MFC after:	1 week
2006-01-31 16:41:05 +00:00
Pawel Jakub Dawidek
4ca64f1db6 Remove unused argument.
MFC after:	3 days
2006-01-31 15:55:52 +00:00
Hartmut Brandt
3dc7424242 This commit was generated by cvs2svn to compensate for changes in r155094,
which included commits to RCS files with non-trunk default branches.
2006-01-31 14:59:07 +00:00
Hartmut Brandt
5105400329 Vendor patch: prevent a core dump when the trace option is not followed
by an option value.

Submitted by:	Shteryana Shopova <shteryana@yahoo.com>
2006-01-31 14:59:07 +00:00
Marius Strobl
a7ee7a7d6a Add le(4), a driver for AMD Am7900 LANCE and Am79C9xx PCnet NICs ported
from NetBSD. This driver actually can replace lnc(4). Advantages over
lnc(4) are:
- Cleaner and more flexible regarding MD needs.
- Endian-clean and MPSAFE.
- Supports ALTQ, VLAN_MTU, ifmedia.
- Uses 32bit DMA for the PCI variants.

This commit includes front-ends for the dma(4) pseudo-bus found on SBus-
based sparc64 machines (thus supports the on-board LANCE in Sun Ultra 1)
and PCI. In order to actually replace lnc(4), the front-ends for ISA and
the PC98 CBUS would have to be added but for which I don't have hardware
to test.

Reviewed and some improvements by:	yongari
Tested on:				i386, sparc64
2006-01-31 14:48:58 +00:00
Luigi Rizzo
de64f22aa4 make sure that the start and end preloaded MFS markers are
in contiguous strings, and that the compiler does not optimize them
away because it thinks they are unused.
2006-01-31 13:35:30 +00:00
Marius Strobl
bdbca4ddae o lsi64854_enet_intr():
- Like lsi64854_scsi_intr() return -1 in case there was a DMA error so
    the caller can distinguish it from a normal interrupt and leave the
    reset of the DMA engine to the caller so we don't kill any state there.
  - Move the static 'dodrain' flag to struct lsi64854_softc as there can
    be more than one LSI64854 used for a LANCE in a system and reset it
    again once draining the E-cache is done so we don't keep draining the
    cache with every interrupt.
  - Remove calling sc->sc_intrchain(), we will call lsi64854_enet_intr()
    via sc->intr() in the interrupt handler of the LANCE driver and not
    use it in chained mode.

o lsi64854_pp_intr():
  - Like lsi64854_scsi_intr() return -1 in case there was a DMA error so
    the caller can distinguish it from a normal interrupt.

o Remove the no longer used sc_intrchain* from struct lsi64854_softc.

o Make lsi64854_reset(), lsi64854_setup*() and lsi64854_*_intr() static
  to lsi64854.c as we do and will only call them via the respective
  function pointers in struct lsi64854_softc.

o While here fix style(9) bugs (variable definition inside a nested scope).
2006-01-31 12:50:02 +00:00
Pawel Jakub Dawidek
551fdafaf4 Add simple tests which verify that redzone(9) works properly. 2006-01-31 11:20:13 +00:00
Pawel Jakub Dawidek
847a2a1716 Add buffer corruption protection (RedZone) for kernel's malloc(9).
It detects both: buffer underflows and buffer overflows bugs at runtime
(on free(9) and realloc(9)) and prints backtraces from where memory was
allocated and from where it was freed.

Tested by:	kris
2006-01-31 11:09:21 +00:00
Poul-Henning Kamp
f0107b2c5d Add missing 's' suffix on alternate rendition of time. 2006-01-31 08:09:37 +00:00
Peter Wemm
8c6a035ead Fix a malloc overrun in 32-bit compat libmap lookup code. 2006-01-31 06:08:28 +00:00
Andrey A. Chernov
fb1a11d799 Don't set time to current, if set to specific time fails
PR:             92577
2006-01-31 02:21:18 +00:00
Tom Rhodes
a00d9cda62 Does not return EBUSY, the mutex will keep blocking until it's unlocked. 2006-01-31 01:47:16 +00:00
Pawel Jakub Dawidek
d72d8f53f5 Tell the user exactly where the problem was. 2006-01-30 23:00:48 +00:00
Pawel Jakub Dawidek
1a0cc6b19e Use pidfile(3).
OK'ed by:	imp
2006-01-30 22:50:13 +00:00
Pawel Jakub Dawidek
aaf8e1867b Allow to specify only one disk. This is helpful when we want to extend
our concatenated device later.

MFC after:	1 week
2006-01-30 22:47:07 +00:00
Pawel Jakub Dawidek
87e9d284dc Fix typo which cased that 64kB elements limit was not set properly and
16kB elements limit wasn't set at all.

Submitted by:	Vsevolod Lobko <seva@ip.net.ua>
MFC after:	3 days
2006-01-30 22:45:43 +00:00
Marius Strobl
bc0dd76f3e Revert the part of rev. 1.3 which enabled the chaining of the DMA engine
interrupt handler for the LANCE devices and remove dma_setup_intr(). We
just can't completely ignore the DMA engine in a LANCE driver anyway and
calling the DMA engine interrupt handler in the LANCE driver directly
allows to cover it by the LANCE driver lock.
2006-01-30 21:43:14 +00:00
Roman Kurakin
1e5f9e06c9 Add manual page for Cronyx Tau-PCI/32 ce(4) driver. 2006-01-30 21:33:22 +00:00
Roman Kurakin
dc8f61b4f1 Fix forward variable declaration. 2006-01-30 21:12:49 +00:00
Roman Kurakin
e784b8786c Add support for Cronyx TAU-PCI/32 ce(4). 2006-01-30 21:08:30 +00:00
Florent Thoumie
b308457205 - Add a scsi_da.c and a umass.c quirk for Genesys 6-in-1 Card Reader.
Reported by:	anders on freebsd-usb@
Tested by:	anders
Approved by:	ssouhlal
MFC after:	3 days
2006-01-30 20:27:44 +00:00
Scott Long
019a2f40ae Regroup order of operations to better reflect what was probably intended.
Submitted by: Peter Jeremy
2006-01-30 19:25:52 +00:00
Matteo Riondato
a192a4640a Make df output more consistent:
Remove -k now that -h is present
use -l instead of -t nonfs to match smbfs too [1]
PR:	conf/50956 [1]
Approved by:	philip (mentor)
MFC after:	3 days
2006-01-30 19:23:24 +00:00
Max Laier
6afd356ecf Fix a leftover "iwi_boot" string.
Submitted by:	gallatin
2006-01-30 16:32:08 +00:00
Ken Smith
65030cb84d Enable splitting up the MFSROOT floppy on amd64, the contents now overflow
one floppy's worth of space.
2006-01-30 14:24:31 +00:00
Gleb Smirnoff
5dc27bc63b Recognize new VLAN_HWCSUM flag. 2006-01-30 14:04:30 +00:00
Gleb Smirnoff
479b23b772 This driver can do hardware VLAN tagging + checksum offloading.
In collaboration with:	Mihail Balikov <mihail.balikov interbgc.com>
2006-01-30 13:45:55 +00:00
Gleb Smirnoff
75ee267c22 Merge the //depot/user/yar/vlan branch into CVS. It contains some collective
work by yar, thompsa and myself. The checksum offloading part also involves
work done by Mihail Balikov.

The most important changes:

o   Instead of global linked list of all vlan softc use a per-trunk
  hash. The size of hash is dynamically adjusted, depending on
  number of entries. This changes struct ifnet, replacing counter
  of vlans with a pointer to trunk structure. This change is an
  improvement for setups with big number of VLANs, several interfaces
  and several CPUs. It is a small regression for a setup with a single
  VLAN interface.
    An alternative to dynamic hash is a per-trunk static array with
  4096 entries, which is a compile time option - VLAN_ARRAY. In my
  experiments the array is not an improvement, probably because such
  a big trunk structure doesn't fit into CPU cache.
o   Introduce an UMA zone for VLAN tags. Since drivers depend on it,
  the zone is declared in kern_mbuf.c, not in optional vlan(4) driver.
  This change is a big improvement for any setup utilizing vlan(4).
o   Use rwlock(9) instead of mutex(9) for locking. We are the first
  ones to do this! :)
o   Some drivers can do hardware VLAN tagging + hardware checksum
  offloading. Add an infrastructure for this. Whenever vlan(4) is
  attached to a parent or parent configuration is changed, the flags
  on vlan(4) interface are updated.

In collaboration with:	yar, thompsa
In collaboration with:	Mihail Balikov <mihail.balikov interbgc.com>
2006-01-30 13:45:15 +00:00
Yaroslav Tykhiy
c21a88e7f8 Do address assignment/removal operations after callbacks.
Presently, ifconfig callbacks are used for L2 configuration, media
and vlan, so actions associated with address assignment, like sending
out a gratuitous ARP, should go when L2 is running already.

This also should fix the problem with setting up vlan interfaces
from rc.conf, when both IP and vlan+vlandev parameters are passed
to ifconfig at once.

Future work: Consider introducing several ifconfig callback lists
to invoke callbacks orderly.

MFC after:	1 week
2006-01-30 13:37:34 +00:00
Roman Kurakin
8edb110aa3 Prepare for sconfig(8) update.
Change also my e-mail.
2006-01-30 13:34:57 +00:00
Giorgos Keramidas
2882d87e08 Add more details about enabling a custom ruleset for /dev in `rc.conf',
and add ruleset labels/numbering to the custom ruleset example.

PR:		docs/90362
Submitted by:	Roland Smith <rsmith@xs4all.nl>
MFC after:	3 days
2006-01-30 13:28:28 +00:00
Matteo Riondato
2bf3c1f587 Make df output in periodic mail human readable
PR:		conf/87196
Submitted by:	Mike <mspam@ideaway.net>
Approved by:	philip (mentor)
MFC after:	3 days
2006-01-30 12:33:44 +00:00
Robert Watson
4c0b19957f Move pts master devices into /dev/pty/ instead of littering /dev with them;
this is more consistent with the placement of slaves in /dev/pts.  The
actual name doesn't matter as it's not part of the exposed API or used by
libc.  In some sense, it would be nice if these device nodes didn't have to
have names in devfs at all.

Suggested by:	Stephen McKay <smckay at internode dot on dot net>
2006-01-30 11:59:19 +00:00
Gleb Smirnoff
01d86f980f Fix typo. 2006-01-30 11:43:53 +00:00
Dag-Erling Smørgrav
5b5139a9da Avoid triggering autovivification of %config entries, which would result in
an empty addenda section.

Handle kernel configs that lack a "machine" line by guessing at the location
of GENERIC (assuming that it is in the same directory as the config file)
2006-01-30 10:46:01 +00:00
Søren Schmidt
9e6b35bff3 Remove accidental debug leftovers. 2006-01-30 10:19:38 +00:00
Gleb Smirnoff
25af0bb50e Add some initial locking to gif(4). It doesn't covers the whole driver,
however IPv4-in-IPv4 tunnels are now stable on SMP. Details:

- Add per-softc mutex.
- Hold the mutex on output.

The main problem was the rtentry, placed in softc. It could be
freed by ip_output(). Meanwhile, another thread being in
in_gif_output() can read and write this rtentry.

Reported by:	many
Tested by:	Alexander Shiryaev <aixp mail.ru>
2006-01-30 08:39:09 +00:00
Hartmut Brandt
f2a49a97ac Instead of printing several pieces with .Sy just enclose the 'Note' block
into a .Bf/.Ef pair.

Submitted by:	ru
2006-01-30 08:26:59 +00:00
Gleb Smirnoff
61fb9bd80c - In pipe() return the error returned by pipe_create(), rather then
hardcoded ENFILES, which is incorrect. pipe_create() can fail due
  to ENOMEM.
- Update manual page, describing ENOMEM return code.

Reviewed by:	arch
2006-01-30 08:25:04 +00:00
Jeff Roberson
3b77d80cdd - Remove a stale comment. This function was rewritten to be SMP safe some
time ago.

Sponsored by:	Isilon Systems, Inc.
2006-01-30 08:24:14 +00:00
Jeff Roberson
d6791f7615 - vn_lock with LK_RETRY can not return an error. The code that handled this
case was not necessary.

Sponsored by:	Isilon Systems, Inc.
2006-01-30 08:22:56 +00:00
Jeff Roberson
608c95d341 - Add a comment warning about an anomalous condition where we VOP_UNLOCK
and then vrele rather than vput because we would like to VOP_UNLOCK with
   a specific thread.
2006-01-30 08:21:23 +00:00
Jeff Roberson
033eb86e52 - Lock access to vrele() with VFS_LOCK_GIANT() rather than mtx_lock(&Giant).
Sponsored by:	Isilon Systems, Inc.
2006-01-30 08:19:01 +00:00
Christian Brueffer
6923e33d95 Note support for the A4D and A6VM models. 2006-01-30 05:29:41 +00:00
Philip Paeps
f50bf4010f Add support for Asus A4D laptops. Currently without display switching
support.  Which reminds me that I'm not even sure if this works on _any_
laptop at all. :-o

PR:		kern/90607
Submitted by:	"Wojciech A. Koszek" <dunstan -at- freebsd.czest.pl>
MFC after:	3 days
2006-01-29 23:59:43 +00:00
Philip Paeps
e691fe45a2 Add support for Asus A6VM laptops.
Submitted by:	Sashi Asokarajan <mail -at- sashi.de>
MFC after:	3 days
2006-01-29 23:54:32 +00:00
Philip Paeps
b9abb62d05 Allow non-P laptops to make use of this module.
Other major changes (from the author):

 o Individual method probing
 o Finally figured out what the RBLL, RVOL, GHKS, GSIF are:
   - RBLL - lcd_brightness radix
   - RVOL - volume radix
   - GHKS - Currently activated hotkey (internal)
   - GSIF - Hotkey mask (internal)

Submitted by:	Anish Mistry <mistry.7 -at- osu.edu>
MFC after:	3 days
2006-01-29 23:52:02 +00:00
Andrew Thompson
74948aa6f3 Back out of r1.148, it causes two arp replies to be sent with different mac
addresses. One for the bridged interface with the IP address assigned but then
another with the mac for the bridge itself.
2006-01-29 23:21:01 +00:00
Roman Kurakin
dfd1ff19b4 Add makefile for ce(4) module. 2006-01-29 22:10:54 +00:00