]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoMFC rev 1.8
brooks [Tue, 29 Apr 2008 21:29:09 +0000 (21:29 +0000)]
MFC rev 1.8

When sending packets directly to the DHCP server, use a socket and send
directly rather than bogusly sending it out as a link layer broadcast
(which fails to be received on some networks).

PR: bin/96018
MFC after: 2 weeks

16 years agoMFC rev 1.278:
brooks [Tue, 29 Apr 2008 20:43:48 +0000 (20:43 +0000)]
MFC rev 1.278:

Delay the global registration of the struct ifnet in if_alloc() until after
we're certain the allocation will entierly succeed.  This fixes a leak in a
fairly unlikely case.

Reported by: vijay singh <vijjus at rocketmail dot com>

16 years agoMFC per ppp profile variable documentation (revs 1.336 and 1.337)
brooks [Tue, 29 Apr 2008 20:17:46 +0000 (20:17 +0000)]
MFC per ppp profile variable documentation (revs 1.336 and 1.337)

PR: conf/121452, conf/122127

16 years agoMFC: Fix a resource leak in the recent fixes for file descriptors >
jhb [Tue, 29 Apr 2008 17:44:00 +0000 (17:44 +0000)]
MFC: Fix a resource leak in the recent fixes for file descriptors >
SHRT_MAX.

16 years ago - Have SCTP use the new pru_flush functionality
rrs [Tue, 29 Apr 2008 09:26:32 +0000 (09:26 +0000)]
  - Have SCTP use the new pru_flush functionality

16 years agoLogging changes from MFC
rrs [Tue, 29 Apr 2008 09:21:52 +0000 (09:21 +0000)]
Logging changes from MFC

16 years ago Protection against errant sender sending a stream
rrs [Tue, 29 Apr 2008 09:20:25 +0000 (09:20 +0000)]
  Protection against errant sender sending a stream
  seq number out of order with no missing TSN's (a
  cisco box has this problem which will make a ssn
  be held forever).

16 years ago Use the pru_flush infrastructure to avoid a panic
rrs [Tue, 29 Apr 2008 09:18:30 +0000 (09:18 +0000)]
  Use the pru_flush infrastructure to avoid a panic

16 years ago Add pru_flush routine so a transport can
rrs [Tue, 29 Apr 2008 09:17:39 +0000 (09:17 +0000)]
  Add pru_flush routine so a transport can
  flush itself during Shutdown

16 years ago 1) adds some additional logging
rrs [Tue, 29 Apr 2008 09:16:19 +0000 (09:16 +0000)]
  1) adds some additional logging
  2) changes to use a inqueue_bytes calculated value in max_len calc's.

16 years agoMFC: Add support for detach packets.
jhb [Mon, 28 Apr 2008 20:47:38 +0000 (20:47 +0000)]
MFC: Add support for detach packets.

16 years agoMFC:
scf [Sun, 27 Apr 2008 17:39:33 +0000 (17:39 +0000)]
MFC:
Capitalize "Eve".  This is the correct form and now matches
calendar.usholiday.

    src/usr.bin/calendar/calendars/calendar.christian: rev 1.10 -> 1.11

16 years agoMerge in_pcb.c:1.203, in6_pcb.c:1.88 from HEAD to RELENG_7:
rwatson [Sun, 27 Apr 2008 14:39:32 +0000 (14:39 +0000)]
Merge in_pcb.c:1.203, in6_pcb.c:1.88 from HEAD to RELENG_7:

  In in_pcbnotifyall() and in6_pcbnotify(), use LIST_FOREACH_SAFE() and
  eliminate unnecessary local variable caching of the list head pointer,
  making the code a bit easier to read.

16 years agoRemove fifo_vnops.c:1.143 from HEAD to RELENG_7:
rwatson [Sun, 27 Apr 2008 14:24:37 +0000 (14:24 +0000)]
Remove fifo_vnops.c:1.143 from HEAD to RELENG_7:

  Remove Giant acquisition around soreceive() and sosend() in fifofs.
  The bug that caused us to reintroduce it is believed to be fixed,
  and Kris says he no longer sees problems with fifofs in highly
  parallel builds.

  Pointed out by: kris

16 years agoMerge procstat.1:1.3 from HEAD to RELENG_7:
rwatson [Sun, 27 Apr 2008 14:17:32 +0000 (14:17 +0000)]
Merge procstat.1:1.3 from HEAD to RELENG_7:

  Provide more detailed information about each procstat(1) display mode,
  including a key to fields in each mode and flag abbreviations.

Note: mention of POSIX shared memory in the man page has been removed
in the MFC, as explicit kernel support for pshm hasn't been merged to
RELENG_7 yet.

16 years agoMerge procstat.1:1.2 from HEAD to RELENG_7:
rwatson [Sun, 27 Apr 2008 14:13:37 +0000 (14:13 +0000)]
Merge procstat.1:1.2 from HEAD to RELENG_7:

  It is a bug that procstat(8) works only on live kernels and not
  crashdumps; document in case anyone wants to work on fixing this.

16 years agoMFC: 1.61
marius [Sun, 27 Apr 2008 11:36:42 +0000 (11:36 +0000)]
MFC: 1.61

- vx_stop() requires the driver lock to be held.
- Add some missing newlines to messages printed by vx_getlink().

16 years agoPut the arguments of kse_switchin in local variables, rather than
marcel [Sat, 26 Apr 2008 19:22:41 +0000 (19:22 +0000)]
Put the arguments of kse_switchin in local variables, rather than
dereferencing uap throughout. On ia64 uap points into the trapframe
and the call to set_mcontext() in this function will change the
trapframe. Consequently, when we dereference uap afterwards we can
best qualify the behaviour as undefined. By putting the arguments
in local variables we also improve code-generation, because the
compiler is not forced to reload after every function call.

Caught by: Christian Kandeler <christian.kandeler@hob.de>

16 years agoMFC to RELENG_7:
antoine [Sat, 26 Apr 2008 17:38:07 +0000 (17:38 +0000)]
MFC to RELENG_7:
  Don't allocate the constant array "props" on the stack in wctype.

  PR:             74743
  Submitted by:   knut st. osmundsen
  Approved by:    rwatson (mentor)
  MFC after:      1 month

16 years agoMFC to RELENG_7:
antoine [Sat, 26 Apr 2008 17:36:33 +0000 (17:36 +0000)]
MFC to RELENG_7:
  Initialize variable "now" before using it (it is used by the LEFTEARTH
  macro)

  PR:             121418
  Submitted by:   Atsuo Ohki
  Approved by:    rwatson (mentor)
  MFC after:      1 month

16 years agoMFC: sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:1.28
pjd [Sat, 26 Apr 2008 13:03:23 +0000 (13:03 +0000)]
MFC: sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:1.28

Fix mmap(2) on ZFS after some changes in VM subsystem.

Submitted by: alc
Reported by: kris (originally) and many others
Reminded by: kris

16 years agoMFC: Correct an off-by-1 for GPART.
marcel [Sat, 26 Apr 2008 03:56:30 +0000 (03:56 +0000)]
MFC: Correct an off-by-1 for GPART.

 Revision  Changes    Path
 1.5       +8 -2      src/lib/libdisk/open_ia64_disk.c

16 years agoMFC: Better implement I-cache invalidation.
marcel [Sat, 26 Apr 2008 03:50:24 +0000 (03:50 +0000)]
MFC: Better implement I-cache invalidation.

 Revision  Changes    Path
 1.25      +4 -0      src/sys/ia64/ia64/elf_machdep.c
 1.235     +18 -5     src/sys/ia64/ia64/machdep.c
 1.198     +37 -84    src/sys/ia64/ia64/pmap.c
 1.28      +1 -0      src/sys/ia64/include/md_var.h

16 years agoThis commit was manufactured by cvs2svn to create branch 'RELENG_7'.
cvs2svn [Sat, 26 Apr 2008 02:15:41 +0000 (02:15 +0000)]
This commit was manufactured by cvs2svn to create branch 'RELENG_7'.

16 years agoMFC: bug fix to preserve high 16 bits of if flags so drivers don't lose
sam [Fri, 25 Apr 2008 18:32:22 +0000 (18:32 +0000)]
MFC: bug fix to preserve high 16 bits of if flags so drivers don't lose
   IFF_NEEDSGIANT

16 years agoMFC: hostapd 0.5.10 + radius acl support
sam [Fri, 25 Apr 2008 18:02:11 +0000 (18:02 +0000)]
MFC: hostapd 0.5.10 + radius acl support

16 years agoMFC: enable syslog support and add -s option to the man page
sam [Fri, 25 Apr 2008 17:39:55 +0000 (17:39 +0000)]
MFC: enable syslog support and add -s option to the man page

16 years agoMFC: wpa_supplicant 0.5.10 + syslog support
sam [Fri, 25 Apr 2008 17:35:33 +0000 (17:35 +0000)]
MFC: wpa_supplicant 0.5.10 + syslog support

16 years agoMFC 1.19: fix locking botch
sam [Fri, 25 Apr 2008 17:18:45 +0000 (17:18 +0000)]
MFC 1.19: fix locking botch

16 years agoMFC 1.3: spell pidfile correctly so multiple wpa_supplicant processes can be run
sam [Fri, 25 Apr 2008 17:05:42 +0000 (17:05 +0000)]
MFC 1.3: spell pidfile correctly so multiple wpa_supplicant processes can be run

16 years agoMFC: split out tty create part of ucom_attach into ucom_attach_tty so
sam [Fri, 25 Apr 2008 17:04:45 +0000 (17:04 +0000)]
MFC: split out tty create part of ucom_attach into ucom_attach_tty so
  derived drivers can use it

16 years agoMFC 1.95: add __noinline
sam [Fri, 25 Apr 2008 16:59:30 +0000 (16:59 +0000)]
MFC 1.95: add __noinline

16 years agoMFC 1.41: IFM_IEEE80211_IBSSMASTER hasn't been used in many years; replace it
sam [Fri, 25 Apr 2008 16:52:09 +0000 (16:52 +0000)]
MFC 1.41: IFM_IEEE80211_IBSSMASTER hasn't been used in many years; replace it
  with IFM_IEEE80211_WDS

16 years agoMFC: enable dynamic addition of "show all" commands
sam [Fri, 25 Apr 2008 16:50:48 +0000 (16:50 +0000)]
MFC: enable dynamic addition of "show all" commands

16 years agoMFC: Fix handling of create operation together with setting other parameters.
sam [Fri, 25 Apr 2008 16:48:08 +0000 (16:48 +0000)]
MFC: Fix handling of create operation together with setting other parameters.

16 years agoMFC 1.223: add M_PROTO[678]; sort mbuf flags and extend values to 32 bits;
sam [Fri, 25 Apr 2008 16:46:20 +0000 (16:46 +0000)]
MFC 1.223: add M_PROTO[678]; sort mbuf flags and extend values to 32 bits;
   write M_COPYFLAGS in terms of M_PROTOFLAGS

16 years agoMFC 1.23: Defer state change on disassociate to avoid unnecessarily
sam [Fri, 25 Apr 2008 16:43:19 +0000 (16:43 +0000)]
MFC 1.23: Defer state change on disassociate to avoid unnecessarily
  dropping the lease.

16 years agoMFC 1.22: correct syslog mask so LOG_DEBUG msgs are not lost
sam [Fri, 25 Apr 2008 16:42:03 +0000 (16:42 +0000)]
MFC 1.22: correct syslog mask so LOG_DEBUG msgs are not lost

16 years agoMFC 1.1286: add include path required to find ah_osdep.h
sam [Fri, 25 Apr 2008 16:41:13 +0000 (16:41 +0000)]
MFC 1.1286: add include path required to find ah_osdep.h

16 years agoMFC 1.344: add some CDMA modems
sam [Fri, 25 Apr 2008 16:40:18 +0000 (16:40 +0000)]
MFC 1.344: add some CDMA modems

16 years agoMFC: add reject+blackhole keywords
sam [Fri, 25 Apr 2008 16:38:14 +0000 (16:38 +0000)]
MFC: add reject+blackhole keywords

16 years agoMFC 1.3: add hints to specify how NPE ports are mapped to MAC+PHY
sam [Fri, 25 Apr 2008 16:35:51 +0000 (16:35 +0000)]
MFC 1.3: add hints to specify how NPE ports are mapped to MAC+PHY

16 years agoMFC 1.2: map device 5; the optional USB controller on Gateworks 2348 boards
sam [Fri, 25 Apr 2008 16:35:07 +0000 (16:35 +0000)]
MFC 1.2: map device 5; the optional USB controller on Gateworks 2348 boards
  shows up here instead of the minipci slot at J4

16 years agoMFC 1.12: document device hints including new ones to control rx fifo trigger
sam [Fri, 25 Apr 2008 16:34:14 +0000 (16:34 +0000)]
MFC 1.12: document device hints  including new ones to control rx fifo trigger

16 years agoMFC: add device hints to control the rx FIFO interrupt level on 16550A parts
sam [Fri, 25 Apr 2008 16:33:23 +0000 (16:33 +0000)]
MFC: add device hints to control the rx FIFO interrupt level on 16550A parts

16 years agoMFC 1.179: (finally) add the hal status to the diagnostic generated after
sam [Fri, 25 Apr 2008 16:22:31 +0000 (16:22 +0000)]
MFC 1.179: (finally) add the hal status to the diagnostic generated after
  a failed ath_hal_reset call

16 years agoMFC 1.9: Fix adhoc mode to scan all available channels...
sam [Fri, 25 Apr 2008 16:21:05 +0000 (16:21 +0000)]
MFC 1.9: Fix adhoc mode to scan all available channels...

16 years agoMFC: 1.561
marius [Fri, 25 Apr 2008 11:03:35 +0000 (11:03 +0000)]
MFC: 1.561

Hook up ZFS to the sparc64 build.

16 years agoMFC: Makefile 1.11; atomic.S 1.1
marius [Fri, 25 Apr 2008 11:02:01 +0000 (11:02 +0000)]
MFC: Makefile 1.11; atomic.S 1.1

Add atomic operations for ZFS/sparc64.

16 years agoMFC: 1.4
marius [Fri, 25 Apr 2008 10:58:54 +0000 (10:58 +0000)]
MFC: 1.4

- Fix the path encoded in the multiple inclusion protection.
- GCC uses 32-byte function alignment for UltraSPARC CPUs.
- Remove code duplication.

16 years agoMFC: 1.111
oleg [Fri, 25 Apr 2008 10:35:53 +0000 (10:35 +0000)]
MFC: 1.111

Calculate p.fs.lookup_step correctly. This should prevent zeroing of
w_q_lookup table (used in RED algorithm for (1 - w_q)^t computation).

16 years agoMFC:
oleg [Fri, 25 Apr 2008 10:29:26 +0000 (10:29 +0000)]
MFC:
src/sys/netinet/ip_dummynet.h 1.41
src/sys/netinet/ip_dummynet.c 1.111-1.114
src/sys/netinet/ip_fw_pfil.c 1.26
src/sys/net/if_bridge.c 1.107
src/sys/net/if_ethersubr.c 1.240
src/sbin/ipfw/ipfw.8 1.206

- style(9) cleanup.
- dummynet_io() declaration has changed.
- Alter packet flow inside dummynet and introduce 'fast' mode of dummynet
  operation: allow certain packets to bypass dummynet scheduler. Benefits are:
  -- lower latency: if packet flow does not exceed pipe bandwidth, packets
     will not be (up to tick) delayed (due to dummynet's scheduler granularity).
  -- lower overhead: if packet avoids dummynet scheduler it shouldn't reenter
     ip stack later. Such packets can be fastforwarded.
  -- recursion (which can lead to kernel stack exhaution) eliminated. This fix
     long existed panic, which can be triggered this way:
kldload dummynet
sysctl net.inet.ip.fw.one_pass=0
ipfw pipe 1 config bw 0
for i in `jot 30`; do ipfw add 1 pipe 1 icmp from any to any; done
ping -c 1 localhost
- New sysctl nodes:
  net.inet.ip.dummynet.io_fast - enables 'fast' dummynet io
  net.inet.ip.dummynet.io_pkt - packets passed to dummynet
  net.inet.ip.dummynet.io_pkt_fast - packets avoided dummynet scheduler
  net.inet.ip.dummynet.io_pkt_drop - packets dropped by dummynet
- Workaround p->numbytes overflow, which can result in infinite loop inside
  dummynet module (prerequisite is using queues with "fat" pipe).

PR: kern/113548 kern/121955

16 years agoMFC 1.146: explain that you must set a default transmit key for WEP
sam [Fri, 25 Apr 2008 05:33:16 +0000 (05:33 +0000)]
MFC 1.146: explain that you must set a default transmit key for WEP

16 years agoMFC 1.14: enable wired driver support
sam [Fri, 25 Apr 2008 05:31:43 +0000 (05:31 +0000)]
MFC 1.14: enable wired driver support

16 years agoMFC: move include paths to Makefile, use the AFTER trick to simplify
sam [Fri, 25 Apr 2008 05:30:11 +0000 (05:30 +0000)]
MFC: move include paths to Makefile, use the AFTER trick to simplify
   adding new items, prepare stat blocks for additional data, other stuff

16 years agoMFC 1.11: sync channel defs w/ _ieee80211.h so cpp doesn't complain
sam [Fri, 25 Apr 2008 05:28:47 +0000 (05:28 +0000)]
MFC 1.11: sync channel defs w/ _ieee80211.h so cpp doesn't complain
    about redefinitions

16 years agoMFC fix for PR ia64/118024
marcel [Thu, 24 Apr 2008 22:42:01 +0000 (22:42 +0000)]
MFC fix for PR ia64/118024

o  Rename cpu_thread_setup() to cpu_thread_alloc() to better communicate that
   it relates to (is called by) thread_alloc()
o  Add cpu_thread_free() which is called from thread_free() to counter-act
   cpu_thread_alloc().

i386: Have cpu_thread_free() call cpu_thread_clean() to preserve behaviour.
ia64: Have cpu_thread_free() call mtx_destroy() for the mutex initialized
in cpu_thread_alloc().

files: sys/amd64/amd64/vm_machdep.c:1.256
sys/arm/arm/vm_machdep.c:1.35
sys/i386/i386/vm_machdep.c1.284
sys/ia64/ia64/machdep.c:1.227
sys/ia64/ia64/vm_machdep.c:1.95
sys/kern/kern_thread.c:1.260
sys/powerpc/powerpc/vm_machdep.c:1.117
sys/sparc64/sparc64/vm_machdep.c:1.77
sys/sun4v/sun4v/vm_machdep.c:1.8
sys/sys/proc.h:1.495

16 years agoMerged textdump.4:1.4, procstat.1:1.4 from HEAD to RELENG_7:
rwatson [Thu, 24 Apr 2008 06:32:16 +0000 (06:32 +0000)]
Merged textdump.4:1.4, procstat.1:1.4 from HEAD to RELENG_7:

  Use ddb(4), not DDB(4) for man page cross-references.

  Reported by:    novel

16 years agoFix spelling mistake made in MFC of rev 1.61.
scf [Thu, 24 Apr 2008 01:30:52 +0000 (01:30 +0000)]
Fix spelling mistake made in MFC of rev 1.61.

16 years ago- Spelling fix for interupt -> interrupt
marius [Wed, 23 Apr 2008 21:28:29 +0000 (21:28 +0000)]
- Spelling fix for interupt -> interrupt
- Take advantage of bus_dmamap_load_mbuf_sg(9).
- Take advantage of m_collapse(9).
- Sync with other NIC drivers and prepend a TX mbuf if the first attempt
  to load it fails with an error other than EFBIG and stop trying instead
  of freeing it and keeping on trying to enqueue more mbufs. Also ensure
  the driver queue isn't empty before trying to enqueue mbufs in order to
  reduce locking operations.
- In xl_ifmedia_upd() add a missing XL_UNLOCK(). [1]
- Const'ify the xl_devs array.
- Remove an outdated comment.

PR: 113406 [1]

16 years agoMFC: bus.h 1.42; bus_machdep.c 1.47
marius [Wed, 23 Apr 2008 21:25:16 +0000 (21:25 +0000)]
MFC: bus.h 1.42; bus_machdep.c 1.47

- Const'ify the bus_stream_asi and bus_type_asi arrays.
- Replace hard-coded functions names missed in bus_machdep.c rev. 1.44
  with __func__.
- Break some long lines.

16 years agoMFC: Add PCI ID's for ICH8 USB controllers.
jhb [Wed, 23 Apr 2008 18:54:51 +0000 (18:54 +0000)]
MFC: Add PCI ID's for ICH8 USB controllers.

16 years agoMFC: Add 'zfs' as an alias for the FreeBSD ZFS UUID.
jhb [Wed, 23 Apr 2008 18:48:36 +0000 (18:48 +0000)]
MFC: Add 'zfs' as an alias for the FreeBSD ZFS UUID.

16 years agoMFC: Fix pkg_info when specifying a remote package.
flz [Wed, 23 Apr 2008 10:42:00 +0000 (10:42 +0000)]
MFC: Fix pkg_info when specifying a remote package.

  src/usr.sbin/pkg_install/info/perform.c: rev 1.54 -> 1.55
  src/usr.sbin/pkg_install/info/main.c: rev 1.51 -> 1.52

16 years agoMFC of new 'arm' category.
linimon [Wed, 23 Apr 2008 04:01:53 +0000 (04:01 +0000)]
MFC of new 'arm' category.

16 years agoFix a mis-merge in the previous commit.
jkim [Tue, 22 Apr 2008 15:53:07 +0000 (15:53 +0000)]
Fix a mis-merge in the previous commit.

16 years agoMFC: 1.192, 1.193
jkim [Tue, 22 Apr 2008 15:45:53 +0000 (15:45 +0000)]
MFC: 1.192, 1.193

Remove M_SKIP_FIREWALL abuse and add more appropriate check.

16 years agoMFC r1.32, r1.33:
rpaulo [Tue, 22 Apr 2008 12:44:39 +0000 (12:44 +0000)]
MFC r1.32, r1.33:
   Add support for Asus EeePC backlight control.
   style(9) fix.

   Submitted by:   Akira Funahashi <funa at funa.org>

16 years agoMFC: rev. 1.335 ip_input.c, rev. 1.10 ip_ipsec.c, rev. 1.3 ip_ipsec.h
bz [Tue, 22 Apr 2008 12:02:55 +0000 (12:02 +0000)]
MFC: rev. 1.335 ip_input.c, rev. 1.10 ip_ipsec.c, rev. 1.3 ip_ipsec.h

  Take the route mtu into account, if available, when sending an
  ICMP unreach, frag needed.  Up to now we only looked at the
  interface MTU. Make sure to only use the minimum of the two.

  In case IPSEC is compiled in, loop the mtu through ip_ipsec_mtu()
  to avoid any further conditional maths.

  Without this, PMTU was broken in those cases when there was a
  route with a lower MTU than the MTU of the outgoing interface.

PR: kern/122338
Tested by: Mark Cammidge  mark peralex.com

16 years agoMFC: rev. 1.162
bz [Tue, 22 Apr 2008 11:57:04 +0000 (11:57 +0000)]
MFC: rev. 1.162

  Back out rev. 1.161 (1.157.2.2) and
  switch back to optimized TCP options ordering.

  A lot of testing has shown that the problem people were seeing was due
  to invalid padding after the end of option list option, which was corrected
  in tcp_output.c rev. 1.146 (1.141.2.4).

Thanks to:              anders@, s3raphi, Matt Reimer
Thanks to:              Doug Hardie and Randy Rose, John Mayer, Susan Guzzardi
Special thanks to:      dwhite@ and BitGravity
Discussed with:         silby

16 years agoAdd FreeBSD IDs to files which originate in FreeBSD.
jb [Tue, 22 Apr 2008 09:21:29 +0000 (09:21 +0000)]
Add FreeBSD IDs to files which originate in FreeBSD.

16 years agoMFC: 1.16: Use calloc() instead of zeroing memory ourselves.
ru [Tue, 22 Apr 2008 08:05:38 +0000 (08:05 +0000)]
MFC: 1.16: Use calloc() instead of zeroing memory ourselves.
     1.17: Better strfmon(3) conversion specifiers sanity checking.
     1.18: Fix memory leaks.

16 years agoMFC ip1000phy.c 1.3, ip1000phyreg.h 1.2 and miidevs 1.52 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:35:37 +0000 (06:35 +0000)]
MFC ip1000phy.c 1.3, ip1000phyreg.h 1.2 and miidevs 1.52 to RELENG_7.
  Add support for IC Plus IP1001 PHY.

16 years agoMFC rgephy.c rev 1.19 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:25:11 +0000 (06:25 +0000)]
MFC rgephy.c rev 1.19 to RELENG_7.
  Add detection of isolation state.

  PR: kern/76710

16 years agoMFC nfe.4 rev 1.10 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:19:29 +0000 (06:19 +0000)]
MFC nfe.4 rev 1.10 to RELENG_7.
  Mention support for nForce MCP73.

16 years agoMFC if_re.c 1.114 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:14:56 +0000 (06:14 +0000)]
MFC if_re.c 1.114 to RELENG_7.
  Don't touch MSI enable bit in RL_CFG2 register. For unknown reason
  clearing MSI enable bit for MSI capable hardwares resulted in Tx
  problems. MSI enable bit is set only when MSI is requested from
  user.

16 years agoMFC if_re.c 1.113, if_rlreg.h 1.74 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:13:05 +0000 (06:13 +0000)]
MFC if_re.c 1.113, if_rlreg.h 1.74 to RELENG_7.
  Padding more bytes than necessary one broke another variants of
  PCIe RealTek chips. Only pad IP packets if the payload is less than
  28 bytes.

16 years agoMFC if_re.c 1.112 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:09:57 +0000 (06:09 +0000)]
MFC if_re.c 1.112 to RELENG_7.
  In revision 1.70, 1.71 and 1.84 re(4) tried to workaround checksum
  offload bugs by manual padding for short IP/UDP frames. Unfortunately
  it seems that these workaround does not work reliably on newer PCIe
  variants of RealTek chips.

  To workaround the hardware bug, always pad short frames if Tx IP
  checksum offload is requested. It seems that the hardware has a
  bug in IP checksum offload handling. NetBSD manually pads short
  frames only when the length of IP frame is less than 28 bytes but I
  chose 60 bytes to safety. Also unconditionally set IP checksum
  offload bit in Tx descriptor if any TCP or UDP checksum offload is
  requested. This is the same way as Linux does but it's not
  mentioned in data sheet.

16 years agoMFC if_re.c 1.111 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:07:59 +0000 (06:07 +0000)]
MFC if_re.c 1.111 to RELENG_7.
  MSI handling on some RealTek chips are broken so disable it by
  default.

16 years agoMFC if_re.c 1.110, if_rlreg.h 1.73 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:05:46 +0000 (06:05 +0000)]
MFC if_re.c 1.110, if_rlreg.h 1.73 to RELENG_7.
  For MSI capable hardwares, enable MSI enable bit in RL_CFG2
  register.  If MSI was disabled by hw.re.msi_disable tunable
  expliclty clear the MSI enable bit.

16 years agoMFC if_re.c 1.109 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:02:20 +0000 (06:02 +0000)]
MFC if_re.c 1.109 to RELENG_7.
  Some RealTek chips are known to be buggy on DAC handling, so
  disable DAC by default.

16 years agoMFC if_re.c 1.108 to RELENG_7.
yongari [Tue, 22 Apr 2008 06:00:34 +0000 (06:00 +0000)]
MFC if_re.c 1.108 to RELENG_7.
  VLAN hardware tag information should be set for all desciptors of a
  multi-descriptor transmission attempt. Datasheet said nothing about
  this requirements. This should fix a long-standing VLAN hardware
  tagging issues with re(4).

16 years agoMFC if_re.c 1.107 to RELENG_7.
yongari [Tue, 22 Apr 2008 05:58:44 +0000 (05:58 +0000)]
MFC if_re.c 1.107 to RELENG_7.
  Always honor configured VLAN/checksum offload capabilities.
  Previously re(4) used to blindly enable VLAN hardware tag stripping
  and Rx checksum offload regardless of enabled optional features of
  interface.

16 years agoMFC if_re.c 1.106, if_rl.c 1.173 to RELENG_7.
yongari [Tue, 22 Apr 2008 05:56:16 +0000 (05:56 +0000)]
MFC if_re.c 1.106, if_rl.c 1.173 to RELENG_7.
  Don't map memory/IO resource in device probe and just use PCI
  vendor/revision/sub device id of the hardware to probe it.
  This is the same way as NetBSD does and it enhances readabilty
  a lot.

16 years agoMFC if_re.c 1.105, if_rlreg.h 1.72 to RELENG_7.
yongari [Tue, 22 Apr 2008 05:51:40 +0000 (05:51 +0000)]
MFC if_re.c 1.105, if_rlreg.h 1.72 to RELENG_7.
  Don't allow jumbo frame on 8139C+ controller.
  While I'm here add a check for minimal MTU length.

16 years agoMFC if_re.c 1.104, if_rlreg.h 1.71 to RELENG_7.
yongari [Tue, 22 Apr 2008 05:49:12 +0000 (05:49 +0000)]
MFC if_re.c 1.104, if_rlreg.h 1.71 to RELENG_7.
 Implement WOL.

16 years agoMFC if_re.c 1.103 to RELENG_7.
yongari [Tue, 22 Apr 2008 05:44:51 +0000 (05:44 +0000)]
MFC if_re.c 1.103 to RELENG_7.
  - Retire re_defrag() and use m_collapse() instead.

16 years agoMFC if_re.c 1.101, if_re.c 1.102, if_rlreg.h 1.70 to RELENG_7.
yongari [Tue, 22 Apr 2008 05:41:29 +0000 (05:41 +0000)]
MFC if_re.c 1.101, if_re.c 1.102, if_rlreg.h 1.70 to RELENG_7.
  Overhaul re(4).
  o Increased number of Rx/Tx descriptors to 256 for 8169 GigEs
    because it's hard to push the hardware to the limit with default
    64 descriptors.
    TSO requires large number of Tx descriptors to pass a full sized
    TCP segment(65535 bytes IP packet) to hardware. Previously it
    consumed 32 Tx descriptors, assuming MCLBYTES DMA segment size,
    to send the TCP segment which means re(4) couldn't queue more
    than two full sized IP packets.
    For 8139C+ it still uses 64 Rx/Tx descriptors due to its hardware
    limitations. With this changes there are (very) small waste of
    memory for 8139C+ users but I don't think it would affect 8139C+
    users for most cases.
  o Various bus_dma(9) fixes.
     - The hardware supports DAC so allow 64bit DMA operations.
     - Removed BUS_DMA_ALLOC_NOW flag.
     - Increased DMA segment size to 4096 from MCLBYTES because TSO
       consumes too many descriptors with MCLBYTES DMA segment size.
     - Tx/Rx side bus_dmamap_load_mbuf_sg(9) support. With these
       changes the code is more readable than previous one and got a
       (slightly) better performance as it doesn't need to pass/
       decode arguments to/from callback function.
     - Removed unnecessary callback function re_dmamap_desc() and
       nuked rl_dmaload_arg structure which was used in the callback.
     - Additional protection for DMA map load failure. In case of
       failure reuse current map instead of returning a bogus DMA
       map.
    -  Deferred DMA map unloading/sync operation for maximum
       performance until we really need to load new DMA map. If we
       happen to reuse current map(e.g. input error) there is no need
       to sync/unload/load again.
    -  The number of allowable Tx DMA segments for a mbuf chains are
       now 32 instead of magic nseg value. If the number of available
       Tx descriptors are short enough to send highly fragmented mbuf
       chains an optimized re_defrag() is called to collapse mbuf
       chains which is supposed to be much faster than m_defrag(9).
       re_defrag() was borrowed from ath(4).
     - Separated Rx/Tx DMA tag from a common DMA tag such that Rx DMA
       tag correctly uses DMA maps that were created with DMA alignment
       restriction(8bytes alignments). Tx DMA tag does not have such
       alignment limitation.
     - Added additional sanity checks for DMA ring map load failure.
     - Added additional spare Rx DMA map for graceful handling of Rx
       DMA map load failure.
     - Fixed misused bus_dmamap_sync(9) and added missing
       bus_dmamap_sync(9) in re_encap()/re_txeof()/re_rxeof().
  o Enabled TSO again as re(4) have reasonable number of Tx
    descriptors.
  o Don't touch DMA address of a Tx descriptor in re_txeof(). It's
    not needed.
  o Fix incorrect update of if_ierrors counter. For Rx buffer
    shortage it should update if_qdrops as the buffer is reused.
  o Added checks for unsupported H/W revisions and return ENXIO for
    these hardwares. This is required to remove resource allocation
    code in re_probe as other drivers do in device probe routine.
  o Modified descriptor index manipulation macros as it's now possible
    to have different number of descriptors for Rx/Tx.
  o In re_start, to save a lock operation, use IFQ_DRV_IS_EMPTY before
    trying to invoke IFQ_DRV_DEQUEUE. Also don't blindly call re_encap
    since we already know the number of available Tx descriptors in
    advance.
  o Removed RL_TX_DESC_THLD which was used to reserve RL_TX_DESC_THLD
    descriptors in Tx path. There is no such a limitation mentioned in
    8139C+/8169/8110/8168/8101/8111 datasheet and it seems to work ok
    without reserving RL_TX_DESC_THLD descriptors.
  o Fix a comment for RL_GTXSTART. The register is 8bits register.
  o Added comments for 8169/8139C+ hardware restrictions on descriptors.
  o Removed forward declaration for "struct rl_softc", it's not needed.
  o Added a new structure rl_txdesc for Tx descriptor managements and
    a structure rl_rxdesc for Rx descriptor managements.
  o Removed unused member variable rl_intlock in driver softc. There are
    still several unused member variables which are supposed to be used
    to access hardware statistics counters. But it seems that accessing
    hardware counters were not implemented yet.

16 years agoMFC revision 1.8:
davidxu [Tue, 22 Apr 2008 01:28:15 +0000 (01:28 +0000)]
MFC revision 1.8:
fix return value for function pthread_mutexattr_settype().

16 years agoMFC.
jb [Mon, 21 Apr 2008 23:57:23 +0000 (23:57 +0000)]
MFC.

The final stage of the big CDDL file move. These files were repo
copied in head to their new location under the 'cddl' directories
of src and src/sys and then added for this branch. The build has
been using the files in their new locations for a few days now.

16 years agoMFC: nlm_prot_impl.c 1.6 - Fix error handling in nlm_get_rpc and correct
dfr [Mon, 21 Apr 2008 09:23:31 +0000 (09:23 +0000)]
MFC: nlm_prot_impl.c 1.6 - Fix error handling in nlm_get_rpc and correct
some spelling mistakes in comments.

16 years agoMFC to RELENG_7:
antoine [Sun, 20 Apr 2008 19:32:46 +0000 (19:32 +0000)]
MFC to RELENG_7:
  Introduce a new F_DUP2FD command to fcntl(2), for compatibility with
  Solaris and AIX.
  fcntl(fd, F_DUP2FD, arg) and dup2(fd, arg) are functionnaly equivalent.
  Document it.
  Add some regression tests (identical to the dup2(2) regression tests).

  PR:             120233
  Submitted by:   Jukka Ukkonen
  Approved by:    rwaston (mentor)
  MFC after:      1 month

16 years agoMFC rev. 1.27:
piso [Sun, 20 Apr 2008 18:55:03 +0000 (18:55 +0000)]
MFC rev. 1.27:

Raise a bit ipfw kld priority.

16 years agoMFC 1.26: Reset the internal state used for the 'getopts' built-in when 'shift'
stefanf [Sun, 20 Apr 2008 18:02:41 +0000 (18:02 +0000)]
MFC 1.26: Reset the internal state used for the 'getopts' built-in when 'shift'
or 'set' are used to modify the arguments.

16 years agoMFC 1.36: Leave working directory variables unchanged if chdir() fails.
stefanf [Sun, 20 Apr 2008 17:55:31 +0000 (17:55 +0000)]
MFC 1.36: Leave working directory variables unchanged if chdir() fails.

16 years agoMFC to RELENG_7:
antoine [Sun, 20 Apr 2008 16:44:50 +0000 (16:44 +0000)]
MFC to RELENG_7:
  Add some obsolete usr/lib32 libraries.

  PR:             117189
  Submitted by:   Scot Hetzel
  Approved by:    rwatson (mentor)
  MFC after:      1 month

16 years agoMerge audit.c:1.41, audit_arg.c:1.19, audit_bsm.c:1.26,
rwatson [Sun, 20 Apr 2008 16:34:50 +0000 (16:34 +0000)]
Merge audit.c:1.41, audit_arg.c:1.19, audit_bsm.c:1.26,
audit_bsm_klib.c:1.15, audit_bsm_token.c:1.15, audit_pipe.c:1.15,
audit_syscalls.c:1.26, audit_trigger.c:1.8, audit_worker.c:1.23
from HEAD to RELENG_7:

  Use __FBSDID() for $FreeBSD$ IDs in the audit code.

16 years agoMFC to RELENG_7:
antoine [Sun, 20 Apr 2008 16:29:01 +0000 (16:29 +0000)]
MFC to RELENG_7:
  Merge changes from NetBSD on humanize_number.c, 1.8 -> 1.13
  Significant changes:
  - rev. 1.11: Use PRId64 instead of a cast to long long and %lld to print
  an int64_t.
  - rev. 1.12: Fix a bug that humanize_number() produces "1000" where it
  should be "1.0G" or "1.0M".  The bug reported by Greg Troxel.

  PR:             118461
  PR:             102694
  Approved by:    rwatson (mentor)
  Obtained from:  NetBSD
  MFC after:      1 month

16 years agoMerge mac_framework.h:1.97, mac_internal.h:1.124, mac_policy.h:1.107
rwatson [Sun, 20 Apr 2008 15:42:11 +0000 (15:42 +0000)]
Merge mac_framework.h:1.97, mac_internal.h:1.124, mac_policy.h:1.107
from HEAD to REENG_7:

  Make naming of include guards for MAC Framework include files more
  consistent with other kernel include guards (don't start with _SYS).

16 years agoMFC some small optimizations:
mav [Sun, 20 Apr 2008 11:28:16 +0000 (11:28 +0000)]
MFC some small optimizations:
rev. 1.151: Remove impossible (hk_peer == NULL) check.
rev. 1.152: Remove ng_setisr() call from ng_dequeue().
rev. 1.153: There is no need to erase hook->hk_node before freeing hook.
rev. 1.154: Use new atomic_fetchadd() primitive instead of looping atomic_cmpset().
rev. 1.158: ng_address_hook() microoptimization.