dragonfly.git
13 years agoMerge from vendor branch LIBPCAP:
Peter Avalos [Mon, 25 Dec 2006 00:32:20 +0000 (00:32 +0000)]
Merge from vendor branch LIBPCAP:
Import LIBPCAP 0.9.5

13 years agoImport LIBPCAP 0.9.5
Peter Avalos [Mon, 25 Dec 2006 00:32:20 +0000 (00:32 +0000)]
Import LIBPCAP 0.9.5

13 years agoMerge from vendor branch TCPDUMP:
Peter Avalos [Mon, 25 Dec 2006 00:17:50 +0000 (00:17 +0000)]
Merge from vendor branch TCPDUMP:
Import of TCPDUMP 3.9.5

13 years agoImport of TCPDUMP 3.9.5
Peter Avalos [Mon, 25 Dec 2006 00:17:50 +0000 (00:17 +0000)]
Import of TCPDUMP 3.9.5

13 years agoRestart TX rate control algorithm for a peer node, if its current TX
Sepherosa Ziehau [Sun, 24 Dec 2006 11:39:59 +0000 (11:39 +0000)]
Restart TX rate control algorithm for a peer node, if its current TX
rate index is beyond the number of TX rates it supports.

This could happen at least in following way:
1) Start a 11g HOSTAP, which uses TX rate control algorithm
2) Use a 11g cardbus wireless card as STA, set its mode to "auto" or
   "11g" and join the BSS created by HOSTAP
3) Transmit some packets from HOSTAP to STA and make sure that TX rate
   index for the STA reaches maximum.
4) Unplug the cardbus wireless card, so it has no chance to send out
   disassociation management frame.
5) Plug the cardbus wireless card back immediately, set its mode to
   "11b" and join the BSS created by HOSTAP again.

13 years agoList more RT2501USB/RT2601USB devices in rum(4) manpage.
Sepherosa Ziehau [Sun, 24 Dec 2006 05:50:11 +0000 (05:50 +0000)]
List more RT2501USB/RT2601USB devices in rum(4) manpage.

Obtained-from: OpenBSD

13 years agoList more RT2500USB devices in ural(4) manpage
Sepherosa Ziehau [Sun, 24 Dec 2006 05:44:36 +0000 (05:44 +0000)]
List more RT2500USB devices in ural(4) manpage

Obtained-from: OpenBSD

13 years agoAdd more ids for RT2500USB.
Sepherosa Ziehau [Sun, 24 Dec 2006 05:18:22 +0000 (05:18 +0000)]
Add more ids for RT2500USB.

Obtained-from: OpenBSD

13 years agoregen
Sepherosa Ziehau [Sun, 24 Dec 2006 05:17:16 +0000 (05:17 +0000)]
regen

13 years agoAdd more ids for RT2500USB.
Sepherosa Ziehau [Sun, 24 Dec 2006 05:16:43 +0000 (05:16 +0000)]
Add more ids for RT2500USB.

Obtained-from: OpenBSD

13 years agoMention MCP67 in nfe(4) manpage
Sepherosa Ziehau [Sun, 24 Dec 2006 05:01:07 +0000 (05:01 +0000)]
Mention MCP67 in nfe(4) manpage

13 years agoAdd NVIDIA MCP67 LAN support.
Sepherosa Ziehau [Sun, 24 Dec 2006 04:58:27 +0000 (04:58 +0000)]
Add NVIDIA MCP67 LAN support.

Obtained-from: OpenBSD

13 years agoregen
Sepherosa Ziehau [Sun, 24 Dec 2006 04:57:13 +0000 (04:57 +0000)]
regen

13 years agoAdd NVIDIA MCP67 Lan PCI ids.
Sepherosa Ziehau [Sun, 24 Dec 2006 04:56:37 +0000 (04:56 +0000)]
Add NVIDIA MCP67 Lan PCI ids.

13 years agoAdd more chip id for fxp(4)
Sepherosa Ziehau [Sun, 24 Dec 2006 03:30:56 +0000 (03:30 +0000)]
Add more chip id for fxp(4)

Obtained-from: FreeBSD

13 years agoAnsify function declarations and fix some minor style issues.
Sascha Wildner [Sat, 23 Dec 2006 23:47:54 +0000 (23:47 +0000)]
Ansify function declarations and fix some minor style issues.

In-collaboration-with: Alexey Slynko <slynko@tronet.ru>

13 years agoRemove printf() definition and prototype from the kernel.
Sascha Wildner [Sat, 23 Dec 2006 20:05:34 +0000 (20:05 +0000)]
Remove printf() definition and prototype from the kernel.

13 years agoSync em(4) manpage with the one in Intel em 6.2.9
Sepherosa Ziehau [Sat, 23 Dec 2006 10:42:29 +0000 (10:42 +0000)]
Sync em(4) manpage with the one in Intel em 6.2.9

13 years agoSync with Intel's em-6.2.9
Sepherosa Ziehau [Sat, 23 Dec 2006 10:39:16 +0000 (10:39 +0000)]
Sync with Intel's em-6.2.9
- Support more chips.
- Implement suspend/resume device methods.
- Correct promisc mode support.
- Code and comment clean up.
- Avoid reinitializing the hardware if only IP address is changed.  This is
  implemented in a different way from Intel's:
  If IFF_RUNNING is set, em_init() will return immediately.  So for some
  situation in which em_init() must run, IFF_RUNNING is cleared before calling
  em_init().
- Rework TX processing:
  In em_encap(), save the index of the packet's last TX descriptor (EOP) in
  the packet's first descriptor.  In em_txeof(), test E1000_TXD_STAT_DD bit
  only for last TX descriptor (EOP) of certain packet.  If it is set, then
  reap the TX descriptors of the packet in an inner loop.
  "This change is important for future chips, where DD bit is going
   to be set only on the EOP descriptors." -- Jack Vogel at Intel

13 years ago- Replace magic number with macro.
Sepherosa Ziehau [Sat, 23 Dec 2006 09:44:26 +0000 (09:44 +0000)]
- Replace magic number with macro.
- In iwi_auth_and_assoc(), add assertion before the questionable memcpy().
  After recent bug fixing in 802.11 layer, this assertion should not fail.

13 years agoSince all necessary bits are in 802_11 layer now:
Sepherosa Ziehau [Sat, 23 Dec 2006 09:26:23 +0000 (09:26 +0000)]
Since all necessary bits are in 802_11 layer now:
- Properly set basic rate set and operational rate set for acx100 part.
- Properly set basic rate set for acx111 part.
- More strigent rate checking

13 years agoMassive 802_11 XRATE bug fixing.
Sepherosa Ziehau [Sat, 23 Dec 2006 09:14:02 +0000 (09:14 +0000)]
Massive 802_11 XRATE bug fixing.

- Correct ieee80211_fix_rate(IEEE80211_F_DODEL) operation by entering
  IEEE80211_F_DONEGO code segment but avoiding real negotiation.
- In ieee80211_fix_rate(), remove duplicated rates if rate set is to
  be sorted.  This should be enough to protect us against maliciously
  minted 802.11 management frames which contain supported rate and
  extended supported rate ies. [*]
- In ieee80211_sta_join(), call ieee80211_fix_rate(IEEE80211_F_DODEL),
  if the wireless NIC operates in STA mode.  So drivers can depend on
  ieee80211com.ic_bss's ni_rates even before entering RUN state, this
  is *very important* for certain driver e.g. iwi(4) [*].
- Add ic_nbasicrates in ieee80211com, which records the number of
  basic rates in the current BSS. [1]
- Add a new function ieee80211_copy_basicrates().  This function is
  used to propagate IEEE80211_RATE_BASIC bit from second parameter
  to the first parameter.  It will return number of basic rates in
  the second parameter.  It is called in ieee80211_sta_join() to
  properly setup basic rates in ieee80211com.ic_sup_rates and
  ieee80211com.ic_nbasicrates. [2]
- Introduce extra parameter to ieee80211_setup_rates() and
  ieee80211_fix_rate().
  This parameter only affects how IEEE80211_F_DONEGO is done.
  Adjust IEEE80211_F_DONEGO behavior after introducing this parameter:
  If the new parameter is 1, then the negotiation is performed on the
  behalf of a STA which wants to join either an infrastructured or an
  independent BSS, and the rate set going to be negotiated is the BSS's
  supported rate set:
  o  Don't overwrite the BSS basic rate set.  So drivers and TX rate
     control algorithm can have knowledge of the BSS basic rate set and
     can do various setting accordingly.
  o  Avoid joining the BSS, if certain rates in the BSS basic rate set
     are not supported.
  If the new parameter is 0, then the negotiation is performed on the
  behalf of a HOSTAP, or a STA that already joined/started an independent
  BSS, and the rate set going to be negotiated is peer STA's supported
  rate set:
  o  Overwrite the basic rates of peer STA's supported rate set with
     basic rates in ieee80211com.ic_sup_rates, which is set up properly
     in ieee80211_sta_join() by ieee80211_copy_basicrates() (see [2]),
     so TX rate control algorithm can act accordingly.
  o  If the current operation mode is IEEE80211_M_HOSTAP, use a counter
     to bookkeep how many basic rates got overwritten during negotiation.
     If at the end of the negotiation the counter is less than
     ieee80211com.ic_nbasicrates (see [1] and [2]), then it means that
     the peer STA does not support certain rates in our basic rate set.
     This kind of STA should not be allowed to join the current BSS.
     This prevention mechanism should be more straightforword than the
     old one in ieee80211_recv_mgmt(), nuke the old prevention mechanism
     after this change.
- In ieee80211_init_neighbor(), do full rate set negotiation, so nodes
  created by ieee80211_add_neighbor() or ieee80211_fakeup_adhoc_node(),
  will not contain rates that the wireless NIC does not support.
- In ieee80211_{beacon,probe_resp}_alloc(), use ieee80211com.ic_sup_rates
  to setup supported rates and extended supported rates ie, instead of
  using ieee80211com.ic_bss's ni_rates.  So two 11g STAs in a 11g/11b
  mixed IBSS can comunicate with each other using OFDM rates, given proper
  protection, like RTS-CTS/CTS-to-self, is applied. [**]
- In ieee80211_send_mgmt(), use ieee80211com.ic_sup_rates to create
  supported rates and extended supported rates ie of (re)association
  response.  So these ies are consistent with what's in beacon and probe
  response. [**]
- In ieee80211_send_mgmt(), use ieee80211_probe_resp_alloc() to create
  frame body of probe response.
- Add more XRATE debug messages.

#
# [*] Details:
# http://lists.freebsd.org/pipermail/freebsd-current/2006-October/066679.html
#
# [**] Basic rates in ieee80211com.ic_sup_rates are set beforehand (see [2])
#

13 years ago- Don't call m_adj() to make RX buffer's _payload_ on longword aligned,
Sepherosa Ziehau [Sat, 23 Dec 2006 03:41:55 +0000 (03:41 +0000)]
- Don't call m_adj() to make RX buffer's _payload_ on longword aligned,
  because some re(4) chips (e.g. RTL8101E) require RX buffer to be
  8-bytes aligned.  This change shows no noticeable performance change.
Reported-by: Joe Talbott <josepht@cstone.net>
- Avoid writing extra hardware registers by writing 2 bytes to IDR4
  instead instead of writing 4 bytes, bacause:
  1) the extra two registers after IDR5 are reserved.
  2) accessing arpcom.ac_enaddr[6,7] should be invalid.
- Add a flag field in re_softc and re_hwrev.  Currently only one flag,
  RE_F_HASMPC, is defined.  This flag is used to indicate whether the
  hardware has MPC register or not, so we can avoid writing to MPC's
  position, if that position is reserved.
- Move descriptor ring address setting up before RX/TX enabling, since
  some re(4) chips (e.g. RTL8101E) will try accessing descriptor ring
  immediately after RX/TX is enabled, which results in intermittent
  kernel panic or system hanging.
Paniced-by: Joe Talbott <josepht@cstone.net>
- Avoid calling re_init(), if hw.reX.tx_moderation is changed but NIC
  is not up yet.
- Const-fy global hardware id arrays and nuke unused macro while I'm here.

Thank Joe Talbott <josepht@cstone.net> to help debugging and provide
valuable information (esp. locating the problematic RX/TX enabling :)

Thank dillon@ to provide debugging hints.

Tested-by:
  Joe Talbott <josepht@cstone.net> (RTL8101E)
  swildner@ (onboard RTL8169S) (*)
  me (RTL8169S)

# (*) swildner@'s card is still half broken even after this commit :\

13 years agoRemove an #ifdef _KERNEL inside an #ifdef _KERNEL.
Sascha Wildner [Sat, 23 Dec 2006 02:58:09 +0000 (02:58 +0000)]
Remove an #ifdef _KERNEL inside an #ifdef _KERNEL.

13 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Sat, 23 Dec 2006 00:41:31 +0000 (00:41 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

13 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Sat, 23 Dec 2006 00:35:05 +0000 (00:35 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

13 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Sat, 23 Dec 2006 00:27:03 +0000 (00:27 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

13 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Fri, 22 Dec 2006 23:57:54 +0000 (23:57 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

13 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Fri, 22 Dec 2006 23:44:57 +0000 (23:44 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

13 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Fri, 22 Dec 2006 23:26:27 +0000 (23:26 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

13 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Fri, 22 Dec 2006 23:12:17 +0000 (23:12 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

13 years agoDefine kvsnprintf as vsnprintf for the case where subr_sbuf.c is compiled
Sascha Wildner [Fri, 22 Dec 2006 08:08:25 +0000 (08:08 +0000)]
Define kvsnprintf as vsnprintf for the case where subr_sbuf.c is compiled
as libsbuf.

Spotted-by: Trevor Kendall <trevorjkendall@gmail.com>
13 years ago- Use jumbo buffers only when MTU > 1518 bytes.
Sepherosa Ziehau [Thu, 21 Dec 2006 14:13:04 +0000 (14:13 +0000)]
- Use jumbo buffers only when MTU > 1518 bytes.
  o  In sk_dma_alloc(), allocate additional DMA stuffs for normal mbuf cluster
     to use.
  o  In sk_init(), set sk_if_softc.sk_use_jumbo if ifnet.if_mtu > 1518.  This
     should only be done after sk_stop(), so sk_stop() will not free wrong RX
     buffers.  Add a comment about it.
  o  Don't touch jumbo buffer related bits in hardware registers, if jumbo
     buffer is not used currently.
  o  Rename old sk_newbuf() to sk_newbuf_jumbo().
  o  Implement sk_newbuf_std(), which allocates RX buffer using mbuf clusters.
  o  Add a wrapper function, sk_newbuf(), to switch between above two functions
     based on whether sk_if_softc.sk_use_jumbo is set or not.
- If something fail in sk_rxeof(), don't call sk_newbuf() with old mbuf:
  Hardware will not change RX descriptor's buffer address part.  Only
  controlling bits of the RX descriptor need to be set up properly.
  Nuke third parameter (i.e. mbuf) of sk_newbuf() after this change and
  rearrange sk_newbuf_jumbo() accordingly.
- Since sk_chain and TX/RX descriptor use same index, nuke unnecessary
  sk_chain.sk_desc field, which points to a corresponding TX/RX descriptor.
  Pass the TX/RX descriptor index to sk_newbuf() instead of sk_chain pointer.
  Nuke never used sk_chain.sk_next field.  These changes degenarate sk_chain
  into a mbuf pointer, so nuke no longer needed sk_chain structure.

Tested-by: Rumko <rumcic@gmail.com> and Gergo Szakal <bastyaelvtars@gmail.com>
Partially-reviewed-by: dillon@
13 years agoAdd the PCI_MAP_FIXUP code as proposed two weeks ago. The code is only
Thomas E. Spanjaard [Wed, 20 Dec 2006 23:29:18 +0000 (23:29 +0000)]
Add the PCI_MAP_FIXUP code as proposed two weeks ago. The code is only
enabled with options PCI_MAP_FIXUP in your kernel, and should only be used
when using nata.

13 years agoRename sprintf -> ksprintf
Matthew Dillon [Wed, 20 Dec 2006 18:14:44 +0000 (18:14 +0000)]
Rename sprintf  -> ksprintf
Rename snprintf -> knsprintf

Make allowances for source files that are compiled for both userland and
the kernel.

13 years agoAdd IFF_MONITOR support.
Matthew Dillon [Tue, 19 Dec 2006 00:11:13 +0000 (00:11 +0000)]
Add IFF_MONITOR support.

Submitted-by: "Vlad Galu" <dudu@dudu.ro>
Obtained-from: FreeBSD

13 years agoSee whether we should compile ipfilter with INET6 support by looking at the
Peter Avalos [Mon, 18 Dec 2006 23:26:36 +0000 (23:26 +0000)]
See whether we should compile ipfilter with INET6 support by looking at the
kernel config rather than requiring the user to use an undocumented build
option.

Thanks to corecode, TGEN, and vbd for various suggestions and Max Herrgard
<herrgard@gmail.com> for testing.

Dragonfly-bug:  <http://bugs.dragonflybsd.org/issue322>
Reviewed-by: vbd
13 years agoUndo some renames that don't apply to the boot code (linked against libstand).
Matthew Dillon [Mon, 18 Dec 2006 23:12:31 +0000 (23:12 +0000)]
Undo some renames that don't apply to the boot code (linked against libstand).

13 years agoAdd 'k' versions for printf, sprintf, and snprintf. kprintf, ksprintf, and
Matthew Dillon [Mon, 18 Dec 2006 21:02:59 +0000 (21:02 +0000)]
Add 'k' versions for printf, sprintf, and snprintf.  kprintf, ksprintf, and
ksnprintf.  This will allow these functions to be renamed piecemeal without
breaking the source tree.

13 years agoRename kvprintf -> kvcprintf (call-back version)
Matthew Dillon [Mon, 18 Dec 2006 20:41:02 +0000 (20:41 +0000)]
Rename kvprintf  -> kvcprintf (call-back version)
Rename vprintf   -> kvprintf
Rename vsprintf  -> kvsprintf
Rename vsnprintf -> kvsnprintf

13 years agoAdd a prototype for the new mcontrol() system call.
Matthew Dillon [Mon, 18 Dec 2006 19:44:51 +0000 (19:44 +0000)]
Add a prototype for the new mcontrol() system call.

13 years agoRepo copy machine/pc32/i386/mem.c to kern/kern_memio.c and separate out
Matthew Dillon [Sun, 17 Dec 2006 20:07:33 +0000 (20:07 +0000)]
Repo copy machine/pc32/i386/mem.c to kern/kern_memio.c and separate out
the (few) machine-dependant parts.  This file primarily controls access
to /dev/zero, /dev/null, /dev/random, and kernel memory, and does not belong
in a machine-dependant directory.

13 years agoPass NULL to objcache_create() to indicate that null_ctor() and/or null_dtor()
Matthew Dillon [Sun, 17 Dec 2006 19:28:32 +0000 (19:28 +0000)]
Pass NULL to objcache_create() to indicate that null_ctor() and/or null_dtor()
should be used.  Make null_ctor() and null_dtor() private functions.

Disallow M_ZERO entirely, it doesn't really fit the objcache model.

With-input-from: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>,
 "Thomas E. Spanjaard" <tgen@netphreax.net>,
 Jeffrey Hsu <hsu@crater.dragonflybsd.org>

13 years ago- Factor out ieee80211_print_rateset().
Sepherosa Ziehau [Fri, 15 Dec 2006 12:44:23 +0000 (12:44 +0000)]
- Factor out ieee80211_print_rateset().
- Add a debug macro: IEEE80211_PRINT_NODERATES().  Replace two almost same
  debug code segments with it.

13 years agoAdd a manual page for umct(4).
Sascha Wildner [Thu, 14 Dec 2006 16:21:34 +0000 (16:21 +0000)]
Add a manual page for umct(4).

13 years agoMake umct compilable into the kernel and add it to LINT.
Sascha Wildner [Thu, 14 Dec 2006 16:20:22 +0000 (16:20 +0000)]
Make umct compilable into the kernel and add it to LINT.

13 years agoFix a typo (found in FreeBSD) and update CVS tag.
Sascha Wildner [Thu, 14 Dec 2006 16:18:04 +0000 (16:18 +0000)]
Fix a typo (found in FreeBSD) and update CVS tag.

13 years agoThere is no "atapi-all.h" anymore. Remove reference to it from atapi-cam.c.
Thomas E. Spanjaard [Thu, 14 Dec 2006 16:06:40 +0000 (16:06 +0000)]
There is no "atapi-all.h" anymore. Remove reference to it from atapi-cam.c.

13 years agorename sscanf -> ksscanf
Matthew Dillon [Wed, 13 Dec 2006 21:58:52 +0000 (21:58 +0000)]
rename sscanf -> ksscanf
rename vsscanf -> kvsscanf
rename fnmatch -> kfnmatch
rename qsort -> kqsort

13 years agoFix umct and add F5U409 USB Serial Adaptor.
Matthew Dillon [Wed, 13 Dec 2006 20:19:06 +0000 (20:19 +0000)]
Fix umct and add F5U409 USB Serial Adaptor.

Submitted-by: Joe Talbott <josepht@cstone.net>
13 years agoHave the genassym.o target depend on forwarding-headers. This unbreaks
Thomas E. Spanjaard [Wed, 13 Dec 2006 19:39:52 +0000 (19:39 +0000)]
Have the genassym.o target depend on forwarding-headers. This unbreaks
parallel kernel builds.

13 years ago${_LHDRS} must succeed ${_MACHINE_FWD}/include/machine, which creates
YONETANI Tomokazu [Wed, 13 Dec 2006 15:29:50 +0000 (15:29 +0000)]
${_LHDRS} must succeed ${_MACHINE_FWD}/include/machine, which creates
${_MACHINE_FWD}/include, in which ${_LHDRS} target creates some headers.

Reported-by: tgen@
13 years agoModify the device description for the standard nForce and nForce2 on-chip
Thomas E. Spanjaard [Wed, 13 Dec 2006 14:48:26 +0000 (14:48 +0000)]
Modify the device description for the standard nForce and nForce2 on-chip
ethernet controllers to Fast Ethernet. Only the last one or two models of
the nForce2 (Ultra 400Gb and possibly Ultra 400R) supported a gmiibus.

Also add a comment regarding PCI_PRODUCT_NVIDIA_NFORCE3_LAN2, as that PCI
ID also appears on the nForce2 Ultra 400Gb chipset's MCP.

13 years agoExplicitly specify null_dtor as our objcache destructor. Fixes a panic when
Thomas E. Spanjaard [Wed, 13 Dec 2006 12:41:36 +0000 (12:41 +0000)]
Explicitly specify null_dtor as our objcache destructor. Fixes a panic when
we were out of empty magazines.

13 years agoAdd another ICH PCI ID.
Matthew Dillon [Tue, 12 Dec 2006 19:01:31 +0000 (19:01 +0000)]
Add another ICH PCI ID.

Submitted-by: "Vlad Galu" <dudu@dudu.ro>
13 years agoMerge from vendor branch FILE:
Peter Avalos [Tue, 12 Dec 2006 18:44:17 +0000 (18:44 +0000)]
Merge from vendor branch FILE:
Update to file-4.19.

13 years agoUpdate to file-4.19.
Peter Avalos [Tue, 12 Dec 2006 18:44:17 +0000 (18:44 +0000)]
Update to file-4.19.

13 years agoUpdate to file-4.19.
Peter Avalos [Tue, 12 Dec 2006 18:44:17 +0000 (18:44 +0000)]
Update to file-4.19.

13 years agoWe don't use magic2mime, so remove it.
Peter Avalos [Tue, 12 Dec 2006 18:27:25 +0000 (18:27 +0000)]
We don't use magic2mime, so remove it.

13 years ago- Correct some debug messages format.
Sepherosa Ziehau [Tue, 12 Dec 2006 15:48:09 +0000 (15:48 +0000)]
- Correct some debug messages format.
- In ieee80211_init_neighbor(), print neighbors' rate set.

13 years agoExploring low speed busses during cold boot, so USB keyboard will work even
Sepherosa Ziehau [Tue, 12 Dec 2006 11:14:27 +0000 (11:14 +0000)]
Exploring low speed busses during cold boot, so USB keyboard will work even
if the kernel is configured with "device atkbd" and "device atkbdc"

Reported-by: Petr Janda <elekktretterr@exemail.com.au>
Tested-by: Petr Janda <elekktretterr@exemail.com.au>
13 years agoUpdate with the latest newsletters from the ISO3166 Maintenance Agency:
Peter Avalos [Tue, 12 Dec 2006 06:56:25 +0000 (06:56 +0000)]
Update with the latest newsletters from the ISO3166 Maintenance Agency:

http://www.iso.ch/iso/en/prods-services/iso3166ma/03updates-on-iso-3166/index.html

This has the nice side-effect of fixing tzsetup.

13 years agoRemove unnecessary escape character.
Sascha Wildner [Tue, 12 Dec 2006 01:47:23 +0000 (01:47 +0000)]
Remove unnecessary escape character.

13 years agoConvert to mdoc.
Sascha Wildner [Tue, 12 Dec 2006 01:27:10 +0000 (01:27 +0000)]
Convert to mdoc.

13 years agoConvert to mdoc.
Sascha Wildner [Tue, 12 Dec 2006 00:49:22 +0000 (00:49 +0000)]
Convert to mdoc.

13 years agoAdd documentation for the mcontrol system call.
Sascha Wildner [Tue, 12 Dec 2006 00:26:38 +0000 (00:26 +0000)]
Add documentation for the mcontrol system call.

13 years agoAdd markup and bump date for rev. 1.5.
Sascha Wildner [Tue, 12 Dec 2006 00:08:17 +0000 (00:08 +0000)]
Add markup and bump date for rev. 1.5.

13 years agoFix typos: mininum/minimun -> minimum
Sascha Wildner [Mon, 11 Dec 2006 23:59:49 +0000 (23:59 +0000)]
Fix typos: mininum/minimun -> minimum

13 years agoDocument MADV_SETMAP and MAP_VPAGETABLE. These functions support virtualized
Matthew Dillon [Mon, 11 Dec 2006 20:55:25 +0000 (20:55 +0000)]
Document MADV_SETMAP and MAP_VPAGETABLE.  These functions support virtualized
page tables for memory mapped regions from userland.

13 years agoUse ${.CURDIR} to get the correct path to the root skeleton directory.
Matthew Dillon [Mon, 11 Dec 2006 20:54:22 +0000 (20:54 +0000)]
Use ${.CURDIR} to get the correct path to the root skeleton directory.

13 years agoThis time *really* fix the .PATHs in the kmod Makefiles. I promise.
Thomas E. Spanjaard [Sun, 10 Dec 2006 23:39:43 +0000 (23:39 +0000)]
This time *really* fix the .PATHs in the kmod Makefiles. I promise.

13 years agoFix a deadlock in the request completion code when the timeout timed out.
Thomas E. Spanjaard [Sun, 10 Dec 2006 23:36:13 +0000 (23:36 +0000)]
Fix a deadlock in the request completion code when the timeout timed out.
The cause was not unlocking the done spinlock before calling ata_completed,
resulting in ata_completed waiting forever because it needs to acquire the
lock as well.

The solution introduces a new request flag, ATA_R_COMPLETED to signal
sleepers that a request has or has not been completed. In theory, we could
just check the return value of msleep(), but this is quite elegant, and
corecode convinced me ;).

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
Reviewed-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>

13 years agoDon't mention recently nuked sysctl MIBs
Sepherosa Ziehau [Sun, 10 Dec 2006 05:21:40 +0000 (05:21 +0000)]
Don't mention recently nuked sysctl MIBs

13 years agoMention required kernel devices for rtw(4) and acx(4)
Sepherosa Ziehau [Sun, 10 Dec 2006 05:15:59 +0000 (05:15 +0000)]
Mention required kernel devices for rtw(4) and acx(4)

13 years agortw(4) requires wlan_wep(4)
Sepherosa Ziehau [Sun, 10 Dec 2006 05:10:41 +0000 (05:10 +0000)]
rtw(4) requires wlan_wep(4)

13 years ago- Add manpage for rum(4)
Sepherosa Ziehau [Sun, 10 Dec 2006 05:03:20 +0000 (05:03 +0000)]
- Add manpage for rum(4)
  Obtained-from: OpenBSD
- Add manpage for ural(4)
  Obatined-frim: FreeBSD

Reviewed-by: swildner@
13 years ago- Hook rum(4) and ural(4) into GENERIC and LINT
Sepherosa Ziehau [Sun, 10 Dec 2006 04:59:38 +0000 (04:59 +0000)]
- Hook rum(4) and ural(4) into GENERIC and LINT
- Hook rum(4) and ural(4) into module building
- Enable wlan_ratectl_onoe in GENERIC.  It is required by rum(4) and ural(4)
- Add a commented-out entry in GENERIC for wlan_ratectl_amrr
- Enable rtw(4) in GENERIC again

13 years agoAdd missing header if USB_DEBUG is defined
Sepherosa Ziehau [Sun, 10 Dec 2006 04:37:02 +0000 (04:37 +0000)]
Add missing header if USB_DEBUG is defined

13 years agoAdd support for RT2501USB/RT2601USB devices.
Sepherosa Ziehau [Sun, 10 Dec 2006 03:24:25 +0000 (03:24 +0000)]
Add support for RT2501USB/RT2601USB devices.

Thank Niall O'Higgins <niallo@openbsd.org> and
Damien Bergamini <damien@openbsd.org> for writing this driver.

Obtained-from: OpenBSD

13 years agoAdd support for RT2500USB devices.
Sepherosa Ziehau [Sun, 10 Dec 2006 02:53:34 +0000 (02:53 +0000)]
Add support for RT2500USB devices.

Thank Damien Bergamini <damien@openbsd.org> for writing this driver.

Obtained-from: FreeBSD

13 years agoUpdate following manpage to reflect changes made to USB host controller part:
Sepherosa Ziehau [Sun, 10 Dec 2006 02:16:26 +0000 (02:16 +0000)]
Update following manpage to reflect changes made to USB host controller part:
- usb.4
  Obtained-from: FreeBSD
- ehci.4 ohci.4 uhci.4

Reviewed-by: swildner@
13 years agoSync USB support (host controller part) with FreeBSD6.
Sepherosa Ziehau [Sun, 10 Dec 2006 02:03:57 +0000 (02:03 +0000)]
Sync USB support (host controller part) with FreeBSD6.

Following changes on FreeBSD-CURRENT(by iedowse@freebsd.org) are merged:
ehci.c rev 1.52
ohci.c rev 1.167
uhci.c rev 1.172
usb.c rev 1.111
usbdi.h rev 1.61
"Use a different task queue for host controller and peripheral driver
 tasks. Since the host controllers rely on tasks to process transfer
 timeouts, if a synchronous transfer from a driver was invoked from
 a task and timed out, it would never complete because the single
 task thread was stuck performing the synchronous transfer so couldn't
 process the timeout."

As of this commit, only following kernel APIs are changed:
- usbd_get_string_desc() takes one more argument which returns the actual
  size of the string description.
- usb_add_task() takes one more argument.  The extra arguemnt is used
  to specify to which task queue the task should be added.  There is
  two task queues defined, one for peripheral driver (USB_TASKQ_DRIVER),
  one for host controller (USB_TASKQ_HC).

ugen(4) is adapted according to the above kernel API changes.

Thank all of the folks for their work on the USB support.

Tested-by:
swildner@, vbd@, joerg@(1.6 backport), Max Herrgard <herrgard@gmail.com>

# Though VT6202 is supported by ehci(4), I still have problems with this
# chip, even with the updated ehci(4).

13 years agoregen
Sepherosa Ziehau [Sat, 9 Dec 2006 10:57:31 +0000 (10:57 +0000)]
regen

13 years ago- Add ids for RT2501USB/RT2601USB/RT2500USB
Sepherosa Ziehau [Sat, 9 Dec 2006 10:56:32 +0000 (10:56 +0000)]
- Add ids for RT2501USB/RT2601USB/RT2500USB
- Add ids for MGE UPS

13 years ago- Use ieee80211_probe_resp_alloc() to setup probe response template.
Sepherosa Ziehau [Sat, 9 Dec 2006 08:10:04 +0000 (08:10 +0000)]
- Use ieee80211_probe_resp_alloc() to setup probe response template.
- Check the return value of ieee80211_probe_resp_alloc() and
  ieee80211_beacon_alloc().  Since these two functions use MB_DONTWAIT
  to allocate mbuf, it is quite possible they will return NULL.
- Turn on IEEE80211_FC0_VERSION_0 when setup null data and probe request
  templates as what we do in netproto/802_11.
- Don't transmit probe responses injected by netproto/802_11 layer,
  firmware will handle them for us.
- Move acx100's TIM ie template setup into common templates initialization
  routine, so acx111 will get its TIM ie template properly set up.
  This makes firmware add well formatted TIM ies to the end of the beacons
  instead of junked ones.
Reported-by: Marcus Glocker <mglocker@openbsd.org>
- Obey DTIM period set in netproto/802_11, i.e. use ieee80211com.ic_dtim_period
- Reduce the length of Partial Virtual Bitmap in TIM template.

13 years ago- Factor out _ieee80211_probe_resp_alloc() from ieee80211_send_mgmt().
Sepherosa Ziehau [Sat, 9 Dec 2006 07:22:49 +0000 (07:22 +0000)]
- Factor out _ieee80211_probe_resp_alloc() from ieee80211_send_mgmt().
  This function creates frame body of a Probe Response.
- Add ieee80211_probe_resp_alloc(), which utilizes
  _ieee80211_probe_resp_alloc() to create a complete Probe Response
  management frame (i.e. has MAC header).

13 years agoFix compilation warnings when compiling without DEVICE_POLLING.
Sascha Wildner [Sat, 9 Dec 2006 01:44:23 +0000 (01:44 +0000)]
Fix compilation warnings when compiling without DEVICE_POLLING.

13 years agoFix the paths in ata_if.m and the module Makefiles to reflect their
Thomas E. Spanjaard [Fri, 8 Dec 2006 15:09:19 +0000 (15:09 +0000)]
Fix the paths in ata_if.m and the module Makefiles to reflect their
location in our tree, rather than my development tree at home.

Submitted-by: YONETANI Tomokazu <qwht+dfly@les.ath.cx>

13 years agoFix a stack overflow in ifconfig(8).
Sepherosa Ziehau [Fri, 8 Dec 2006 14:25:07 +0000 (14:25 +0000)]
Fix a stack overflow in ifconfig(8).

The stack overflow happens, if "-" is passed as the argument to 'ssid' or
'wepkey' commands.  The offender is ifieee80211.c:get_string()'s "-" special
handling:
...
len = p - buf;
/* The string "-" is treated as the empty string. */
if (!hexstr && len == 1 && buf[0] == '-')
len = 0;
if (len < *lenp)
memset(p, 0, *lenp - len);
...

If the string is "-", the 'p' will be 1 byte beyound 'buf' and 'len' is set to
0.  'len' must be less than '*lenp' here, so memset() will be called.  But the
length, used to clear the buffer, is 1 byte larger the buffer pointed by 'p'

13 years agoExpand the Intel Brand ID table to cover all known brand IDs as mentioned
Thomas E. Spanjaard [Thu, 7 Dec 2006 13:33:04 +0000 (13:33 +0000)]
Expand the Intel Brand ID table to cover all known brand IDs as mentioned
in Intel document AP-485, released September 2006, document number
241618-31, page 42.

13 years agoRevert to zero'ing the objects we pull out of our objcaches ourselves.
Thomas E. Spanjaard [Thu, 7 Dec 2006 12:47:24 +0000 (12:47 +0000)]
Revert to zero'ing the objects we pull out of our objcaches ourselves.
Having it done by objcache_get() incurs too much of a penalty on the hot
path of it, that it isn't warranted, especially considering the fact that
pulling zero'ed objects out of it isn't taking advantage of the objcache
model. However, there are arguments for using it, like growability in
interrupt context (zones can't).

13 years agoFix some of the C++/Java-style comments in ata-usb.c. Adjust the default
Thomas E. Spanjaard [Wed, 6 Dec 2006 20:20:51 +0000 (20:20 +0000)]
Fix some of the C++/Java-style comments in ata-usb.c. Adjust the default
pipe abort to our interface.

These changes allow natausb to compile.

13 years agoAdd a function to retrieve the speed a USB device is running on.
Thomas E. Spanjaard [Wed, 6 Dec 2006 20:14:47 +0000 (20:14 +0000)]
Add a function to retrieve the speed a USB device is running on.

13 years agoPending enlightenment, specify confstr(3) to conform to SUSv3 instead of
Thomas E. Spanjaard [Wed, 6 Dec 2006 16:33:29 +0000 (16:33 +0000)]
Pending enlightenment, specify confstr(3) to conform to SUSv3 instead of
POSIX 1003.2.

13 years agoAdd a SUSv3 symbol to our local mdoc(7) file. A patch has been submitted to
Thomas E. Spanjaard [Wed, 6 Dec 2006 16:27:28 +0000 (16:27 +0000)]
Add a SUSv3 symbol to our local mdoc(7) file. A patch has been submitted to
upstream's doc-syms.

Approved-by: Sascha Wildner <saw@online.de>

13 years agonfe_init() should be called with softc not ifnet
Sepherosa Ziehau [Wed, 6 Dec 2006 13:47:29 +0000 (13:47 +0000)]
nfe_init() should be called with softc not ifnet

13 years agoFix a bug in our confstr(3) implementation, it did not conform to POSIX
Thomas E. Spanjaard [Wed, 6 Dec 2006 11:58:57 +0000 (11:58 +0000)]
Fix a bug in our confstr(3) implementation, it did not conform to POSIX
1003.2. It returned -1 for errors where it should have returned 0.

Also, fix the only consumer of confstr(3) in our tree, getconf(1).

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue393>
Reviewed-by: Victor Balada Diaz <victor@bsdes.net>

13 years agoCorrect a signedness bug which allowed members of the operator
Simon Schubert [Wed, 6 Dec 2006 11:50:06 +0000 (11:50 +0000)]
Correct a signedness bug which allowed members of the operator
group to read kernel memory.

Obtained-from: FreeBSD / FreeBSD-SA-06:25.kmem

13 years agoLocal variables that were improperly named 'errno' must be renamed so as
Matthew Dillon [Tue, 5 Dec 2006 23:31:57 +0000 (23:31 +0000)]
Local variables that were improperly named 'errno' must be renamed so as
not to conflict with libc's errno, when building a virtual kernel.

13 years agoFor the moment conditionally remove the declaration of certain libc
Matthew Dillon [Tue, 5 Dec 2006 23:14:55 +0000 (23:14 +0000)]
For the moment conditionally remove the declaration of certain libc
functions when compiling with _KERNEL_VIRTUAL to avoid conflicts with
replicas in the kernel code.  This allows the virtual kernel source to
include standard libc header files.

Define _KERNEL_VIRTUAL in machine/vkernel/conf/kern.mk.

Begin fleshing out the virtual kernel init sequence.