]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoNow that ipfw is split into multiple files, we need
luigi [Thu, 17 Dec 2009 17:44:34 +0000 (17:44 +0000)]
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

14 years agoRemove unused VGE_ETHER_ALIGN definition.
yongari [Thu, 17 Dec 2009 17:38:06 +0000 (17:38 +0000)]
Remove unused VGE_ETHER_ALIGN definition.

14 years agosimplify and document lookup_next_rule()
luigi [Thu, 17 Dec 2009 17:27:12 +0000 (17:27 +0000)]
simplify and document lookup_next_rule()

14 years agoSync getline() with comm(1):
jh [Thu, 17 Dec 2009 17:03:47 +0000 (17:03 +0000)]
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)

14 years agoThe input line length limit mentioned on the manual page was removed by
jh [Thu, 17 Dec 2009 16:59:19 +0000 (16:59 +0000)]
The input line length limit mentioned on the manual page was removed by
r176119.

Approved by: trasz (mentor)

14 years agoFix debug messages of bd_io().
nyan [Thu, 17 Dec 2009 13:14:11 +0000 (13:14 +0000)]
Fix debug messages of bd_io().

MFC after: 1 week

14 years ago- Partially revert r200417. config.h brings several definitions,
stas [Thu, 17 Dec 2009 12:42:45 +0000 (12:42 +0000)]
- 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).

14 years agosimplify the code that finds the next rule after reinjections
luigi [Thu, 17 Dec 2009 12:27:54 +0000 (12:27 +0000)]
simplify the code that finds the next rule after reinjections

MFC after: 1 week

14 years agorewind(3) is already declared to return 'void', so no need for an explicit cast
rse [Thu, 17 Dec 2009 08:42:44 +0000 (08:42 +0000)]
rewind(3) is already declared to return 'void', so no need for an explicit cast

14 years agoDEBUG is either defined or not defined for the 'calender' sources, so use #ifdef...
rse [Thu, 17 Dec 2009 08:41:06 +0000 (08:41 +0000)]
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

14 years agoremove external reference to not (or at least no longer) existing variable 'myname'
rse [Thu, 17 Dec 2009 08:37:02 +0000 (08:37 +0000)]
remove external reference to not (or at least no longer) existing variable 'myname'

14 years agoAdd Australian, New Zealand and Ukraian calendars to the "all" target".
edwin [Thu, 17 Dec 2009 07:18:06 +0000 (07:18 +0000)]
Add Australian, New Zealand and Ukraian calendars to the "all" target".

MFC after: 1 week

14 years agoAdd a null pointer check so "name" can be used as a key parameter in
jamie [Thu, 17 Dec 2009 05:06:56 +0000 (05:06 +0000)]
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

14 years agoFix argument order in a call to mtx_init.
mjacob [Thu, 17 Dec 2009 00:22:56 +0000 (00:22 +0000)]
Fix argument order in a call to mtx_init.

MFC after: 1 week

14 years agoFix argument order in a call to mtx_init.
mjacob [Thu, 17 Dec 2009 00:21:12 +0000 (00:21 +0000)]
Fix argument order in a call to mtx_init.

MFC after: 1 week

14 years agoRevert 200606.
imp [Wed, 16 Dec 2009 21:53:56 +0000 (21:53 +0000)]
Revert 200606.

14 years agoAdd "Velocity" to probe message which will make it clearer which
yongari [Wed, 16 Dec 2009 20:03:43 +0000 (20:03 +0000)]
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.

14 years agoAdd new flag VGE_FLAG_SUSPENDED to mark suspended state and
yongari [Wed, 16 Dec 2009 19:49:23 +0000 (19:49 +0000)]
Add new flag VGE_FLAG_SUSPENDED to mark suspended state and
remove suspended member in softc.

14 years agoAdd hardware MAC statistics support. This statistics could be
yongari [Wed, 16 Dec 2009 19:41:40 +0000 (19:41 +0000)]
Add hardware MAC statistics support. This statistics could be
extracted from dev.vge.%d.stats sysctl node.

14 years agoMake man page reflect the output columns
julian [Wed, 16 Dec 2009 19:37:38 +0000 (19:37 +0000)]
Make man page reflect the output columns

MFC after: 1 week

14 years agoRewrite RX filter setup and simplify code.
yongari [Wed, 16 Dec 2009 19:32:44 +0000 (19:32 +0000)]
Rewrite RX filter setup and simplify code.
Now promiscuous mode and multicast handling is performed in single
function, vge_rxfilter().

14 years agoremove a duplicate sysctl entry
luigi [Wed, 16 Dec 2009 18:03:35 +0000 (18:03 +0000)]
remove a duplicate sysctl entry

14 years agoAll vge(4) controllers support RX/TX checksum offloading for VLAN
yongari [Wed, 16 Dec 2009 18:03:25 +0000 (18:03 +0000)]
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.

14 years agoLarge I/Os on Promise controllers reported to cause UDMA ICRC errors and
mav [Wed, 16 Dec 2009 17:42:02 +0000 (17:42 +0000)]
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

14 years agoFix compiling FREEBSD_COMPAT[4,5,6] without FREEBSD_COMPAT7.
imp [Wed, 16 Dec 2009 17:17:40 +0000 (17:17 +0000)]
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.

14 years agoAdd entries to NOTES for the modular phy support so that these options are
jhb [Wed, 16 Dec 2009 16:24:32 +0000 (16:24 +0000)]
Add entries to NOTES for the modular phy support so that these options are
documented.

PR: docs/141358
Submitted by: Bruce Cran

14 years ago- Prevent overflowing of the buffer length variable in getline() by
jh [Wed, 16 Dec 2009 14:34:48 +0000 (14:34 +0000)]
- 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)

14 years agobring back a couple of #include that are supplied by nesting,
luigi [Wed, 16 Dec 2009 13:00:37 +0000 (13:00 +0000)]
bring back a couple of #include that are supplied by nesting,
and explain why they are used.

14 years agoichsmb: add another pci id
avg [Wed, 16 Dec 2009 12:25:27 +0000 (12:25 +0000)]
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

14 years agoVarious cosmetic cleanup of the files:
luigi [Wed, 16 Dec 2009 10:48:40 +0000 (10:48 +0000)]
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

14 years ago(no commit message)
matteo [Wed, 16 Dec 2009 04:19:23 +0000 (04:19 +0000)]

14 years agoForgot to bump .Dd, so do it with this commit. Chose local time over
imp [Wed, 16 Dec 2009 03:29:00 +0000 (03:29 +0000)]
Forgot to bump .Dd, so do it with this commit.  Chose local time over
UTC time for the date...

14 years agoQuick fix to make this compile:
imp [Wed, 16 Dec 2009 03:26:37 +0000 (03:26 +0000)]
Quick fix to make this compile:
Remove redundant extern declearations.
If the maintainer has a better fix, then feel free to back this out.

14 years agoDocmuent NO_KERNEL{CLEAN,CONFIG,DEPEND,OBJ} as necessary. Update
imp [Wed, 16 Dec 2009 03:25:43 +0000 (03:25 +0000)]
Docmuent NO_KERNEL{CLEAN,CONFIG,DEPEND,OBJ} as necessary.  Update
documentation on KERNFAST meaning.

14 years agoAdd NO_KERNELOBJ flag, similar to NO_KERNEL{CONFIG,DEPEND,CLEAN},
imp [Wed, 16 Dec 2009 02:54:34 +0000 (02:54 +0000)]
Add NO_KERNELOBJ flag, similar to NO_KERNEL{CONFIG,DEPEND,CLEAN},
which disables doing a make obj.  Use it when you know it will work
only.  KERNFAST now implies NO_KERNELOBJ, since you don't need to keep
doing obj when doing incremental kernel builds.

14 years agoAdd INCLUDE_CONFIG_FILE, and a note in comments about how to also
dougb [Wed, 16 Dec 2009 02:17:43 +0000 (02:17 +0000)]
Add INCLUDE_CONFIG_FILE, and a note in comments about how to also
include the comments with CONFIGARGS

14 years agoAdd two new debugging tunables for x86bios instead of abusing bootverbose,
jkim [Tue, 15 Dec 2009 22:44:28 +0000 (22:44 +0000)]
Add two new debugging tunables for x86bios instead of abusing bootverbose,
i.e., debug.x86bios.call and debug.x86bios.int.

14 years agomore splitting of ip_fw2.c, now extract the 'table' routines
luigi [Tue, 15 Dec 2009 21:24:12 +0000 (21:24 +0000)]
more splitting of ip_fw2.c, now extract the 'table' routines
and the sockopt routines (the upper half of the kernel).

Whoever is the author of the 'table' code (Ruslan/glebius/oleg ?)
please change the attribution in ip_fw_table.c. I have copied
the copyright line from ip_fw2.c but it carries my name and I have
neither written nor designed the feature so I don't deserve
the credit.

MFC after: 1 month

14 years agocpuset(2): fix a typo and a markup error in the man page
jilles [Tue, 15 Dec 2009 21:02:29 +0000 (21:02 +0000)]
cpuset(2): fix a typo and a markup error in the man page

MFC after: 1 week

14 years agoifconfig(8) is documented to take a ISO 3166-1 country code to set the
gavin [Tue, 15 Dec 2009 20:44:12 +0000 (20:44 +0000)]
ifconfig(8) is documented to take a ISO 3166-1 country code to set the
regulatory domain with the "country" parameter, but will also take a full
country name.  The man page warns that only the ISO code is unambiguous.
In reality, however, the first match on either would be accepted, leading
to "DE" being interpreted as the "DEBUG" country rather than Germany, and
"MO" selecting Morocco rather than the correct country, Macau.

Fix this by always checking for an ISO CC match first, and only search on
the full country name if that fails.

PR: bin/140571
Tested by: Dirk Meyer dirk.meyer dinoex.sub.org
Reviewed by: sam
Approved by: ed (mentor)
MFC after: 1 month

14 years agoAttach dpms(4) to vgapm and make sure to restore DPMS state after
jkim [Tue, 15 Dec 2009 19:58:23 +0000 (19:58 +0000)]
Attach dpms(4) to vgapm and make sure to restore DPMS state after
VGA is resumed properly.

Reviewed by: jhb

14 years agoadd ip_fw_private.h to ng_ipfw.c, forgotten in previous commit;
luigi [Tue, 15 Dec 2009 18:33:12 +0000 (18:33 +0000)]
add ip_fw_private.h to ng_ipfw.c, forgotten in previous commit;
comment out remove ip_fw.h from ng_bridge.c, as it seems unused.

MFC after: 1 month

14 years agoStart splitting ip_fw2.c and ip_fw.h into smaller components.
luigi [Tue, 15 Dec 2009 16:15:14 +0000 (16:15 +0000)]
Start splitting ip_fw2.c and ip_fw.h into smaller components.
At this time we pull out from ip_fw2.c the logging functions, and
support for dynamic rules, and move kernel-only stuff into
netinet/ipfw/ip_fw_private.h

No ABI change involved in this commit, unless I made some mistake.
ip_fw.h has changed, though not in the userland-visible part.

Files touched by this commit:

conf/files
now references the two new source files

netinet/ip_fw.h
remove kernel-only definitions gone into netinet/ipfw/ip_fw_private.h.

netinet/ipfw/ip_fw_private.h
new file with kernel-specific ipfw definitions

netinet/ipfw/ip_fw_log.c
ipfw_log and related functions

netinet/ipfw/ip_fw_dynamic.c
code related to dynamic rules

netinet/ipfw/ip_fw2.c
removed the pieces that goes in the new files

netinet/ipfw/ip_fw_nat.c
minor rearrangement to remove LOOKUP_NAT from the
main headers. This require a new function pointer.

A bunch of other kernel files that included netinet/ip_fw.h now
require netinet/ipfw/ip_fw_private.h as well.
Not 100% sure i caught all of them.

MFC after: 1 month

14 years agontpd 4.2.4p8 is now in the tree, ntptrace is dead RIP.
roberto [Tue, 15 Dec 2009 14:59:58 +0000 (14:59 +0000)]
ntpd 4.2.4p8 is now in the tree, ntptrace is dead RIP.

Security: CVE-2009-3563

14 years agoMerge 4.2.4p8 into contrib (r200452 & r200454).
roberto [Tue, 15 Dec 2009 14:58:10 +0000 (14:58 +0000)]
Merge 4.2.4p8 into contrib (r200452 & r200454).

Subversion is being difficult here so take a hammer and get it in.

MFC after: 2 weeks
Security: CVE-2009-3563

14 years agoMerge libkqueue test suite through r119
rwatson [Tue, 15 Dec 2009 10:43:20 +0000 (10:43 +0000)]
Merge libkqueue test suite through r119

Submitted by: Mark Heily <mark@heily.com>

14 years agoAdd missing #include <sys/ktr.h>.
bms [Tue, 15 Dec 2009 10:40:40 +0000 (10:40 +0000)]
Add missing #include <sys/ktr.h>.

Submitted by: Hideki Yamamoto
MFC after: 1 week

14 years agoimplement a new match option,
luigi [Tue, 15 Dec 2009 09:46:27 +0000 (09:46 +0000)]
implement a new match option,

    lookup {dst-ip|src-ip|dst-port|src-port|uid|jail} N

which searches the specified field in table N and sets tablearg
accordingly.
With dst-ip or src-ip the option replicates two existing options.
When used with other arguments, the option can be useful to
quickly dispatch traffic based on other fields.

Work supported by the Onelab project.

MFC after: 1 week

14 years agofix the indentation for addr: values
luigi [Tue, 15 Dec 2009 09:32:35 +0000 (09:32 +0000)]
fix the indentation for addr: values

MFC after: 3 days

14 years agoThe named process needs to have a "working directory" that it can
dougb [Tue, 15 Dec 2009 05:14:39 +0000 (05:14 +0000)]
The named process needs to have a "working directory" that it can
write to. This is specified in "options { directory }" in named.conf.
So, create /etc/namedb/working with appropriate permissions, and
update the entry in named.conf to match.

In addition to specifying the working directory, file and path names
in named.conf can be specified relative to the directory listed.
However, since that directory is now different from /etc/namedb
(where the configuration, zone, rndc.*, and other files are located)
further update named.conf to specify all file names with fully
qualified paths. Also update the comment about file and path names
so users know this should be done for all file/path names in the file.

This change will eliminate the 'working directory is not writable'
messages at boot time without sacrificing security. It will also
allow for features in newer versions of BIND (9.7+) to work as
designed.

14 years agoTell upper layer vge(4) supports long frames. This should be done
yongari [Mon, 14 Dec 2009 22:55:20 +0000 (22:55 +0000)]
Tell upper layer vge(4) supports long frames. This should be done
after ether_ifattach(), as ether_ifattach() initializes it with
ETHER_HDR_LEN.
While I'm here remove setting if_mtu, it's already handled in
ether_ifattach().

14 years agoAdd apple-boot and apple-ufs.
rpaulo [Mon, 14 Dec 2009 22:47:09 +0000 (22:47 +0000)]
Add apple-boot and apple-ufs.

Submitted by: nwhitehorn

14 years agoDon't report current link status if interface is not UP.
yongari [Mon, 14 Dec 2009 22:30:07 +0000 (22:30 +0000)]
Don't report current link status if interface is not UP.
If interface is not UP, the current link status wouldn't
reflect the negotiated status.

14 years agoRemove _FDE quirk handling as these quirks are automatically repaired
jkim [Mon, 14 Dec 2009 22:28:32 +0000 (22:28 +0000)]
Remove _FDE quirk handling as these quirks are automatically repaired
by ACPICA layer since ACPICA 20091214.

14 years agoMerge ACPICA 20091214.
jkim [Mon, 14 Dec 2009 22:24:04 +0000 (22:24 +0000)]
Merge ACPICA 20091214.

14 years agoReport media change result to caller instead of returning success
yongari [Mon, 14 Dec 2009 22:23:06 +0000 (22:23 +0000)]
Report media change result to caller instead of returning success
without regard to the result.

14 years agoWhenever link state change interrupt is raised, vge_tick() is
yongari [Mon, 14 Dec 2009 22:20:05 +0000 (22:20 +0000)]
Whenever link state change interrupt is raised, vge_tick() is
called and vge(4) used to drive auto-negotiation timer(mii_tick) in
vge_tick(). Therefore the mii_tick was not called for every hz such
that auto-negotiation complete was never handled in vge(4).
Use mii_pollstat to extract current negotiated speed/duplex instead
of mii_tick. The latter is valid only for auto-negotiation case.
While I'm here change the confusing function name vge_tick() to
vge_link_statchg().

14 years agoSort function prototyes.
yongari [Mon, 14 Dec 2009 22:00:11 +0000 (22:00 +0000)]
Sort function prototyes.

14 years agoWe don't have to reload EEPROM in vge_reset(). Because vge_reset()
yongari [Mon, 14 Dec 2009 21:16:02 +0000 (21:16 +0000)]
We don't have to reload EEPROM in vge_reset(). Because vge_reset()
is called in vge_init_lock(), vge(4) always used to reload EEPROM.
Also add more comment why vge(4) clears VGE_CHIPCFG0_PACPI bit.
While I'm here add missing new line in vge_reset().

14 years agoSet ATA_CHECKS_CABLE when appropriate.
marius [Mon, 14 Dec 2009 21:11:50 +0000 (21:11 +0000)]
Set ATA_CHECKS_CABLE when appropriate.

Reviewed by: mav
MFC after: 1 week

14 years agoIncrease output queue size from 64 to 255.
yongari [Mon, 14 Dec 2009 20:59:18 +0000 (20:59 +0000)]
Increase output queue size from 64 to 255.

14 years agoImprove the markup
dougb [Mon, 14 Dec 2009 20:59:01 +0000 (20:59 +0000)]
Improve the markup

Submitted by: ru

14 years agoAdd MSI support for VT613x controllers.
yongari [Mon, 14 Dec 2009 20:49:50 +0000 (20:49 +0000)]
Add MSI support for VT613x controllers.

14 years agoSave PHY address by reading VGE_MIICFG register. For PCIe
yongari [Mon, 14 Dec 2009 20:39:42 +0000 (20:39 +0000)]
Save PHY address by reading VGE_MIICFG register. For PCIe
controllers(VT613x), we assume the PHY address is 1.
Use the saved PHY address in MII register access routines and
remove accessing VGE_MIICFG register.
While I'm here save PCI express capability register which will be
used in near future.

14 years agoAdd Microsoft and NetBSD partition types handling.
rpaulo [Mon, 14 Dec 2009 20:26:27 +0000 (20:26 +0000)]
Add Microsoft and NetBSD partition types handling.

14 years agoIntroduce vge_flags member in softc. The vge_flags member will
yongari [Mon, 14 Dec 2009 20:17:53 +0000 (20:17 +0000)]
Introduce vge_flags member in softc. The vge_flags member will
record device specific bits. Remove vge_link and use vge_flags.
While here, move clearing link state before mii_mediachg() as
mii_mediachg() may affect link state.

14 years agoMove the scan for max_keylen into route.c::route_init(),
luigi [Mon, 14 Dec 2009 20:12:51 +0000 (20:12 +0000)]
Move the scan for max_keylen into route.c::route_init(),
and make max_keylen an argument for rn_init().
This removes an unnecessary dependency on domain.h from radix.c

MFC after: 7 days

14 years agostyle(9).
yongari [Mon, 14 Dec 2009 20:07:25 +0000 (20:07 +0000)]
style(9).

14 years agoAdd more Apple partition types.
rpaulo [Mon, 14 Dec 2009 20:04:28 +0000 (20:04 +0000)]
Add more Apple partition types.

14 years agoSimplify partition type parsing by using a data-oriented model.
rpaulo [Mon, 14 Dec 2009 20:04:06 +0000 (20:04 +0000)]
Simplify partition type parsing by using a data-oriented model.
While there add more Apple and Linux partition types.

14 years agos/u_intXX_t/uintXX_t/g
yongari [Mon, 14 Dec 2009 19:53:57 +0000 (19:53 +0000)]
s/u_intXX_t/uintXX_t/g

14 years agoRemove unnecessary return statement.
yongari [Mon, 14 Dec 2009 19:49:20 +0000 (19:49 +0000)]
Remove unnecessary return statement.

14 years agoUse ANSI function definations.
yongari [Mon, 14 Dec 2009 19:44:54 +0000 (19:44 +0000)]
Use ANSI function definations.

14 years agoDon't panic on failure to attach if we fail before or during the
gavin [Mon, 14 Dec 2009 19:18:02 +0000 (19:18 +0000)]
Don't panic on failure to attach if we fail before or during the
if_alloc() of ifp.  This fixes the panic reported in the PR, but
not the attach failure.

PR: kern/139079
Tested by:      Steven Noonan <steven uplinklabs.net>
Reviewed by: thompsa
Approved by: ed (mentor)
MFC after: 2 weeks`

14 years agoClear VGE_TXDESC_Q bit for transmitted frames. The VGE_TXDESC_Q bit
yongari [Mon, 14 Dec 2009 19:08:11 +0000 (19:08 +0000)]
Clear VGE_TXDESC_Q bit for transmitted frames. The VGE_TXDESC_Q bit
seems to work like a tag that indicates 'not list end' of queued
frames. Without having a VGE_TXDESC_Q bit indicates 'list end'. So
the last frame of multiple queued frames has no VGE_TXDESC_Q bit.
The hardware has peculiar behavior for VGE_TXDESC_Q bit handling.
If the VGE_TXDESC_Q bit of descriptor was set the controller would
fetch next descriptor. However if next descriptor's OWN bit was
cleared but VGE_TXDESC_Q was set, it could confuse controller.
Clearing VGE_TXDESC_Q bit for transmitted frames ensure correct
behavior.

14 years agoAdd old read_mac_addr routine to this module since
jfv [Mon, 14 Dec 2009 19:05:16 +0000 (19:05 +0000)]
Add old read_mac_addr routine to this module since
a customer report of an Invalid MAC Address has occurred.

14 years agoFix typo in register definition.
yongari [Mon, 14 Dec 2009 18:50:26 +0000 (18:50 +0000)]
Fix typo in register definition.

14 years agoUse PCIR_BAR instead of hard-coded value.
yongari [Mon, 14 Dec 2009 18:49:16 +0000 (18:49 +0000)]
Use PCIR_BAR instead of hard-coded value.

14 years agoOverhaul bus_dma(9) usage and fix various things.
yongari [Mon, 14 Dec 2009 18:44:23 +0000 (18:44 +0000)]
Overhaul bus_dma(9) usage and fix various things.
 o Separate TX/RX buffer DMA tag from TX/RX descriptor ring DMA tag.
 o Separate RX buffer DMA tag from common buffer DMA tag. RX DMA
   tag has different restriction compared to TX DMA tag.
 o Add 40bit DMA address support.
 o Adjust TX/RX descriptor ring alignment to 64 bytes from 256
   bytes as documented in datasheet.
 o Added check to ensure TX/RX ring reside within a 4GB boundary.
   Since TX/RX ring shares the same high address register they
   should have the same high address.
 o TX/RX side bus_dmamap_load_mbuf_sg(9) support.
 o Add lock assertion to vge_setmulti().
 o Add RX spare DMA map to recover from DMA map load failure.
 o Add optimized RX buffer handler, vge_discard_rxbuf which is
   activated when vge(4) sees bad frames.
 o Don't blindly update VGE_RXDESC_RESIDUECNT register. Datasheet
   says the register should be updated only when number of
   available RX descriptors are multiple of 4.
 o Use __NO_STRICT_ALIGNMENT instead of defining VGE_FIXUP_RX which
   is only set for i386 architecture. Previously vge(4) also
   performed expensive copy operation to align IP header on amd64.
   This change should give RX performance boost on amd64
   architecture.
 o Don't reinitialize controller if driver is already running. This
   should reduce number of link state flipping.
 o Since vge(4) drops a driver lock before passing received frame
   to upper layer, make sure vge(4) is still running after
   re-acquiring driver lock.
 o Add second argument count to vge_rxeof(). The argument will
   limit number of packets could be processed in RX handler.
 o Rearrange vge_rxeof() not to allocate RX buffer if received
   frame was bad packet.
 o Removed if_printf that prints DMA map failure. This type of
   message shouldn't be used in fast path of driver.
 o Reduce number of allowed TX buffer fragments to 6 from 7. A TX
   descriptor allows 7 fragments of a frame. However the CMZ field
   of descriptor has just 3bits and the controller wants to see
   fragment + 1 in the field. So if we have 7 fragments the field
   value would be 0 which seems to cause unexpected results under
   certain conditions. This change should fix occasional TX hang
   observed on vge(4).
 o Simplify vge_stat_locked() and add number of available TX
   descriptor check.
 o vge(4) controllers lack padding short frames. Make sure to fill
   zero for the padded bytes. This closes unintended information
   disclosure.
 o Don't set VGE_TDCTL_JUMBO flag. Datasheet is not clear whether
   this bit should be set by driver or write-back status bit after
   transmission. At least vendor's driver does not set this bit so
   remove it. Without this bit vge(4) still can send jumbo frames.
 o Don't start driver when vge(4) know there are not enough RX
   buffers.
 o Remove volatile keyword in RX descriptor structure. This should
   be handled by bus_dma(9).
 o Collapse two 16bits member of TX/RX descriptor into single 32bits
   member.
 o Reduce number of RX descriptors to 252 from 256. The
   VGE_RXDESCNUM is 16bits register but only lower 8bits are valid.
   So the maximum number of RX descriptors would be 255. However
   the number of should be multiple of 4 as controller wants to
   update 4 RX descriptors at a time. This limits the maximum
   number of RX descriptor to be 252.

Tested by: Dewayne Geraghty (dewayne.geraghty <> heuristicsystems dot com dot au)
Carey Jones (m.carey.jones <> gmail dot com)
Yoshiaki Kasahara (kasahara <> nc dor kyushu-u dot ac dotjp)

14 years agoPass all IEs to net80211.
rpaulo [Mon, 14 Dec 2009 18:43:27 +0000 (18:43 +0000)]
Pass all IEs to net80211.

PR: 141376
Submitted by: Paul <onemda at gmail.com>
MFC after: 1 week

14 years agoRemove the MTX_SPIN flag to the shared code MUTEX
jfv [Mon, 14 Dec 2009 18:43:18 +0000 (18:43 +0000)]
Remove the MTX_SPIN flag to the shared code MUTEX
as it was causing a panic, also took the opportunity
to rename the lock for clarity.

14 years agoPrefer bus_alloc_resource_any(9) to bus_alloc_resource(9).
yongari [Mon, 14 Dec 2009 18:27:34 +0000 (18:27 +0000)]
Prefer bus_alloc_resource_any(9) to bus_alloc_resource(9).

14 years agoFix spelling in comment.
yongari [Mon, 14 Dec 2009 18:19:56 +0000 (18:19 +0000)]
Fix spelling in comment.

14 years agoPrefer device_printf(9) to printf(9).
yongari [Mon, 14 Dec 2009 18:00:08 +0000 (18:00 +0000)]
Prefer device_printf(9) to printf(9).

14 years agoRemove register keyword.
yongari [Mon, 14 Dec 2009 17:53:10 +0000 (17:53 +0000)]
Remove register keyword.

14 years agoAdd an option to specify that the received ZFS should not be automatically
delphij [Mon, 14 Dec 2009 17:04:44 +0000 (17:04 +0000)]
Add an option to specify that the received ZFS should not be automatically
mounted (receive -u).

Obtained from: OpenSolaris (onnv revision 8584:327a1b6dd944)
Approved by: pjd

14 years agoStyle improvements:
delphij [Mon, 14 Dec 2009 16:54:39 +0000 (16:54 +0000)]
Style improvements:

 - Sort function prototypes;
 - Apply static on all function bodies.  To quote bde@:

> It is a good obfuscation to declare functions as static only in the
> prototype, so that you can't see the static for the actual function.
> The reverse obfuscation (with static only in the function definition)
> would make more sense, but is a constraint error.

Reviewed by: bde

14 years agoRemove comment claiming that building acpi into the kernel is deprecated.
jhb [Mon, 14 Dec 2009 15:32:32 +0000 (15:32 +0000)]
Remove comment claiming that building acpi into the kernel is deprecated.

PR: docs/141353
Submitted by: Bruce Cran
MFC after: 1 week

14 years agoProperly fix callout handling by putting all the per-cpu info in
luigi [Mon, 14 Dec 2009 12:23:46 +0000 (12:23 +0000)]
Properly fix callout handling by putting all the per-cpu info in
struct callout_cpu. From the comment in the file:

+ * There is one struct callout_cpu per cpu, holding all relevant
+ * state for the callout processing thread on the individual CPU.
+ * In particular:
+ *     cc_ticks is incremented once per tick in callout_cpu().
+ *     It tracks the global 'ticks' but in a way that the individual
+ *     threads should not worry about races in the order in which
+ *     hardclock() and hardclock_cpu() run on the various CPUs.
+ *     cc_softclock is advanced in callout_cpu() to point to the
+ *     first entry in cc_callwheel that may need handling. In turn,
+ *     a softclock() is scheduled so it can serve the various entries i
+ *     such that cc_softclock <= i <= cc_ticks .

Together with a smaller patch committed in september, this fixes a
bug that affects 8.0 with apps that rely on callouts to fire exactly
in the number of ticks specified (qemu among them).
Right now, callouts in 8.0 fire one tick late.

This was discussed in september with JeffR and jhb

MFC after: 3 days

14 years agoRevert the xterm terminal behavior to NOT clear the screen after
dougb [Mon, 14 Dec 2009 07:18:31 +0000 (07:18 +0000)]
Revert the xterm terminal behavior to NOT clear the screen after
exiting a pager, vi, etc.

Add some example xterm*-clear entries to the termcap files to make
it easier for people to enable that behavior.

Document the examples in the man page to make them easier to find.

14 years agoFix one spelling and one copy&paste error in comments.
kan [Mon, 14 Dec 2009 01:51:23 +0000 (01:51 +0000)]
Fix one spelling and one copy&paste error in comments.

14 years agoWork-around a race condition on ia64 while unlocking a contested lock.
marcel [Mon, 14 Dec 2009 01:26:01 +0000 (01:26 +0000)]
Work-around a race condition on ia64 while unlocking a contested lock.
The race condition is believed to be in UMTX_OP_MUTEX_WAKE. On ia64,
we simply go to the kernel to unlock.
The big question is why this is only a race condition on ia64...

MFC after: 3 days

14 years agoOnly set ATA_CHECKS_CABLE for chip versions that actually support
marius [Sun, 13 Dec 2009 20:36:42 +0000 (20:36 +0000)]
Only set ATA_CHECKS_CABLE for chip versions that actually support
cable detection, i.e. neither for ALI_OLD nor for ALI_NEW revisions
>= 0xc7.

MFC after: 1 week

14 years agoMake admsw(4) compile again fixing typos and adding the missing variable
bz [Sun, 13 Dec 2009 20:27:59 +0000 (20:27 +0000)]
Make admsw(4) compile again fixing typos and adding the missing variable
after r199762.

14 years agoAdd Mark Heily's libkqueue test suite as a general kqueue test suite to
rwatson [Sun, 13 Dec 2009 20:27:46 +0000 (20:27 +0000)]
Add Mark Heily's libkqueue test suite as a general kqueue test suite to
tools/regression.  It tests a number of aspects of kqueue behavior,
although not all currently pass (possibly bugs in the test suite?).

Submitted by: Mark Heily <mark at heily.com>
Obtained from: svn://mark.heily.com/libkqueue/trunk/test (r114)

14 years agoProperly support M5229 revision 0xc7 and 0xc8:
marius [Sun, 13 Dec 2009 18:42:06 +0000 (18:42 +0000)]
Properly support M5229 revision 0xc7 and 0xc8:
- These revisions no longer have cable detection capability.
- The UDMA support bit of register 0x4b has been dropped without an
  replacement.
- According to Linux it's crucial for working ATAPI DMA support to
  also set the reserved bit 1 of regsiter 0x53 with these revisions.

MFC after: 1 week

14 years agoSpecify the capability and media bits of the capabilities page in
marius [Sun, 13 Dec 2009 18:26:19 +0000 (18:26 +0000)]
Specify the capability and media bits of the capabilities page in
native, i.e. big-endian, format and convert as appropriate like we
also do with the multibyte fields of the other pages. This fixes
the output of acd_describe() to match reality on big-endian machines
without breaking it on little-endian ones. While at it, also convert
the remaining multibyte fields of the pages read although they are
currently unused for consistency and in order to prevent possible
similar bugs in the future.

MFC after: 1 week

14 years ago- Fix main() to use two separated sockets for the two transports
hrs [Sun, 13 Dec 2009 15:19:01 +0000 (15:19 +0000)]
- Fix main() to use two separated sockets for the two transports
  when "-P port" is specified.  It invoked svc{tcp,udp}_create()
  for only one of the two allocated sockets, and prevented the
  TCP socket from binding to as the result.

- Use TI-RPC functions and handle sockets in a
  transport-independent way.  At this moment only AF_INET ("udp"
  and "tcp") is supported because others need rewrites of ACL
  handling and yp clients.

- Add '-h addr' to specify addresses to bind to.

- Convert _msgout() to use variable argument lists and remove
  asprintf() for error strings.

- Remove register storage class specifier.

Discussed with: kuriyama
MFC after: 1 week

14 years agoThroughout the network stack we have a few places of
bz [Sun, 13 Dec 2009 13:57:32 +0000 (13:57 +0000)]
Throughout the network stack we have a few places of
if (jailed(cred))
left.  If you are running with a vnet (virtual network stack) those will
return true and defer you to classic IP-jails handling and thus things
will be "denied" or returned with an error.

Work around this problem by introducing another "jailed()" function,
jailed_without_vnet(), that also takes vnets into account, and permits
the calls, should the jail from the given cred have its own virtual
network stack.

We cannot change the classic jailed() call to do that,  as it is used
outside the network stack as well.

Discussed with: julian, zec, jamie, rwatson (back in Sept)
MFC after: 5 days

14 years agoAdd a few more V_hacks to nfsclient to allow machines with a VIMAGE
bz [Sun, 13 Dec 2009 11:06:39 +0000 (11:06 +0000)]
Add a few more V_hacks to nfsclient to allow machines with a VIMAGE
kernel to boot from NFS. [1]

Note: this is not a full virtualization of nfsclient. It is only does
what advertised above and nothing more.

Requested by: public demand [1]
Tested by: kris, ..
MFC after: 5 days