Commit Graph

63658 Commits

Author SHA1 Message Date
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