117454 Commits

Author SHA1 Message Date
pjd
bdaff90f70 MFC: Add VIA/ACE "PadLock" support as a crypto(9) driver.
HW donated by:			Mike Tancsa <mike@sentex.net>
Most of the code obtained from:	OpenBSD
Approved by:			re (scottl)
2005-08-30 14:56:02 +00:00
mux
7b3716f009 MFC if_nve.c r1.8:
date: 2005/07/25 22:21:11;  author: mux;  state: Exp;  lines: +0 -1
  Remove an erroneous m_freem() call.  If m_defrag() returns a non-NULL
  pointer, it has already freed the original mbuf chain, so we shouldn't
  do it again.

Approved by:	re (scottl)
2005-08-30 09:03:13 +00:00
jhb
3439f4b996 MFC: Locking and sundry fixes; mark MPSAFE:
- Use device_printf() and if_printf().
- Remove pre-new-bus and other #if 0 code.
- Overhaul failure handling in my_attach().

Approved by:	re (scottl)
2005-08-29 20:00:31 +00:00
andre
e5068a6432 MFC addition of memmem(3).
Submitted by:	Pascal Gloor <pascal.gloor at spale.com>
Approved by:	re (scottl)
2005-08-29 18:46:39 +00:00
andre
8ffcceaf29 MFC rev. 1.27 (Pretty print multipath routes).
Approved by:	 re (scottl)
2005-08-29 17:57:36 +00:00
andre
11666bac98 MFC rev. 1.31 (correct layer 2 broad- and multicast handling) and rev. 1.29
(Misc spelling and/or English fixes in comments).

PR:		kern/85052
Approved by:	re (scottl)
2005-08-29 17:52:53 +00:00
emax
21c9adb9b0 MFC to RELENG_6
Address minor locking issues. Use taskqueue_swi instead of taskqueue_swi_giant.

Approved by:	re (scottl)
2005-08-29 17:00:54 +00:00
emax
2b0bdd9bb3 MFC to RELENG_6
Make sure ng_fec_init() uses the same calling convention as the rest of
the code, i.e. ng_fec_init() is called with the ifp->if_softc pointer and
NOT with the ifp pointer.

PR:		kern/85239
Reviewed by:	brooks
Approved by:	re (scottl)
2005-08-29 16:23:21 +00:00
cvs2svn
99644cc57f This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-08-29 11:34:09 +00:00
glebius
24946e6e80 MFC:
Remove all references to T/TCP, which was removed several months ago.

Approved by:	re (scottl)
2005-08-29 09:10:22 +00:00
glebius
24a6a04f7f MFC 1.140:
When we have a published ARP entry for some IP address, do reply on
  ARP requests only on the network where this IP address belong, to.

  Before this change we did replied on all interfaces. This could
  lead to an IP address conflict with host we are doing ARP proxy
  for.

  PR:		kern/75634
  Reviewed by:	andre

Approved by:	re (scottl)
2005-08-29 09:06:30 +00:00
glebius
ff71da86ca MFC:
Backout revision 1.54, because it exposes a worse problem, than
  it fixes. I believe the problem lives somewhere outside ng_ksocket,
  but until it is found, let the node be working.

  PR:		kern/84952
  PR:		kern/82413

Approved by:	re (scottl)
2005-08-29 09:01:58 +00:00
glebius
bd92ded1c5 MFC 1.87:
In order to support CARP interfaces kernel was taught to handle more
  than one interface in one subnet. However, some userland apps rely on
  the believe that this configuration is impossible.

  Add a sysctl switch net.inet.ip.same_prefix_carp_only. If the switch
  is on, then kernel will refuse to add an additional interface to
  already connected subnet unless the interface is CARP. Default
  value is off.

  PR:				bin/82306
  In collaboration with:	mlaier

Approved by:	re (scottl)
2005-08-29 08:58:45 +00:00
ssouhlal
bfc657ece4 MFC rev 1.292:
Set the mountpoint path in the superblock (fs_fsmnt) at mount-time
  so that it appears in the various messages (not cleanly unmounted,
  filesystem full, etc). This has been broken since rev 1.261.

Approved by:	re (scottl)
2005-08-28 17:04:43 +00:00
yar
e98eb9d1e5 MFC defaults/rc.conf#1.259, rc.subr#1.37:
Stop hard-coding an -M flag to mdmfs(8) in /etc/rc.subr.
  Now this flag can be set, or not set, for memory-backed
  file systems on individual basis, as illustrated by the
  rc.conf(5) variables tmpmfs_flags and varmfs_flags.  The
  flag is set for those FS'en by default, in /etc/defaults/rc.conf,
  in order to stay compatible with the old rc.subr behaviour.

Approved by:	re (scottl)
2005-08-28 09:08:05 +00:00
yar
64ca23e269 MFC rev. 1.52:
List -W as one of the meaningful options to the -i (interfaces)
  display of netstat(1).

Approved by:	re (hrs)
2005-08-28 09:03:45 +00:00
rwatson
07d5c1227b Merge rtsock.c:1.127 from HEAD to RELENG_6:
De-spl parts of the routing socket code now generally protected
  through locking; leave some spl references around code where there
  are open questions about global variable references.  Also, add
  an XXX regarding locking in sysctl.

Approved by:	re (scottl)
2005-08-28 04:31:40 +00:00
markus
3d2226f652 MFC: rev. 1.5 + 1.6
rev. 1.6:
     - Document the led(4) interface for the Thinklight
     - Bump .Dd

  rev. 1.5:
    - Clarify how events are used and how the different event sysctl correlate
    - Document how an event looks like that is received by devd(8) from
      acpi_ibm(4)
    - Document the event codes as they occur on a T41p
    - Add a note about sysctl.conf and an Xref to it
    - Add an example section providing an example script and an entry for
      devd.conf. This is an adapted version of the one in acpi_fujitsu(4).
    - s/Fn-F4/Fn+F4/ for consistency sake
    - Add a button description where refering to a T41p, remove it otherwise,
      since it might vary from model to model
    - Bump .Dd

Approved by:	re (hrs)
2005-08-27 22:51:25 +00:00
cperciva
36a21a603a Note the addition of bsdiff(1), bspatch(1), and portsnap(8) into the
base system.

Approved by:	re (hrs)
2005-08-27 20:12:11 +00:00
tegge
df06317979 MFC: Don't set the COMPLETE flag in an inodedep structure before the
related inode has been written.

Approved by:	re (scottl)
2005-08-27 18:40:06 +00:00
marius
8ea046259b MFC: 1.98
Now that at least some screen savers work on sparc64 sync with other
archs and enable splash(4) by default.

Approved by:	re (scottl)
2005-08-27 18:04:43 +00:00
marius
14280f25ba MFC: 1.30
- Wrap the handler and associated code for collecting completed RX
  descriptors that are still marked owned in #ifdef GEM_RINT_TIMEOUT
  instead of #if 0 for convenience.
- Remove stale code and comment about relying on the preset XIF config.
- In case of a watchdog timeout call the init function instead of just
  the start function so the chip is properly reset.

Merge from hme(4):
- Convert to use bus_dmamap_load_mbuf_sg() for loading RX buffers.
- Protect from a duplicate mbuf free panic in case the DMA engine hangs.

Approved by:	re (scottl)
2005-08-27 18:02:15 +00:00
marius
94bb79907b MFC: sys/boot/sparc64/loader/metadata.c 1.14,
sys/dev/uart/uart_cpu_sparc64.c 1.21

- Change the code that determines whether to use a serial console and
  which serial device to use in that case respectively to not rely on
  the OFW names of the input/output and stdin/stdout devices. While at
  it save on some variables and for sys/boot/sparc64/loader/metadata.c
  move the code in question to a new function md_bootserial() so it can
  be kept in sync with uart_cpu_getdev_console() more easily.
- Adjust the size of some buffers.
- Remove the package handle of the '/options' node from the argument
  list of uart_cpu_getdev_dbgport().

Approved by:	re (scottl)
2005-08-27 15:52:05 +00:00
jkoshy
0a5b2c4b0e MFC: { r1.8--r1.10 }
- Add COMPATIBILITY and HISTORY sections.  Fix an -mdoc error.
   Cross-reference pmclog(3).

 - Document two new diagnostic messages in hwpmc(4).

 - Document the diagnostic message printed at startup time.  Keep the
   list of diagnostic messages sorted.

 - Document the recently introduced EOPNOTSUPP error return.  Repair
   sort ordering for the list of error descriptions.

Approved by:	re (hrs)
2005-08-27 04:25:49 +00:00
thompsa
146f71c102 MFC: if_bridge.c, r1.19
> The mtu check in bridge_enqueue is bogus as the maximum Ethernet frame is
> actually 1514, so comparing the mbuf length which includes the Ethernet
> header
> to the interface MTU is wrong.
>
> The check was a little over the top so just remove it.

Approved by:	re (scottl), mlaier (mentor)
2005-08-26 20:00:25 +00:00
jkoshy
7ff186d475 MFC:
[ hwpmc_mod.c:1.14,1.15 ]
 - Print PMC capabilities at module load time.

 - Return EOPNOTSUPP instead of EINVAL if a PMC allocation request
   specifies a PMC capability (e.g., sampling) that is not supported
   by hardware.  Return EINVAL early if the PMC class passed in is
   not recognized.

 [ hwpmc_x86.c:1.3 ]
 - On x86 processors, turn off 'INTERRUPT' capabilities on PMCs
   if the CPU does not have its local APIC enabled.

Approved by:	re (scottl)
2005-08-26 19:49:32 +00:00
jhb
f669c46b33 MFC: Conditionally lock Giant in xl's taskqueue handler function.
Approved by:	re (scottl)
2005-08-26 15:31:09 +00:00
jhb
7d4d674c95 MFC: Use if_printf() and device_printf() and remove ste_unit from the
softc.

Approved by:	re (scottl)
2005-08-26 15:27:23 +00:00
jhb
7aa2745a2d MFC: Add aliases for atomic operations on 64-bit integers.
Approved by:	re (scottl)
2005-08-26 14:53:57 +00:00
jhb
e878090f8a MFC: Fix up locking and mark MPSAFE.
Approved by:	re (scottl)
2005-08-26 14:52:36 +00:00
jhb
2bcd5cdce1 MFC: Fixup locking including moving the taskqueue_drain() out of xl_stop().
Approved by:	re (scottl)
2005-08-26 14:46:22 +00:00
jhb
827b28973d MFC: Various locking fixups including removing Giant from a bus dma
callback.

Approved by:	re (scottl)
2005-08-26 14:40:03 +00:00
jhb
fa602a439e MFC: Fix up locking and remove spls and support for 4.x.
Approved by:	re (scottl)
2005-08-26 14:35:45 +00:00
jhb
d15690f22e MFC: Fix up the locking in pcn(4) and mark it MPSAFE.
Approved by:	re (scottl)
2005-08-26 14:33:05 +00:00
bz
19636d5e3c MFC rev. 1.109:
* Solve "No PHY found" problem for more Yukon Lite variants.
   * Catch a bus attach error.
   * Improve locking.
   (missing in original commit message but was not worth a forced commit):
   * put interrupt moderation messages under bootverbose

Approved by:	re (kensmith)
2005-08-26 10:46:20 +00:00
keramida
045c559fe2 MFC revision 1.24:
% Add a small paragraph that describes how the current environment
% settings can be displayed, near the end of the DESCRIPTION section,
% immediately after the paragraph that describes how they can be set.
%
% Add a reference to printenv(1) too (and the ``printenv'' csh builtin).
%
% Submitted by:   Gary W. Swearingen <garys@opusnet.com>
% PR:             docs/85008

Approved by:	re (hrs)
2005-08-26 10:25:44 +00:00
cperciva
c9564c8fd4 MFC: When looking for new lines in diff output, grep for '^[>+]'
instead of '^>', in order to catch both normal and unified diffs.

Approved by:	re (scottl)
2005-08-25 19:07:28 +00:00
cperciva
642858bf45 MFC: Tell locate to ignore /var/db/portsnap by default because it isn't
very interesting.

Approved by:	re (scottl)
2005-08-25 19:06:11 +00:00
sos
4e9db3bd6f MFC:
Add support for working around controllers that cannot do DMA in 48bit.
	The workaround use PIO mode above ~137GB to allow using the disk.
	Add the Acer chips with rev < 0xc4 as first candidate.

	Add support for the Promise PDC4071[89] chips on the Fasttrak TX4300.
	Docs kindly provided by Promise.

	Apply fix for "pr82261 DMA-support on Sparc64 broken"

	Use the bio field instead of the driver field as intended.

	Dont set default mode to ATA_DMA_MAX on devices not capable of DMA.

Approved by: re@ (scottl)
2005-08-25 16:21:05 +00:00
sos
8b45109821 MFC:
Add definition for SATAII 3Gb/s mode.

Approved by: re@ (scottl)
2005-08-25 16:16:45 +00:00
emax
9547e540c3 MFC to RELENG_6
Fix multiple typos in the mutex names. This fixes false positive (and pretty
strange looking too) LORs I have seen on my system. Pointy hat to goes to me.

Approved by:	re (scottl)
2005-08-25 16:14:33 +00:00
rwatson
1ee6a590fa White space sync: add missing line break.
Approved by:	re (kensmith - earlier whitespace fixes)
2005-08-25 05:44:06 +00:00
rwatson
03e9f7fc13 Merge if.h:1.98 from HEAD to RELENG_6:
For each interface flag, indicate whether or not it is owned by the
  device driver, owned by the network stack, or initialized by the device
  driver before attach and read-only from then on.

  Not all device drivers and network stack components currently follow
  these rules, especially with respect to IFF_UP, and a few exceptions
  with IFF_ALLMULTI.

Approved by:	re (scottl)
2005-08-25 05:02:28 +00:00
rwatson
e13b2df854 Merge linux_ioctl.c:1.128 svr4_sockio.c:1.17 altq_cbq.c:1.3 if_oltr.c:1.38
if_pflog.c:1.14 if_pfsync.c:1.21 if_an.c:1.70 if_ar.c:1.72 if_arl.c:1.11
amrr.c:1.10 onoe.c:1.10 if_ath.c:1.101 awi.c:1.41 if_bfe.c:1.27
if_bge.c:1.93 if_cm_isa.c:1.7 smc90cx6.c:1.16 if_cnw.c:1.20 if_cp.c:1.25
if_cs.c:1.42 if_ct.c:1.26 if_cx.c:1.46 if_ed.c:1.256 if_em.c:1.68
if_en_pci.c:1.37 midway.c:1.66 if_ep.c:1.143 if_ex.c:1.58 if_fatm.c:1.20
if_fe.c:1.93 if_fwe.c:1.38 if_fwip.c:1.8 if_fxp.c:1.244 if_gem.c:1.33
if_hatm.c:1.25 if_hatm_intr.c:1.20 if_hatm_ioctl.c:1.13 if_hatm_rx.c:1.10
if_hatm_tx.c:1.14 if_hme.c:1.39 if_ie.c:1.104 if_ndis.c:1.101
if_ic.c:1.24 if_ipw.c:1.10 if_iwi.c:1.10 if_ixgb.c:1.13 if_lge.c:1.41
if_lnc.c:1.113 if_my.c:1.31 if_nge.c:1.77 if_nve.c:1.10 if_owi.c:1.12
if_patm.c:1.9 if_patm_intr.c:1.6 if_patm_ioctl.c:1.10 if_patm_tx.c:1.10
pdq_ifsubr.c:1.28 if_plip.c:1.38 if_ral.c:1.12 if_ral_pci.c:1.2
if_ray.c:1.81 if_rayvar.h:1.22 if_re.c:1.49 if_sbni.c:1.21 if_sbsh.c:1.14
if_sn.c:1.48 dp83932.c:1.21 if_snc_pccard.c:1.9 if_sr.c:1.70 if_tx.c:1.91
if_txp.c:1.33 if_aue.c:1.92 if_axe.c:1.32 if_cdce.c:1.8 if_cue.c:1.59
if_kue.c:1.66 if_rue.c:1.23 if_udav.c:1.16 if_ural.c:1.12 if_vge.c:1.16
if_vx.c:1.58 if_wi.c:1.185 if_wi_pci.c:1.26 if_wl.c:1.68 if_xe.c:1.60
if_xe_pccard.c:1.30 if_el.c:1.68 i4b_ipr.c:1.35 i4b_isppp.c:1.31
kern_poll.c:1.20 bridge.c:1.94 bridgestp.c:1.4 if_arcsubr.c:1.27
if_atm.h:1.24 if_atmsubr.c:1.40 if_bridge.c:1.16 if_ef.c:1.35
if_ethersubr.c:1.196 if_faith.c:1.37 if_fddisubr.c:1.100 if_fwsubr.c:1.14
if_gif.c:1.54 if_gre.c:1.34 if_iso88025subr.c:1.70 if_loop.c:1.107
if_ppp.c:1.106 if_spppsubr.c:1.121 if_tap.c:1.57 if_tun.c:1.154
if_vlan.c:1.80 ppp_tty.c:1.67 ieee80211_ioctl.c:1.32 atm_if.c:1.31
ng_eiface.c:1.33 ng_ether.c:1.50 ng_fec.c:1.19 ng_iface.c:1.44
ng_sppp.c:1.9 ip_carp.c:1.30 ip_fastfwd.c:1.30 in6.c:1.53 nd6_nbr.c:1.31
natm.c:1.40 if_dc.c:1.162 if_de.c:1.168 if_pcn.c:1.72 if_rl.c:1.154
if_sf.c:1.84 if_sis.c:1.135 if_sk.c:1.108 if_ste.c:1.86 if_ti.c:1.109
if_tl.c:1.101 if_vr.c:1.106 if_wb.c:1.81 if_xl.c:1.194 from HEAD to
RELENG_6:

  Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
  IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
  ifnet.if_drv_flags.  Device drivers are now responsible for
  synchronizing access to these flags, as they are in if_drv_flags.  This
  helps prevent races between the network stack and device driver in
  maintaining the interface flags field.

  Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
  some less so.

  Reviewed by:    pjd, bz

Approved by:	re (scottl)
2005-08-25 05:01:24 +00:00
rwatson
8f8fa61d9b Merge if.c:1.242, if.h:1.97, if_var.h:1.102, rtsock.c:1.125 from HEAD
to RELENG_6:

  Rename IFF_RUNNING to IFF_DRV_RUNNING, IFF_OACTIVE to IFF_DRV_OACTIVE,
  and move both flags from ifnet.if_flags to ifnet.if_drv_flags, making
  and documenting the locking of these flags the responsibility of the
  device driver, not the network stack.  The flags for these two fields
  will be mutually exclusive so that they can be exposed to user space as
  though they were stored in the same variable.

  Provide #defines to provide the old names #ifndef _KERNEL, so that user
  applications (such as ifconfig) can use the old flag names.  Using the
  old names in a device driver will result in a compile error in order to
  help device driver writers adopt the new model.

  When exposing the interface flags to user space, via interface ioctls
  or routing sockets, or the two fields together.  Since the driver flags
  cannot currently be set for user space, no new logic is currently
  required to handle this case.

  Add some assertions that general purpose network stack routines, such
  as if_setflags(), are not improperly used on driver-owned flags.

  With this change, a large number of very minor network stack races are
  closed, subject to correct device driver locking.  Most were likely
  never triggered.

  Driver sweep to follow; many thanks to pjd and bz for the line-by-line
  review they gave this patch.

  Reviewed by:    pjd, bz

Approved by:	re (scottl)
2005-08-25 04:55:48 +00:00
rodrigc
1273bd9a5e MFC rev 1.411:
- Remove NTP servers which do not resolve in DNS.
 - Use pool.ntp.org servers where possible, thanks to
   Chuck Swiger <cswiger at mac dot com> .
 - Update list of Swedish NTP servers, thanks to
   Fredrik Lindberg <fli+freebsd-current at shapeshifter dot se> .

PR:		bin/75479
Approved by:	re (scottl)
2005-08-25 00:42:26 +00:00
rwatson
605eed31ef Merge if_atmsubr.c:1.38 from HEAD to RELENG_6:
Lock down netnatm and mark as MPSAFE:

  - Introduce a subsystem mutex, natm_mtx, manipulated with accessor macros
    NATM_LOCK_INIT(), NATM_LOCK(), NATM_UNLOCK(), NATM_LOCK_ASSERT().  It
    protects the consistency of pcb-related data structures.  Finer grained
    locking is possible, but should be done in the context of specific
    measurements (as very little work is done in netnatm -- most is in the
    ATM device driver or socket layer, so there's probably not much
    contention).

  - Remove GIANT_REQUIRED, mark as NETISR_MPSAFE, remove
    NET_NEEDS_GIANT("netnatm").

  - Conditionally acquire Giant when entering network interfaces for
    ifp->if_ioctl() using IFF_LOCKGIANT(ifp)/IFF_UNLOCKGIANT(ifp) in order
    to coexist with non-MPSAFE atm ifnet drivers..

  - De-spl.

  Reviewed by:    harti, bms (various versions)

Approved by:	re (hrs)
2005-08-24 18:10:51 +00:00
rwatson
6bafdfe2e2 Merge subr_witness.c:1.196, igmp.c:1.49, in.c:1.86, in_var.h:1.55,
ip_input.c:1.303, ip_output.c:1.243 from HEAD to RELENG_6:

  Introduce in_multi_mtx, which will protect IPv4-layer multicast address
  lists, as well as accessor macros.  For now, this is a recursive mutex
  due code sequences where IPv4 multicast calls into IGMP calls into
  ip_output(), which then tests for a multicast forwarding case.

  For support macros in in_var.h to check multicast address lists, assert
  that in_multi_mtx is held.

  Acquire in_multi_mtx around iteration over the IPv4 multicast address
  lists, such as in ip_input() and ip_output().

  Acquire in_multi_mtx when manipulating the IPv4 layer multicast
  addresses, as well as over the manipulation of ifnet multicast address
  lists in order to keep the two layers in sync.

  Lock down accesses to IPv4 multicast addresses in IGMP, or assert the
  lock when performing IGMP join/leave events.

  Eliminate spl's associated with IPv4 multicast addresses, portions of
  IGMP that weren't previously expunged by IGMP locking.

  Add in_multi_mtx, igmp_mtx, and if_addr_mtx lock order to hard-coded
  lock order in WITNESS, in that order.

  Problem reported by:    Ed Maste <emaste at phaedrus dot sandvine dot ca>

Approved by:	re (scottl)
2005-08-24 17:30:44 +00:00
rwatson
091aba35eb Merge if_ath.c:1.99 awi.c:1.39 if_bfe.c:1.26 if_bge.c:1.92 if_ed.c:1.255
if_em.c:1.67 if_ex.c:1.57 if_fe.c:1.92 if_fxp.c:1.242 if_gem.c:1.32
if_hme.c:1.38 if_ie.c:1.103 if_ndis.c:1.100 if_ixgb.c:1.12 if_lge.c:1.40
if_lnc.c:1.112 if_my.c:1.30 if_nge.c:1.76 if_nve.c:1.9 if_owi.c:1.11
pdq_ifsubr.c:1.27 if_ray.c:1.80 if_re.c:1.47 if_sn.c:1.47 dp83932.c:1.20
if_tx.c:1.90 if_txp.c:1.32 if_aue.c:1.91 if_axe.c:1.31 if_cue.c:1.58
if_kue.c:1.65 if_rue.c:1.22 if_udav.c:1.15 if_vge.c:1.15 if_wi.c:1.182
if_wl.c:1.67 if_xe.c:1.58 if_dc.c:1.161 if_de.c:1.167 if_pcn.c:1.70
if_rl.c:1.153 if_sf.c:1.83 if_sis.c:1.134 if_sk.c:1.107 if_ste.c:1.85
if_ti.c:1.108 if_tl.c:1.100 if_vr.c:1.105 if_wb.c:1.80 if_xl.c:1.193
from HEAD to RELENG_6:

  Modify device drivers supporting multicast addresses to lock if_addr_mtx
  over iteration of their multicast address lists when synchronizing the
  hardware address filter with the network stack-maintained list.

  Problem reported by:    Ed Maste (emaste at phaedrus dot sandvine dot ca>

Approved by:	re (scottl)
2005-08-24 16:50:46 +00:00
keramida
8081c1d979 MFC 1.34: Spell "partition" correctly.
Reminded by:	simon
Approved by:	re (scottl)
2005-08-24 15:42:12 +00:00