Commit Graph

78472 Commits

Author SHA1 Message Date
augustss 5d74925cbe Add a new match level, UMATCH_HIGHEST. 2005-11-28 13:14:48 +00:00
thorpej 3a29afcd5e Move DDB files to files.ddb
XXX couple of kgdb references -- clean up later
2005-11-27 22:44:35 +00:00
thorpej ff810990b2 Move UVM files to files.uvm 2005-11-27 22:18:41 +00:00
thorpej 0a23751882 Move 802.11-specific files to files.net80211 2005-11-27 21:14:26 +00:00
thorpej 0ad2439928 Need <sys/queue.h> for userland. Thanks to wa1ter for pointing it out. 2005-11-27 20:56:09 +00:00
tsutsui 64b825a07a Set correct VPN in mips3_wired_enter_page(). 2005-11-27 16:49:56 +00:00
yamt ba38016298 implement splraiseipl() for the following ports.
evbppc, evbmips, evbsh3, hp700, mac68k, vax, x68k.
2005-11-27 14:01:45 +00:00
dsl 9a6cc769c9 If we are compiling with -fno-asynchronous-unwind-tables then also
remove the .eh_frame section from athhal-x86_64-elf.hal.o.
2005-11-27 13:30:27 +00:00
dsl 7baed7ef31 Compile with -fno-asynchronous-unwind-tables so that gcc doesn't generate
the .eh_frame data area that can be used to aid thr generation of stack
traceback - at a cost of a load of bloat!
Reinstate the isp driver.
Remove the unlikely-to-be-needed esh, lmc and ntwoc.
2005-11-27 13:08:50 +00:00
yamt 3afdabd868 make DDB_COMMANDONENTER sysctl. (ddb.commandonenter)
suggested by Christos Zoulas.
2005-11-27 13:05:28 +00:00
yamt 467e5f4980 KNF. convert
if () {
        }
        /*
         * some
         * comments
         */
        else {
        }

to
        if () {
        } else {
                /*
                 * some
                 * comments
                 */
        }
2005-11-27 12:07:24 +00:00
dsl d59e7ef247 Force some multiplies to give a 64 bit result to avoid dirsize being zero
and causing a divide by zero trap later.
Fixes a panic noted in netbsd-help.
2005-11-27 11:45:56 +00:00
jdolecek 62729c9f70 regen - 3ware ATA RAID description/ID fixes 2005-11-27 10:19:03 +00:00
jdolecek 3f4958d066 change the description of the 3ware raid controllers to 'ATA RAID Controller'
rather then 'IDE RAID'

fix the ID of the 9xxx series controller and rename to ATARAID_9k, since
3ware doesn't refer to it using the 'Escalade' family name
2005-11-27 10:17:26 +00:00
thorpej 7d00e1aff3 Overhaul how TTY line disciplines are handled:
- Replace references to linesw[0] with a ttyldisc_default() function
  that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
  ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
  registering those disciplines with the system.  The linesw
  structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
  be held.  ttyldisc_release() releases the reference.  Attempts to
  detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
  that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().
2005-11-27 05:35:52 +00:00
jdolecek 8c602c3844 Add some casts to make this compile on amd64 (and perhaps other LP64
architectures). Part of PR kern/30456.

The binary object file on i386 confirmed to be exactly the same before
and after the change.
2005-11-26 21:33:46 +00:00
jdolecek 9019b1d22c fix aac_print_fib() to compile with AAC_DEBUG; noncompilable "%16D" printf
format replaced by explicit hexadecimal dump of the first 32 bytes of fip->data
2005-11-26 21:29:48 +00:00
thorpej 64ec2ae1b4 Use t_linesw instead of (the non-existent) t_line. 2005-11-26 20:27:51 +00:00
tsutsui d0c28ccd6d Fix typo (FALLTHOUGH -> FALLTHROUGH). From Jeff Ito. 2005-11-26 13:54:18 +00:00
yamt 30e4cf555e remove xen-specific ddb_trap_hook.
you can use DDB_COMMANDONENTER="tr;sh re" to achive the similar behaviour.
2005-11-26 12:19:53 +00:00
yamt ac41acf302 add a new option DDB_COMMANDONENTER.
which can be useful for eg. broken console input.
2005-11-26 12:16:44 +00:00
skrll 535aed4540 Fixes from Steve Woodford:
- add some missing bus_dmamap_sync operations.
	- don't process other interrupts if we get an error/radio off
	  interrupt.
	- improve command handling - sleep against the descriptor instead
	  of the descriptor set.
2005-11-26 07:42:10 +00:00
tsutsui ca2b187449 Use aprint_debug() instead of aprint_normal() for messages
of establishing/disestablishing mace interrupt.
2005-11-26 06:18:40 +00:00
simonb d4b3703a73 Note that M_SUBPROC is only used on sparc/sparc64. 2005-11-26 05:27:08 +00:00
simonb d077ba210f Convert malloc/free of struct ptimers to pools.
Move the ptimer pool to kern_time.c to keep like pools together,
and it wasn't used in kern_proc.c
2005-11-26 05:26:33 +00:00
tsutsui 36f216123b FALLTHROUH -> FALLTHROUGH (from OpenBSD) 2005-11-26 04:11:31 +00:00
thorpej 959eb5dd8e Statically initalize the systrace lock. systrace_init() is now not
needed on NetBSD.  Remove the call from main().
2005-11-25 20:32:32 +00:00
thorpej 6685f0f408 Use a once control to initialize the LKM subsystem on first open. Remove
the lkm_init() call from main().
2005-11-25 20:13:54 +00:00
thorpej 49fc1cb09c Use a once control to initialize the NFS server / client shared data
from nfs_vfs_init() or sys_nfssvc().  Remove the nfs_init() call from
main().
2005-11-25 20:01:38 +00:00
thorpej 9c99eab147 Use a once control to call initialize the 802.11 layer when
ieee80211_ifattach() is called.  "wlan" no longer needs-flag,
and remove the ieee80211_init() call from main().
2005-11-25 17:33:56 +00:00
thorpej 4537c59ffb Add swcrypto 2005-11-25 16:42:55 +00:00
thorpej cfc81086d9 swcr -> swcrypto 2005-11-25 16:41:31 +00:00
thorpej 7385cdd346 "pseudo-device crypto" really refers to the /dev/crypto API to the
opencrypto framework, not the framework itself.  Update the comment
accordingly.
2005-11-25 16:35:11 +00:00
thorpej 751f32db24 Add "pseudo-device swcr" (commented out if "pseudo-device crypto" is also
commented out).
2005-11-25 16:30:23 +00:00
thorpej 7bc6d90c9d - De-couple the software crypto implementation from the rest of the
framework.  There is no need to waste the space if you are only using
  algoritms provided by hardware accelerators.  To get the software
  implementations, add "pseudo-device swcr" to your kernel config.
- Lazily initialize the opencrypto framework when crypto drivers
  (either hardware or swcr) register themselves with the framework.
2005-11-25 16:16:46 +00:00
tsutsui f7e281c38a Remove unnecessary byteswap code so that bge(4) should work
at least on macppc.
2005-11-25 15:30:34 +00:00
simonb 35c06e774b More KNF. 2005-11-25 14:10:35 +00:00
simonb f550ec6c5a Include <sys/systm.h> if we use printf(), instead of relying on some
other random header pulling <sys/systm.h> in for us.
2005-11-25 13:55:14 +00:00
tsutsui 648f74397a No need to include <machine/vmparam.h> here. 2005-11-25 13:37:58 +00:00
elad d51a16a060 Remove few no longer needed XXX comments about fsid/fileid being
not the same type as dev_t/ino_t.
2005-11-25 12:02:09 +00:00
simonb 29d9af43d0 KNF. 2005-11-25 11:50:55 +00:00
hannken 1ea5b5631c Make it compile on archs without __HAVE_RAS. 2005-11-25 11:29:48 +00:00
dsl b184d489b2 We don't need 'le' here, I'm not sure amd64 GENERIC deserves it either. 2005-11-24 20:06:53 +00:00
thorpej da4c72ac64 Make a couple of functions static. 2005-11-24 18:36:50 +00:00
martin 328b263349 Use %zd for size_t. Noticed by Kurt Schreiner on current-users. 2005-11-24 13:47:46 +00:00
fredb c3ec7554f8 Initialize "mapped" before any of the "goto"'s, so we're not testing an
uninitialized variable at "bad:".
2005-11-24 13:34:55 +00:00
he 3c33ccf011 Remove declaration of a variable which is no longer used. 2005-11-24 13:33:33 +00:00
yamt bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
yamt 6eaa98c111 use .d mechanism for kernel as well. 2005-11-24 13:01:42 +00:00
dbj 8000972bbe . Have dbsym explicitly suggest increasing SYMTAB_SPACE when
an overflow occurs.
   . Make this error a fatal build time error
   . Move the support for dbsym into the MI Makefile.kern.inc,
     conditional upon the SYMTAB_SPACE option being defined in
     the kernel config file.
2005-11-24 12:54:29 +00:00
he 9476e5349e Make sure the file ends with a newline, so the port builds again. 2005-11-24 12:11:32 +00:00
dyoung 7e173af81d Put the microsecond timestamp in the radiotap header for received
frames.
2005-11-24 09:58:39 +00:00
jonathan 43255e3f4e Add TSO support to bge(4) for PCI-Express bge devices, which are
shipped from the factory with TSO-capable firmware.  The TSO support
here may also work on 5705 chips, but that is (so far) untested.

TSO support written after careful reading of the Linux tg3 driver,
and (after attempting to deconstruct the cut-and-paste mess therein)
very close reading of the Broadcom-supplied Linux driver, particularly
the building of Tx-DMA buffer descriptors (bds). The TSO code herein was
then rewritten from scratch, circa 4am local time, October 27 2005.
(In other words: this is 4am software; caveat emptor.)

Other magic register settings in this patch are required; without
them, attepmting to use TSO locks up the chip. The required register
settings were extracted from the cited Linux drivers.

Note that TSO-capable firmware for the 5703/5704 is distributed in
non-GPL form with the aforementioned Linux drivers. Once the 5705 case
is debugged, (particularly the pseudo-header checksum precalculation
flagged with an XXX) downloading that TSO-capable firmware to the
5703/5704 should, in principle, enable TSO support on all but the
original bcm5700 (I forget if the 5701 can support TSO, or not).

Note also that the ``hard case '' of IP/TCP headers spanning more than
one mbuf is not handled; I haven't been able to trigger it.  In any
case, since TSO applies only to packets generated by the local TCP,
and our TCP always leaves space for TCP headers and a normal IP
header, TSO on an IP/TCP header spanning multiple headers can only
arise due to insertion of IP options. I beleive that we are clearly
better off outlawing that case, and requiring ip_insertoptions()
to  pull-up TCP headers on any packets with M_CSUM_TSOv4 set.

As far as I know, bge hardwar does not support TSO for IPv6.
2005-11-24 03:27:59 +00:00
manu 2697809839 To awake all processes sleeping on a futex, set maximum value to 0x7fffffff
instead of -1 (0xffffffff): the value is signed...
2005-11-23 22:38:46 +00:00
manu c06b3dd8a8 Remove a debug printf 2005-11-23 22:23:30 +00:00
christos dcc61c764f Fix 64 bit truncation problem reported by http://www.securitylab.net 2005-11-23 22:00:32 +00:00
skrll 3b6e301485 Fix the handling of ENETRESET in iwi_ioctl.
This fixes PR 32143
2005-11-23 20:35:54 +00:00
skrll 0b25d36d6a Update for recent changes and after tweaking the command to generate
this:

	- use UTC
	- only list the changes to HEAD.
2005-11-23 20:29:08 +00:00
skrll d40d6be769 Correct a bpf tap. 2005-11-23 20:08:29 +00:00
riz 752c0a4023 Special-case the Linksys EG1032 cards using PCI subsystem ID; rev. 2 uses
the sk(4) driver, while rev. 3 needs re(4).

Mostly from brad@openbsd.
2005-11-23 18:56:22 +00:00
manu 23cf341ea0 - Add Linux tkill and tgkill (partial emulation).
- Fix getrlimit on amd64
2005-11-23 16:14:57 +00:00
nonaka 292989c8b6 In decr_intr(), update lasttb only when clock interrupt is not masked.
(sync with macppc/macppc/clock.c: rev.1.11 -> 1.12)
2005-11-23 13:00:51 +00:00
tron 019491bca2 Make this compile if UHID_DEBUG is not defined. 2005-11-23 10:03:56 +00:00
yamt 11aa556068 fix a typo in a comment. 2005-11-23 09:43:37 +00:00
augustss 48164bddda If a mouse has both a wheel and a Z direction we report both.
XXX Due to tradition the wheel is reported as the Z direction (and the Z
direction as W).
Now Apple's Mighty Mouse is fully supported, except the X11 mouse driver
doesn't know what to do with the new coordinate.
2005-11-23 09:41:28 +00:00
augustss 5b71c2bf99 Some devices provide more than three (X, Y, and Z) "directions". So add
a W "coordinate" that can be used for these.
This changes the type of wsmouse_input().  To avoid changing a lot of drivers
a compatibilty #define is provided.  Maybe changing all drivers would have
been better?
2005-11-23 09:38:02 +00:00
augustss f0b7793c4b Look for a wheel before looking for a Z dir. This makes Apple's
Mightymouse work.
2005-11-23 09:04:20 +00:00
augustss cf1de1bda0 Normally a ugen device only attaches if no other driver wants the device.
Add the ability to force ugen to attach with very high priority if "flags 1"
is specified.  This can be used with the vendor and product locators to
force ugen to be used for certain devices.
Similarly, uhid only attaches if no other HID driver (ums or ukbd) wants it.
Again, "flags 1" will force uhid to attach anyway.
2005-11-23 08:54:47 +00:00
tsutsui 38893d95db - use -mmemcpy (it saves ~12kbytes)
- fix ident
2005-11-23 08:20:45 +00:00
tsutsui 1fd2caa23d Add njs* at pci, which works fine on my O2. 2005-11-23 08:14:50 +00:00
dyoung 3d578b96da In adhoc mode, mark the "BSS" node's (ic->ic_bss) change of BSSID.
If the operator did not configure a "desired BSSID," then we simply
adopt the BSS node's new BSSID.  If the operator configured a
"desired BSSID," the new BSSID is (probably) not the desired one,
so start scanning for it.

Note that a change of BSSID will occur as two ad hoc networks merge.
2005-11-23 04:32:12 +00:00
dyoung 5e8176f5d5 In ieee80211_init_neighbor, delete unsupported rates from an adhoc
node.  It's the right thing to do, but it is of pressing importance
because SampleRate's ath_rate_ctl_reset() will convert an unsupported
rate to an invalid rate-index of 0xff, and pass the index to
ath_hal_computetxtime().  ath_hal_computetxtime() does not tolerate
an invalid index; the CPU traps a divide-by-zero fault in
ath_hal_computetxtime().
2005-11-23 04:24:00 +00:00
dyoung 63d8fb2cb6 Miscellaneous Realtek RTL8180L driver improvements:
1 Added new sysctl controls for debugging.

2 Improve detection & support for hardware WEP.

3 Revamp handling of transmit descriptor rings.

4 Reliably IFF_OACTIVE when transmit descriptors are available, to
  stop the transmit section of the driver from freezing up.

5 Fix beacon transmission in adhoc and hostap modes.  XXX There is
  a wart in hostap mode, where beacons are transmitted at 1/2 the
  correct rate.  Load beacon descriptors when the RTW_INTR_BINT
  interrupt arrives; schedule RTW_INTR_BINT 1ms ahead of the target
  beacon time.

6 Recover more gracefully from tx/rx errors: avoid
  transmitter/receiver/chip resets.  Try to re-synchronize software
  state with hardware state---e.g., load next descriptor pointer
  from hardware.

7 Activate the transmit watchdog timer for beacons as well as other
  packets.

8 Introduce rtw_idle() that waits for transmit DMA to finish; call
  it before resetting the transmitter.
2005-11-23 04:12:33 +00:00
dyoung 5e4572a5a8 Misc. bug fixes:
1 Reset both IFF_OACTIVE and the transmit watchdog timer in
  appropriate places to avoid both wedging the transmit section
  and spurious transmit timeouts.

2 Reset IFF_ALLMULTI at the top of atw_filter_setup so that the
  NIC will filter the multicast packets we are not interested in
  after we come out of promiscuous mode.

3 In atw_txdrain, count drained transmit descriptors to avoid
  descriptor exhaustion.
2005-11-23 01:11:23 +00:00
dyoung 4e254e89e9 Non-functional change: a missing '}' in an #ifdef __FreeBSD__
section confuses ctags(1), so I add the '}'.
2005-11-23 01:04:37 +00:00
rpaulo 8708c3d6c2 regen 2005-11-22 22:57:45 +00:00
rpaulo eed63d4b44 Fix entry for TI FlashMedia Controller. 2005-11-22 22:55:30 +00:00
macallan 6862f6384f uncomment options BLINK, removed uwe's todo comment. 2005-11-22 20:16:23 +00:00
macallan 321e779911 add support for options BLINK 2005-11-22 20:13:34 +00:00
yamt d3ac0a8b69 revert rev.1.72 as it isn't necessary. 2005-11-22 17:52:38 +00:00
yamt 73ad976942 simplify memory layout. 2005-11-22 06:18:01 +00:00
yamt b0cf681a01 - reduce number of linear search per rpc.
- coalesce mount_netexport_pair into netexport.
2005-11-22 04:44:29 +00:00
bouyer 737cf9cfa9 Remove commented out options I586.
As it's i686-only, optimize for i686.
2005-11-21 22:16:59 +00:00
bouyer c59d1285cc Sync with i386/conf/GENERIC:
- add a buch of PCI storage devices
- add firewire devices
- add some missing PCI network devices
- add serial and parallel PCI adapters
- add lpt0 at isa
- add com1 at isa
  com0 not added for the benefit of serial console users (it will conflicts
  with the Xen kernel).
XXX this means that setups with serial console on com1 will now break with the
default kernel.
Use userconf(4) (add -c to kernel command line) or change your setup to
com0 instead (most bios allows arbitrary mappings of com ports)
2005-11-21 22:15:13 +00:00
martin 17b12c5ad7 This driver does only access the bus_space_tag via bus_space_* functions,
so there is no need to map it linear. From Garrett D'Amore in
PR kern/32137.
2005-11-21 20:25:15 +00:00
nonaka 970e300a95 In decr_intr(), update lasttb only when clock interrupt is not masked.
(sync with macppc/macppc/clock.c: rev.1.11 -> 1.12)
2005-11-21 15:04:52 +00:00
augustss 4bc39eaf86 Make the unused ehci_dump() function non-static. 2005-11-21 10:15:41 +00:00
yamt f1bf6425bc use c99 initializers for proct. 2005-11-21 09:39:02 +00:00
augustss e49945ef23 Print an error message if we cannot located the legacy capability. 2005-11-20 18:44:56 +00:00
augustss d801565e9b Make debug printout a little nicer. 2005-11-20 18:42:43 +00:00
augustss 8e55eef7c0 Add some definitions for the extended capability registers. 2005-11-20 18:36:20 +00:00
augustss 3fe79ce029 Go through the prescribed process to get ownership of the controller from
BIOS before we start using it.
This seems to fix the problems some people have been experiencing with
keyboards not working.
2005-11-20 14:46:23 +00:00
augustss 992297a008 Keep a flag for each port that keeps track of if the port has been reset
instead of having one flag for the controller.

Also, don't try to modify read-only power bits if the controller doesn't
support power cobntrol.
2005-11-20 14:27:25 +00:00
dyoung cd662cea95 Set the "special" struct ieee80211_channel pointer, IEEE80211_CHAN_ANYC,
to 0x1 instead of 0xffff, so the kernel will trap accidental
dereferences.  I don't set IEEE80211_CHAN_ANYC to NULL because it
may have a distinct meaning in net80211.  Thanks to Steve Woodford
for pointing out that 0xffff may be a valid kernel memory address
on x86.
2005-11-20 10:16:51 +00:00
dyoung 461cd4dbb5 Repair adhoc mode.
1 Complete initialization of "faked up" ieee80211_nodes,
          whose capabilities and other fields are wrong, when we
          first receive a beacon or probe response from the
          corresponding neighbor.  This entails factoring
          ieee80211_init_neighbor out of ieee80211_add_neighbor.

        2 In adhoc mode, ic->ic_bss is present in the neighbors
          table, ic->ic_sta, and it is not necessarily the wrong
          node on which to mark statistics for a rx'd packet.  Do
          not reject ic->ic_bss and fake-up a new node without
          comparing its MAC address with the address of the sender
          in the rx'd packet.  This fixes a memory leak.
2005-11-20 10:04:21 +00:00
dyoung 2bfe9acea8 Mark ieee80211_nodes with their node-table membership: scan table
or client/neighbor table.

While I'm here, assert that ieee80211_getmgtframe returns a frame
that starts on a 32-bit boundary.
2005-11-20 09:39:04 +00:00
tsutsui 8d456d84c1 Fix page size values passed to arc_wired_enter_page() for NEC-R96 and Tyne.
Detected by gxemul. (Wow, gxemul is also trying to emulate these machines!)
2005-11-20 09:21:36 +00:00
yamt 6e0ca2f323 fix bugs introduced by the recent exports list rototill.
- mountd_set_exports_list: don't discard error.
- nfs_update_exports_30: check the correct flag.
2005-11-20 06:23:44 +00:00
tsutsui 6e53249d84 Include <dev/ic/i8042reg.h> for MI pckbc rather than <machine/kbdreg.h>. 2005-11-20 04:38:11 +00:00
riz 8b1bf051e2 From FreeBSD (appropriate pieces of revs 1.90 and 1.92):
Only clear the IFF_OACTIVE flag when we have a chance of being able
to queue a packet to the hardware, instead of when the hardware queue
is empty, and fix up handling and prodding of the tx.

These fixes clear up an occasional "sk0: watchdog timeout" from the
on-board ethernet on my Asus A8V motherboard.

OK christos@
2005-11-19 21:45:50 +00:00