Commit Graph

46989 Commits

Author SHA1 Message Date
alc
ec226ee689 Remove a stale comment: PG_DIRTY and PG_FILLED were removed in
revisions 1.17 and 1.12 respectively.
2004-05-30 20:48:15 +00:00
phk
30a7ac8468 Add missing #include <sys/module.h> 2004-05-30 20:34:58 +00:00
phk
f43aa0c4bc add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
phk
9d102d7d5a Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
phk
78e0acd9ea Add missing <sys/module.h> includes 2004-05-30 20:00:41 +00:00
phk
623c8fe8d0 Zap a redundant NULL 2004-05-30 18:04:06 +00:00
phk
d6f7d2bde6 Add some missing <sys/module.h> includes which are masked by the
one on death-row in <sys/kernel.h>
2004-05-30 17:57:46 +00:00
dwmalone
43ffabb3fb Make the comment for DLT_NULL slightly more accurate.
PR:		62272
Submitted by:	Radim Kolar <hsn@netmag.cz>
MFC after:	1 week
2004-05-30 17:03:48 +00:00
phk
cfb99155bf struct cpu_nameclass is a private to identcpu.c, move it there. 2004-05-30 15:16:07 +00:00
nyan
7652ad90b0 Merged from sys/dev/fdc/fdc.c revision 1.272. 2004-05-30 13:56:06 +00:00
alc
c8b1bb8032 MFi386 revision 1.6
Reenable ithread preemption for interrupts that occur while executing in
 the kernel.
2004-05-30 04:49:39 +00:00
scottl
2eab4ae579 Use a unique malloc type rather than M_DEVBUF. 2004-05-30 04:01:29 +00:00
sanpei
f3ff3c1aef check interface number
Kyocera AH-K3001V has 2 data interface.  But we could use only one
interface(id = 0)

PR:		kern/66779
Submitted by:	Togawa Satoshi <toga@puyo.org>
2004-05-30 01:48:04 +00:00
hmp
58fffa8ca6 Correct typo, vm_page_list_find() is called vm_pageq_find() for quite a
long time, i.e., since the cleanup of the VM Page-queues code done two
years ago.

Reviewed by:	Alan Cox <alc at freebsd.org>,
            	Matthew Dillon <dillon at backplane.com>
2004-05-30 00:42:38 +00:00
wpaul
24d0dec0e8 Fix build with ndisulator: Add prototype for my_strcasecmp(). 2004-05-29 22:34:08 +00:00
marius
e8757e8b1e In hme_init() call mii_mediachg() to make sure the current media is set.
This is part 2/2 of fixing autonegotiation on hme(4) using DP83840A PHYs.
It appears to also fix the occasional problems to establish a link on
hme(4) using LU6612 PHYs and shouldn't hurt on those using QS6612 PHYs.

Obtained from:	NetBSD
2004-05-29 18:29:53 +00:00
marius
ab35591f62 DP83840A on hme(4) don't advertise their media capabilities themselves
properly. This causes the autonegotiation to e.g. never establish a
100baseTX full-duplex link. The solution to this problem is to manually
write the capabilities from the BMSR to the ANAR every time a media
change occurs, even when already in autonegotiation mode.
The NetBSD way of doing this is to set their MIIF_FORCEANEG flag in the
NIC driver. This causes mii_phy_setmedia() to call mii_phy_auto() (which
will set the ANAR according to the BMSR) even when the PHY alread is in
autonegotiation mode. However, while doing the same on FreeBSD (which
involves porting the MIIF_FORCEANEG flag and converting nsphy.c to use
mii_phy_setmedia()) fixes autonegotiation, using mii_phy_setmedia()
causes this driver to no longer work properly in the other modes.
Another drawback of that approach is that this will also force writing
the ANAR on other PHYs whose drivers use mii_phy_setmedia() and which
are used with a NIC whose driver sets MIIF_FORCEANEG (e.g. hme(4) is
known to be used together with 3 different PHYs while only the DP83840A
require this workaround).
So instead of moving to MIIF_FORCEANEG, just call mii_phy_auto() in
nsphy_service() unconditionally when hanging off of a hme(4) and serving
a media change

This is part 1/2 of fixing autonegotiation on hme(4) using DP83840A PHYs.
2004-05-29 18:23:26 +00:00
marius
ad9892f32e Spelling fix in a comment. 2004-05-29 18:13:44 +00:00
marius
41c5d57ced Remove double __FBSDID and move the remaining one into a common place after
the license(s) and before the driver comment (the latter only in drivers not
having __FBSDID at that location).
2004-05-29 18:09:10 +00:00
marius
5a4326ce81 Move __FBSDID out from under a comment. 2004-05-29 17:45:45 +00:00
marius
d85cb3f892 Spelling fix in a comment. 2004-05-29 16:54:59 +00:00
rwatson
6fd04518a1 Don't release Giant until after the call to vput() in nfsrv_setattr().
Unless running with debug.mpsafenet=1, this was not actually a problem.
2004-05-29 15:52:39 +00:00
iedowse
03c4a3a74c In axe_stop(), close the pipes before calling axe_reset(). axe_reset()
changes the device configuration index, which should not be done
while there are pipes open.

Debugged with help from:	Luke Dean <LukeD@pobox.com>
2004-05-29 15:21:33 +00:00
rwatson
8f6b4aa431 No need to conditionally acquire Giant in nfssvc_nfsd() because it
is acquired by the caller.  Should not cause problems, but causes
an unnecessary recursion on Giant.

Pointed out by:	bmilekic
2004-05-29 15:21:25 +00:00
iedowse
5b277e7dbd Refuse to change the configuration index if the device has open
pipes, since open pipes are linked off a usbd_interface structure
that is free()'d when the configuration index is changed. Attempting
to close or use such pipes later would access freed memory and
usually crash the system.

The only driver that is known to trigger this problem is if_axe,
which is itself at fault, but it is worth detecting the situation
to avoid the obscure crashes that result from this type of easily
made driver mistakes.
2004-05-29 14:51:23 +00:00
rik
1bc72344a4 Switch to using C99 sparse initialisers for the type methods array.
Requested by:	harti

MFC after:	1 week
2004-05-29 13:17:28 +00:00
julian
14e22ae790 Add a new netgraph method to allow restoration of some
behaviour lost in the change from 4.x style netgraph tee nodes.
Alter the tee node to use the new method. Document the behaviour.

Step the ABI version number... old netgraph klds will refuse to load.
Better than just crashing.

Submitted by:	Gleb Smirnoff <glebius@cell.sick.ru>
2004-05-29 07:21:46 +00:00
julian
9fc4e00a1c Missed these in the last commit.
Change to C99 structure initialisation for the type method structure.
2004-05-29 07:16:49 +00:00
wpaul
86ad4bc572 In subr_ndis.c, when searching for keys in our make-pretend registry,
make the key name matching case-insensitive. There are some drivers
and .inf files that have mismatched cases, e.g. the driver will look
for "AdhocBand" whereas the .inf file specifies a registry key to be
created called "AdHocBand." The mismatch is probably a typo that went
undetected (so much for QA), but since Windows seems to be case-insensitive,
we should be too.

In if_ndis.c, initialize rates and channels correctly so that specify
frequences correctly when trying to set channels in the 5Ghz band, and
so that 802.11b rates show up for some a/b/g cards (which otherwise
appear to have no 802.11b modes).

Also, when setting OID_802_11_CONFIGURATION in ndis_80211_setstate(),
provide default values for the beacon interval, ATIM window and dwelltime.
The Atheros "Aries" driver will crash if you try to select ad-hoc mode
and leave the beacon interval set to 0: it blindly uses this value and
does a division by 0 in the interrupt handler, causing an integer
divide trap.
2004-05-29 06:41:17 +00:00
maxim
51777e90b7 Remove unneeded XXX comments botched in previous commit.
Submitted by:	bde
2004-05-29 05:36:43 +00:00
njl
ac6b510f5a Decrease sleep_delay default to 1 second now that the machines that
required the 5 second delay have been fixed.
2004-05-29 05:34:04 +00:00
njl
01c1b253fc Style cleanups, don't set the device description before the probe routine
has completed successfully.
2004-05-29 04:32:50 +00:00
tjr
2bc3263ac9 Enable MI bits for gcc -ftest-coverage -fprofile-arcs on amd64. 2004-05-29 01:18:14 +00:00
tjr
3793bc5d48 Implement __bb_init_func. This is a fairly straightforward conversion
of the i386 version.
2004-05-29 01:13:28 +00:00
tjr
ddbca80ea4 Provide the _start_ctors and _stop_ctors symbols. As on i386, the addresses
of these are the start and end of the .ctors section.
2004-05-29 01:09:00 +00:00
julian
c85e63d425 Switch to using C99 sparse initialisers for the type methods array.
Should make no binary difference.

Submitted by:	Gleb Smirnoff <glebius@cell.sick.ru>
Reviewed by:	Harti Brandt <harti@freebsd.org>
MFC after:	1 week
2004-05-29 00:51:19 +00:00
alc
87de22f863 Remove a broken micro-optimization from pmap_enter(). The ill effect
of this micro-optimization occurs when we call pmap_enter() to wire an
already mapped page.  Because of the micro-optimization, we fail to
mark the PTE as wired.  Later, on teardown of the address space,
pmap_remove_pages() destroys the PTE before vm_fault_unwire() has
unwired the page.  (pmap_remove_pages() is not supposed to destroy
wired PTEs.  They are destroyed by a later call to pmap_remove().)
Thus, the page becomes lost.

Note: The page is not lost if the application called munlock(2), only
if it relies on teardown of the address space to unwire its pages.

For the historically inclined, this bug was introduced by a
megacommit, revision 1.182, roughly six years ago.

Leak observed by: green@ and dillon independently
Patch submitted by: dillon at backplane dot com
Reviewed by: tegge@
MFC after: 1 week
2004-05-28 19:42:02 +00:00
jhb
cb36cda063 Reenable ithread preemption for interrupts that occur while executing in
the kernel.  I accidentally broke this with the new interrupt code that
came in prior to 5.2.

Submitted by:	bde
2004-05-28 17:50:07 +00:00
jhb
b37201f805 Don't assume that the current setting (_CRS) of a PCI link device is
correct.  Instead, check it against the possible settings (_PRS) when
the link is probed.  This is important when using APIC mode but link
devices still have PIC mode settings.  This is also what Linux does.

Additional prodding by:	Len Brown len dot brown at intel dot com
2004-05-28 17:31:32 +00:00
njl
577b8571b9 Style fixes. 2004-05-28 16:38:37 +00:00
maxim
6eb6ad12e9 Style.
Submitted by:	bde
2004-05-28 14:20:06 +00:00
njl
0659d93cbd Now that we properly disable GPEs before entering a sleep state, including
S5 (soft off), we don't need to disable ACPI when powering off.  This may
fix some systems that don't power off correctly.
2004-05-28 07:16:52 +00:00
njl
bf2804c5c0 Style cleanups. "extern" is unneeded for function prototypes. 2004-05-28 07:15:55 +00:00
njl
61d1e128a8 Update the new suspend/resume GPE methods to properly limit the GPE
based on the destination sleep state.  Add a method to restore the old
state on resume.  This is needed for the case of suspending to a very low
state disabling a GPE (i.e. S4), resuming, and then suspending to a higher
state (i.e. S3).  This case should now keep the proper GPEs enabled.
2004-05-28 07:04:09 +00:00
njl
41bb6f98ab Pass a pointer to the sleep state instead of casting gymnastics to pass
the value itself in the pointer.
2004-05-28 06:32:16 +00:00
njl
aeb7add661 Fix paste-o. 2004-05-28 06:29:30 +00:00
njl
0a67198e38 Attach per-device sysctls to allow users to set whether or not a given
device can wake the system.  For example:

    dev.root0.nexus0.acpi0.acpi_lid0.wake: 1
    dev.root0.nexus0.acpi0.acpi_button0.wake: 1
    dev.root0.nexus0.acpi0.pcib0.wake: 0
    dev.root0.nexus0.acpi0.sio0.wake: 0
2004-05-28 06:28:55 +00:00
scottl
e66b8efce9 Remove a redundant include directive 2004-05-28 04:42:10 +00:00
marcel
99e71f8aad Fix LP64 environments: cast a pointer type to intptr_t before casting
to int and vice versa.
2004-05-28 02:50:43 +00:00
imp
32a2cb4250 Don't nest includes here. There's no need and the subset included is lame.
Submitted by: bde
2004-05-28 02:24:07 +00:00