Commit Graph

81751 Commits

Author SHA1 Message Date
msaitoh
ccf7001ac2 fix TX_COLLISION_DISTANCE_FDX and TX_COLLISION_DISTANCE_HDX (swapped).
add some register definitions (EERD, EEWR).
2006-06-10 08:01:31 +00:00
tsutsui
261274d592 Put newline if there is no input on Boot: prompt. 2006-06-10 07:49:29 +00:00
rjs
920cada8e2 Add opt_multiprocessor.h. 2006-06-10 06:38:07 +00:00
christos
d5ba7564d8 stack police: don't allocate statvfs on the stack. 2006-06-09 23:24:24 +00:00
kardel
54cd6fafa8 re-order initialization sequence to have real counters available during autoconfig 2006-06-09 22:47:56 +00:00
christos
f6ad6a2699 stack police: Fix the biggest offender with ~4K stack, by allocating the
buffer in the softc.
2006-06-09 21:58:57 +00:00
christos
7b128daa3b stack police: Introduce an opl_match function that uses malloc instead of
allocating ~2K of softc on the stack.
2006-06-09 21:55:33 +00:00
christos
d13a9159e3 stack police: don't allocate statvfs on the stack. 2006-06-09 21:41:14 +00:00
christos
f96931bf10 stack police: Don't allocate large buffers on the stack for I/O. Put the
buffer in the softc instead.
2006-06-09 21:34:19 +00:00
christos
de34bda8ec stack police: don't allocate usb_events on the stack, malloc them directly.
this saves stack and an extra copy.
2006-06-09 21:33:42 +00:00
christos
c10d68c29c stack police: Don't allocate 1k on the stack, only use malloc when we need to. 2006-06-09 21:33:01 +00:00
aymeric
11fb090059 in the softintr-with-si_callbacks framework, don't use add_sicallback()
everytime softintr_schedule() is called. They don't have the same semantics
when called multiple times before the callback is triggered.
Should avoid huge numbers of si_callbacks being created when a machine is
overloaded.
XXX the fix certainly applies to the atari port, too.
2006-06-09 21:29:39 +00:00
drochner
c87a7b61b9 fix obvious botch in radiotap header alignment (untested) 2006-06-09 19:17:46 +00:00
rpaulo
f5a468f537 Revert previous. Wrong way of doing things... 2006-06-09 19:13:17 +00:00
gdamore
a8d4d1e86c Add AR531X_SYSREG_WDOG_TIMER register. (Forgot to commit this earlier.) 2006-06-09 18:35:42 +00:00
tsutsui
e684286988 Fix a botch on ANSIfy. 2006-06-09 18:11:58 +00:00
kent
a70f7f188d - print audio format only when the format is changed
- print the name of STAC9220 codec
2006-06-09 16:56:30 +00:00
kent
71842e07b1 shorten audio format message 2006-06-09 16:26:58 +00:00
garbled
76847dcb92 Completely rework how we look up PCI interrupts on prep:
1) Rather than build an array of the pci->intr mappings, build a proplib
tree.
2) add a SIMPLEQ of device properties to the pci_chipset_tag to hold the
proplib trees of each bus.
3) Move the interrupt routing code from pci_conf_interrupt to pci_map_intr()
4) Deal properly with non-native PCI bridge chips that are not recognized
by the prep firmware, and therefore are not noted in the residual data.

The major win of this restructure is #4. Hopefully I haven't broken
anything. Tested on a 7248-100, 7043-140 and 7024-E20.
2006-06-09 01:19:10 +00:00
nonaka
a1a022c748 Added more register define. 2006-06-08 23:27:47 +00:00
gdamore
c76dd4fa65 KNR->KNF. :-) 2006-06-08 22:47:26 +00:00
gdamore
ef3b8c3cc3 Print bus_addr_t using PRIx64 (casting to uint64_t), which fixes builds
on 32-bit sparc (which have 64-bit bus_addr_t, but only 32-bit pointers.)
2006-06-08 22:42:24 +00:00
hubertf
b6eda27950 Rename XEN kernel config files to be more consistent:
INSTALL_XEN3_U        -> INSTALL_XEN3_DOMU
  INSTALL_XENU          -> INSTALL_XEN2_DOMU
  XEN0                  -> XEN2_DOM0
  XEN3_U                -> XEN3_DOMU
  XENU                  -> XEN2_DOMU

OK'd by bouyer@
2006-06-08 22:17:07 +00:00
simonb
dfeb2fa259 Unwrap a not-too-long line. 2006-06-08 21:04:16 +00:00
rpaulo
69ae4b1781 Bring the following change from OpenBSD:
Keep track of the average RSSI using an Exponential Moving Average (EMA).
  Use it to dynamically tune radio receive sensitivity.

  The idea is simple:
  - increase sensitivity when the RSSI is bad to optimize throughput on
    long distance to the AP, and
  - decrease sensitivity when the RSSI is good to reduce noise level and
    optimize throughput on short distance to the AP

  The EMA allows to smooth RSSI variations so we don't end up changing the
  sensitivity too frequently.  We check if it would be worth updating the
  sensitivity every one second.
  RSSI thresholds were taken from the Ralink Tech. Linux driver.
2006-06-08 20:56:41 +00:00
martin
d8c7f94e0e Implement bus_space_*_stream_* methods for sgimips - so that we can use the
atheros wlan driver. Thanks to Izumi Tsutsui for lots of input. All errors,
as usualy, are mine though.
2006-06-08 19:29:16 +00:00
rjs
f001fdd86f Regen for Nokia CA42. 2006-06-08 17:57:14 +00:00
rjs
9ade422744 Add vendor id for Nokia.
Add product id for CA42 mobile phone cable.
2006-06-08 17:56:20 +00:00
drochner
698fb4fb6c make the public declaration of "hardclock_ticks" signed again; other
code (kernel timeout/callout) does comparisions with it
2006-06-08 17:23:11 +00:00
rpaulo
41eefa78ba Add cleandir and clean fake targets. I should find a better way to do this. 2006-06-08 15:22:03 +00:00
rpaulo
24ba5ad5fd Rename sta variable. Pointed out by Havard Eidnes and Juergen Hannken-Illjes. 2006-06-08 13:00:35 +00:00
hannken
cbaa71d5f4 Add missing brace to make it compile again. 2006-06-08 10:56:49 +00:00
he
bc5f506d49 Get rid of another instance of an lvalue cast. 2006-06-08 08:18:13 +00:00
he
6f8829a0d2 Get rid of lvalue casts by either using an extra temporary variable
or by using the appropriate casts in the first place.
2006-06-08 07:03:11 +00:00
gdamore
391d67720b Add support for AR5312 on-chip watchdog.
While we're here, fix mainbus so that mainbus doesn't complain about
unconfigured devices, and use the *atheros* mainbus instead of alchemy (doh!)
2006-06-08 06:15:59 +00:00
xtraeme
5ff5dfea17 Adapt to timecounters. 2006-06-08 05:00:25 +00:00
freza
a88dd66a11 Advance queue indices properly instead of silently rewriting
sysmon_power_event_queue[0] all the time.

OK by thorpej@
2006-06-08 04:23:34 +00:00
kent
08c434e746 add 23 ICH8 devices.
http://download.intel.com/design/chipsets/specupdt/31305701.pdf

No regen follows because no one refers them.
2006-06-08 02:34:28 +00:00
rpaulo
e84fae1d86 Add a fake includes target. 2006-06-08 00:21:54 +00:00
rpaulo
7145d9ddba Descend into microcode. 2006-06-08 00:12:50 +00:00
christos
c946f0d4db fix timecounter fallout 2006-06-07 23:58:03 +00:00
rpaulo
943d263332 Descend into ral. 2006-06-07 23:30:17 +00:00
kardel
e11bb150ed avoid shadowing time while it still exists 2006-06-07 23:22:52 +00:00
kardel
d377d3f58a no timecounters yet - provide a local types.h 2006-06-07 22:45:21 +00:00
kardel
9af3ab6763 add timecounter support (from branch simonb-timecounters) 2006-06-07 22:41:09 +00:00
kardel
09b51ec920 convert to timecounters (from branch simonb-timecounters) 2006-06-07 22:37:14 +00:00
kardel
de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
rpaulo
95b0a57069 Definitions needed by subsequent Makefiles to install the firmware. 2006-06-07 19:54:04 +00:00
rpaulo
a484b73c46 Refactor this and use bsd.files.mk instead. 2006-06-07 19:52:49 +00:00
rpaulo
6fe7f65c21 Define proginstall (empty) and afterinstall (to install the firmware). 2006-06-07 19:14:37 +00:00
rpaulo
9a7119856d License from Ralink. 2006-06-07 18:58:27 +00:00
smb
a5b05fc8d6 Increase the size of UMODEMIBUFSIZE and UMODEMOBUFSIZE. These are the
USB input and output buffer sizes; the previous values were fine for
dialup modems, but seriously limited the speed of some high-speed
wireless devices that appear to the system as a umodem.
2006-06-07 18:03:00 +00:00
gdamore
4aa924bc70 For cases where AH_REGOPS_FUNC is not defined, the bus tag is not defined.
In these cases, passing NULL for it solves a problem on AMD64 where the bus
tag is an integer rather than uintptr_t.  (I.e. fix the cast warning on
amd64.)
2006-06-07 17:07:33 +00:00
nakayama
dc8650e97c Add void cast to functions whose return values are ignored. 2006-06-07 15:34:47 +00:00
nakayama
abcd591292 Make it compile on sparc64. 2006-06-07 15:30:48 +00:00
rpaulo
d83bbab446 Fix a comment for ral. 2006-06-07 15:24:12 +00:00
kent
0b0ab7efe7 * move mixer functions from azalia.c to azalia_codec.c, and
rename them like azalia_mixer_foo() to generic_mixer_foo()

* enable codec-specific code to hook any mixer operations such
as creating mixer items, or special handling for a specific
item.

* provide a custom mixer table specific to ALC260
* provide a custom mixer table specific to Fujitsu LOOX
2006-06-07 15:23:59 +00:00
martin
77947573d1 Now that rt2661.c uses firmware_*, ral needs attribute firmload. 2006-06-07 12:51:40 +00:00
he
d3056ebc9a Get rid of an instance of lvalue casts by using a pair of helper vars. 2006-06-07 11:29:56 +00:00
he
9bc6aa0193 Get rid of LHS casts by introducing a pair of local helper variables. 2006-06-07 10:07:03 +00:00
dogcow
43d83b7844 add the dev/ic/ files for ral(4). 2006-06-07 08:06:56 +00:00
dogcow
938bded698 revert my earlier commit - the /ic/ stuff should go in src/sys/conf/files,
not here.
2006-06-07 08:05:53 +00:00
gdamore
1a366dbe11 Add missing file (forgot to commit this) for AR531X systems. 2006-06-07 06:43:36 +00:00
dogcow
a48d248fbb ral_pci was missing the /ic/ files. 2006-06-07 03:39:43 +00:00
rpaulo
65369074fe regen 2006-06-06 21:01:04 +00:00
rpaulo
431dc1da44 Attachment framework for the rt2561.c and rt2661.c drivers.
From OpenBSD.
2006-06-06 21:00:41 +00:00
rpaulo
9fc70013c7 struct ifnet must be inside sc_ec. Fixes panics on detachment. 2006-06-06 20:48:27 +00:00
christos
74653dfe15 Make this work with objdirs. 2006-06-06 15:41:50 +00:00
rjs
4037bbaa45 Remove __P. 2006-06-06 08:58:09 +00:00
tron
6cfd8c69e5 Regen. 2006-06-06 08:54:27 +00:00
tron
132db79f9b Resolve name conflict between Sun Type 6 and Type 7 USB keyboard. 2006-06-06 08:53:58 +00:00
grant
88b1c2383e regen. 2006-06-06 06:21:29 +00:00
grant
ca33211023 add Sun type 7 keyboard. 2006-06-06 06:17:59 +00:00
gdamore
a4f593555e Kernel config for the AP30, which includes the WLAN support for the AR5312.
I will probably delete the generic AR531X config later, because frankly its
pretty useless without the board-specific HALs.
2006-06-06 05:17:22 +00:00
rpaulo
355b4c7b38 Oops, missing arg to firmware_free. 2006-06-06 01:18:25 +00:00
martin
daed41efa2 Add D-Link DWL-610 2006-06-05 21:09:29 +00:00
martin
b8a3ae290a Regen (DWL-610 added) 2006-06-05 21:08:51 +00:00
martin
a2e2668a27 Add D-Link Air DWL-610 2006-06-05 21:08:18 +00:00
bouyer
02ace2fe6c Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.
2006-06-05 18:22:23 +00:00
rpaulo
c54cf300da Don't leak memory on error. 2006-06-05 17:00:50 +00:00
rpaulo
7a35a95fe6 Add missing firmware_close(). 2006-06-05 16:59:41 +00:00
msaitoh
52532c99c9 add support 82546GB_PCIE(PRO/100MT), 82541ER_LOM, 82547EI_MOBILE,
82571EB_COPPER, 82571EB_FIBER, 82572EI_COPPER, 82572EI_FIBER
and 82572EI(PRO/1000PT)

TODO: add i82573 support
2006-06-05 16:06:10 +00:00
xtraeme
045e0f2d3d it_check(): check values from IT_RES48 and IT_RES52, if both are default
values specified by the chip, continue attaching the driver (previously
only checking IT_RES48 was enough and IT_RES52 was ignored).
2006-06-05 15:59:47 +00:00
msaitoh
5d3a49100a regen 2006-06-05 15:58:55 +00:00
msaitoh
f80e45c34c add 82541ER_LOM, 82547EI_MOBILE, 82546GB_PCIE(PRO/100MT),
82546GB_QUAD_COPPER(PRO/1000MT QP) and 82572EI(PRO/1000PT).
2006-06-05 15:58:15 +00:00
rpaulo
9f668d8be9 Call to kauth_cred_getgroups() should use kauth_cred_ngroups() result,
not the size of the array.
2006-06-05 13:25:28 +00:00
rpaulo
abd28afaa8 pcr_ngroups should be uint16_t. 2006-06-05 13:24:22 +00:00
gdamore
b38b3d39ad Import new HAL 0.9.17.2. Approved by sam@
New HAL includes some driver changes to register accesses.
Adds support for WLAN devices on AR5312 family devices.
Adds support 32-bit SPARC ath devices (untested).
ath enabled in SPARC64 GENERIC builds.
This HAL is tested and known to work for i386 PCI devices, SPARC64 PCI devices,
and AR5312 WiSoC devices.  MIPS PCI devices appear to be busted (possibly only
on Alchemy hardware, unconfirmed), and cardbus support is untested due to
lack of test hardware.

Please report any new problems with this import to garrett@.
2006-06-05 05:14:37 +00:00
rpaulo
76c6161871 Driver for Ralink chipsets RT2460A, RT2560, RT2561S, RT2561 and RT2661
from FreeBSD/OpenBSD that supersedes ral*.[ch].

Not yet enabled because I don't have a CardBus controller to test and it
will most likely crash during detach.

I tried to include our modifications, but if something is missing please
tell me or add it.

Special thanks to minipci.biz for the donation of one PCI RT2661 and
one CardBus RT2661.
2006-06-04 20:38:06 +00:00
rpaulo
a49baeafe7 Generated firmware files for Ralink chipsets 2561, 2561s, 2661. 2006-06-04 20:32:53 +00:00
rpaulo
e2c5d8e671 Framework to build Ralink wireless cards binary firmwares based on
Ralink distributed microcode.h.

From OpenBSD.
2006-06-04 20:30:17 +00:00
christos
52514196f1 save another 1K on the stack. 2006-06-04 19:38:32 +00:00
christos
03701dc24f Don't allocate 1K on the stack. 2006-06-04 19:34:16 +00:00
christos
4de2a1c70e Don't allocate 2K on the stack... 2006-06-04 19:27:59 +00:00
christos
65a5eb3712 Grr, change the code so that it compiles with gcc-3. It was ok with gcc-4. 2006-06-04 16:44:08 +00:00
perry
5da686584b convert a tab to a space so commenting out of piixpm is cleaner 2006-06-04 15:48:08 +00:00
perry
18e9385d27 Wrap the UPAGES definition with an #ifndef so that (in emergencies) it
can be put into a kernel config file.

Stack overflows should be fixed, not patched around, but this makes it
easier to test if one is causing a panic.
2006-06-04 15:41:53 +00:00
itohy
90ed6f0bd7 Make compile by gcc 2. 2006-06-04 11:49:02 +00:00
mrg
77b9fb02b9 undef memset before calling it with a destination address of 0.
GCC4.1 complains about this when using the builtin, so force
this to call the real function normally.
2006-06-04 07:32:20 +00:00
simonb
180fec2bb9 Adjust asm constraints for more pickier gcc4. 2006-06-03 23:58:48 +00:00
christos
95e13e63bd Introduce SA_NOKERNINFO, a flag for SIGINFO not to print kernel messages. 2006-06-03 18:18:26 +00:00
christos
2a606d89a3 remove static decl. 2006-06-03 15:35:29 +00:00
ragge
cb7f51a59d Add IFM_10G_SR and IFM_10G_CX4, to keep in sync with FreeBSD.
Kindly requested by Gleb Smirnoff at FreeBSD.
2006-06-03 12:43:28 +00:00
rpaulo
8420a4bdc7 Sean Boudreau: The eeprom bits are shifted out in host order.
Also present in the upcoming rt2560.c driver.
2006-06-03 12:02:51 +00:00
dogcow
5e988d30ba include <netccitt/x25.h> for the SIOCSIFCONF_X25 case in in6_control. 2006-06-03 06:56:43 +00:00
christos
26deb5021a Fix typo. 2006-06-03 01:43:47 +00:00
christos
7353ed65a9 add 2 more ioctls that use struct ifaddr *, and remove debugging printfs
I accidentally committed.
2006-06-03 01:32:52 +00:00
christos
404d15411e This is ugly, but it is the simplest fix to avoid calling in the default
case:

    <driver>_ioctl(ifp, SIOCSIFADDR, struct ifreq *)

where it should be calling:

    <driver>_ioctl(ifp, SIOCSIFADDR, struct ifaddr *)

and "Bad Things Happen (TM)"

Returning an error is good enough because none of the drivers handle INET6.

The problem here is that handling SIOCSIFADDR is a kludge. The ioctl gets
passed a struct ifreq * from userland, but then in the control routines
SIOCSIFADDR is handled "specially", and we call:

	ifp->if_ioctl(ifp, SIOCSIFADDR, struct ifaddr *)

directly with the ifaddr we computed for that interface. It would be nice
if we called the ioctl routine if the original struct ifreq, and computed
the ifaddr, or passed it directly. This way all the ioctls would be treated
the same way, and we would not have the problem of pointer overloading.
2006-06-03 01:04:29 +00:00
mrg
db19e89e04 remove support for building (with) GCC 2.95. also:
- always install <stdbool.h>
- don't generate a fake one for vax / gettext.
2006-06-02 22:16:18 +00:00
mrg
475665f3ba remove GCC2 support 2006-06-02 19:46:24 +00:00
mrg
c8fffd8947 remove GCC2 support. 2006-06-02 19:45:56 +00:00
garbled
b18c709a99 Make the space for the ramdisk slightly larger. 2006-06-01 21:16:05 +00:00
bouyer
19d40b6b73 -mcpu=i686 is implied by -march=i686 and gcc4 doens't like -mcpu=i686 so
remove it. From Sergey Lungu on current-users.
2006-06-01 19:39:59 +00:00
nathanw
9822b848e6 Change return type of sdgetdisklabel() from void to int; return an error
if readdisklabel() returned an error.

sdopen(): Return an error if sdgetdisklabel() returns an error. This prevents
a crash in spec_open() (and possibly elsewhere) if a sd device is detached in
the middle of sdopen().
2006-06-01 15:53:09 +00:00
tsutsui
88032f5d39 Sync with hpcsh/bus_space.c rev 1.12:
> Use C99 syntax for designated initializers.
> Semicolon syntax is a gcc extension and has been obsolete since gcc 2.5.
2006-06-01 14:18:41 +00:00
jonathan
6e42605bf4 Rework bge_reset() to more closely follow the Broadcom-supplied Linux driver:
1. Instead of enabling the buffer manager hardware-FSM only on
pre-5705 devices, initialize the buffer manager on all bge devices.
Modelled on the Broadcom-authored Linux driver.

2. Instead of enabling the memory arbiter hardware-FSM only on
pre-5705 devices, initialize the memory arbiter on all bge devices.
Modelled on the Broadcom-authored Linux driver.

3. Ditto the second copy of code which enables the memory arbiter.
Also, add an XXX asking, why taunt the chip this way a second time?
(The most plausible explanatoin is that enabling the memory arbiter
twice is my own darn fault, likely a cut-and-paste glitch I made many
moons ago, when re-ordering hardware enables to match the Linux drivers.)
2006-06-01 02:20:54 +00:00
jonathan
e8c37e204d Fix a minor thinko in ascertaining whether or not a bge(4) device is
attached via PCI-Express:

The previous code first checked that the bge ASIC-revision matched the
5750 ASIC-revisoin (the bcm5721 has the same ASIC revision). However, the
bcm5752 is also a PCI-Express device, but has a different ASIC revision.
Thus, we were setting sc->bge_pcie to zero for bcm5752s, which in turn
causes bge_reset() to not perform required PCI-Express setup.

The test for a 5750 ASIC revision may (or may not) have been carried
across from the FreeBSD bge(4) driver. FreeBSD's bge(4) does not
properly detect or handle post-5750 bge devices. Instead, FreeBSD's
bge(4) keeps a sofc copy of the ASIC revision, and for post-5750
devices (5752, 5714, ...) overwrites that softc copy of the
ASIC-revision with the 5750 ASIC revision.  Thus, the test (mutatis
mutandis, using FreeBDS's softc asic-revision field), was correct for
FreeBSD; but manifestly incorrect for NetBSD.

Mark Davies (mark at mcs.vuw.ac..nz) has confirmed via private email
that this change fixes PR kern/kern/33509: his bcm5752 now works.
2006-06-01 01:46:41 +00:00
uwe
4c3245cf01 Remove redundant semicolon in dev_type_cnbell. 2006-06-01 00:43:37 +00:00
uwe
e81e00a1ad s/0/NULL/ when dealing with pointers. 2006-05-31 22:48:48 +00:00
uwe
cac00f2e06 Use C99 syntax for designated initializers.
Semicolon syntax is a gcc extension and has been obsolete since gcc 2.5.
2006-05-31 22:40:38 +00:00
riz
03c11483b9 Add support for the DLink DGE-530T revision B1 (Tested by Tillman
Hodgson) and the DGE-560T (untested).
2006-05-31 21:46:32 +00:00
riz
5412a4d276 Regen. 2006-05-31 21:43:25 +00:00
riz
1ff114df3d Add a couple DLINK product IDs, from OpenBSD. 2006-05-31 21:42:35 +00:00
tsutsui
a46e8b9247 Remove unneeded #include headers. 2006-05-31 13:20:42 +00:00
tsutsui
d241536854 Use __predict_true() and __predict_false() in some critical handlers. 2006-05-31 13:14:13 +00:00
tsutsui
cbe0593dd5 Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
  because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
  accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>
2006-05-31 12:59:39 +00:00
drochner
4b02662f6c -add 2 subclasses new in rev. 3.0 of the spec, and fix a pasto in another
-get power management rev printing right
2006-05-31 10:01:18 +00:00
drochner
05a790f438 regen 2006-05-31 09:54:45 +00:00
drochner
5529c06d6a support ntp_gettime again
compile tested by Havard Eidnes
2006-05-31 09:52:27 +00:00
tsutsui
3bd0011e38 Use a proper macro to determine I/O size for DIO-II devices. 2006-05-31 09:32:11 +00:00
tsutsui
35a0a35342 Check scode range for DIO-II based framebuffers correctly
in cnattach() functions.
Fixes boot failure problem on HP400t with fb console
reported by Stephan "doomwarrior" on port-hp300.
2006-05-31 09:25:44 +00:00
garbled
fed113c6f4 Rewrite the pci bus attribute decodings to be human-readable by using the
proper pcipnp structure file to read them rather than magical array offsets.

Add more complete decoding of the VPD, including extendedvpd, and TLB.  While
I was here, fix a bug where we never printed the L1 cache data properly.
2006-05-30 23:56:38 +00:00
freza
fbb6d5fc9e Remove duplicate definitions of mfdcr()/mtdcr() in favor of a single one
in cpu.h

OK Matt Thomas
2006-05-30 22:44:13 +00:00
he
eb8171b634 Remove local declaration of the 'fb' attribute now that it's declared
globally.
2006-05-30 19:19:36 +00:00
uwe
bcd4abc305 If tty that we open already has hpf1275a line discipline set, don't
spawn new pseudo-device and wskbd instances.

XXX: The logic for exclusive use needs to be thought out better, but
for now this should at least prevent scores of new hpf1275a/wskbd
being attached if you accidentally set this line discipline on your
serial console.
2006-05-30 01:14:38 +00:00
uwe
f7d6597db0 Miscellaneous cosmetics. 2006-05-29 23:01:08 +00:00
uwe
5807cbeb31 Propagate "static" to linesw method defintions. 2006-05-29 22:17:26 +00:00
garbled
6a298274ec Add code to decode small vendor items that are documented. Namely we can
now decode the chipid, and L2 processor affinity data.

Also fix a bug where we were reporting the service processor type as a
memory controller.
2006-05-29 22:11:15 +00:00
uwe
b2d14e97a2 Constify hpf1275a_wskbd_keymapdata. 2006-05-29 21:27:16 +00:00
rittera
98c1d0c0f5 Replaced some #ifdef NDIS_LKM's which were commenting out debugging
information with #ifdef NDIS_DBG.  Also added a commented out #define NDIS_DBG
to ndis_var.h.
2006-05-29 20:49:03 +00:00
rpaulo
c1ee12dd17 Don't check for SSE/SSE2 twice. 2006-05-29 17:35:41 +00:00
drochner
ad909cf73e export ntp_gettime() and ntp_timestatus(), for use by compat code 2006-05-29 16:43:05 +00:00
drochner
305932c524 Remove passing of an uninitialized variable found by gcc4.
(The variable was not used by the called function, so remove the
argument completely.)
2006-05-29 15:17:29 +00:00
drochner
3a1bb8a2ff gcc4 found that it can't store
#define  TULIP_TXTIMER           4
in
u_int32_t tulip_txtimer : 2;        /* transmission timer */

gcc4 appears to be right. "tulip_txtimer" is purely used by software,
so give it the full integer.
(Appearently the txtimer could never work.)
2006-05-29 15:12:57 +00:00
drochner
4f2e2f7d77 regen 2006-05-29 09:58:51 +00:00
drochner
42a3bd3098 Extend "struct ntptimeval" for the needs of "timecounters".
Allocate a new syscall for ntp_gettime() and set up COMPAT_30 for
the old one.
2006-05-29 09:57:54 +00:00
drochner
21166bafa5 regen 2006-05-29 09:46:54 +00:00
drochner
9575ca7cfd Remove emulation of ntp_gettime. In preparation for "timecounters" we
will change "struct ntptimeval", so some translation would be necessary.
ntp_gettine is considered dispensable, the only userland program known
to use it is "ntptime".
2006-05-29 09:44:51 +00:00
bouyer
85cd924c0e Remove unused file. Pointed out by Pavel Cahyna.
Probably unused since kernel config files were moved to i386/conf.
2006-05-28 17:14:59 +00:00
pavel
ad560fa074 Give Xen its own linker script, which does not set the physical load address
specially. In Xen, the system is already in virtual mode when the kernel is
started, so the old behavior of setting physical address to virtual address
was actually correct, and the previous change made NetBSD/Xen kernels
unbootable.

Pointed out, explained and tested by <bouyer>.
2006-05-28 14:00:13 +00:00
bouyer
b48d779334 Revert previous. HYPERVISOR_set_timer_op() works fine for domU, and using
HYPERVISOR_yield() cause a domain to busy-wait for some work to do (so
using HYPERVISOR_yield doen't fix the problem for dom0, and makes things much
worse for domU).
2006-05-28 13:36:28 +00:00
blymn
4a065f3379 Clean up bogus whitespace 2006-05-28 13:23:08 +00:00
blymn
3a0170518a Clean up bogus whitespace 2006-05-28 13:12:42 +00:00
blymn
8582430c8c Clean up bogus whitespace 2006-05-28 13:01:46 +00:00
tsutsui
2dba0c5647 Initialize the GT64x11 PCI timeout and retry register with a value taken
from Linux/MIPS, which improves viaide xfer performance significantly.
2006-05-28 12:52:07 +00:00
liamjfoy
62438e22ea remove some dead code
ok christos@
2006-05-28 11:07:04 +00:00
martin
b59e36a073 Move definition of the 'fb' attribute to global scope and make machfb@pci
require it. On most archs this does not change anything, but on sparc{,64}
it allows linking of kernels that have machfb as the only framebuffer.
Solution suggested by Quentin.
2006-05-28 08:57:53 +00:00
yamt
07ddfaead3 systrace_seteuid, systrace_setegid:
fix bugs in kauth change.  don't forget to update p_cred.
2006-05-28 07:08:41 +00:00
yamt
04c3beb7b1 make some internal variables static. 2006-05-28 06:52:17 +00:00
yamt
b7da9130d1 remove kauth_cred_destroy, which isn't used anymore. ok'ed by Elad Efrat. 2006-05-28 06:49:27 +00:00
yamt
3ef3d785cc nfs_request: use kauth_cred_free rather than kauth_cred_destroy. 2006-05-28 06:47:58 +00:00
simonb
e78022e1d6 Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.
2006-05-27 23:46:49 +00:00
elad
4ea6eb36cb add sysctl for routing stats 2006-05-27 23:08:11 +00:00
bouyer
5ff62d8d84 On my system the CPU frequency reported at boot is off by about 10% (maybe
because of the jitter caused by the serial console), which is not only
cosmetic but is bad for clock accuracy. Introducing a 1s delay before reading
Xen's idea of the CPU frequency fixes this.
2006-05-27 20:48:40 +00:00
bouyer
2a649c320b HYPERVISOR_set_timer_op() doesn't seem to work right on a NetBSD Xen3 dom0,
the dom0 is getting a continous stream of clock interrupts. As we want an
interrupt every hz anyway, just use HYPERVISOR_yield() instead.
2006-05-27 19:57:15 +00:00
bouyer
498d4ec7e6 The receive buffer, once mapped back in the domU, is read/write and not
shared so there;s no problems marking the mbuf M_EXT_RW.
2006-05-27 19:54:59 +00:00
he
732bd1213b Remove setting of xs_status to XS_STS_DONE before calling scspi_done().
After revision 1.135 of scsipi_base.c, it's a big no-no to set
XS_STS_DONE before calling scsipi_done().  Besides, scsipi_done()
sets XS_STS_DONE itself after checking that it's not already set.

This puts this driver back in working order; before this change
the probe of the logical drives would cause a hang.
2006-05-27 17:56:39 +00:00
bouyer
de9d456540 A lot of work is needed in the tcp stack to handle read-only ext storage
so always copy packets from the domU to a fresh mbuf for now.
2006-05-27 13:54:35 +00:00
bouyer
01307555ec Revert rev 1.241: calling m_makewritable() in tcp_input causes problems when
it has to change the mbuf chain. I experience hard hang on a Xen2 domU after
TCP connections have been closed, and a crash has been reported which may be
caused by this too.
2006-05-27 13:35:20 +00:00
yamt
725fa55be5 hide more by ifdef _KERNEL. 2006-05-27 09:12:31 +00:00
yamt
21785cfc00 remove a nested function so that its initializers can be compiled by gcc2.
pointed by Havard Eidnes.
2006-05-27 08:41:13 +00:00
yamt
4e9ca7aa01 callback_head_init: don't forget to initialize ch_running and ch_flags.
fix a problem reported by Jeff Rizzo on tech-kern@.
2006-05-27 07:42:42 +00:00
rittera
2fb24c8b6d Added an #ifdef _KERNEL around the #include <sys/device.h>. This is needed
because nbcompat.h is included from the user-level ndiscvt utility, which
wouldn't compile due to the indirect inclusion of sys/device.h.
2006-05-26 19:31:35 +00:00
rittera
60d227b1f8 Some general cleaning up of if_ndis.c, and if_ndis_pci.c. Added
#ifdef NDIS_DBG around some printfs, and deleted some commented out code.
2006-05-26 19:27:49 +00:00
tsutsui
eeb8ad7128 Use the same bus_space_barrier(9) macro with other mips ports to avoid
possible unused variable warnings.
2006-05-26 13:25:21 +00:00
tsutsui
a465c6b884 Tweak bus_space_barrier(9) macro to appease
"left-hand operand of comma expression has no effect"
warnings by gcc4.
2006-05-26 13:23:34 +00:00
blymn
a88dd3436a Clean up bogus whitespace 2006-05-26 12:52:45 +00:00
blymn
6b8a344329 Clean up bogus whitespace 2006-05-26 12:39:31 +00:00
blymn
44278a4fa1 Clean up bogus whitespace 2006-05-26 11:52:08 +00:00
pavel
3b5ae171d2 New linker scripts for the i386 kernel. The main improvement is setting the
physical load address correctly. (Before, it was set to the same very high
value as the virtual address.)

Provided by Jason Thorpe in
http://mail-index.netbsd.org/port-i386/2006/02/10/0008.html
with some modifications by me, mainly to make the output more similar to
the current one, and to not hardwire the physical and virtual addresses.

See also:
http://mail-index.netbsd.org/port-i386/2006/05/19/0001.html

Now an unpatched grub can load a NetBSD Multiboot kernel.
2006-05-26 09:22:42 +00:00
uebayasi
b5775a5a4f Expose struct pool::struct callback_entry pr_reclaimerentry only when _KERNEL
is defined.  Fix build of src/sbin/mount/mount_tmpfs/mount_tmpfs.c.
2006-05-26 00:26:12 +00:00
bouyer
bc93583ffe If we're going to byteswap fields in the TCP header, make sure the mbuf
area is writable first.
2006-05-25 21:49:19 +00:00
bouyer
df9be102c5 Make sure the mbuf is writable before trying to write to it. 2006-05-25 21:33:12 +00:00
bouyer
ad55d247de Make the mbuf writable before calling in6_clearscope(). Based on patch sent
by David Young on tech-kern.
2006-05-25 21:32:47 +00:00
bouyer
5eda3c3cab Use xen_shm_* to map the packet sent to us by the domU, and attach it
as external storage to the mbuf.
2006-05-25 21:28:38 +00:00
bouyer
159a19cf73 Always include xen_shm_machdep.c for Xen3, theorically a domU could also
provide backend services to other domains.
2006-05-25 21:27:40 +00:00
bouyer
d1d1596e1e Convert xen_shm_map() and xen_shm_unmap() to the Xen3 grant table
interface.
2006-05-25 21:26:20 +00:00
liamjfoy
14c608becb remove a little white space 2006-05-25 15:22:05 +00:00
yamt
c24f70bcad move wait points for kva from upper layers to vm_map. PR/33185 #1.
XXX there is a concern about interaction with kva fragmentation.
see: http://mail-index.NetBSD.org/tech-kern/2006/05/11/0000.html
2006-05-25 14:27:28 +00:00
yamt
67c564ace6 sa_upcall_userret: yield cpu on stack starvation so that it's
killable at least.  PR/28612 from ITOH Yasufumi.
2006-05-25 14:13:29 +00:00
blymn
1e545a5a2b Include kauth header for function prototypes
Whitespace cleanup.
2006-05-25 11:24:00 +00:00
blymn
3018e35533 Add kauth header for function prototypes
Whitespace clean up.
2006-05-25 11:23:11 +00:00
gdamore
60a298a64e Rename flash to athflash to reflect MD nature. Approved by simon@ and dyoung@ 2006-05-25 06:37:47 +00:00
gdamore
fef1104692 Rename MD flash to athflash to avoid confusion. This only renames the major
number.  The driver itself still needs to be done as well. :-)
2006-05-25 06:29:21 +00:00
gdamore
473eede9de Add flash device support. 2006-05-25 03:19:43 +00:00
gdamore
0a959690d5 Add RBLE bit to flash enable. 2006-05-25 03:17:36 +00:00
gdamore
1f55482fd5 Add major number for flash device. 2006-05-25 03:16:29 +00:00
garbled
c9e13db63a Implement partial support for the RS6K PCI Bridge found on 7025-F40
models.  This code was made possible by assistance from Cory Bajus.

Add code that asks the PCI bridge what it's config base address is, and
use that when wiring up an indirect bridge type.
Move prep's user segment register to 10, because the 7025's PCI config
address is at 11, where the user segment used to be.
Add a battable entry for 0xbf800000 for machines with RS6K bridges.

There is still probably work left to be done before a 7025-F40 is fully
supported.
2006-05-25 02:11:13 +00:00
wrstuden
d6dd729f42 Add $NetBSD: ids, which work better than $netbsd: ones. 2006-05-25 01:37:08 +00:00
wrstuden
b949192d0f Style changes from simonb at wasabisystems dot com:
Use config_stdsubmatch() instead of our own submatch function.
  Use "__inline" in header files and "inline" in .c files.
  Make some local function static.
2006-05-25 00:21:45 +00:00
wrstuden
a4dd1e2635 3ware 9000 driver, contributed by Wasabi Systems and written
by Jordan Rhody (based on the FreeBSD driver).

Contributed in NetBSD PR 33364.
2006-05-24 23:44:28 +00:00
yamt
a53726f2a7 kauth_cred_uucmp: fix inversed return code. PR/33546 from Juan RP. 2006-05-24 23:00:49 +00:00
mrg
dca7185f31 rename the local 'devsw' to of_devsw - devsw is already defined in libsa
as an 'extern' but this one is static.
2006-05-24 21:24:25 +00:00
mrg
27fdcc3d32 'volatile' is not a valid return type qualifier - remove it. 2006-05-24 21:22:36 +00:00
perseant
402f3abc7a Read the inode version number fro a more reliable source, quelling a
diagnostic assertion panic.
2006-05-24 21:08:00 +00:00
garbled
1f280c6eaf Add a small convenience function 2006-05-24 16:10:18 +00:00
liamjfoy
d8d9494bf9 Add a check for our own advertisements. This is due to non-simplex
interfaces which received the packets they have just sent.

From: OpenBSD (rev. 1.124)
ok: christos@
2006-05-24 13:39:37 +00:00
peter
a3fa0e8e3f Initialize h4 and h6 to NULL.
Fixes a panic reported by Mipam on -current-users.
2006-05-23 22:24:32 +00:00
bouyer
b06932d37f Add a network backend driver for Xen3. This will appear as a xvif pseudo
device in kernel config files.
2006-05-23 21:10:42 +00:00
bouyer
a4fe55530f Don't forget to softintr_disestablish() when destroying a xvif. 2006-05-23 21:09:37 +00:00
bouyer
237137c875 Add needed framework for backend drivers.
As we want some control on the name the backend driver will have we
can't use autoconf(9) here. Instead backend drivers registers to
xenbus, which will call a create callback when a new device is there.
Backend devices won't have a "struct device" in xenbus, use a void pointer
instead.
2006-05-23 21:07:56 +00:00
gdamore
86b54ed307 Increase size of embedded symbol table. 2006-05-23 20:28:05 +00:00
rpaulo
ff3f0e34cc In ip6_savecontrol(), ignore IPv4 packets.
From JINMEI Tatuya (KAME). Should fix PR 33269.
2006-05-23 14:20:56 +00:00
pavel
8f6c91f9fd Enable the gsip driver. Worked when I (lightly) tested it.
No objections on port-sgipips@.
2006-05-23 08:18:35 +00:00
uwe
828f707790 Add more "static" so that only j6x0tp_ca (and j6x0tp_debug) are visible. 2006-05-23 01:34:49 +00:00
yamt
be46b8e46c KNF. wrap a long line. 2006-05-23 00:43:30 +00:00
uwe
497c1ccc27 Provide __movmem* aliases to __movstr* functions.
Gcc4 uses movmem, older versions use movstr.
2006-05-22 21:34:08 +00:00
rpaulo
46ecc3073d First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.
2006-05-22 21:01:15 +00:00
uwe
9001bc2fd8 G/c #ifdef PIC we inherited from the userland. 2006-05-22 20:56:44 +00:00
uwe
24172f6f4d #include <dev/wscons/wsksymvar.h> as gcc4 doesn't like arrays,
pckbd_keydesctab[] in this case, with incomplete element types (older
versions of gcc allow them as long as you don't try to access them).
2006-05-22 20:40:07 +00:00
drochner
2f959928c8 make sure bswap64() returns an uint64_t, not an unsigned long long,
which is incompatible for gcc4 on alpha at least
2006-05-22 16:28:27 +00:00
yamt
7445825948 i386 and xen: move struct user to the highest address in uarea
and reduce UPAGES from 4 to 3 in the case of !NOREDZONE.
2006-05-22 13:44:53 +00:00
yamt
1075c99d89 introduce macros, UAREA_TO_USER and USER_TO_UAREA,
to convert uarea VA into a pointer to struct user and vice versa,
so that MD code can change the layout in uarea.
2006-05-22 13:43:54 +00:00
yamt
b43dc97b09 use consistent order of function specifiers and type specifiers.
(int inline -> inline int)
2006-05-22 12:42:01 +00:00
mrg
d6b63d330d use "j" instead of "ll" for intmax_t and friends.
XXX: we should probably use "j" for all(?) other platforms as well
(just for intmax_t and friends.)
2006-05-22 07:38:41 +00:00
mrg
13f78de634 add NULLFS and re(4) (both tested.) 2006-05-22 07:20:18 +00:00
christos
770d099190 add void casts. 2006-05-22 00:09:34 +00:00
christos
35c4405d50 void casts. 2006-05-22 00:09:08 +00:00
christos
fe6055587f void casts to functions whose return values are ignored. 2006-05-21 23:56:09 +00:00
christos
b0eb4bc8ee Remove packed attributes gcc-4 dislikes. 2006-05-21 23:55:22 +00:00
uwe
943edbd0d8 Nuke va-sh.h. stdarg.h and varargs.h now use __builtin_va_*. 2006-05-21 23:14:13 +00:00
cube
d897e3cfdb Include <sys/kauth.h> because it's needed. 2006-05-21 22:51:27 +00:00
uwe
9458b164a6 New stdarg.h and varargs.h based on arm and i386 versions.
Use __builtin_va_* instead of hand written code in va-sh.h that uses
LHS casts.  Slightly worse code is generated by gcc 3.3.3, but LHS
casts are outlawed in gcc 3.3.6 and gcc 4.

Build-tested on hpcsh (le) and mmeye (be), run-tested on hpcsh.
2006-05-21 22:39:04 +00:00
cube
5536c0b46c Fix tyop reported by Yoshito Komatsu. 2006-05-21 11:39:27 +00:00
christos
c03d07d01d Put the __insn_barrier() inside the spinloop for the DIAGNOSTIC case, so
that we have a barrier for the DIAGNOSTIC case too.
2006-05-21 06:17:12 +00:00
christos
ce07c2d219 it is attributes no attribute 2006-05-21 05:49:54 +00:00
christos
2bea415e72 remove gcc4 stuff since it is done in bsd.kmod.mk 2006-05-21 05:43:49 +00:00
christos
c52ff7f9d5 Fixes from David Boggs; in his words:
/sys/net/if_spppvar.h says:

	"Lower layer drivers that are always ready to communicate
	(like hardware HDLC) can shortcut pp_up from pp_tls,
	and pp_down from pp_tlf."

	When I follow those instructions, I get a kernel stack
	overflow as soon as I open the HDLC device.

	Here is the loop:
	 sppp_ioctl calls sppp_lcp_open
	 sppp_lcp_open calls sppp_open_event
	 sppp_open_event calls sppp_lcp_tls
	 sppp_lcp_tls calls pp_tls
	 pp_tls is the SHORTCUT to sppp_lcp_up
	 sppp_lcp_up calls spp_lcp_open
	 ...and around we go until the stack overflows.

	The fix is to reverse the order of the action (tls)
	and the state change (from INITIAL to STARTING) in
	sppp_open_event.

	There is a similar loop during closing:
	 sppp_ioctl calls sppp_lcp_close
	 sppp_lcp_close calls sppp_close_event
	 spp_close_event calls sppp_lcp_tlf
	 sppp_lcp_tlf calls pp_tlf
	 pp_tlf is the SHORTCUT to sppp_lcp_down
	 sppp_lcp_down calls sppp_lcp_close
	 ...and around we go until the stack overflows.

	The fix is to reverse the order of the action (tlf)
	and the state change (from STARTING to INITIAL) in
	sppp_close_event.

	Separately, while I was discovering this, I noticed
	that pp_tlf was being called unconditionally rather
	than first checking to see if it is NULL.  pp_tlf
	is a callout from sppp to the hdlc device driver.
	Elsewhere in sppp, this is always checked for NULL
	before calling it, and the comments in if_spppvar.h
	imply that filling it in is optional.

	From spppvar.h:
	"These functions need to be filled in by the lower layer
	(hardware) drivers if they request notification from the
	PPP layer whether the link is actually required."
	This clearly says that pp_tlf and pp_tls are optional
	and so sppp must check before calling them.
2006-05-21 05:09:13 +00:00
christos
a4d71852e0 Put back -Wno-attribute for now since not all archs have been fixed. 2006-05-21 04:53:23 +00:00
christos
3c22b94a4a fix typo 2006-05-21 04:45:35 +00:00
christos
c9904084fe add -fno-strict-aliasing for gcc4 2006-05-21 04:43:58 +00:00
christos
a75306c3a4 Fix strict aliasing issues and while I am here fix a memory leak on error 2006-05-21 04:30:03 +00:00
dan
58c89e46e0 initialise a few "off"s to appease gcc4
these only turned up with -O2 and/or -march=nocona, not with default flags
2006-05-21 01:19:25 +00:00
christos
589a4be805 Add -Wno-pointer-sign for gcc4 2006-05-20 22:22:04 +00:00
christos
57f1eb7d75 XXX: GCC uninitialized 2006-05-20 22:15:20 +00:00
gdt
42ecd6e67d Enable ugensa. 2006-05-20 22:03:56 +00:00
mrg
19ad9e5482 change some variable types from int to size_t, since that's what libsa
dv_strategy() wants for the 6th argument.
2006-05-20 20:38:39 +00:00
mrg
2d245c626f change some char to u_char to match other variables and functions. 2006-05-20 20:37:15 +00:00
christos
d05d5214fe Add another fixup entry Arthur Dimitrelis 2006-05-20 20:32:16 +00:00
mrg
696ab05f50 add (char *) cast to quieten GCC. 2006-05-20 19:40:46 +00:00