Commit Graph

63996 Commits

Author SHA1 Message Date
Robert Watson
b312d4b0ba Don't assign sp to the value of s when we're about to assign it instead to
s + strlen(s).

Found with:	Coverity Prevent(tm)
CID:		2243
2007-05-27 17:02:54 +00:00
Hidetoshi Shimokawa
db72757973 Change default value of hw.firewire.dcons_crom.force_console to 0
for least astonishment.

MFC after: 3 days
2007-05-27 14:00:34 +00:00
Hidetoshi Shimokawa
207bcebe4b Make compile without GDB option.
MFC after: 3 days
2007-05-27 13:58:43 +00:00
Robert Watson
e4e80aa713 Remove #if 0'd check for 0-size allocations, which if enabled, called
kdb_enter().
2007-05-27 13:13:46 +00:00
Robert Watson
86fc5557a6 Rather than entering the debugger via kdb_enter() when detecting memory
corruption under SMBUFS_NAME_DEBUG, panic() with the same error message.
2007-05-27 13:12:36 +00:00
Robert Watson
cf29f18a25 Rather than entering the debugger via kdb_enter() in the event the
root vnode is unexpectedly locked under NULLFS_DEBUG in nullfs and
then returning EDEADLK, panic.
2007-05-27 13:10:16 +00:00
Robert Watson
f0dde538b0 Rather than entering DDB with the message "unexpected error" and wedging
the card, panic explicitly if EN_DEBUG is enabled.  In the (default)
case of !EN_DEBUG, the driver resets the card.  Probably this case
shouldn't exist at all.
2007-05-27 12:45:05 +00:00
Sam Leffler
ee7d684055 silence some compiler complaints 2007-05-27 05:38:44 +00:00
Kip Macy
077ff26cbc fix compile warning by removing redundant LOG_ERR define 2007-05-27 04:39:29 +00:00
Kip Macy
b2dda71e61 set IFF_OACTIVE to avoid hangs when the tx ring fills up 2007-05-27 04:39:07 +00:00
Pawel Jakub Dawidek
0d99488ded There are too many false positive LORs reported by WITNESS, so when ZFS
debug is turned off, initialize locks with NOWITNESS flag.
At some point I'll get back to them, we would probably need BLESSING
functionality, which is currently turned off by default.
2007-05-26 21:37:14 +00:00
Warner Losh
14eced725c A careful reading of the disclaimer that is required to download the
SD Simplified specification, as well as other SD and SDIO
implemenations I've examined, suggest this disclaimer may be required.
It is unclear to me exactly what the license would be for, or why it
might be required.  Err on the side of caution and include this
disclaimer so anybody deploying this code can judge for themselves.  I
have no further unformation about the details.
2007-05-26 05:23:36 +00:00
Pawel Jakub Dawidek
6e042171bd To avoid a deadlock when handling .. directory during a lookup, we unlock
parent vnode and relock it after locking child vnode. The problem was that
we always relock it exclusively, even when it was share-locked.

Discussed with:	jeff
2007-05-25 22:23:38 +00:00
Pawel Jakub Dawidek
b4c85af977 We no longer need to put namecache entries onto temporary mplist.
It was useful in revision 1.86, but should have been removed in 1.89.
2007-05-25 22:19:49 +00:00
Pawel Jakub Dawidek
950afe9972 The cache_leaf_test() function seems to be unused, so remove it. 2007-05-25 22:16:17 +00:00
Andre Oppermann
faedb66c2a The printf %b list in PRINT_TH_FLAGS has to be in octal numbering.
Thus convert \8 to \10 and the warnings go away.

Pointed out by:	sam, ru, thompsa
2007-05-25 21:28:49 +00:00
Andrew Gallatin
a0394e33a5 - Use m_getcl() rather than m_getjcl() when we're allocating 2KB
clusters.  This helps quite a bit on my low end machines (improves
performance by about 300Kpps when being blasted by a hardware
packet generator).
- Include one extended f/w counter forgotten in earlier commit

Sponsored by: Myricom Inc.
2007-05-25 19:38:32 +00:00
Kip Macy
d1b41c9b16 add missed header 2007-05-25 18:29:17 +00:00
Kip Macy
dbda4d7734 update license headers 2007-05-25 16:42:25 +00:00
Kip Macy
5e51a65917 add toe device header missed by previous commit 2007-05-25 16:17:59 +00:00
Xin LI
77a20b72ef Make the comparsion more obvious. 2007-05-25 13:13:12 +00:00
Kip Macy
d722cab49a (MFp4)
- upgrade to reflect state of 1.0.0.86
        - move from firmware rev 3.2 to 4.0.0
        - import driver bits for offload functionality
	- remove binary distribution clause from top level files as it
	  runs counter to the intent of purely supporting the hardware

MFC after: 3 days
2007-05-25 09:48:20 +00:00
JINMEI Tatuya
6abdc89958 do not directly call rtfree() to meet an assumption in the callee.
(this fix suppresses a warning message appearing in the boot time on
IPv6-enabled systems)

Approved by:	gnn (mentor)
2007-05-25 06:44:00 +00:00
Nate Lawson
93bfd059fd Add a sysctl, 'debug.acpi.suspend_bounce', that causes the system to bounce
back in a simulated resume instead of entering the requested suspend state.
This helps in testing drivers separately from the acpi suspend code.  To
test your drivers, set debug.acpi.suspend_bounce=1 and then run
acpiconf -s3 (or 4).

MFC after:	1 day
2007-05-25 05:26:21 +00:00
Hidetoshi Shimokawa
10f39c7d37 Include stand.h for loader.
MFC after: 3 days
2007-05-25 05:00:39 +00:00
Kip Macy
fdd54a53de remove unneccessary curcpu reference in setting mmfsa 2007-05-25 01:55:51 +00:00
Kip Macy
7275e4bf4d move trap table initialization for cpu0 into sparc64_init 2007-05-25 01:21:40 +00:00
David E. O'Brien
9eef6e338b Temporarily add 'WITH_GCC3' that removes -Wno-pointer-sign from the
compiler invocation.  This is just to help get over the hump of people
tracking down bugs that may cross the GCC 4.2 upgrade.
It is envisioned that this option goes away after a suitable amount
of time.
2007-05-24 21:53:42 +00:00
Jack F Vogel
8a4787401a Fix for PR 112937, thanks to Ruslan Ermilov. I am still
a bit confused how the 'link flap' was connected to the
'get' rather than 'set' address, but this seems the right
thing to do here.
2007-05-24 18:11:11 +00:00
Sam Leffler
56b5a9c2a7 Search for a proper ucode image to use by incrementing the minor
release number up to the max.  This should eliminate the need to
tweak the default imageid define for later releases that are found
on the Intel web site.

MFC after:	1 month
2007-05-24 16:31:22 +00:00
Sam Leffler
c1fd78f884 o add hints for avila boards; brings back i2c devices lost when iicbus
started using hints instead of wired down device enumeration
o add usb commented out; will enable when support works

MFC after:	1 month
2007-05-24 16:27:48 +00:00
Sam Leffler
640edef54d Move to hints for configuring numerous devices so we can eliminate various
quirky code: uarts, led, cf/ide, ixpqmgr, npe are now specified with hints.

May want to put some of these devices back in the code and just use hints
to override/specify configuration.

MFC after:	1 month
2007-05-24 16:25:49 +00:00
Sam Leffler
dbbeaafca4 Don't muck with the internal state of a uart during probe, all we
should setup is the class.  This corrects an issue where enabling
uart1 on the avila board caused uart0 to stop working during boot
(no msgs generated by rc scripts were displayed).

Reviewed by:	imp
MFC after:	3 weeks
2007-05-24 16:17:51 +00:00
Sam Leffler
9fcef51546 Fix interrupt setup; rev 1.3 switched the irq to GPIO_TYPE_ACT_LOW
but this does not work on avila boards; special case them to use
GPIO_TYPE_EDG_RISING.

MFC after:	3 weeks
Submitted by:	jhay
2007-05-24 16:15:20 +00:00
Pawel Jakub Dawidek
fbd08bbe6a DNLC_NO_VNODE can't be NULL.
Reported by:	ru
2007-05-24 13:44:45 +00:00
Pawel Jakub Dawidek
f92dd5c2d9 Initialize ZFS a bit earlier and block root mounting until
initialization is complete. This fixes some root-on-ZFS
configurations.

Reported by:	Bruno Damour <freebsd.ruomad@free.fr>
Tested by:	Bruno Damour <freebsd.ruomad@free.fr>
2007-05-24 07:43:00 +00:00
Pawel Jakub Dawidek
d4c4dfe96f FreeBSD's namecache works quite well with ZFS, so remove DNLC. 2007-05-23 21:33:02 +00:00
Pawel Jakub Dawidek
4282c449dc All objects we create using GFS are directories, so initialize d_type
properly, but add XXX comment saying that it can eventually change in
the future.
2007-05-23 21:27:47 +00:00
Jack F Vogel
ca2a8b584f Two minor fixes, keep old 82542 from using jumbo frames, and add
missing htole64 in encap code.

Reviewed by:Pdeuskar
Approved by:Pdeuskar
2007-05-23 20:41:20 +00:00
Andre Oppermann
a250f3820c Add CWR back into the PRINT_TH_FLAGS list as gcc42 doesn't complain
about \8 in a string anymore.
2007-05-23 19:16:21 +00:00
Andre Oppermann
ec05a17370 In tcp_log_addrs():
o add the hex output of the th_flags field to the example log
   line in comments
 o simplify the log line length calculation and make it less
   evil
 o correct the test for the length panic; the line isn't on
   the stack but malloc'ed
2007-05-23 19:07:53 +00:00
John Baldwin
6db89449f0 Don't set lo_name and clobber lo_flags in lock_profile_object_init().
This was just wasteful when this was always called before lock_init()
(which overwrote both fields each time), but when
lock_profile_object_init() was moved into lock_init() the clearing of
lo_flags proved fatal (all locks became spin locks to _sleep(), etc.)

Reported by:	kris
2007-05-23 18:46:54 +00:00
Sam Leffler
3c86b7cdad fix comment typo 2007-05-23 17:28:21 +00:00
Robert Watson
4dec0e67ea Comment that tdsignal() may be entered from the debugger. 2007-05-23 17:27:42 +00:00
Robert Watson
63d69d2592 Initialize time_lock before calling cpu_initclocks(). This corrects a
race condition in which hardclock fires before the mutex is initialized
leading to a "corrupt spinlock" panic.

Submitted by:	attilio
2007-05-23 17:27:01 +00:00
Andrew Gallatin
c792928f01 Add support for "hardware" vlan tag insertion & removal emulation
in the mxge driver so as to be able to do checksum offload
on vlans.  This is good enough to achieve 10GbE line rate on vlans.
2007-05-23 16:25:40 +00:00
Konstantin Belousov
a96811b171 Fix the dependency for the linux_support.s, explicitely add linux_assym.h.
Reported by:	rwatson
In collaboration with:	rdivacky
Sponsored by:	Google SoC 2007
2007-05-23 15:45:52 +00:00
Andrew Gallatin
bd82bbb145 Fix a typo in pcib_alloc_msi{x} which resulted in the
device's, not the bridge's, softc to be used to check the
PCIB_DISABLE_MSI flag.  This resulted in randomly allowing
or denying MSI interrupts based on whatever value the driver
happened to store at sizeof(device_t) bytes into its softc.

I noticed this when I stopped getting MSI interrupts
after slighly re-arranging mxge's softc yesterday.
2007-05-23 15:31:00 +00:00
Olivier Houchard
302e130edc Remove duplicate includes.
Submitted by:   Cyril Nguyen Huu <cyril ci0 org>
2007-05-23 13:36:02 +00:00
Olivier Houchard
9d480d9ede Remove duplicate includes.
Submitted by:   Cyril Nguyen Huu <cyril ci0 org>
2007-05-23 13:21:57 +00:00
Pawel Jakub Dawidek
64c40cdcb0 Eliminate VI_LOCK()/VI_UNLOCK() pair from getattr and close code paths.
It's hard to measure performance improvement on my test machine, but the
change won't degrade performance for sure. I can measure slight improvement
for debugging kernel and it can also be a win for machines where atomic
operation is more expensive.

Reviewed by:	kib
2007-05-23 11:06:09 +00:00
Robert Watson
a4a035fd3e No need to force __inline__ of currecord(), as the compiler will usefully
inline it when needed already, and the symbol is also required outside of
audit.c.  This silences a new gcc warning on the topic of using __inline__
instead of __inline.

MFC after:	3 days
2007-05-23 09:32:30 +00:00
Konstantin Belousov
1c182de9a9 Move futex support code from <arch>/support.s into linux compat directory.
Implement all futex atomic operations in assembler to not depend on the
fuword() that does not allow to distinguish between -1 and failure return.
Correctly return 0 from atomic operations on success.

In collaboration with:	rdivacky
Tested by:	Scot Hetzel <swhetzel gmail com>, Milos Vyletel <mvyletel mzm cz>
Sponsored by:	Google SoC 2007
2007-05-23 08:33:06 +00:00
Kip Macy
905a24b997 Add some early diagnostics under bootverbose
bootverbose is not getting set early enough so hardcode for the moment
2007-05-23 05:22:58 +00:00
Pawel Jakub Dawidek
f013ccb768 - Remove redundant initialization.
- Compare pointer with NULL.
2007-05-22 23:05:48 +00:00
Pawel Jakub Dawidek
124427f96d Lock vnode on lookup. This fixes ZIL replay for rmdir/unlink/rename.
Reported by:	des
2007-05-22 21:22:25 +00:00
Jung-uk Kim
e629eb82ba Remove an empty line. 2007-05-22 20:24:07 +00:00
Jung-uk Kim
0f89fde22c Remove BCM5704S specific tunable (hw.bge.fake_autoneg) and
auto-detect the condition.
2007-05-22 19:35:34 +00:00
Jung-uk Kim
186f842beb Rearrange DMA read/write control register settings based on document snippet
provided by davidch via glebius.

PR:		kern/96806
2007-05-22 19:22:58 +00:00
Jung-uk Kim
410c2bebd2 Remove stale alpha support code. 2007-05-22 19:11:39 +00:00
Jung-uk Kim
d5d2385773 Fix time out check in EEPROM read and move delays to give some settle time.
Submitted by:	mjacob
2007-05-22 18:51:05 +00:00
Jung-uk Kim
ca0ba1d16f Add delays in MI communication register R/W loops. 2007-05-22 18:16:23 +00:00
Gleb Smirnoff
a0c0e34bd4 Some minor cleanups:
- In rt_check() remove the senderr() macro and the "bad" label. They
  used to simplify code, but now aren't.
- Remove extra RT_LOCK_ASSERT() in rt_setgate(). The RT_REMREF macro
  does this.
- In rtfree() convert panics to KASSERTs.
- Strict the routing API: rtfree() should be called only in a case
  when we are completely sure we've got the last reference on the
  rtentry. In all other cases RTFREE_LOCKED() macro should be used.
  If the reference isn't the last one spit out a warning printf.
  Correct the only(?) case for this in rt_check().
- Fix typos in comments.
2007-05-22 16:17:31 +00:00
Andrew Gallatin
adae7080fb mxge cleanups:
- Remove code to use the special wc_fifo.  It has been disabled by default
  in our other drivers as it actually slows down transmit by a small amount

- Dynamically determine the amount of space required for the rx_done
  ring rather than hardcoding it.

- Compute the number of tx descriptors we are willing to transmit per
  frame as the minimum of 128 or 1/4 the tx ring size.

- Fix a typo in the tx dma tag setup which could lead to unnecessary
  defragging of TSO packets (and potentially even dropping TSO packets
  due to EFBIG being returned).

- Add a counter to keep track of how many times we've needed to
  defragment a frame.  It should always be zero.

- Export new extended f/w counters via sysctl

Sponsored by: Myricom, Inc.
2007-05-22 15:57:49 +00:00
Andrew Gallatin
6200d44319 Hook mxge_lro.c to the build so that the if_mxge.ko module
will load.
2007-05-22 14:38:17 +00:00
Alexander Motin
e842c54054 Add support for setmode and settarget messages.
Approved by:	glebius (mentor)
2007-05-22 12:23:39 +00:00
Alexander Motin
179f56e196 Allow node to bypass traffic while no alias address defined.
Approved by:	glebius (mentor)
2007-05-22 12:14:43 +00:00
Alexander Motin
408e1674d6 Return back NETGRAPH_MPPC_COMPRESSION depends.
Reviewed by:	ru, julian
Approved by:	glebius (mentor)
2007-05-22 12:00:31 +00:00
Diomidis Spinellis
fdbe5babe4 Increase precision of time values in the process accounting
structure, while maintaining backward compatibility with legacy
file and record formats.
2007-05-22 06:51:38 +00:00
Kip Macy
38354c989f restore interrupts to working order after INTR_THREAD changes
- ithread_wrapper was being treated as a wrapper for fast interrupts when
  in fact it was intended for ithread interrupts
2007-05-22 06:17:55 +00:00
Alan Cox
cf4682ae23 Eliminate the reactivation of cached pages in vm_fault_prefault() and
vm_map_pmap_enter() unless the caller is madvise(MADV_WILLNEED).  With
the exception of calls to vm_map_pmap_enter() from
madvise(MADV_WILLNEED), vm_fault_prefault() and vm_map_pmap_enter()
are both used to create speculative mappings.  Thus, always
reactivating cached pages is a mistake.  In principle, cached pages
should only be reactivated by an actual access.  Otherwise, the
following misbehavior can occur.  On a hard fault for a text page the
clustering algorithm fetches not only the required page but also
several of the adjacent pages.  Now, suppose that one or more of the
adjacent pages are never accessed.  Ultimately, these unused pages
become cached pages through the efforts of the page daemon.  However,
the next activation of the executable reactivates and maps these
unused pages.  Consequently, they are never replaced.  In effect, they
become pinned in memory.
2007-05-22 04:45:59 +00:00
Alexander Kabaev
23a29e45cd Allow FreeBSD's native ELF image activators to execute shared libraries the
same way it was enabled for Linux binares in linuxulator.

This allows binaries built with -pie. Many ports auto-detect -fPIE support
in GCC 4.2 and build binaries FreeBSD was unable to run.
2007-05-22 02:22:58 +00:00
Daniel Hartmeier
67debc100c From OpenBSD, rev. 1.524, 1.528, 1.529
Deal with IPv6 routing headers (see FreeBSD-SA-07:03.ipv6 for background)
Block IPv6 packets with routing headers by default, unless 'allow-opts'
is specified. Block RH0 unconditionally. Deal with ip6_plen 0.

MFC after:	1 week
Discussed with:	mlaier
2007-05-21 20:08:59 +00:00
Jung-uk Kim
bf5a3266f7 Use lower cases for UUID string to conform RFC4122 and ISO/IEC-9834-8:2005. 2007-05-21 18:48:18 +00:00
Andrew Gallatin
053e637f86 Improve mxge receive performance:
- Update to the latest (1.4.18) f/w.  This f/w introduces a new
  receive mode which allows us to use FreeBSD's physically discontinuous
  MJUM9BYTES clusters.

- Switch the driver from chaining MJUMPAGESIZE clusters to using
  MJUM9BYTES clusters to avoid mbuf chaining overheads.  Due to this
  change, people running obsolete f/w images will be limited to an MTU of
  PAGE_SIZE - 16.

- Add (disabled by default) support for Large Receive Offload.

Sponsored by: Myricom, Inc.
2007-05-21 18:32:27 +00:00
Olivier Houchard
d10f3ce07f Force the alignment of the chars arrays, as they are casted later to
structs.
gcc 4.2 doesn't do it by default, and that results in unaligned access on
arm.

Reviewed by:	gnn, imp
2007-05-21 14:38:20 +00:00
Robert Watson
5a9f2d6c56 Short name of kernel audit worker thread from "audit_worker" to "audit".
MFC after:	3 days
2007-05-21 14:08:26 +00:00
Xin LI
4d953fe6db Bump __FreeBSDversion for shared library version bump.
This makes it possible for our ports infrastructure
to determine whether it is appropriate to install
compat6x in the future.
2007-05-21 14:03:28 +00:00
Hidetoshi Shimokawa
bebdf94c45 Make sure fwsid is not NULL.
MFC after: 3 days
2007-05-21 12:17:54 +00:00
Yoshihiro Takahashi
f3fc519625 MFi386: revision 1.652
- Move GDT/LDT locking into a seperate spinlock, removing the global
     scheduler lock from this responsibility.
2007-05-21 11:57:36 +00:00
Matt Jacob
b8fdb7f911 Perhaps a better fix- make the called function do the (possible never reached)
initialization. Do a token amount of style cleanup.

Poked by: bde
2007-05-21 09:26:47 +00:00
Marcel Moolenaar
6de61ca8f8 When speculation fails (as determined by the chk instruction) the
processor is to jump to recovery code. This branching behaviour
may not be implemented by the processor and a Speculative Operation
fault is raised. The OS is responsible to emulate the branch.
Implement this, because GCC 4.2 uses advanced loads regularly.
2007-05-21 05:11:43 +00:00
Hidetoshi Shimokawa
9404513cfa MFp4: Simplify the bus probe routin using a kthread.
MFC after: 1 week
2007-05-21 02:18:50 +00:00
Jeff Roberson
80b200da28 - rename VMCNT_DEC to VMCNT_SUB to reflect the count argument.
Suggested by:	julian@
Contributed by:	attilio@
2007-05-20 22:33:42 +00:00
Jeff Roberson
8b98fec903 - Move clock synchronization into a seperate clock lock so the global
scheduler lock is not involved.  sched_lock still protects the sched_clock
   call.  Another patch will remedy this.

Contributed by:	Attilio Rao <attilio@FreeBSD.org>
Tested by:	kris, jeff
2007-05-20 22:11:50 +00:00
Jeff Roberson
0ad5e7f326 - Move GDT/LDT locking into a seperate spinlock, removing the global
scheduler lock from this responsibility.

Contributed by:	Attilio Rao <attilio@FreeBSD.org>
Tested by:	jeff, kkenn
2007-05-20 22:03:57 +00:00
Matt Jacob
a443a26379 Initialize irql to something prior to calls that (might) set it.
Whined about: gcc 4.2
2007-05-20 16:59:37 +00:00
Matt Jacob
2d5f1502fe Initializae lastaddr to 0 in bus_dmamap_load_uio so that
_bus_dmamap_load_buffer won't (potentially) be confused.

Discovered by: gcc 4.2

MFC after:	3 days
2007-05-20 16:53:45 +00:00
Matt Jacob
6c7d0cff3f Make gcc 4.2 happy by initiatlizing controller && channel prior
to a call to a function which *might* then initialize them.

MFC after:	3 days
2007-05-20 16:49:09 +00:00
Matt Jacob
c512bc298c Increase size of timer counter bitfield to accomodate the actual size of the
default timer value.

Discovered By: gcc 4.2

MFC after:	3 days
2007-05-20 16:43:35 +00:00
Marius Strobl
62afade2cc - Staticize cpu_ipi_send() and cpu_mp_unleash() as these aren't
referenced outside of mp_machdep.c
- Replace a magic 14 with the newly added IDC_ITID_SHIFT macro.
- Remove the global mp_boot_mid variable as it's not really necessary
  and just replacing it with PCPU_GET(mid) doesn't have any impact on
  performance once booted.
- Replace PCPU_GET(cpuid) with the curcpu shortcut.
- Replace hardcoded function names in panic strings etc with __func__
  so they don't need to be updated when renaming the function.
- Use register_t instead of u_long for variables used to hold the
  return value of intr_disable() so we don't need to apply any
  knowledge about the actual width of that value here.
- Improve the wording of some comments.
- Fix several style(9) bugs.
2007-05-20 14:49:01 +00:00
Marius Strobl
8d9b9168aa - Also identify USIIIi+, USIV and USIV+ CPUs.
- Use __FBSDID in identcpu.c.
- Remove #ifndef SUN4V around global cpu_impl variable; it doesn't
  hurt on sun4v for now and once setPQL2() is gone sun4v can stop
  sharing identcpu.c with sparc64, making the reminder of this file
  also sparc64-only again. [1]

Submitted by:	kmacy [1]
2007-05-20 13:47:36 +00:00
Marius Strobl
84edfa5dd8 Given that these sparc64 (as in sun4u) specific headers only exist
in the sun4v source in order to be able to compile the source which
is shared between sparc64 and sun4v just #include the sparc64
version here instead of duplicating it.
This is based on the approach taken by pc98 headers in order to
compile the source shared between i386 and pc98.
2007-05-20 13:19:32 +00:00
Marius Strobl
ebf9df0158 Delete the unused/not really used sparc64 (as in sun4u) cache.h,
iommureg.h (which already began to bitrot) and iommuvar.h from the
sun4v source and adjust some of the source which is shared between
sparc64 and sun4v as appropriate.
2007-05-20 13:06:45 +00:00
Marius Strobl
331a66091a Delete a remnant of the old sparc64 nexus(4) which was never used for sun4v. 2007-05-20 09:58:16 +00:00
Marius Strobl
aea97983ee Remove superfluous inclusion of machine/ver.h. 2007-05-20 09:31:31 +00:00
Marius Strobl
fb6b415c96 Make previous revision compile. 2007-05-20 09:21:29 +00:00
Andrew Thompson
6469e186ad - packets on the input interface were counted twice
- Use IFQ_HANDOFF instead of rolling our own
2007-05-20 03:21:59 +00:00
John Baldwin
7ec137e5b0 Rename the macros for assertion flags passed to sx_assert() from SX_* to
SA_* to match mutexes and rwlocks.  The old flags still exist for
backwards compatiblity.

Requested by:	attilio
2007-05-19 21:26:05 +00:00
Andre Oppermann
1c9dbd1567 In kern_sendfile() adjust byte accounting of the file sending loop to
ignore the size of any headers that were passed with the sendfile(2)
system call.  Otherwise the file sent will be truncated by the header
size if the nbytes parameter was provided.  The bug doesn't show up
when either nbytes is zero, meaning send the whole file, or no header
iovec is provided.

Resolve a potential error aliasing of errors from the VM and sf_buf
parts and the protocol send parts where an error of the latter over-
writes one of the former.

Update comments.

The byte accounting bug wasn't seen in earlier because none of the popular
sendfile(2) consumers, Apache, lighttpd and our ftpd(8) use it in modes
that trigger it.  The varnish HTTP proxy makes full use of it and exposed
the problem.

Bug found by:	phk
Tested by:	phk
2007-05-19 20:50:59 +00:00
John Baldwin
71a95881d4 Expose sx_xholder() as a public macro. It returns a pointer to the thread
that holds the current exclusive lock, or NULL if no thread holds an
exclusive lock.

Requested by:	pjd
2007-05-19 20:18:12 +00:00
John Baldwin
46a8b9cbc9 Oops, didn't include SX_ADAPTIVESPIN in the list of valid flags for the
assert in sx_init_flags().

Submitted by:	attilio
2007-05-19 18:34:24 +00:00
Marcel Moolenaar
68863fdbfc Fix GCC warning: va = va += PAGE_SIZE contains pointless operation
va = va. Fix white space in nearby lines.
2007-05-19 18:25:14 +00:00
John Baldwin
b0d673254d Add a new SX_RECURSE flag to make support for recursive exclusive locks
conditional.  By default, sx(9) locks are back to not supporting recursive
exclusive locks.

Submitted by:	attilio
2007-05-19 16:35:27 +00:00
Olivier Houchard
705fda849d Use __mcount() instead of _mcount() to reduce diffs with NetBSD. 2007-05-19 16:20:37 +00:00
Olivier Houchard
3de2f9db98 Constify to please gcc 4.2. 2007-05-19 13:32:58 +00:00
Olivier Houchard
10c33eae44 Do not try to inline pmap_kremove(), as it's exported. 2007-05-19 13:21:41 +00:00
Joel Dahl
ea18b1d925 Fix randomly broken playback with Fortemedia FM801 XWave PCI soundcard.
PR:		kern/98898
Submitted by:	Johannes Weiner <hnazfoo@googlemail.com>
Approved by:	ariff
2007-05-19 13:19:32 +00:00
Olivier Houchard
a994b16d7d Do not try to inline bus_dmamap_sync_buf(), gcc 4.2 doesn't want to do so
because it uses alloca().
Initialize lastaddr in bus_dmamap_load_uio().
2007-05-19 13:17:31 +00:00
Marcel Moolenaar
aea0bb5c9b Add a level of indirection to the kernel PTE table. The old
scheme allowed for 1024 PTE pages, each containing 256 PTEs.
This yielded 2GB of KVA. This is not enough to boot a kernel
on a 16GB box and in general too low for a 64-bit machine.
By adding a level of indirection we now have 1024 2nd-level
directory pages, each capable of supporting 2GB of KVA. This
brings the grand total to 2TB of KVA.
2007-05-19 13:11:27 +00:00
Xin LI
6c958d1d21 Bump __FreeBSDversion to 700042 to indicate that gcc 4.2 was
imported to the base system.
2007-05-19 12:57:16 +00:00
Marcel Moolenaar
47538c21e5 Account for the fact that contigmalloc(9) can return a NULL pointer.
Fix the flags argument: M_WAITOK is not a valid flag. Its presence
leaves the indication that contigmalloc(9) will not return a NULL
pointer.

The use of contigmalloc(9) in this place is probably not a good idea
given the constraints. It's probably better to lift the constraints
and instead add a permanent mapping to the ITR. It's possible that
the first 256MB of memory is exhausted when we get here.

This fixes a kernel panic on a 16GB rx3600.
2007-05-19 12:50:12 +00:00
Olivier Houchard
fe85f6cee8 Switch the kernel's pmap domain from 15 to 0.
This should be a no-op, and this is needed for xscale core 3 supersections
support, as they are always part of the domain 0
2007-05-19 12:47:34 +00:00
Joel Dahl
03756ceff7 Turn off the AK452X De-emphasis filter for 44.1KHz. This should fix some
sound quality problems.

PR:		kern/112688
Submitted by:	Stefan Ehmann <shoesoft@gmx.net>
Reviewed by:	Konstantin Dimitrov <kosio.dimitrov@gmail.com>
Approved by:	ariff
2007-05-19 11:06:43 +00:00
Joel Dahl
ecdbb0d42b Fix detection of PC-9821 V166 internal sound card.
PR:		kern/105600
Submitted by:	rotus <rotus@takamanohara.dyndns.org>
Approved by:	ariff
2007-05-19 10:53:01 +00:00
Scott Long
40ca137bbd Minor update to version 3.70.03.007 2007-05-19 10:12:58 +00:00
Andrew Thompson
fe45e65f10 Compare the partner system priority when choosing the aggregator. 2007-05-19 09:37:04 +00:00
Andrew Thompson
998971a70f Implement the Marker Protocol. A marker frame is placed on the interface queue
of each port and any further packets are blocked, when the all the marker frames
have been returned to us from the remote network device then we can be sure
that all interface queues are empty.

This is needed when a port is added or removed from the aggregation since it
will affect the hash based distribution, if the queues are not empty then a
packet from an existing connection may be placed on a different interface and
arrive out of order. This was previously achieved by suppressing transmission for
1 second, now that there is an active feedback this timeout as been increased
to 3 seconds and used as a fallback.
2007-05-19 07:47:04 +00:00
Robert Watson
4ce71ef718 Check return value of m_pullup() in firewire_input().
CID:		2105
Found with:	Coverity Prevent(tm)
2007-05-19 05:29:05 +00:00
Alexander Kabaev
12c95a2554 Tweak inlining parameters a little. Add warning to tell us if function
we declared as inline can not be inlined.
2007-05-19 05:07:47 +00:00
Alexander Kabaev
d586dea015 Remove extern struct pcpu __pcpu[]; from the header file and
move it the the only file where it appears to be used.
2007-05-19 05:03:59 +00:00
Alexander Kabaev
fa298d5ea8 Include machine/pcb.hto turn extern struct pcb stoppcbs[]; construct
into the valid C.
2007-05-19 05:01:43 +00:00
Alexander Kabaev
b27167c85e Remove local static redefinition of ucom_devclass. 2007-05-19 04:57:15 +00:00
Alexander Kabaev
ee9f46615e Add kern.arnd sysctl. SSP code uses it to initialize the stack guard
magic value.

Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
2007-05-19 04:53:14 +00:00
Alexander Kabaev
da3bcc92c1 Disable -Werror for now.
Remove  -I- construct obsolete in GCC 4.2.
2007-05-19 04:48:08 +00:00
Alexander Kabaev
42f17ea912 Add -Wno-pointer-sign to CWARNFLAGS.
Switch ia64 kernels to -fpic. This is likely wrong, but at least gets
ia64 kernels to compile and link with GCC 4.2. The previous -mno-sdata
trick is not working anymore.
2007-05-19 04:45:54 +00:00
Andrew Thompson
9bbba41e79 Fix a mbuf leak where sc_start fails or the protocol is none. 2007-05-19 01:40:18 +00:00
Andrew Thompson
3362a47464 Fix locking assert where we should hold the reader lock. 2007-05-18 23:38:35 +00:00
Matt Jacob
1cd1670b48 Zero scsi_readcapacity allocations so we can really
tell if there has been data returned (for some broken
residual checking points).

MFC after:	3 days
2007-05-18 21:58:07 +00:00
Andre Oppermann
d2ddf5d4b0 Be more restrictive with segment validity checks in syncache_expand()
and log check failures to syslog at LOG_DEBUG level.

Always prefill the sc->sc_ts field to use it in the checks.
2007-05-18 21:42:25 +00:00
Andre Oppermann
5df429a002 o Add syslog logging under LOG_DEBUG to various failures caused by
bogus segments
o Add more KASSERT()s
o Update comments
2007-05-18 21:13:01 +00:00
Robert Watson
eefc497257 Remove unnecessary assignment.
CID:		2227
Found with:	Coverity Prevent(tm)
2007-05-18 21:10:08 +00:00
Andre Oppermann
df541e5fc1 Add tcp_log_addrs() function to generate and standardized TCP log line
for use thoughout the tcp subsystem.

It is IPv4 and IPv6 aware creates a line in the following format:

 "TCP: [1.2.3.4]:50332 to [1.2.3.4]:80 tcpflags <RST>"

A "\n" is not included at the end.  The caller is supposed to add
further information after the standard tcp log header.

The function returns a NUL terminated string which the caller has
to free(s, M_TCPLOG) after use.  All memory allocation is done
with M_NOWAIT and the return value may be NULL in memory shortage
situations.

Either struct in_conninfo || (struct tcphdr && (struct ip || struct
ip6_hdr) have to be supplied.

Due to ip[6].h header inclusion limitations and ordering issues the
struct ip and struct ip6_hdr parameters have to be casted and passed
as void * pointers.

tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr,
    void *ip6hdr)

Usage example:

 struct ip *ip;
 char *tcplog;

 if (tcplog = tcp_log_addrs(NULL, th, (void *)ip, NULL)) {
	log(LOG_DEBUG, "%s; %s: Connection attempt to closed port\n",
	    tcplog, __func__);
	free(s, M_TCPLOG);
 }
2007-05-18 19:58:37 +00:00
John Baldwin
0ba5d2eedb Fix statistical accounting for bytes and packets during sack retransmits.
MFC after:	1 week
Submitted by:	mohans
2007-05-18 19:56:24 +00:00
Robert Watson
5d0dd109f4 In nfs_down(), if rep can be NULL, which we test for, then we should
lock and unlock conditionally, not just set the flag on it conditionally.
In practice, this bug couldn't manifest, as in the current revision of
the code, no callers pass a NULL rep.

CID:		1416
Found with:	Coverity Prevent(tm)
2007-05-18 19:34:54 +00:00
Alexander Motin
06c51e6e74 Fix build with NETGRAPH_MPPC_COMPRESSION but without NETGRAPH_MPPC_ENCRYPTION.
Approved by:	glebius (mentor)
2007-05-18 15:28:01 +00:00
David Malone
34fa9e8a37 Help ng_fec deal with multicast addresses.
While ng_fec called the ioctl to let interfaces in the bundle know
the list of multicast addresses had changed, it never actually
updated that list on the interfaces in the bundle. Consequently,
the multicast filters could be programmed incorrectly.

if_lagg does this correctly, by maintaining a list of addresses
that it has added to interfaces in the bundle. This commit basically
takes the if_lagg code and adds it to ng_fec.

A version of this patch for RELENG_6 has fixed some problems with
IPv6 ND over ng_fec. This is probably the problem in PR 107523.

PR:		107523
Tested by:	Rob Gallagher <robert.gallagher@heanet.ie>
Obtained from:	if_lagg
MFC after:	3 weeks
2007-05-18 15:05:49 +00:00
John Baldwin
da7d0d1e24 Fix a comment. 2007-05-18 15:05:41 +00:00
John Baldwin
c91fcee75d Move lock_profile_object_{init,destroy}() into lock_{init,destroy}(). 2007-05-18 15:04:59 +00:00
Konstantin Belousov
d413d21071 Since renaming of vop_lock to _vop_lock, pre- and post-condition
function calls are no more generated for vop_lock.
Rename _vop_lock to vop_lock1 to satisfy tools/vnode_if.awk assumption
about vop naming conventions. This restores pre/post-condition calls.
2007-05-18 13:02:13 +00:00
Jeff Roberson
222d01951f - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating
vmcnts.  This can be used to abstract away pcpu details but also changes
   to use atomics for all counters now.  This means sched lock is no longer
   responsible for protecting counts in the switch routines.

Contributed by:		Attilio Rao <attilio@FreeBSD.org>
2007-05-18 07:10:50 +00:00
Jeff Roberson
2b7e2ee7a5 - Convert turnstiles and sleepqueus to use UMA. This provides a modest
speedup and will be more useful after each gains a spinlock in the
   impending thread_lock() commit.
 - Move initialization and asserts into init/fini routines.  fini routines
   are only needed in the INVARIANTS case for now.

Submitted by:	Attilio Rao <attilio@FreeBSD.org>
Tested by:	kris, jeff
2007-05-18 06:32:24 +00:00
JINMEI Tatuya
187069853c - Disabled responding to NI queries from a global address by default as
specified in RFC4620.  A new flag for icmp6_nodeinfo was added to enable the
  feature.
- Also cleaned up the code so that the semantics of the icmp6_nodeinfo
  flags is clearer (i.e., defined specific macro names instead of using
  hard-coded values).

Approved by:	gnn (mentor)
MFC after:	1 week
2007-05-17 21:20:24 +00:00
Christian S.J. Peron
6821ba0e76 Correct typo in comment 2007-05-17 16:03:14 +00:00
Peter Wemm
c6b342f820 Eliminate a micro-optimization that hasn't had any effect for 15+ years. 2007-05-17 15:31:14 +00:00
Alexander Motin
b50ace7384 Fix small copy/paste mistake. 2007-05-17 13:33:38 +00:00
Randall Stewart
3c503c28da - Fixed 1-2-1 model to not worry about associd in sockopts
- Fixed RTOinfo for bounding.
- Fixed connect() to return ECONNREFUSED when an ABORT is received.
- Added comments to direct Static Analysis not to look at some things
  it does not understand (comments are /* sa_ignore XXXXX */)
- Bind when colliding was broken, missing not_found = 1 before
  checking to see if the port was in use caused endless bind loop.
- Cookie life needs to be in milliseconds to conform to socket api.
- Cookie life is not supposed to change if its 0, On the assoc
  level set we changed it to 0 opps.
- Two more static analysis issues identified by the cisco
  tool. Null checks needed.
- An issue for sendfile(). Need to validate the correct
  input argument.
- When sending failed due to a no route to host, we leaked
  the mbuf chain failing to call m_freem().
- Fix #ifdef issue for getting hash block len when HAVE_SHA2 is NOT defined
Reviewed by:	gnn
2007-05-17 12:16:24 +00:00
Warner Losh
3627f73782 Don't export a kern.conftxt sysctl, except when INCLUDE_CONF_FILE is
defined.  This restores the old behavior, and eliminates the
dependency on the kernconf.tmpl when INCLUDE_CONFIG_FILE isn't
included in the kernel config.  There were many people in the terminal
room that had almost, but not quite, up-to-date config files that this
helps.  I don't know if this is the result of skew among the cvsup
servers, or some other more subtle problem.  However, this fix should
work for any config of recent vintage (I tested with the latest, and
one before the recent changes, and eye-balled the intermediate
versions).

Reviewed by: the terminal room crew
2007-05-17 05:05:12 +00:00
Marcel Moolenaar
7db977fb07 The HP Diva RMP3 uses BAR 0x14. 2007-05-17 04:07:19 +00:00
Marcel Moolenaar
91ac788806 Make the serdev I/F non-optional. At least 3 drivers depend on it
and they can be loaded as a module.

PR: kern/112706
2007-05-17 01:29:55 +00:00
Jack F Vogel
481dd885f8 Couple of changes, back down on last TSO change, instead make old
adapter list still capable, but only PCI-E adapters are now enabled.
The user can enable older PCI-X or PCI adapters using ifconfig.
Secondly, Arthur Hartwig pointed out my MSI change was not working
correctly, changed to something that now does. Thanks Arthur.
There was also a fundamental bug in the 82575 MSIX code, the MSIX
registers had to be mapped, opps :)

Rubber-stamped by: Pdeuskar
2007-05-17 00:14:03 +00:00
Oleg Bulyzhin
7e17f8b864 Unbreak IPv4 kernel build. 2007-05-17 00:05:13 +00:00
John Baldwin
81c8102c4c Don't completely skip pci_cfg_save() in the PCI nomatch routine if
the power_nodriver tunable is off.  pci_cfg_save() already checks the
tunable internally, and no other callers of pci_cfg_save() check the
tunable.

Reviewed by:	imp
2007-05-16 23:42:04 +00:00
John Baldwin
d193b870a5 Fix interrupt routing for some cards after the previous fix to clear BARs
in cardbus cards: update the saved copy of the PCIR_INTLINE register in
the PCI ivars in addition to the actual register.

Reviewed by:	imp
2007-05-16 23:40:08 +00:00
David Christensen
567590460f - Added TSO support
- Updated firmware to latest release (v3.4.8) to fix TSO + jumbo frame lockup
- Added MSI (hw.bce.msi_enable) and TSO (hw.bce.tso_enable) sysctls
- Fixed kernel panic when MSI is used and module is unloaded
- Added several new debug routines
- Removed slack space for RX/TX chains since it only covers sloppy coding
- Fixed a potential problem when programming jumbo MTU size in hardware
- Various other comment changes

MFC after:	4 weeks
2007-05-16 23:34:11 +00:00
Robert Watson
6751f8364e Remove leading spaces before tabs spotted thanks to silby using
kwrite to read ip_input.c.
2007-05-16 20:46:58 +00:00
Robert Watson
d19e16a72c Generally migrate to ANSI function headers, and remove 'register' use. 2007-05-16 20:41:08 +00:00
Warner Losh
cfd1374177 Write 0 to all the bars in cardbus_cardbus_setup_regs. This is needed
because on at least my dc based cards there's garbage in there.  The
recent changes in the resource code appears to have unmasked this
problem...  At least dc now probes/attaches better than it did before.

Also, we no longer need to write to the cfg for the other registers.
2007-05-16 20:00:36 +00:00
Brooks Davis
a45cbf12c8 Update the comments on if_alloc(), if_free(), if_free_type(), and
if_attach.

Remove a comment about pre-3.0 network drivers from if_attach().

Be a bit more consistant about whitespace near comments.
2007-05-16 19:59:01 +00:00
Warner Losh
26432f7ba2 o Don't hold lock over bus_teardown_intr when we're waiting for the
thread to die, since that can cause deadlock with the ISR (in theory).
o Minor cleanup
o comment nit
2007-05-16 19:53:49 +00:00
Warner Losh
af3bdf60d5 Better message on cbb resource alloc failure 2007-05-16 18:44:56 +00:00
Warner Losh
4b3337405d Change PCIM_CIS_ASI_TUPLE to _CONFIG.
Add PCI_MAX_BAR_0
minor style nit.
Add PCIM_CIS_CONFIG_MASK
2007-05-16 18:42:38 +00:00
Warner Losh
7a528f5c2e Add some doxygen docs for pci_cfg_{save,restore}. 2007-05-16 18:41:42 +00:00
Brooks Davis
bec59525e6 The struct if_data members ifi_recvquota and ifi_xmitquota have been
unused for ages.  Rename them to ifi_spare_char1 and ifi_spare_char2
respectively to indicate this face.
2007-05-16 18:37:37 +00:00
Andre Oppermann
abb91d889a Remove now unused stuff forgotten in the previous commit. 2007-05-16 17:55:22 +00:00
Wojciech A. Koszek
332fd25c96 Revert config(8) version bump. It brings major pain for people working on
different versions of FreeBSD source tree.

Old config(8) can now be used unless you want to use INCLUDE_CONFIG_FILE
option.

Approved by:	imp
Reviewed by:	imp
2007-05-16 17:23:54 +00:00
Scott Long
35ef86f285 Catch up to driver changes required for the mfip sub-driver. 2007-05-16 17:23:36 +00:00
Scott Long
f366931c86 Add the 'mfip' sub-driver for gaining SCSI-passthrough access to devices
on an MFI controller.
2007-05-16 17:19:47 +00:00
Andre Oppermann
2104448fe7 Move TIME_WAIT related functions and timer handling from files
other than repo copied tcp_subr.c into tcp_timewait.c#1.284:

 tcp_input.c#1.350 tcp_timewait() -> tcp_twcheck()

 tcp_timer.c#1.92 tcp_timer_2msl_reset() -> tcp_tw_2msl_reset()
 tcp_timer.c#1.92 tcp_timer_2msl_stop() -> tcp_tw_2msl_stop()
 tcp_timer.c#1.92 tcp_timer_2msl_tw() -> tcp_tw_2msl_scan()

This is a mechanical move with appropriate renames and making
them static if used only locally.

The tcp_tw_2msl_scan() cleanup function is still run from the
tcp_slowtimo() in tcp_timer.c.
2007-05-16 17:14:25 +00:00
Scott Long
daddc0011f Release the bus reference that is acquired when doing a CAMIOCOMMAND
ioctl.  This should make SIM removal a bit more robust.
2007-05-16 16:57:21 +00:00
Scott Long
9602c3fce8 Remove an assertion in xpt_print_path() that makes debugging code much more
difficult.
2007-05-16 16:55:50 +00:00
Scott Long
85d92640f8 Add a helper function for registering async callbacks. Besides
eliminating a lot of duplicated code, this also fixes a locking edge case.
2007-05-16 16:54:23 +00:00
Wojciech A. Koszek
5f9974ae57 Handle !INCLUDE_CONFIG_FILE entirely in the kernel. This should make some
developers happy, since it will let them to use old config(8) with newer
kernels.

Reviewed by:	imp
Approved by:	imp
2007-05-16 16:08:04 +00:00
Alexander Motin
ae1be01f9e Style cleanup.
Approved by:	glebius (mentor)
2007-05-16 12:11:09 +00:00
David Malone
39629c92cc When verifying the IPv4 UDP checksum, don't overwrite the checksum
value in the mbuf with the result of the calculation. Previously,
if we chose to return an ICMP message, the quoted UDP checksum bytes
would be different to what was sent.

PR:		112471
Submitted by:	Matthew Luckie <mluckie@cs.waikato.ac.nz>
MFC after:	3 weeks
2007-05-16 09:12:16 +00:00
Nate Lawson
f1d16a11cb Fix a logic bug added in last commit where PNP0103 devices would no longer
be probed but table-based devs would be ok.  General style cleanup also.

MFC after:	5 days
2007-05-16 01:15:51 +00:00
Jack F Vogel
0ac5a4cc2b This delta adds two bug fixes: one that makes HW Offload logic in
legacy codepath match the 82575, without this we were seeing bridging
fail on 82546 adapters. Secondly, I have limited TSO to PCI Express
adapters, I meant to do this and it got dropped in the earlier delta.
Next, I am dropping in the latest shared code from our development
team, consensus was that this should be done frequently, so I am :)

Approved by: pdeuskar
2007-05-16 00:14:23 +00:00
Marcel Moolenaar
ce3498bd83 Fix a dereference in KASSERT. 2007-05-15 23:29:57 +00:00
Marcel Moolenaar
35fe9df032 o Implement automatic commit. It's enabled when the flags parameter
exists and contains the 'C' flag.
o  The partition label can be the empty string. It's how labels are
   cleared.
o  When an action fails, lower permissions when they were raised
   in order to allow the action. A failed action will not result
   in any uncommitted changes.
o  Allow the flags paremeter to be present but empty. It's the
   equivalent of not being present.
2007-05-15 20:14:55 +00:00
Andrew Thompson
e2a77bb8b7 Fix unused variable error with !INET6
Reported by:	Artem Naluzhny, Frank Terhaar-Yonkers
2007-05-15 18:30:48 +00:00
Alexander Motin
7d3b4a0846 A node that implements various traffic shaping and rate limiting algorithms (ng_car).
Approved by:	glebius (mentor)
2007-05-15 16:43:01 +00:00
Alexander Motin
1adb54142d A node that implements various traffic shaping and rate limiting algorithms.
Approved by:	glebius (mentor)
2007-05-15 16:24:50 +00:00
Alexander Motin
c97bf8c3bd A node that implements various traffic shaping and rate limiting algorithms.
Approved by:	glebius (mentor)
2007-05-15 16:09:23 +00:00
Takanori Watanabe
fffe371da3 Add ACPI HPET table support.
Reviewed by:njl
2007-05-15 08:41:05 +00:00
Andrew Thompson
7a04b0f625 Feed ipv6 flowlabel to hash calculation.
Obtained from:	NetBSD
2007-05-15 07:59:49 +00:00
Andrew Thompson
3bf517e389 Change from a mutex to a read/write lock. This allows the tx port to be
selected simultaneously by multiple senders and transmit/receive is not
serialised between aggregated interfaces.
2007-05-15 07:41:46 +00:00
Warner Losh
0e1466ac89 First cut at making detach work. also add sdh as a possible mmc bridge.
Submitted by: Andrea Bittau
(Andrea may have updated patches, but I've tested these)
2007-05-15 05:49:14 +00:00
Warner Losh
78f8edfb44 Don't need mmc_mode ivar 2007-05-15 05:46:58 +00:00
John Baldwin
19059a13ed Rework the support for ABIs to override resource limits (used by 32-bit
processes under 64-bit kernels).  Previously, each 32-bit process overwrote
its resource limits at exec() time.  The problem with this approach is that
the new limits affect all child processes of the 32-bit process, including
if the child process forks and execs a 64-bit process.  To fix this, don't
ovewrite the resource limits during exec().  Instead, sv_fixlimits() is
now replaced with a different function sv_fixlimit() which asks the ABI to
sanitize a single resource limit.  We then use this when querying and
setting resource limits.  Thus, if a 32-bit process sets a limit, then
that new limit will be inherited by future children.  However, if the
32-bit process doesn't change a limit, then a future 64-bit child will
see the "full" 64-bit limit rather than the 32-bit limit.

MFC is tentative since it will break the ABI of old linux.ko modules (no
other modules are affected).

MFC after:	1 week
2007-05-14 22:40:04 +00:00
John Baldwin
1bba2a940b Move cpu_exit() earlier in exit1() to close a race between
SIGCHLD/kevent(2) notification of process termination and wait().  Now
we no longer drop locks between sending the notification and marking
the process as a zombie.  Previously, if another process attempted to do
a wait() with W_NOHANG after receiving a SIGCHLD or kevent and locked
the process while the exiting thread was in cpu_exit(), then wait() would
fail to find the process, which is quite astonishing to the process
calling wait().

MFC after:	3 days
2007-05-14 22:21:58 +00:00
Scott Long
e62c19b256 Eliminate M_TEMP. 2007-05-14 22:01:03 +00:00
Scott Long
0dd50e9b5e Eliminate the use of M_TEMP. 2007-05-14 21:48:53 +00:00
JINMEI Tatuya
7eefde2c0c handle IPv6 router alert option contained in an incoming packet per
option value so that unrecognized options are ignored as specified in RFC2711.
(packets containing an MLD router alert option are passed to the upper layer
as before).

Approved by: gnn (mentor), ume (mentor)
2007-05-14 17:56:13 +00:00
Andre Oppermann
ec9c755352 Complete the (mechanical) move of the TCP reassembly and timewait
functions from their origininal place to their own files.

TCP Reassembly from tcp_input.c -> tcp_reass.c
TCP Timewait   from tcp_subr.c  -> tcp_timewait.c
2007-05-13 22:16:13 +00:00
Kirk McKusick
2f79c90982 Update entries for building tags. 2007-05-13 18:21:54 +00:00
Matt Jacob
abeda21e8d Temp workaround for config_intrhook_establish running the hook
right away.
2007-05-13 17:45:00 +00:00
Robert Watson
78cfb6a09c Add prototypes for ether_aton_r() and ether_ntoa_r() missed in previous
commit.
2007-05-13 15:52:46 +00:00
Daniel Eischen
38d1ff0586 Bump FreeBSD version for enabling of symbol versioning and changing
default threading library to libthr.
2007-05-13 14:28:16 +00:00
Yoshihiro Takahashi
a6661bed8b Disable PREEMPTION option. It causes some problem on pc98. 2007-05-13 07:19:10 +00:00
Wojciech A. Koszek
9e2f7513e1 Bump config(8) version and build requirement for config(8) to 600006. This
is caused by my latest changes to config(8). You're supposed to install new
config(8) in order to prevent yourself from seeing a warning about old
version of that tool.

You should configure the kernel with a new config(8) then.

Oked by:	rwatson, cognet (mentor)
2007-05-13 02:36:41 +00:00
Wojciech A. Koszek
744b947ef8 Improve INCLUDE_CONFIG_FILE support.
This change will let us to have full configuration of a running kernel
available in sysctl:

	sysctl -b kern.conftxt

The same configuration is also contained within the kernel image. It can be
obtained with:

	config -x <kernelfile>

Current functionality lets you to quickly recover kernel configuration, by
simply redirecting output from commands presented above and starting kernel
build procedure. "include" statements are also honored, which means options
and devices from included files are also included.

Please note that comments from configuration files are not preserved by
default. In order to preserve them, you can use -C flag for config(8). This
will bring configuration file and included files literally; however,
redirection to a file no longer works directly.

This commit was followed by discussion, that took place on freebsd-current@.
For more details, look here:

	http://lists.freebsd.org/pipermail/freebsd-current/2007-March/069994.html
	http://lists.freebsd.org/pipermail/freebsd-current/2007-May/071844.html

Development of this patch took place in Perforce, hierarchy:

	//depot/user/wkoszek/wkoszek_kconftxt/

Support from:	freebsd-current@ (links above)
Reviewed by:	imp@
Approved by:	imp@
2007-05-12 19:38:18 +00:00
Christian Brueffer
3f054080e6 Add missing curly braces.
Approved by:	rwatson (mentor)
2007-05-12 05:56:58 +00:00
Christian Brueffer
c9960ef732 ALTQify.
Submitted by:	J.R. Oldroyd
Reviewed by:	mlaier
Approved by:	rwatson (mentor)
MFC after:	1 week
2007-05-12 05:56:10 +00:00
Christian Brueffer
224aecbcdf Remove compat ifdefs for FreeBSD versions < 500014, makes the code
quite a bit easier to read.

Approved by:	rwatson (mentor)
MFC after:	1 weeks
2007-05-12 05:53:53 +00:00
Marius Strobl
ac474f9545 - Add bits for userland profiling. For sun4u this is compile-tested only.
- Replace magic 14 with PIL_TICK.
2007-05-11 23:43:55 +00:00
Jack F Vogel
4e341d7ed1 Mistake in the logic deciding what adapters need
to map the IO BAR. Causing the driver to fail on
th 82542.

Reviewed by:pdeuskar
Approved by:pdeuskar
2007-05-11 21:36:08 +00:00
Andre Oppermann
57615c7e86 Drop everything that doesn't belong into this new file.
It's neither functional not connected to the build yet.
2007-05-11 21:17:53 +00:00
Andre Oppermann
1433541aa4 Drop everything that doesn't belong into this new file.
It's neither functional nor connected to the build yet.
2007-05-11 21:04:57 +00:00
Andre Oppermann
0489b64c5e Make the TCP timer callout obtain Giant if the network stack is marked
as non-mpsafe.

This change is to be removed when all protocols are mp-safe.
2007-05-11 20:52:47 +00:00
Andre Oppermann
504abdc6e6 Add the timestamp offset to struct tcptw so we can generate proper
ACKs in TIME_WAIT state that don't get dropped by the PAWS check
on the receiver.
2007-05-11 18:29:39 +00:00
Hidetoshi Shimokawa
c6cf3e202a - Initialize login->id and fix problem for non-zero login id.
- Increase maxopenings for multiple lun/initiators.

MFC after: 3 days
2007-05-11 14:51:13 +00:00
Alexander Motin
ce52e8f411 Performance optimization of the "encryption without compression" case by
avoiding memory allocation and data copying.
Encrypting directly at the original mbuf chain.

Approved by:	glebius (mentor)
2007-05-11 14:36:02 +00:00
Matt Jacob
f58a08937b Bad merge. 2007-05-11 13:47:28 +00:00
Robert Watson
08d73f1370 Remove more one more stale comment regarding unpcb type-safety. 2007-05-11 12:28:45 +00:00
Robert Watson
d7924b7086 Clarify and update quite a few comments to reflect locking optimizations,
the addition of unpcb refcounts, and bug fixes.  Some of these fixes are
appropriate for MFC.

MFC after:	3 days
2007-05-11 12:10:45 +00:00
Robert Watson
632bbf0f5b Coalesce two identical UCB licenses into a single license instance with
one set of copyright years.

White space and comment cleanup.

Export $FreeBSD$ via __FBSDID.
2007-05-11 11:21:43 +00:00
Robert Watson
b34aab2337 Minor white space and style cleanups. 2007-05-11 11:05:30 +00:00
Robert Watson
c59b9aa51b White space and style cleanup. 2007-05-11 11:00:48 +00:00
Robert Watson
d22e451d5b Minor white space/style normalization. 2007-05-11 10:50:31 +00:00
Robert Watson
4d41cc2fe6 Normalize style a bit: reduce pseudo-randomness of comment layout and
white space.  Remove 'register'.
2007-05-11 10:48:30 +00:00
Robert Watson
94ad7d68c7 Use ANSI C function declarations throughout netipx.
Remove 'register' use.
2007-05-11 10:38:34 +00:00
Robert Watson
54d642bbe5 Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddr
protocol entry points using functions named proto_getsockaddr and
proto_getpeeraddr rather than proto_setsockaddr and proto_setpeeraddr.
While it's true that sockaddrs are allocated and set, the net effect is
to retrieve (get) the socket address or peer address from a socket, not
set it, so align names to that intent.
2007-05-11 10:20:51 +00:00
Robert Watson
169db7b25d Remove unneeded wrappers for in_setsockaddr() and in_setpeeraddr(), which
used to exist so pcbinfo locks could be acquired, but are no longer
required as a result of socket/pcb reference model refinements.
2007-05-11 09:54:53 +00:00
Matt Jacob
0230a28bf4 Fix pointy-hat problem with BUS_DMA_ROOTARG macro that caused problems for sparc64.
Candidate for immediate MFC.

Noticed by: Everyone-maxim contacted.
2007-05-11 06:28:26 +00:00
Alexander Kabaev
ec69a8a6d2 Do not dereference linux_to_bsd_signal[-1] if userland has
passed zero as exit signal.

GCC 4.2 changes the kernel data segment layout not to have 0
in that memory location. This code ran by luck before and now
the luck has run out.
2007-05-11 01:25:51 +00:00
Andre Oppermann
4b8e42baab Fix an incorrect replace of a timer reference made during the TCP timer
rewrite in rev. 1.132.  This unmasked yet another bug that causes certain
connections to get indefinately stuck in LAST_ACK state.
2007-05-10 23:11:29 +00:00
Robert Watson
f2565d68a4 Move universally to ANSI C function declarations, with relatively
consistent style(9)-ish layout.
2007-05-10 15:58:48 +00:00
Dag-Erling Smørgrav
c2b49d4f49 Bump __FreeBSD_version for the addition of flopen(3) to libutil.
Requested by:	delphij
2007-05-10 15:37:27 +00:00
Scott Long
4d190d01ab The version string scheme embeds the freebsd major release version,
something that I wasn't aware of with the last import.  Adjust the
string accordingly for 7-CURRENT.
2007-05-10 15:36:58 +00:00
Scott Long
ddfae47b9d Collapse the mfi_ld object. Add an ioctl to help management apps map
array Id's to FreeBSD device names.
2007-05-10 15:33:41 +00:00
Stephen McKay
5bdc94fa35 Make a missing or empty VPD non-fatal, as it was prior to rev 1.131.
With this change, my D-Link DGE-530T rev A1 is operational again.
2007-05-10 13:10:34 +00:00
Kevin Lo
6ac646b3b7 Hook wlan_amrr up to the build. 2007-05-10 08:53:57 +00:00
Ariff Abdullah
a6f9c6fb5f Don't hold mutex while releasing bus resources. 2007-05-10 01:46:51 +00:00
Kevin Lo
00465d5ab3 Add wlan_amrr. ural(4) uses amrr as transmit rate control. 2007-05-10 01:39:50 +00:00
Kevin Lo
02dff35642 Add wlan_amrr. ural(4) uses amrr as transmit rate control. 2007-05-10 01:32:17 +00:00
Matt Jacob
b065259568 Need sys/cdevs.h for the macro FBSDID to work. 2007-05-09 23:19:55 +00:00
Robert Watson
6ab3b958fc Update stale comment on protecting UMA per-CPU caches: we now use
critical sections rather than mutexes.
2007-05-09 22:53:34 +00:00
Pawel Jakub Dawidek
68e752c31c Increase debug level - this message is not that important. 2007-05-09 22:32:49 +00:00
George V. Neville-Neil
559d3390d0 Integrate the Camellia Block Cipher. For more information see RFC 4132
and its bibliography.

Submitted by:   Tomoyuki Okazaki <okazaki at kick dot gr dot jp>
MFC after:      1 month
2007-05-09 19:37:02 +00:00
Scott Long
f73e86c383 It turns out that the hptiop driver isn't portable after all. Confine it to
amd64 and i386 for now.
2007-05-09 15:55:45 +00:00
Randall Stewart
ad81507eed Two major items here:
- All printf that was surrounded by #ifdef SCTP_DEBUG moves to
  a macro that does all of this. This removes all printfs from
  the code and makes the code more portable and easier to
  read.
- Static Analysis (cisco) - found a few bugs, but mostly we
  add checks for NULL pointers and such to make the tool
  happy. We now pass the Cisco SA tools checks except for
  where it does not understand tailq/lists. We still need
  to look at the coverity tools output too (this is like
  the cisco SA tool) and see if it wants us to fix any other
  items. Hopefully this will be the last major churn in the
  code other than bug fixes.
2007-05-09 13:30:06 +00:00
Maxim Konovalov
856d5abeed o Fix typo: comments start by "#" not "*". 2007-05-09 11:43:04 +00:00
Maxim Konovalov
d30d90dc80 o Fix style(9) bugs introduced in the last commit.
Pointed out by:	bde
2007-05-09 11:39:46 +00:00
Kevin Lo
eb6e110a7a - Remove dependency on deprecated if_watchdog ABI.
- Move amrr code into net80211 itself.
- Handle ->INIT state transition in ural_newstate() to eliminate the race.

Tested with a ASUS WL-167g.
2007-05-09 09:32:41 +00:00
Yaroslav Tykhiy
ac95c07889 tl(4) appears to support long frames.
Tested by:	Peter Jeremy <peterjeremy at optushome dot com dot au>
2007-05-09 09:02:11 +00:00
Scott Long
4439f8b4b6 Introduce a driver for the Highpoint RocketRAID 3xxx series of controllers.
The driver relies on CAM.

Many thanks to Highpoint for providing this driver.
2007-05-09 07:07:26 +00:00
Maxim Konovalov
10fe523e99 o Unbreak "options TCPDEBUG" && "nooptions INET6" kernel build.
PR:		kern/112517
Submitted by:	vd
2007-05-09 06:09:40 +00:00
Marcel Moolenaar
5100f9e95b Write the output parameter (if present) for the add, create, delete
destroy and modify verbs.
2007-05-09 05:37:53 +00:00
Scott Long
4511a5c893 Import version 3.60.03.006 of the TWA driver:
This patch does the following:

- Remove un-necessary code that is not even compiling into the driver
 under TW_OSL_NON_DMA_MEM_ALLOC_PER_REQUEST defines.
- Remove bundled firmware image and associated "files" entry for tw_cl_fwimg.c
- Remove bundled firmware flashing routines. We now have tw_update userspace
 FreeBSD controller flash utility.
- Fix driver crash on load due to shared interrupt.
- Fix 2 lock leaks for Giant lock.
- Fix CCB leak.
- Add support for 9650SE controllers.

Many thanks to 3Ware/AMCC for continuing to support FreeBSD.
2007-05-09 04:16:32 +00:00
Stephane E. Potvin
c085f6bbf6 Add documentation for the vm.kmem_size_min and vm.kmem_size_max tunables.
Approved by: njl (mentor, blanket)
2007-05-09 02:37:58 +00:00