Commit Graph

83785 Commits

Author SHA1 Message Date
christos f6e519df16 Coverity CID 3015: Check before using (from Arnaud Lacombe) 2006-09-29 14:28:46 +00:00
christos ed106f137b Coverity CID 2990: fix memory leak (from Arnaud Lacombe) 2006-09-29 14:24:55 +00:00
tsutsui ebd0b89ad0 Pull mii_readreg fix from FreeBSD if_rl.c rev 1.81:
> When reading PHY regs over the i2c bus, the turnaround ACK bit
> is read one clock edge too late. This bit is driven low by
> slave (as any other input data bits from slave) when the clock
> is LOW. The current code did read the bit after the clock was
> driven high again.
2006-09-29 14:03:07 +00:00
tsutsui a7f43a90fe In rtk_txeof(), clear the timeout timer only if there is no pending packet. 2006-09-29 13:59:40 +00:00
martin ebaf1420c5 If using NLAPIC, we better include lapic.h. Pointed out by Kurt Schreiner
on current-users.
2006-09-29 11:18:44 +00:00
martin 90924281b7 Sysinst now properly ignores eon0 interfaces - so there is no need to
avoid ISO networking and EON in this kernel anymore.
2006-09-29 10:44:31 +00:00
tsutsui c6bfa68fcc - trim CRC off rather than setting M_HASFCS
- use appropriate types instead of `unsigned'
2006-09-29 08:49:30 +00:00
tsutsui 2f6ae33af4 In rtk_rxeof():
- discard too short packets as well as too large ones
- trim CRC off rather than setting M_HASFCS

Closes PR kern/31348.
2006-09-29 08:33:06 +00:00
he 66964d9c22 When the implementation of lpic_dump() is inside DIAGNOSTIC, the
declaration of it has to be too.
2006-09-29 07:37:36 +00:00
reinoud d9df4ed24c Add `vfs.udf.verbose' sysctl when running a DEBUG kernel to dynamically set
the udf_verbose variable. So when something goes wrong, it can be examined
on the spot without needing to reboot a new kernel and possibly loosing
state.
2006-09-29 01:36:28 +00:00
bjh21 3143e7d6c3 ANSIfy, un-__P, light KNF. 2006-09-28 23:54:14 +00:00
bjh21 557f409231 No need to do silly asm() dances to get R14_svc saved now -- the compiler
does it for us everywhere.
2006-09-28 23:25:01 +00:00
bjh21 8e80f0df78 Don't specify -fomit-frame-pointer -mno-apcs-frame, since that breaks kernel
page faults.
2006-09-28 23:23:22 +00:00
perseant 2ac2813b6e Use lockstatus instead of a homebrewed locking system to control
LFCNWRAPSTOP and LFCNWRAPGO.

Be less verbose about the various looping checks: use log() rather than
printf(), and only log anything if we are really looping ("count = 2" is
not an error condition).

Allow dirops sleeping on available space to be interruptible.
2006-09-28 23:08:23 +00:00
bjh21 87e6985bed Add -mapcs-frame -fno-omit-frame-pointer to acorn26 kernel builds. This
is necessary to ensure that GCC saves R14_svc on entry to every function,
and thus that page faults within the kernel are safe (since they corrupt
R14_svc).  I think this used to be the default, but it's not any more.
2006-09-28 22:10:53 +00:00
he bc9fb2d92d Since intr_spin is declared inside #ifdef DIAGNOSTIC, make sure the uses
are too, so that this builds without DIAGNOSTIC defined.
2006-09-28 21:34:59 +00:00
skrll 17843a3034 Add -mdisable-fpregs which makes this work again with gcc4. This needs
revisiting.
2006-09-28 21:17:01 +00:00
reinoud 695fa2b8b8 Fix lookup bug that could result in not finding the last entry. The check
for the cycling was too early. Also fix potential endless loop when the
last entry was deleted.
2006-09-28 19:57:26 +00:00
bouyer f23d3bb7be Add Xen3 support for ACPI and/or MPBIOS + IOAPIC. To help with this, physical
CPUs are now configured on mainbus only in dom0, and only to know about
their APIC id. virtual CPUs are attached to hypervisor as:
vcpu* at hypervisor?
and this is what's used as curcpu(). The kernel config files needs to be
updated for this, see XEN3_DOM0 or XEN3_DOMU for examples.
XEN3_DOM0 now has acpi, MPBIOS and ioapic by default.
Note that a Xen dom0 kernel doens't have access to the lapic.
2006-09-28 18:53:15 +00:00
bouyer e2d271e26c - make it possible to have ACPI without IOAPIC and/or LAPIC
- make it possible for machine-specific code to provide custom R/W routines
  in its i82093*.h headers
- always initialize sc->sc_pins[pin], even in the !ioapic_cold case.
No objections on port-i386 and port-amd64.
2006-09-28 18:01:24 +00:00
joerg b12fa3d640 Regen. 2006-09-28 16:54:16 +00:00
joerg fc4a0108a7 Add IDs for Ralink RT2501USB/RT2601USB. From OpenBSD. 2006-09-28 16:53:40 +00:00
simonb a4c94c5ab7 Remove stale copy. Pointed out by uwe@ ages ago. 2006-09-28 13:12:59 +00:00
rjs 0107b5e769 ANSIfy. 2006-09-28 09:06:05 +00:00
rjs f99ba5e550 ANSIfy and fix missed proc -> lwp conversion. 2006-09-28 09:03:46 +00:00
dyoung 1d6d201f2e Activate ath(4) in GENERIC, since it works under light testing on
my Powerbook G4.
2006-09-28 07:57:49 +00:00
skrll b43d42196d Remove a debug message.
Hi Ross!
2006-09-28 07:48:35 +00:00
dbj 7c8cd0a2c8 consider sb_lowat when limiting the transmit length to keep acks on the wire 2006-09-28 04:32:47 +00:00
oster ed4d175ee4 Make sure the 'last configured as' field in the component labels
are updated each time the component labels are written.
2006-09-28 02:39:50 +00:00
hubertf 78f4bb5154 Add (commented out) option WSKBD_USONLY 2006-09-27 23:58:50 +00:00
macallan 88681719b0 on PowerBook 3400c and similar machines redirect the built-in tlp's IRQ to
60 if we find a 2nd OHare - OF claims 27 which is wrong and keeps the tlp
from working.
Tested on a PB3400c, should work on 2400 and original G3 as well.
2006-09-27 22:44:18 +00:00
macallan 37fe34eef6 rewrite most of the Old World interrupt handling to allow things like
cascaded PICs found in some PowerBooks, like two OHare in the PB3400c
2006-09-27 22:41:55 +00:00
cube 160fdb0333 Add support for 82562G. 2006-09-27 21:51:48 +00:00
cube 4775d417a1 Regen (Intel 82562G). 2006-09-27 21:50:27 +00:00
cube f9d66765dd Add Intel 82562G PHY. 2006-09-27 21:50:00 +00:00
cube f33f698361 Make fxp(4) support the PRO/100 VE variant just added to pcidevs.
Reported by rix on #NetBSD-code on freenode.
2006-09-27 21:46:15 +00:00
cube 1e05843063 Regen (Intel/0x1094). 2006-09-27 21:43:26 +00:00
manu f309b668fd - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
2006-09-27 21:42:04 +00:00
cube 3d367d313e Add the Intel PRO/100 variant found on the D946GZIS motherboard. 2006-09-27 21:41:56 +00:00
bjh21 826ff5f060 Make db_validate_address() work, even when called from within an interrupt
handler.  This should make debugging prefetch aborts slightly simpler.
2006-09-27 21:21:09 +00:00
rpaulo 7775a16308 Config file for the Parallels virtual machine. 2006-09-27 18:45:46 +00:00
thorpej ec1894a78a Don't inline uvm_pagealloc_pgfl(). 2006-09-27 17:18:50 +00:00
cube 4a5ad09e72 This is again that time of the millenium where we have to crank up a few
static limits to meet modern bloat requirements.

VM_PHYSSEG_MAX needs it to run on Intel's D946GZIS motherboard, as reported
by rix on #NetBSD-code on freenode.  This has a consequence on the initial
number of possible extent allocations for iomem_ex, so increase that value
too.

While there, clarify the action to be taken when VM_PHYSSEG_MAX is maxed
out.

Do that on both amd64 and i386 because the causes, the effects and the code
are mostly the same.
2006-09-27 17:10:34 +00:00
sketch 83a18a4ac4 Regenerate for TI ACX changes. 2006-09-27 11:49:04 +00:00
sketch 2394aa3588 Add TI ACX100B and rename existing (unused) TI ACX100 to ACX100A. 2006-09-27 11:48:02 +00:00
freza 19461b0a95 Make sure we mask statclock timer on ibm4xx systems. This avoids
pthread "related" panics like:

    panic: remrunqueue: bit 18 not set
    Stopped in pid 479.3 (exsprite) at      netbsd:cpu_Debugger+0x10:       lwz
    r
    0, r1, 0x14
    db> bt
    0x869abe00: at panic+0x1b4
    0x869abe50: at remrunqueue+0x80
    0x869abe60: at mi_switch+0x114
    0x869abea0: at sa_unblock_userret+0x4e8
    0x869abee0: at syscall_plain+0x224
    0x869abf40: user SC trap #93 by 0x41949810: srr1=0xc030
               r1=0x445fff40 cr=0x40000002 xer=0 ctr=0x41aae208 esr=0 pid=0x36

While there, cleanup IPL_ definitions somewhat and fix interrupt mask
calculation per spl(9).

OK by matt@
2006-09-27 09:11:47 +00:00
macallan a2120a92a7 the chip wants all data we send with 64bit padding, no matter what padding
individual scanlines have so we send an extra 0 when we have to.
2006-09-27 06:39:38 +00:00
elad f91b42aeb9 Don't care for super-user in packet filter rules, it's done via a device
anyway. Same as the clock-related change few days ago.

Should address PR/34635 from victori at lamer0 dot com
2006-09-27 05:35:05 +00:00
macallan 214a60e5cb cleanup, implement putchar() using the blitter 2006-09-27 05:19:23 +00:00
bjh21 24bcb8e38a wd33c93_minphys() doesn't exist any more, so don't declare it. 2006-09-26 23:27:36 +00:00
bjh21 334ef0cbc9 Merge my bjh21-wd33c93 branch. This improves message handling in general
and sync negotiation in particular.  Tested on sgimips (thanks to
Manuel Bouyer) and acorn26 (with my still-unfinished driver for the Acorn
SCSI Expansion Card).
2006-09-26 22:45:25 +00:00
martin 73962fd960 Minor cosmetics and error checking for probably impossible corner
cases.
2006-09-26 19:06:46 +00:00
gdamore 179079c753 Dynamically calculate the memory size. The math is suspect, but the
results are at least accurate.  (This was reverse engineered from the
redboot sources, which is one of the reasons why the math is suspect.)
2006-09-26 17:09:32 +00:00
rjs 7741a20ae9 Make it compile with gcc4. 2006-09-26 16:35:26 +00:00
thorpej 68c8876e88 device_setofnode(): Release the number object after storing it in the
device properties dictionary.  The dictionary also retains the object,
so if we don't release it, the initial reference leaks.
2006-09-26 16:11:02 +00:00
elad 5c38108d28 Change the PaX mprotect(2) restrictions' "global_protection" knob to
just "global" -- it's shorter and more readable. Update documentation.
2006-09-26 14:48:40 +00:00
elad 2f417d0f92 Oops! forgot "options" in previous commit. Pointed out by freza@, thanks! 2006-09-26 14:30:26 +00:00
elad 8b4adae65a Make PaX mprotect(2) restrictions more accessible.
On amd64, sparc64, i386, and alpha, they will be compiled in and disabled
by default. That means that to use them you either enable the "global"
knob with sysctl, or use paxctl(1) to enable it on a per-program basis.

On sparc and macppc just include a commentd out line in the GENERIC kernel.
2006-09-26 14:08:18 +00:00
tsutsui afb7d3cbe0 Protect from multiple inclusion. 2006-09-26 13:11:59 +00:00
is ed48e2c326 Fix typo in comment 2006-09-26 11:55:41 +00:00
martin 931c60dde9 Rework boot device matching to get rid of lots of special case code
and tables to map fimware names to driver names. Based on a suggestion
from Eduardo (quite some time ago).
Each device (on busses we can handle and care about) gets a device property
storing the devices OpenFirmware package handle. To match the boot device,
the phandle of the chosen bootpath is compared against this property,
plus some additional string matching for disk/cd devices (where OF only
provides a node for the device class, not each instance).
2006-09-26 09:45:57 +00:00
jeremy b91b1cdbb2 Fixed a bug in the timeout range constraint macro that can cause a timeout
to break free of the constraint if the range minimum boundary is larger than
the maximum boundary.

Discovered by jmg@FreeBSD.org.  (See FreeBSD's tcp_timer.h rev 1.31).
2006-09-26 06:39:22 +00:00
gdamore e653071cb2 Initial import of AR2315 support, specifically the Meraki Mini (see
the Meraki web site at http://www.meraki.net/ )  This includes changes
to the AR5312 to make it more conducive to sharing code with the AR5315,
and also includes improved early console support.

All devices including ethernet and wlan interfaces on the Meraki Mini are
functional with this port, _except_ SPI flash, which will be introduced
later.

This port was funded by the Champaign-Urbana Communit Wireless Network
Project (CUWiN).
2006-09-26 06:37:31 +00:00
kiyohara 58f6bfaae5 Fix device name in {fwohci,firewire}_print(). valiable aux is not string
pointer.
2006-09-26 02:50:42 +00:00
jmcneill 466af2f141 When resuming from S1 standby, don't try to release a mutex that we hadn't
previously acquired.
2006-09-26 01:50:43 +00:00
heas e8bce64b5c Regen for pcidevs 1.833 2006-09-26 00:09:42 +00:00
heas a19ef0d521 Add entries for Datum Inc. (Bancomm) & the BC635PCI_U card. 2006-09-25 23:58:23 +00:00
jmcneill 8f4e570fd3 PR# 32473: GUS PnP audio device seems to be broken in NetBSD 3.0
We now need to call isa_drq_alloc to reserve DMA channel(s) for ISA devices.
Thanks to Ben Collver for testing the patch for me!
2006-09-25 23:26:19 +00:00
jmcneill 1d83a2dea6 No need to call pci_set_powerstate from our powerhook, the bus handles this
for us now.
2006-09-25 23:11:07 +00:00
jmcneill 8e37d48dc1 Create a PCI bus powerhook to handle setting PCI D# power state transitions
on suspend/standby/resume.
2006-09-25 23:09:42 +00:00
jmcneill ce9801710e Only display "interrupt while not running ignored" if DIAGNOSTIC is set, as
whenever this happens, so many messages are spewed to the screen from the
kernel that the system is effectively useless. Hardly ignored :-)
2006-09-25 22:15:15 +00:00
jmcneill fbd43a6ddc Add powerhook for RT2560-based cardbus wireless adapters. 2006-09-25 22:14:01 +00:00
christos b5a9957169 Fix reversed test in __NetBSD_Prereq__; from dbj 2006-09-25 20:28:47 +00:00
christos 1a9beba1e6 PR/34612: Bucky Katz: SA returns from sleep do not set the signal flags
Patch applied, many thanks for the example!
2006-09-25 18:28:56 +00:00
xtraeme d532985d18 Fix typo and missing space. 2006-09-25 17:39:33 +00:00
pavel 3cdb79bdae Replace homegrown tests for FIFO (... & S_IFIFO) by S_ISFIFO. The old code
was "correct" by luck - we don't have any other file type whose S_IF* bits
in sys/stat.h overlap with S_IFIFO.

Originally discovered by Paul Stoeber in OpenBSD.
2006-09-25 16:16:18 +00:00
cube f6eef99476 Don't accept a compressed image that has 0 for the block size...
Fixes PR#34608.
2006-09-25 13:47:26 +00:00
rpaulo 8917262dee Remove line that shouldn't have been committed. 2006-09-25 13:21:53 +00:00
rpaulo f3e1747995 PR/14806: NetBSD uses the wrong default TCP MSS.
No objections in tech-net.
2006-09-25 13:20:20 +00:00
sketch a38b4ece79 typo. 2006-09-25 12:24:47 +00:00
xtraeme 94e721817e Back out linux_ptrace.c changes, looks like they were removed with
a reason in the past.
2006-09-25 10:55:54 +00:00
xtraeme 8de009a612 linux_ptrace.c is not available in all archs, only in powerpc, arm,
mips and i386... make it so.

Patch from Kurt Schreiner.
2006-09-25 10:36:23 +00:00
mrg 8dd1169cb4 print the cpu number in a bunch of fault handler debug messages. 2006-09-25 05:52:34 +00:00
briggs 31c06a3ac5 Obvious (now that Jorge Acereda pointed it out) bug in the restoremmu
section of ENTRY(ofwr_init) (a constant offset of 4 was changed to %r4).
2006-09-25 01:45:27 +00:00
bjh21 5858e7aa70 Arrange that catching an unexpected data abort in the kernel causes a trap
into DDB where possible, even if it happens in an interrupt handler.
2006-09-24 23:38:59 +00:00
bjh21 e0884dc370 PR 23783: the correct number of elements to insert into cmd_iohs is WDC_NREG,
not DRIVE_REGISTERS_SPACE.  The latter is much bigger and causes a buffer
overrun and panic.  Patch supplied by Mike Pumford.
2006-09-24 23:14:58 +00:00
dbj 2df12fb8b5 use _KERNEL_OPT instead of _LKM to check whether to include "opt_ktrace.h" 2006-09-24 21:44:58 +00:00
bjh21 83d7ac871e Turn address exceptions into SIGSEGV rather than SIGBUS, since they're really
just attempts to access unmapped (and incidentally unmappable) memory,
rather than anything special.
2006-09-24 21:42:06 +00:00
bjh21 7841bf68c0 uvm_fault has been sensible about when to return ENOMEM for some time now,
so it's reasonable for us to kill processes when we get it returned,
rather than sleeping.  Do that.
2006-09-24 20:54:14 +00:00
briggs 65b5f899a0 Dump the pin and line information only if DEBUG is defined. 2006-09-24 19:17:56 +00:00
briggs 06b73e4c8c Match APPLE_INTREPID2_* 2006-09-24 19:17:28 +00:00
peter 223213b93f Improve some debug texts. 2006-09-24 19:07:26 +00:00
briggs d9a3e24d2f Regen with new IDs for devices in the last-generation Apple PowerBook G4. 2006-09-24 18:36:40 +00:00
briggs f1e45a271e Add IDs for the devices in the last-generation PowerBook G4. 2006-09-24 18:35:34 +00:00
peter d04123ca73 Run the "power button event" hooks when the special button OFF is pressed.
Change the keycodes in the keymaps that are currently using the OFF button
to -1 so that they will still operate the same way (i.e. do nothing).

No objection on port-hpcsh & port-hpcmips.
2006-09-24 18:34:41 +00:00
peter 7644942c0e Minor KNF, replace some spaces with tabs. 2006-09-24 18:24:55 +00:00
bouyer f99383d432 The Xen folks says everyone should use hypercall call page now, make it so.
Old hypercall call method still still available with
options XEN_NO_HYPERCALLPAGE
but this is disabled by default (xen-3.0.2-2 supports hypercall call page
just fine).
While there add a VIRT_BASE= string in __xen_guest section; from
Bastian Blank on port-xen@.
2006-09-24 18:14:44 +00:00
christos 8b0b9e2db5 Regen 2006-09-24 17:18:49 +00:00
christos 385afe8d48 Fix whitespace inconsistencies; no functional change 2006-09-24 17:18:02 +00:00
christos da685f2130 From Claus Andersen:
- change uftdi driver to use usb_lookup
- are more devices (from FreeBSD/OpenBSD)
2006-09-24 17:17:17 +00:00