Commit Graph

151380 Commits

Author SHA1 Message Date
Joseph Koshy
68c3e04122 Recognize Intel CPUs with Family 0x6, Models 0x1E and 0x1F.
Submitted by:	Marc Unangst <mju at panasas dot com>
2009-12-18 15:01:46 +00:00
Alexander Motin
7485a8eb62 Remove duplicate devstat_start_transaction_bio() call. It is already called
from geom_disk. Dulicate call causes wrong queue depth and busy accounting.
2009-12-18 14:41:30 +00:00
Konstantin Belousov
9ae781dfcf Signal 0 is used to check the permission for current process to signal
target one. Since r184058, linux_do_tkill() calls tdsignal() instead of
kill(), without checking for validity of supplied signal number. Prevent
panic when supplied signal is 0 by finishing work after checks.

Found and tested by:	scf
MFC after:	3 days
2009-12-18 14:27:18 +00:00
Ruslan Ermilov
a46a1e767d - Fixed incorrect watchdog timeout setting: MSB of a 2-byte
value is obtained by dividing it by 256, not by 2550; also,
  one second is 10^9 nanoseconds, not 1800000000 nanoseconds.

- Due to rounding error, setting watchdog to a really small
  timeout (<1 sec) was turning the watchdog off.  It should
  set the watchdog to a small timeout instead.

- Implemented error checking in ipmi_wd_event(), as required
  by watchdog(9).

PR:		kern/130512
Submitted by:	Dmitrij Tejblum

- Additionally, check that the timeout value is within the
  supported range, and if it's too large, act as required by
  watchdog(9).

MFC after:	3 days
2009-12-18 12:10:42 +00:00
Andrew Thompson
b340b7be10 Keep list sorted. 2009-12-18 00:36:30 +00:00
Andrew Thompson
c0e2c17865 Add a bunch of new 3G ids obtained from from various operating systems and
Internet sources.

Obtained from:	Linux, NetBSD, OpenBSD, etc
2009-12-18 00:34:58 +00:00
Alexander Motin
6988053e0e Serverworks OSB4 has no 0x4a (piomode) register, do not touch it.
Also OSB4 has some problems with UDMA transfers, limit it to WDMA2.
2009-12-17 23:42:09 +00:00
Luigi Rizzo
1328a38b96 Add some experimental code to log traffic with tcpdump,
similar to pflog(4).
To use the feature, just put the 'log' options on rules
you are interested in, e.g.

	ipfw add 5000 count log ....

and run
	tcpdump -ni ipfw0 ...

net.inet.ip.fw.verbose=0 enables logging to ipfw0,
net.inet.ip.fw.verbose=1 sends logging to syslog as before.

More features can be added, similar to pflog(), to store in
the MAC header metadata such as rule numbers and actions.
Manpage to come once features are settled.
2009-12-17 23:11:16 +00:00
Andrew Thompson
2a4c6157ca Use the EVENTHANDLER system to hook into the usb device configuration and
perform a function such as ejecting a 3G autoinstaller disk. The eventhandler
system properly tracks threads and is safe to unload, remove the
setting/clearing of a function pointer in the kernel by u3g(4) which included a
tsleep for safety.
2009-12-17 21:42:10 +00:00
Andrew Thompson
2b54315009 If the runcount is non-zero in eventhandler_deregister() then one or more
threads are executing the eventhandler, sleep in this case to make it safe for
module unload. If the runcount was up then an entry would have been marked
EHE_DEAD_PRIORITY so use this as a trigger to do the wakeup in
eventhandler_prune_list().

Reviewed by:	jhb
2009-12-17 21:17:13 +00:00
Edwin Groothuis
d14ec16633 Nationalise Easter -> Pasen
MFC after:	1 week
2009-12-17 20:41:59 +00:00
Pyun YongHyeon
dd77a0532b Remove unused member variable of softc. 2009-12-17 19:48:54 +00:00
Pyun YongHyeon
5f8249ee7e Document newly added loader tunable and sysctl variables.
o hw.vge.msi_disable
 o dev.vge.%d.int_holdoff
 o dev.vge.%d.rx_coal_pkt
 o dev.vge.%d.tx_coal_pkt
2009-12-17 18:37:11 +00:00
Pyun YongHyeon
610dfa9399 Actually clear interrupts. Writing 0 has no effect. 2009-12-17 18:03:05 +00:00
Pyun YongHyeon
3b2b8afb3c Implement interrupt moderation scheme supported by VT61xx
controllers. TX/RX interrupt mitigation is controlled by
VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppress
generation of interrupts until the programmed frames counter equals
to the registers. VT61xx also supports interrupt hold off timer
register. If this interrupt hold off timer is active all interrupts
would be disabled until the timer reaches to 0. The timer value is
reloaded whenever VGE_ISR register written. The timer resolution is
about 20us.

Previously vge(4) used single shot timer to reduce Tx completion
interrupts. This required VGE_CRS1 register access in Tx
start/completion handler to rearm new timeout value and it did not
show satisfactory result(more than 50k interrupts under load). Rx
interrupts was not moderated at all such that vge(4) used to
generate too many interrupts which in turn made polling(4) better
approach under high network load.

This change activates all interrupt moderation mechanism and
initial values were tuned to generate interrupt less than 8k per
second. That number of interrupts wouldn't add additional packet
latencies compared to polling(4). These interrupt parameters could
be changed with sysctl.
dev.vge.%d.int_holdoff
dev.vge.%d.rx_coal_pkt
dev.vge.%d.tx_coal_pkt
Interface has be brought down and up again before change take
effect.

With interrupt moderation there is no more need to loop in
interrupt handler. This loop always added one more register access.
While I'm here remove dead code which tried to implement subset of
interrupt moderation.
2009-12-17 18:00:25 +00:00
Gavin Atkinson
64a026bdcc Don't panic due to unlocking an unowned mutex if we fail during attach.
PR:		kern/139053
Reviewed by:	scottl
Approved by:	ed (mentor)
MFC after:	2 weeks
2009-12-17 17:46:08 +00:00
Luigi Rizzo
8c5d93d4d4 Now that ipfw is split into multiple files, we need
to list them all in the Makefile for the module,
otherwise it won't load due to missing symbols.

The problem only affected head with ipfw built as a module.

Reported by David Horn
2009-12-17 17:44:34 +00:00
Pyun YongHyeon
ed03d795ff Remove unused VGE_ETHER_ALIGN definition. 2009-12-17 17:38:06 +00:00
Luigi Rizzo
60ab046a41 simplify and document lookup_next_rule() 2009-12-17 17:27:12 +00:00
Jaakko Heinonen
a8092021a0 Sync getline() with comm(1):
- Prevent overflowing of the buffer length variable in getline() by
   limiting its maximum value.
 - Exit if reallocf(3) fails in getline(). Failure was silently
   considered as end-of-file.

Reviewed by:	ghelmer
Approved by:	trasz (mentor)
2009-12-17 17:03:47 +00:00
Jaakko Heinonen
698f926389 The input line length limit mentioned on the manual page was removed by
r176119.

Approved by:	trasz (mentor)
2009-12-17 16:59:19 +00:00
Yoshihiro Takahashi
ef7b7ac106 Fix debug messages of bd_io().
MFC after:	1 week
2009-12-17 13:14:11 +00:00
Stanislav Sedov
4ee23f5ee8 - Partially revert r200417. config.h brings several definitions,
that appears to be actually used.  Without config.h included
  cross-build of world failed (at least for ARM).
2009-12-17 12:42:45 +00:00
Luigi Rizzo
59cd9f65f9 simplify the code that finds the next rule after reinjections
MFC after:	1 week
2009-12-17 12:27:54 +00:00
Ralf S. Engelschall
a752c19301 rewind(3) is already declared to return 'void', so no need for an explicit cast 2009-12-17 08:42:44 +00:00
Ralf S. Engelschall
1e3249cb9b DEBUG is either defined or not defined for the 'calender' sources, so use #ifdef and not just #if -- both to be semantically correct and also to be aligned with the rest of the 'calendar' sources 2009-12-17 08:41:06 +00:00
Ralf S. Engelschall
9ed01df370 remove external reference to not (or at least no longer) existing variable 'myname' 2009-12-17 08:37:02 +00:00
Edwin Groothuis
58fe9c40b1 Add Australian, New Zealand and Ukraian calendars to the "all" target".
MFC after:	1 week
2009-12-17 07:18:06 +00:00
Jamie Gritton
1574e5ddd9 Add a null pointer check so "name" can be used as a key parameter in
jailparam_get.

PR:		bin/141692
Submitted by:	delphij
MFC after:	3 days
2009-12-17 05:06:56 +00:00
Matt Jacob
e7d829a46c Fix argument order in a call to mtx_init.
MFC after:	1 week
2009-12-17 00:22:56 +00:00
Matt Jacob
ab429a9218 Fix argument order in a call to mtx_init.
MFC after:	1 week
2009-12-17 00:21:12 +00:00
Warner Losh
8ffab8645b Revert 200606. 2009-12-16 21:53:56 +00:00
Pyun YongHyeon
83accfdbd5 Add "Velocity" to probe message which will make it clearer which
ethernet controller was recognized. VIA consistently calls
"Velocity" family for gigabit ethernet controllers. For fast
ethernet controllers they uses "Rhine" family(vr(4) controllers))
and vr(4) already shows "Rhine" in probe message.
2009-12-16 20:03:43 +00:00
Pyun YongHyeon
a931e5497b Add new flag VGE_FLAG_SUSPENDED to mark suspended state and
remove suspended member in softc.
2009-12-16 19:49:23 +00:00
Pyun YongHyeon
7129fb20d6 Add hardware MAC statistics support. This statistics could be
extracted from dev.vge.%d.stats sysctl node.
2009-12-16 19:41:40 +00:00
Julian Elischer
84bc0aa3b0 Make man page reflect the output columns
MFC after:	1 week
2009-12-16 19:37:38 +00:00
Pyun YongHyeon
5f07fd19e2 Rewrite RX filter setup and simplify code.
Now promiscuous mode and multicast handling is performed in single
function, vge_rxfilter().
2009-12-16 19:32:44 +00:00
Luigi Rizzo
53638988bc remove a duplicate sysctl entry 2009-12-16 18:03:35 +00:00
Pyun YongHyeon
38aa43c511 All vge(4) controllers support RX/TX checksum offloading for VLAN
tagged frames so add checksum offloading capabilities. Also add
missing VLAN hardware tagging control in ioctl handler and let
upper stack know current VLAN capabilities.
2009-12-16 18:03:25 +00:00
Alexander Motin
8bff82df5a Large I/Os on Promise controllers reported to cause UDMA ICRC errors and
subsequent timeouts. Restore previous limit for now, at least until
I will have hardware to experiment.

PR:             kern/141438
2009-12-16 17:42:02 +00:00
Warner Losh
42b3331b8a Fix compiling FREEBSD_COMPAT[4,5,6] without FREEBSD_COMPAT7.
Note: Not sure this is the right way to do compat, but it makes the
headers consistent with the implementations.
2009-12-16 17:17:40 +00:00
John Baldwin
dfd775727f Add entries to NOTES for the modular phy support so that these options are
documented.

PR:		docs/141358
Submitted by:	Bruce Cran
2009-12-16 16:24:32 +00:00
Jaakko Heinonen
e8861840c8 - Prevent overflowing of the buffer length variable in getline() by
limiting its maximum value.
- Exit if reallocf(3) fails in getline(). Failure was silently
  considered as end-of-file.

Reviewed by:	ghelmer
Approved by:	trasz (mentor)
2009-12-16 14:34:48 +00:00
Luigi Rizzo
1b5691c61e bring back a couple of #include that are supplied by nesting,
and explain why they are used.
2009-12-16 13:00:37 +00:00
Andriy Gapon
ac2703ea39 ichsmb: add another pci id
This is SMBus controller found in Intel Platform Controller Hub (PCH),
which is a general name that refers to Intel 5 Series chipsets and
3400 Series chipsets.

Submitted by:	Dmitry S. Luhtionov <mitya@cabletv.dp.ua>
MFC after:	3 days
2009-12-16 12:25:27 +00:00
Luigi Rizzo
97219abf05 Various cosmetic cleanup of the files:
- move global variables around to reduce the scope and make them
  static if possible;
- add an ipfw_ prefix to all public functions to prevent conflicts
  (the same should be done for variables);
- try to pack variable declaration in an uniform way across files;
- clarify some comments;
- remove some misspelling of names (#define V_foo VNET(bar)) that
  slipped in due to cut&paste
- remove duplicate static variables in different files;

MFC after:	1 month
2009-12-16 10:48:40 +00:00
Matteo Riondato
5d26f10fbb 2009-12-16 04:19:23 +00:00
Warner Losh
e999537881 Forgot to bump .Dd, so do it with this commit. Chose local time over
UTC time for the date...
2009-12-16 03:29:00 +00:00
Warner Losh
26bbc1fc5a Quick fix to make this compile:
Remove redundant extern declearations.
If the maintainer has a better fix, then feel free to back this out.
2009-12-16 03:26:37 +00:00
Warner Losh
6d50d5e4d5 Docmuent NO_KERNEL{CLEAN,CONFIG,DEPEND,OBJ} as necessary. Update
documentation on KERNFAST meaning.
2009-12-16 03:25:43 +00:00