Commit Graph

51233 Commits

Author SHA1 Message Date
sam
e3a33be489 cover up the landmine until there's a proper solution 2004-12-13 04:26:36 +00:00
scottl
6d3ab8ca37 Remove the addition of ACPI_DEBUG that was accidentally added in the last
commit.
2004-12-13 03:23:08 +00:00
scottl
1048e6f4a6 Allow the acpi_ibm module to be built with ACPI_DEBUG. 2004-12-13 03:22:11 +00:00
julian
532abd191c Try make code for teh M$ Intellimouse less obtrusive
when not using such a device.
2004-12-13 02:20:48 +00:00
scottl
89aa93f4bc Make sure that opt_ddb.h exists so that this will compile with ACPI_DEBUG 2004-12-13 02:13:08 +00:00
julian
0dfd473a43 Don't export the 'dt' field as that would break the exisiting ABI.
keep the code but comment it out so that if the ABI changes we
can see easily what should be done.

Submitted by:	iedowse
2004-12-13 01:23:49 +00:00
julian
e798309545 Revert addition of Lide scanner entry..
It's a duplicate of an already exisiting entry. (with another name).
2004-12-13 00:25:03 +00:00
imp
0683fc4a30 Bump revision of FreeBSD for 802.11 framework update. 2004-12-12 22:42:17 +00:00
imp
a9476981be Separate mse driver into a core driver and a bus attachments. Separate out
the ISA and CBUS (called isa on pc98) attachments.  Eliminate all PC98
ifdefs in the process (the driver in pc98/pc98/mse.c was a copy of the one
in i386/isa/mse.c with PC98 ifdefs).  Create a module for this driver.

I've tested this my PC-9821RaS40 with moused.  I've not tested this on i386
because I have no InPort cards, or similar such things.  NEC standardized
on bus mice very early, long before ps/2 mice ports apeared, so all PC-98
machines supported by FreeBSD/pc98 have bus mice, I believe.

Reviewed by: nyan-san
2004-12-12 20:05:50 +00:00
marcel
8944146336 Fix the last of the instability and the cause of the annoying
"vm_fault: fault on nofault entry, addr: %lx" panic. The problem was a
stale PTE in the TLB that marked the page as not present, even though
we had a good PTE in the VHPT. We typically don't yet insert PTEs in
the TLB. We do that lazily. The CPU will look for the PTE in the VHPT
when there's no PTE in the TLB. Unfortunately this doesn't handle the
case of the stale PTE in the TLB. The quick fix is to invalidate the
TLB (sloppily) when the VHPT doesn't contain a valid PTE. This is also
the only case that may cause a PTE in the TLB that marks a page as
non-present.
2004-12-12 19:27:58 +00:00
cognet
8e56111fcd Save a few more cycles in cpu_switch() and cpu_throw(). 2004-12-12 19:21:58 +00:00
rik
a09ae8d2bf Make sppp MPSAFE.
MPSAFE could be turned off by IFF_NEEDSGIANT.

Silence on: net@, current@, hackers@.
No objections: joerg
2004-12-12 14:54:15 +00:00
phk
729dda8f41 With the introduction of UFS2 we started looking for superblocks in
four different locations on a prospective filesystem.

If we found none, we forgot to invalidate the four buffers, thus the
following sequence would fails:

	(md0 = blank disk)
	mount /dev/md0 /mnt
	(fails, no superblocks)
	newfs /dev/md0
	(writes using physio which does not go through buffercache).
	mount /dev/md0 /mnt
	(still fails, the four cached buffers still contain no superblocks)

Found by:	ru
2004-12-12 14:19:11 +00:00
phk
60aefa9310 Don't deref NULL if no charset-conversion is specified.
Return correct vnode in vop_bmap()
2004-12-12 12:02:34 +00:00
phk
35b3c9fdfb Pass the file->flags down to geom ioctl handlers.
Reject certain ioctls if write permission is not indicated.

Bump geom API version.

Reported by:	Ruben de Groot <mail25@bzerk.org>
2004-12-12 10:09:05 +00:00
julian
cfac934dde Add support for Cannon LIDE 20 scanner
PR:	kern/74301
Submitted by:	Vlad Manilici <vman@tmok.com>
MFC after:	1 week
2004-12-12 08:35:21 +00:00
sam
6e836f2de1 record the bssid for an association
Tested by:	Daniel O'Connor
2004-12-12 07:45:42 +00:00
njl
e73aaccf12 Only export defined symbols. Note that I couldn't find any difference
between object code generated without the flag but it makes sense and might
make a difference in the future.

PR:		kern/53008
Submitted by:	Jens Rehsack rehsack at liwing de
2004-12-12 06:59:14 +00:00
njl
e84f6642f1 Move the author's copyright notice to match the initial LongRun import
now that we have split out this support into longrun.c
2004-12-12 05:53:57 +00:00
julian
b8473b1c5d Add support for USB Microsoft Intellimouse
PR:		kern/70607
Submitted by:	Matt Wright <matt@consultmatt.co.uk>
MFC after:	1 week
2004-12-12 05:34:20 +00:00
sam
dc4ceb7b98 do not clear the global key cache when reaching the INIT state 2004-12-12 05:00:13 +00:00
julian
4f6eebc338 Changes to cache endpoint descriptors for all the interfaces. this information
is not always available if we change interfaces.

Submitted by:	jamie at bishopston dot net  (jamie jones)
MFC after:	1 week
2004-12-12 02:27:30 +00:00
marius
13c1f64b09 Some changes related to reading the MAC-address from the VPD on systems
without Open Firmware:
- The PCI data structure of some HME PROMs contains a non-zero interface
  revision in the class code. Thus remove the checks for matching class
  code and PCI data structure length and revsion. These were pretty much
  useless anyway as we only really need the pointer to the VPD which is
  located before the structure length and revision fields.
- On Sun QFE (Quad FastEthernet) cards read the Nth MAC-address for the
  Nth HME controller instead of always the first one for all four HMEs. [1]
- Improve the comment describing the used VPD format to better reflect
  reality.
- Minor clean-up.

Prodded by:	joerg [1]
2004-12-12 00:32:51 +00:00
sam
27e1f2c5b3 remove module dependency on rc4; it's not needed any more 2004-12-12 00:28:41 +00:00
cognet
f047a2aa01 Fix style. 2004-12-11 23:56:03 +00:00
cognet
3c819126da Add entries to trace syscalls with KTR. 2004-12-11 23:54:03 +00:00
marcel
fb456e7011 Revert rev 1.259. The null-pointer function call (a dereference on
ia64) was not the result of a change in the vector operations. It
was caused by the NFS locking code using a FIFO and those bypassing
the vnode. This indirectly caused the panic. The NFS locking code
has been changed.

Requested by: phk
2004-12-11 23:07:14 +00:00
marcel
e951047e5f Revert previous commit. The null-pointer function call (a dereference
on ia64) was not the result of a change in the vector operations. It
was caused by the NFS locking code using a FIFO and those bypassing
the vnode. This indirectly caused the panic. The NFS locking code has
been changed.

Requested by: phk
2004-12-11 23:05:30 +00:00
rik
e00dca86b9 Add support for Tau-PCI-L model - one V.35/RS-232 or
RS-530(449)/X.21 interface.
2004-12-11 22:44:12 +00:00
alc
4e33a39313 Pass VM_ALLOC_NOBUSY to vm_page_grab() so that we don't have to call
vm_page_flag_clear(PG_BUSY).  The object lock is held the entire time.
Thus, whether or not the PG_BUSY flag is set is invisible to others.
2004-12-11 22:35:16 +00:00
phk
dcaf810e82 Copy the entire stats structure. Let compiler decide how. 2004-12-11 22:13:02 +00:00
marcel
4b90107750 Revert rev 1.233. The null-pointer function call (a dereference on
ia64) was not the result of a change in the vector operations. It
was caused by the NFS locking code using a FIFO and those bypassing
the vnode. This indirectly caused the panic. The NFS locking code has
been changed.

Requested by: phk
2004-12-11 21:36:29 +00:00
marcel
860981b28f Revert previous commit. The null-pointer function call (a dereference
on ia64) was not the result of a change in the vector operations. It
was caused by the NFS locking code using a FIFO and those bypassing
the vnode. This indirectly caused the panic. The NFS locking code has
been changed.

Requested by: phk
2004-12-11 21:33:35 +00:00
phk
88c8b6a503 Fix whitespace.
Spotted by:	njl
2004-12-11 20:41:32 +00:00
phk
40fb82789b Handle MNT_UPDATE export requests first and return so we do not
interpret the rest of the msdosfs_args structure.

Detected by:	marcel
2004-12-11 20:37:48 +00:00
cognet
975196bf45 Fix compilation with INVARIANTS. 2004-12-11 14:46:52 +00:00
phk
b733b4afe1 Remove the /dev/dev -> / symlink after we are done with it. 2004-12-11 12:48:37 +00:00
phk
93f6fd0d01 typo 2004-12-11 12:45:24 +00:00
marcel
1cd76b6473 Use primitive types to avoid creating an artificial header dependency:
o  s/u_long/unsigned long/
o  s/uint32_t/unsigned int/g
o  s/uint64_t/unsigned long/g

Trigger case: multimedia/mpeg2codec
2004-12-11 06:15:12 +00:00
rik
13a7d25634 Clean up from '#if __FreeBSD_version'. 2004-12-11 05:38:16 +00:00
mlaier
5a1a81dd99 Compile pfsync w/o bpf.
Noticed by:	"Jayel Villamin" <jarthel operamail com>
2004-12-10 17:42:47 +00:00
cognet
01b59b6929 s/RETEQ/RETeq/. 2004-12-10 16:49:08 +00:00
sam
42039c0abf fix wep key seting: ENETRESET is the code to return to signal the driver
should push software state to the hardware (was ERESTART which caused the
system call to be retried)

Submitted by:	Tor Egge
2004-12-10 16:35:37 +00:00
scottl
a014627e19 Expand the scope of the critical section in the PCIe read and write methods
on the advice of Alan Cox.
2004-12-10 15:44:12 +00:00
glebius
16a5d8193f In certain cases ip_output() can free our route, so check
for its presence before RTFREE().

Noticed by:	ru
2004-12-10 07:51:14 +00:00
glebius
c08591ffd6 Revert last change.
Andre:
  First lets get major new features into the kernel in a clean and nice way,
  and then start optimizing. In this case we don't have any obfusication that
  makes later profiling and/or optimizing difficult in any way.

Requested by:	csjp, sam
2004-12-10 07:47:17 +00:00
rik
bd2198776f Clean up from '#if __FreeBSD_version'. 2004-12-10 05:54:45 +00:00
alc
72abac0bd2 Remove unneeded code from the zero-copy receive path.
Discussed with: gallatin@
Tested by: ken@
2004-12-10 04:49:13 +00:00
ps
b4a200824a In nfs_rename(), skip the otw rename operation if the fsync (to
either src or dst) fails. This closes a potential data loss case
(where the fsync failed with ENOSPC, for example).

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
Obtained from:	Yahoo!
2004-12-10 03:29:02 +00:00
ps
f46c52047f Store a hint in the nfsnode to detect sequential access of the file.
Kick off a readahead only when sequential access is detected.  This
eliminates wasteful readaheads in random file access.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
Obtained from:	Yahoo!
2004-12-10 03:27:12 +00:00
csjp
9757d6d2e3 This commit adds a shared locking mechanism very similar to the
mechanism used by pfil.  This shared locking mechanism will remove
a nasty lock order reversal which occurs when ucred based rules
are used which results in hard locks while mpsafenet=1.

So this removes the debug.mpsafenet=0 requirement when using
ucred based rules with IPFW.

It should be noted that this locking mechanism does not guarantee
fairness between read and write locks, and that it will favor
firewall chain readers over writers. This seemed acceptable since
write operations to firewall chains protected by this lock tend to
be less frequent than reads.

Reviewed by:	andre, rwatson
Tested by:	myself, seanc
Silence on:	ipfw@
MFC after:	1 month
2004-12-10 02:17:18 +00:00
sam
c0d8c46478 Fix compilation and correct mapping from struct ifnet to
struct ieee80211com after net80211 import.

Submitted by:	Tor Egge
2004-12-10 00:59:27 +00:00
rik
b73c74d91c Partially backout 1.34. These ioctls and function cx_modem_status () are
used by sync part of driver, so put them back.
2004-12-09 23:43:03 +00:00
scottl
08399c7f98 Complete the repo-copy of aac_ioctl.h from sys/dev/aac/to sys/sys. 2004-12-09 22:20:25 +00:00
mckusick
a697c3ed65 Fixes a bug that caused UFS2 filesystems bigger than 2TB to
prematurely report that they were full and/or to panic the kernel
with the message ``ffs_clusteralloc: allocated out of group''.

Submitted by:	Henry Whincup <henry@jot.to>
MFC after:	1 week
2004-12-09 21:24:00 +00:00
takawata
177099d758 Connect acpi_ibm to build.
Submitted by: rushani, sumikawa
2004-12-09 16:47:07 +00:00
glebius
a00e6991bc Check that DUMMYNET_LOADED before seeking dummynet m_tag.
Reviewed by:	andre
MFC after:	1 week
2004-12-09 16:41:47 +00:00
takawata
226bfdc163 Add IBM Laptop extra device driver.
This depends on ACPI and RTC registers.

Reviewed by: njl
2004-12-09 13:54:29 +00:00
brueffer
acd8904095 URL of the data sheet has changed.
Obtained from:	OpenBSD
2004-12-09 13:27:44 +00:00
pjd
3342c80c8f - Turn off 'fast' mode by default and increase maximum memory to consume
when this mode is used.
- Manual page update.
2004-12-09 12:26:47 +00:00
mlaier
488882b3e9 Start the protocol timeouts only after all domains have been initialized
completely. For some reason (that I am still curious about) we started to no
longer manage to finish the initialization before the timeouts run the first
time leading to panics when using uninitialized mutex etc.

The root of this problem is that we currently first link a domain to the
domains list and only later initialize the domain's protocols. This should
be reworked in the future, but with the current API it is not possible in
all situations. We settle with this lazy fix for now.

Tested by:	gnn, ru, myself
2004-12-09 11:47:30 +00:00
glebius
272be69b39 style the last change 2004-12-09 09:52:58 +00:00
glebius
9fdc5dd01a MFinet4:
- Make route cacheing optional, configurable via IFF_LINK0 flag.
  - Turn it off by default.

Reminded by:	suz
2004-12-09 09:48:47 +00:00
glebius
ce23ffb82d Use ng_callout() and ng_uncallout() instead of home-grown
implementation.

Tested by:	Savchuk Taras
Reviewed by:	archie
Approved by:	julian (mentor)
2004-12-09 07:49:02 +00:00
sos
c6a934b3e0 Compensate for off by one bugs in disk firmware for 48BIT addressing cutover. 2004-12-09 07:31:06 +00:00
mlaier
489aa3c57e More fixing of multiple addresses in the same prefix. This time do not try
to arp resolve "secondary" local addresses.

Found and submitted by:	ru
With additions from:	OpenBSD (rev. 1.47)
Reviewed by:		ru
2004-12-09 00:12:41 +00:00
sam
0ea4584f3c fixup printf arguments for 64-bit machines 2004-12-08 22:34:07 +00:00
rsm
f85e5b2030 Diff-reduction before merging if_axe to RELENG_4.
Approved by:	imp (mentor)
MFC after:	1 week
2004-12-08 22:02:58 +00:00
kbyanc
f947a8cc1c If the parent process has the trap bit set (i.e. a debugger had single
stepped the process to the system call), we need to clear the trap flag
from the new frame unless the debugger had set PF_FORK on the parent.
Otherwise, the child will receive a (likely unexpected) SIGTRAP when it
executes the first instruction after returning to userland.

Reviewed by:	bde
MFC after:	3 days
2004-12-08 19:03:55 +00:00
sam
bf7a77645b clear old files now in public 2004-12-08 18:27:44 +00:00
sam
45e73044fe update for new ath hal 2004-12-08 18:20:53 +00:00
sam
12c26fd8f2 resolve merge conflict 2004-12-08 18:18:39 +00:00
sam
a1c4d74288 This commit was generated by cvs2svn to compensate for changes in r138583,
which included commits to RCS files with non-trunk default branches.
2004-12-08 18:06:09 +00:00
sam
bb2ee9a892 Version 0.9.14.12:
[Changes listed only since last public release 0.9.12.14; for changes
 prior to that consult the CVS logs at http://madwifi.sourceforge.net]

o reorg directory structure to have a single set of public binary builds
  shared by all systems
o support for new parts (all shipping pci/cardbus parts to this date work)
o new capabilities for identifying various chip features
o set/get tx power cap for supporting 802.11h information element
o revised api for set/get tx queue properties
o support for updating CTS in frames when doing packet bursting
o support for querying which tx queues have pending interrupts
2004-12-08 18:06:09 +00:00
sos
778b1dc628 Update the ICH6 support so all 4 SATA channels can be used.
We still use "normal" mode, AHCI mode is in the works still.

HW donated by:	Sentex
HW donated by:	Yahoo!
2004-12-08 18:00:46 +00:00
sam
26fa487b00 add ath rate control module(s) 2004-12-08 17:40:55 +00:00
sam
f716b4c91e Update for ath and net80211 changes. 2004-12-08 17:39:51 +00:00
sam
1a32aab0d4 Update/new modules for net80211 and ath changes. 2004-12-08 17:38:38 +00:00
sam
db6535c876 Update for net80211 changes. 2004-12-08 17:36:51 +00:00
sam
0c82ed6165 o Update for net80211 changes
o Import some minor fixes from netbsd
2004-12-08 17:36:28 +00:00
sam
302c94fa29 Update with last year of work. 2004-12-08 17:34:36 +00:00
sam
adfba3a7ae Transmit rate control modules for the ath driver. 2004-12-08 17:32:02 +00:00
sam
2843bf259e Update 802.11 support; too much new functionality to fully describe
here but it includes completed 802.11g, WPA, 802.11i, 802.1x, WME/WMM,
AP-side power-save, crypto plugin framework, authenticator plugin framework,
and access control plugin frameowrk.
2004-12-08 17:26:47 +00:00
glebius
99506151c1 - Use ng_callout() instead of timeout()
- remove spl(9) calls

Tested by:	Ilya Pizik
Approved by:	julian (mentor)
2004-12-08 13:27:54 +00:00
phk
125513db75 Fix snapshot creation. 2004-12-08 11:54:06 +00:00
rwatson
a8ea643607 Add a new sysctl/tunable to mac_portacl:
security.mac.portacl.autoport_exempt

This sysctl exempts to bind port '0' as long as IP_PORTRANGELOW hasn't
been set on the socket.  This is quite useful as it allows applications
to use automatic binding without adding overly broad rules for the
binding of port 0.  This sysctl defaults to enabled.

This is a slight variation on the patch submitted by the contributor.

MFC after:	2 weeks
Submitted by:	Michal Mertl <mime at traveller dot cz>
2004-12-08 11:46:44 +00:00
sos
0138ea081f Add support for the ITE IT8212F controller.
HW donated by:	Yahoo!
2004-12-08 11:17:38 +00:00
sos
db3855bde9 Reset timeout when we are back from interrupt. 2004-12-08 11:16:33 +00:00
sos
d4647dd77b Add first shot on support for the new Promise SATAII chips.
HW donated by:	pil.dk
2004-12-08 10:02:41 +00:00
sos
5dc3dca989 Correct logical error, result was that retries wasn't always made but
failure reported instead.
2004-12-08 09:19:03 +00:00
ru
979de51e35 Properly handle vnode_if.h dependencies, and don't forget to clean all files. 2004-12-08 07:23:12 +00:00
marcel
f005fa80bc Don't obtain the HCDP address directly from the bootinfo structure.
Use a function to keep the details at arms length from uart(4).
2004-12-08 05:46:54 +00:00
sam
2c929f635e Cleanup link state change notification:
o add new if_link_state_change routine that deals with link state changes
o change mii to use if_link_state_change
2004-12-08 05:45:59 +00:00
sam
bc6df700aa add m_append utility function to be used in forthcoming changes 2004-12-08 05:42:02 +00:00
sam
051e994615 Don't require a device to be marked up when issuing BIOCSETIF. 2004-12-08 05:40:02 +00:00
alc
cdb92b3917 Tidy up the zero-copy receive path: Remove an unneeded argument to
uiomoveco() and userspaceco().
2004-12-08 05:25:08 +00:00
alc
40ad9ef99b With the removal of kern/uipc_jumbo.c and sys/jumbo.h,
vm_object_allocate_wait() is not used.  Remove it.
2004-12-08 05:01:47 +00:00
imp
4675c019d8 Fix comments to match last commit, and minor reformatting... 2004-12-08 04:35:19 +00:00
imp
0a1dc51947 It turns out that a lot of newer systems have 'base peripherals' on
the PCI bus.  We presently have no drivers for these devices, so they
are powered down.  This is undesirable behavior since it breaks the
system when the base peripherals go away suddenly in the middle of
boot.

# if we ever get generic drivers for memory and/or base peripherals, then
# we can remove the tests here.
2004-12-08 04:16:18 +00:00
green
a7cdf97674 Unbreak KLDs that use VFS by accounting for changes in the generation
process for the vnode header files.
2004-12-08 03:54:32 +00:00
njl
6224f36cad Add the devclass_get_count(9) function and man page. It gets a count of
the number of devices in a devclass and is a subset of
devclass_get_devices(9).

Reviewed by:	imp, dfr
2004-12-08 02:39:56 +00:00
alc
b014c2904e Almost nine years ago, when support for 1TB files was introduced in
revision 1.55, the address parameter to vnode_pager_addr() was changed
from an unsigned 32-bit quantity to a signed 64-bit quantity.  However,
an out-of-range check on the address was not updated.  Consequently,
memory-mapped I/O on files greater than 2GB could cause a kernel panic.
Since the address is now a signed 64-bit quantity, the problem resolution
is simply to remove a cast.

Reviewed by: bde@ and tegge@
PR: 73010
MFC after: 1 week
2004-12-07 22:05:38 +00:00
ps
81f484b21d Fix for a Lock Order Reversal in the nfs_flush() path, between the
vnode interlock and the proc lock.

Reported by:	marcel
Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-07 21:16:32 +00:00
ups
0e900aeba0 Avoid more than two pending IPI interrupt vectors per local APIC
as this may cause deadlocks.

This should fix kern/72123.

Discussed with: jhb
Tested by: Nik Azim Azam, Andy Farkas, Flack Man, Aykut KARA
           Izzet BESKARDES, Jens Binnewies, Karl Keusgen
Approved by:    sam (mentor)
2004-12-07 20:15:01 +00:00
ups
e2f469b728 Propagate TDF_NEEDRESCHED to replacement thread in sched_switch().
Reviewed by:    julian, jhb (in October)
Approved by:    sam (mentor)
MFC after:      4 weeks
2004-12-07 18:17:24 +00:00
cognet
988b22e8cb Include <sys/signalvar.h> for trapsignal(). 2004-12-07 17:39:42 +00:00
imp
4dc7ffa02d NEC PC-98 machines do not have and cannot have an EISA bus. They have
only C-Bus and PCI busses.  Therefore, don't create an eisa0 node on
the legacy bus that can never attach.

PC-98 info verified by: nyan-san
2004-12-07 15:36:19 +00:00
phk
13dc81a40f First save from editor, *then* commit. 2004-12-07 15:25:36 +00:00
phk
a103d64da5 Fix exports. 2004-12-07 15:13:35 +00:00
phk
8bef9a211a Fix nfs exports (for now). The real fix is to teach mountd about
nmount.
2004-12-07 15:09:30 +00:00
phk
849729c60b Don't clobber mnt_stat.f_mntonname 2004-12-07 14:26:39 +00:00
phk
4a639d6164 The remaining part of nmount/omount/rootfs mount changes. I cannot sensibly
split the conversion of the remaining three filesystems out from the root
mounting changes, so in one go:

cd9660:
	Convert to nmount.
	Add omount compat shims.
	Remove dedicated rootfs mounting code.
	Use vfs_mountedfrom()
	Rely on vfs_mount.c calling VFS_STATFS()

nfs(client):
	Convert to nmount (the simple way, mount_nfs(8) is still necessary).
	Add omount compat shims.
	Drop COMPAT_PRELITE2 mount arg compatibility.

ffs:
	Convert to nmount.
	Add omount compat shims.
	Remove dedicated rootfs mounting code.
	Use vfs_mountedfrom()
	Rely on vfs_mount.c calling VFS_STATFS()

Remove vfs_omount() method, all filesystems are now converted.

Remove MNTK_WANTRDWR, handling RO/RW conversions is a filesystem
task, and they all do it now.

Change rootmounting to use DEVFS trampoline:

vfs_mount.c:
	Mount devfs on /.  Devfs needs no 'from' so this is clean.
	symlink /dev to /.  This makes it possible to lookup /dev/foo.
	Mount "real" root filesystem on /.
	Surgically move the devfs mountpoint from under the real root
	filesystem onto /dev in the real root filesystem.

Remove now unnecessary getdiskbyname().

kern_init.c:
	Don't do devfs mounting and rootvnode assignment here, it was
	already handled by vfs_mount.c.

Remove now unused bdevvp(), addaliasu() and addalias().  Put the
few necessary lines in devfs where they belong.  This eliminates the
second-last source of bogo vnodes, leaving only the lemming-syncer.

Remove rootdev variable, it doesn't give meaning in a global context and
was not trustworth anyway.  Correct information is provided by
statfs(/).
2004-12-07 08:15:41 +00:00
phk
e8e7853c60 Instead of complaining about it, just silently filter out MNT_ROOTFS.
This fixes the "fsck /" problem various people have reported overnight.
2004-12-07 06:58:42 +00:00
imp
efea860c4d PNP BIOS devices are fundamentally different than ISA PNP devices.
These devices should be probed first because they are at fixed
locations and cannot be turned off.  ISA PNP devices, on the other
hand, can be turned off and often can be flexible in the resources
they use.  Probe them last, as always.
2004-12-07 05:30:02 +00:00
ps
1d9d717d90 Always issue wakeups() to the NFS requestors under the mutex
to close all potential cases of missed wakeups.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-07 03:39:52 +00:00
ups
0e26edfd43 Move reading the current CPU mask in pmap_lazyfix() to where the thread
is protected from migrating to another CPU.

Approved by:    sam (mentor)
MFC after:      4 weeks
2004-12-07 02:56:14 +00:00
rsm
5e81937a6f Properly release allocated resources if adw(4) device fails to fully attach,
eg. if the firmware load fails.  Shortish MFC timeout so this can be merged
before the 4.11 freeze.

PR:		kern/34306
Submitted by:	gibbs
Approved by:	gibbs, imp (mentor)
MFC after:	5 days
2004-12-06 23:17:04 +00:00
peter
e6d23e6014 MFi386: rev 1.12: re-allow fast interrupts to cause preemption 2004-12-06 22:56:15 +00:00
ru
3827837a66 Time out routes created by redirect. 2004-12-06 22:27:22 +00:00
ups
f4f83943de Allow fast interrupts to cause preemption.
Reviewed by:    jhb, scottl
Approved by:    sam (mentor)
2004-12-06 22:25:01 +00:00
phk
b0b381b949 make "ffs" and alias for "ufs" when it comes to filesystem names. 2004-12-06 22:22:57 +00:00
ps
eeccf3813d Rewrite of the NFS client's reply handling. We now have NFS socket
upcalls which do RPC header parsing and match up the reply with the
request. NFS calls now sleep on the nfsreq structure. This enables
us to eliminate the NFS recvlock.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 21:11:15 +00:00
phk
2b5157cd0d Use vfs_mountedfrom().
Since VFS_STATFS() always calls the filesystem with mp->mnt_stat now, the
vfs_statfs method is now a no-op.  Explain this in a comment.
2004-12-06 20:52:46 +00:00
phk
e6c6f2ab9a Convert to nmount. Add omount compat code. 2004-12-06 20:34:32 +00:00
phk
3aae37ff61 Convert to nmount, add omount compat.
Take the cheap way and just put struct nfs_args in a nmount arg, we will
need a userland mount_nfs4(8) program anyhow.
2004-12-06 20:33:24 +00:00
phk
5d8af49b77 Trust vfs_mount to call VFS_STATFS() on all mounts. 2004-12-06 20:31:36 +00:00
phk
0e7aaf24f7 Convert to nmount. Add omount compat.
Unpropagate the sm_args function into the runtime part.
2004-12-06 20:31:08 +00:00
phk
b71fe4fc33 Convert to nmount. Add omount compat.
Use vfs_mountedon().  Rely on vfs_mount.c calling VFS_STATFS().
2004-12-06 20:23:51 +00:00
phk
43fffbad59 Convert to nmount. Add omount compat.
Same comment about charset conversions apply.

Use vfs_mountedfrom().  Rely on vfs_mount.c calling VFS_STATFS().
2004-12-06 20:22:16 +00:00
phk
3d2dc8aba5 Convert to nmount. Add backwards compat cmount method.
Same comment as msdosfs applies: It would be nice if we had generic option
names for charset conversions.

Use vfs_mountefrom().  Rely on vfs_mount.c calling VFS_STATFS().
2004-12-06 20:14:20 +00:00
phk
68b4df69d0 Convert nwfs to nmount, but take the low road: There is no way this is
ever going to work without a dedicated mount_nwfs(8) program so simply
stick struct nwfs_args into a nmount argument and leave it at that.
2004-12-06 20:11:56 +00:00
kan
17bd3d9149 Fix a typo in PFS_TRACE.
PR:		kern/74461
Submitted by:	Craig Rodrigues <rodrigc at crodrigues.org>
2004-12-06 20:07:17 +00:00
phk
5d1a13a0c9 ufs vfs_mountedon(), rely on vfs_mount.c calling VFS_STATFS() 2004-12-06 20:03:58 +00:00
phk
1eff61ea7f Use vfs_mountedfrom(), rely on vfs_mount.c calling VFS_STATFS(). 2004-12-06 20:02:13 +00:00
phk
463e576c38 Use vfs_mountedfrom() and rely on vfs_mount.c to call VFS_STATFS() 2004-12-06 19:54:31 +00:00
phk
40bf35ba61 Always call VFS_STATFS() on mp->mnt_stat when we have mounted a filesystem,
this way individual filesystems don't have to do it.
2004-12-06 19:53:32 +00:00
glebius
535ed5b0e2 - Use ng_callout() instead of timeout(9).
- Do not put/remove node references, since this no longer
  needed.
- Remove timerActive flag, use callout flags.
- Schedule next callout after doing current one.

Reviewed by:	archie
Approved by:	julian (mentor)
2004-12-06 19:49:55 +00:00
phk
39311fe2e6 Convert coda to nmount. 2004-12-06 19:46:02 +00:00
rwatson
892d4bfa16 Switch from using an sx lock to a mutex for the mac_portacl rule chain:
the sx lock was used previously because we might sleep allocating
additional memory by using auto-extending sbufs.  However, we no longer
do this, instead retaining the user-submitted rule string, so mutexes
can be used instead.  Annotate the reason for not using the sbuf-related
rule-to-string code with a comment.

Switch to using TAILQ_CONCAT() instead of manual list copying, as it's
O(1), reducing the rule replacement step under the mutex from O(2N) to
O(2).

Remove now uneeded vnode-related includes.

MFC after:	2 weeks
2004-12-06 19:43:45 +00:00
ps
8eaa4f53e4 2 fixes that improve on the consistency of the NFS client cache.
- Change the cached mtime to a 'struct timespec' from a
  time_t. Improving the precision of the cached mtime tightens up
  NFS' "close-to-open" consistency considerably.
- Always force an over-the-wire consistency check from nfs_open()
  (unless the file is marked modified). This further improves
  NFS' "close-to-open" consistency.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 19:18:00 +00:00
phk
b894547e6f Convert msdosfs to nmount.
Add a vfs_cmount() function which converts omount argument stucture
to nmount arguments.

Convert vfs_omount() to vfs_mount() and parse nmount arguments.

This is 100% compatible with existing userland.

Later on, but before userland gets converted to nmount we may want
to revisit the names of the mountoptions, for instance it may make
sense to use consistent options for charset conversion etc.
2004-12-06 19:05:48 +00:00
glebius
a67e8a38b3 - Make route cacheing optional, configurable via IFF_LINK0 flag.
- Turn it off by default.

Requested by:	many
Reviewed by:	andre
Approved by:	julian (mentor)
MFC after:	3 days
2004-12-06 19:02:43 +00:00
ps
aa4aa62af0 Serialize NFS vinvalbuf operations by acquiring/upgrading to the
vnode EXCLUSIVE lock. This prevents threads from adding pages to
the vnode while an invalidation is in progress, closing potential
races. In the bioread() path, callers acquire the SHARED vnode lock
- so while an invalidate was in progress, it was possible to fault
in new pages onto the vnode causing the invalidation to take a while
or fail. We saw these races at Yahoo! with very large files+heavy
concurrent access. Forcing an upgrade to EXCLUSIVE lock before doing
the invalidation closes all these races.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 18:52:28 +00:00
scottl
f98e4c8a08 Due to a significant addition of code, add my copyright to this file. Also
note that the PCIe work was made possible due to hardware donations from
the FreeBSD Foundation and Intel.  Thanks!
2004-12-06 18:19:32 +00:00
phk
dbe532a28b Add more functions for handling mount arguments in VFS_MOUNT():
vfs_flagopt() for binary/boolean options.
vfs_getopts() for string options
vfs_filteropt() to check for unknown options.
vfs_scanopt() for scanf() like processing of options.

Also add function for setting the stat.f_mntfromname field.
2004-12-06 18:18:35 +00:00
ps
5feadd3eba Add non-blocking versions of nfsm_dissect() and friends, for use from
socket callbacks or similar callers, from both the NFS client and the
server.
Instituted nfsm_dissect_nonblock(), nfsm_dissect_xx_nonblock(). And
nfsm_disct() now takes an extra M_TRYWAIT/M_DONTWAIT argument.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 17:33:52 +00:00
phk
e196d80083 Change the first argument of vfs_cmount() to a handy struct mntarg* and
call it accordingly.

(No filesystems implement vfs_cmount() yet, so this is a no-op commit)
2004-12-06 16:39:05 +00:00
ps
ebd6438ae1 - If all data has been committed to stable storage on the server, it
is safe to turn off the nfsnode's NMODIFIED flag.
- Move the check for signals to the top of the loop where we loop
  around the dirty buffers on the vnode, scheduling writes. This
  ensures that we'll break ouf of the flush operation on reception of
  a signal.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 16:35:58 +00:00
rwatson
a98750ac1b Correct a typo in a comment. 2004-12-06 16:11:25 +00:00
phk
51c6653f10 Add a few convenient functions in the mount_arg() family and collect the
entire family at the end of the source file.
2004-12-06 13:01:41 +00:00
phk
e1b20748c2 Collapse two almost identical license copies, preserving the rights of
all listed authors, rightholders and contributors.
2004-12-06 12:44:30 +00:00
phk
62d457bcc4 Remove the kern.rootdev sysctl.
Root filessytems (like NFS) don't have an associated disk device,
and even if they had, the exact semantics would be filesystem
dependent and should be implemented there.
2004-12-06 12:40:45 +00:00
phk
bcbc430a4b Make struct vfsopt{list} private to vfs_mount.c 2004-12-06 12:36:17 +00:00
phk
28a46c9c9c Fix warning 2004-12-06 12:34:28 +00:00
pjd
7d8ef218e3 We don't have RAIDFrame anymore and it seems gvinum doesn't use SI_SUB_RAID,
so correct stale comment. The only SI_SUB_RAID consumer is gmirror right now.
2004-12-06 11:28:02 +00:00
jkoshy
cb37acb890 Use 'const char *' for a few prototypes.
Reviewed by:	ru
2004-12-06 10:53:40 +00:00
phk
753d615ec0 For reasons unknown, the nfs locking code used a fifo to send requests to
userland and a dedicated system call to get replies.

The vnode-bypass of fifos broke this into a panic.

Ditch all the magic and create a device /dev/nfslock instead, and
use that for both directions apart from the shorter path, this is
also faster because the device driver runs Giant free using the
vnode bypass.

Noticed by:	marcel
2004-12-06 08:31:32 +00:00
scottl
b62f254b42 Add support for the memory-mapped PCI Express configuration mechanism. This
actually is a property of the northbridge and applies to all PCI/PCI-X/PCIe
devices in the system, though only PCIe devices will respond to registers
higher than 256.  This uses per-CPU pools of temporary mappings so that
the whole 256MB of configuration space doesn't have to be mapped all at
once.  While the sf_buf API was considered for this, the fact that it
requires sleep locks and can return failure made it unsuitable for this use.

For now only the Intel Grantsdale and Lindenhurst (925 and 752x) chipsets are
supported.  Since there doesn't appear to be a compatible way to determine
northbridge support, new chipsets will have to be explicitely added in the
future.
2004-12-06 08:27:10 +00:00
imp
53f3deb9de The 'start' command processes loader.conf variables, not loader.rc.
Fix comment to match.
2004-12-06 05:30:31 +00:00
obrien
b3a3af726d Enable amr(4) - scottl fixed when used with >4GB RAM. 2004-12-06 02:50:31 +00:00
alc
630d0d0838 Update the Tigon 1 and 2 driver to use the sf_buf API for implementing
zero-copy receive of jumbo frames.  This eliminates the need for the
jumbo frame allocator implemented in kern/uipc_jumbo.c and sys/jumbo.h.
Remove it.

Note: Zero-copy receive of jumbo frames did not work without these changes;
I believe there was insufficient locking on the jumbo vm object.

Tested by: ken@
Discussed with: gallatin@
2004-12-06 00:43:40 +00:00
scottl
29448bd3e8 Fix a number of bugs and significantly alter the command execution path to
properly support bounce buffers and resource shortages.  This allows the
driver to work properly and reliably with more than 4GB of RAM.  Of the
three data paths that exist in the driver, (block, CAM, ioctl), the ioctl
path has not been well tested with these changes due to difficulty with
finding an application that uses it that actually works.

Sponsored by: The FreeBSD Foundation and FreeBSD Systems, Inc.
2004-12-05 23:48:17 +00:00
glebius
66304651ce Use ng_callout() instead of timeout(9).
Approved by:	julian (mentor)
2004-12-05 22:58:13 +00:00
rwatson
6b017b90b9 Convert GIANT_REQUIRED; in nfs_mountroot() to NET_ASSERT_GIANT(),
and annotate that nfs_mountroot assumes it is OK to step on the
values in the global NFSv3 diskless structure as the mountroot
function is called during a serialized part of the boot, before
any other NFS client activity occurs.

MFC after:	2 weeks
2004-12-05 22:53:17 +00:00
rwatson
22be685755 Convert a GIANT_REQUIRED; into a NET_ASSERT_GIANT();, as sockets are
now only conditionally protected by Giant based on debug.mpsafenet.
2004-12-05 22:50:09 +00:00
cognet
49745b3e73 Make sure to map the whole kernel into 1MB pages. Try to use the remaining
memory for things such as the kernel stack.
2004-12-05 22:48:04 +00:00
rwatson
47b5ad626d Assert the tcptw inpcb lock in tcp_timer_2msl_reset(), as fields in
the tcptw undergo non-atomic read-modify-writes.

MFC after:	2 weeks
2004-12-05 22:47:29 +00:00
cognet
1286f9fc64 Reactivate the use of the minidata cache. 2004-12-05 22:47:25 +00:00
cognet
d852f75fe8 Do not change the page directory and do not flush the TLB when switching to
a kernel thread.
2004-12-05 22:46:59 +00:00
cognet
8c5a104a40 Remove an unused field from the struct pv_entry.
While I'm there, fix style.
2004-12-05 22:46:30 +00:00
phk
6c14f71ef7 VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases
doesn't.  Most of the implementations have grown weeds for this so they
copy some fields from mnt_stat if the passed argument isn't that.

Fix this the cleaner way:  Always call the implementation on mnt_stat
and copy that in toto to the VFS_STATFS argument if different.
2004-12-05 22:41:02 +00:00
marcel
8b42e21d12 Fix null-pointer indirect function calls introduced in the previous
commit. In the new world order, the transitive closure on the vector
operations is not precomputed. As such, it's unsafe to actually use
any of the function pointers in an indirect function call. They can
be null, and we need to use the default vector in that case.
This is mostly a quick fix for the four function pointers that are
ed explicitly. A more generic or scalable solution is likely to see
the light of day.

No pathos on: current@
2004-12-05 22:30:28 +00:00
rwatson
a12b213cad Assert inpcb lock in:
tcpip_fillheaders()
  tcp_discardcb()
  tcp_close()
  tcp_notify()
  tcp_new_isn()
  tcp_xmit_bandwidth_limit()

Fix a locking comment in tcp_twstart(): the pcbinfo will be locked (and
is asserted).

MFC after:	2 weeks
2004-12-05 22:27:53 +00:00
rwatson
386bd91d54 Minor grammer fix in comment. 2004-12-05 22:20:59 +00:00
rwatson
338b787cfd Pass the inpcb reference into ip_getmoptions() rather than just the
inp->inp_moptions pointer, so that ip_getmoptions() can perform
necessary locking when doing non-atomic reads.

Lock the inpcb by default to copy any data to local variables, then
unlock before performing sooptcopyout().

MFC after:	2 weeks
2004-12-05 22:08:37 +00:00
rwatson
f2988d54de Define INP_UNLOCK_ASSERT() to assert that an inpcb is unlocked.
MFC after:	2 weeks
2004-12-05 22:07:14 +00:00
alc
fcf141e6aa Correct a sanity check in vnode_pager_generic_putpages(). The cast used
to implement the sanity check should have been changed when we converted
the implementation of vm_pindex_t from 32 to 64 bits.  (Thus, RELENG_4 is
not affected.)  The consequence of this error would be a legimate write to
an extremely large file being treated as an errant attempt to write meta-
data.

Discussed with: tegge@
2004-12-05 21:48:11 +00:00
rwatson
514977fc0b Push the inpcb argument into ip_setmoptions() when setting IP multicast
socket options, so that it is available for locking.
2004-12-05 21:38:33 +00:00
obrien
70d525536e When panicing in device_unbusy(), actually tell what device has the issue. 2004-12-05 20:58:56 +00:00
rwatson
ef102033be Start working through inpcb locking for ip_ctloutput() by cleaning up
modifications to the inpcb IP options mbuf:

- Lock the inpcb before passing it into ip_pcbopts() in order to prevent
  simulatenous reads and read-modify-writes that could result in races.
- Pass the inpcb reference into ip_pcbopts() instead of the option chain
  pointer in the inpcb.
- Assert the inpcb lock in ip_pcbots.
- Convert one or two uses of a pointer as a boolean or an integer
  comparison to a comparison with NULL for readability.
2004-12-05 19:11:09 +00:00
glebius
4f260d49bc - Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.
- Always check that index number passed from userland
  is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]

Noticed by:	Roman Palagin [1]
Requested by:	Yuri Y. Bushmelev [2]
MFC after:	1 week
2004-12-05 14:30:38 +00:00
rwatson
7679ddf408 Correct a misspelling in a comment. 2004-12-05 13:28:52 +00:00
rwatson
c39858036f Acquire socket receive buffer mutex before appending and then waking up
a receive socket in DDP.  This reduces the number of mutex operations
required to deliver to a socket by two, and is the model used in other
protocols.
2004-12-05 13:27:30 +00:00
dhartmei
de7cd2f92a IPv6 packets can contain headers (like options) before the TCP/UDP/ICMP6
header. pf finds the first TCP/UDP/ICMP6 header to filter by traversing
the header chain. In the case where headers are skipped, the protocol
checksum verification used the wrong length (included the skipped headers),
leading to incorrectly mismatching checksums. Such IPv6 packets with
headers were silently dropped.

Discovered by:	Bernhard Schmidt
MFC after:	1 week
2004-12-05 12:15:43 +00:00
imp
29f3f48407 Start to add GIANT_REQUIRED; macros in places where giant is required
and that I've verified things seem to basically work.  I was able to
boot and hot plug usb devices.  Please let me know if this causes
problems for anybody.

The push down of giant has proceeded to the point that this will start
to matter more and more.
2004-12-05 07:55:30 +00:00
marcel
b898758464 o Don't limit GPT as a rank 2 provider. Allow it to be connected
anywhere in the DAG. This includes configurations that are not
   allowed by the EFI specification.
o  Reject a GPT partition table if it's not preceeded by a PMBR.
   There's no need to preserve the MBR partitioning anymore as GPT
   is mature and with the first bullet extending the applicability
   of GPT, it's better to be a bit more strict.
2004-12-05 06:02:21 +00:00
njl
c3df9439cf Grab Giant around calls to DEVICE_SUSPEND/RESUME in acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems.  It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE).  Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.

Found by:	iedowse
MFC after:	2 days
2004-12-05 01:35:18 +00:00
alc
dbfbcad51b Replace (inlined) pmap_pte() calls with smaller, faster code where
possible, such as the inner loop of pmap_copy().

Remove two comments that apply to i386 but not amd64.
2004-12-04 22:02:31 +00:00
pjd
ca88614a1e When initializing device, set d_softc and d_no fields for all components,
because we know it then and we need it when inserting a component which
wasn't destroyed while device was running.

Reported by:	Michael Handler <handler@grendel.net>
MFC after:	1 week
2004-12-04 21:20:59 +00:00
marius
1f07555c9d Revert rev. 1.166 and remove sparc64/pci/ofw_pci_if.m from MFILES again,
sparc64/pci/ofw_pci.h is no longer required for compiling modules.
2004-12-04 14:20:56 +00:00
phk
c47c85d39e Remove #if 0'ed rootfs mounting code. 2004-12-04 09:58:20 +00:00
phk
3bb4ccf412 Remove embryonic rootfs mounting facility.
In the near future rootfs mounting will not require special handling
in the filesystems.
2004-12-04 09:57:38 +00:00
brooks
ca26eca762 kmod.mk knows how to create empty opt_*.h files so let it deal with the
NOINET6 case.

Reported by:	ru
2004-12-03 23:43:02 +00:00
phk
7a77ca68a3 Implement a function, mount_arg() for accumulating a list of mount parameters
to nmount.

Make kernel_mount() accept the output from mount_arg() and know how to
free the malloc'ed space.

Make kernel_vmount() use the new function.
2004-12-03 22:38:06 +00:00
phk
8bc17baa39 Sort and wash #includes. 2004-12-03 21:29:25 +00:00
phk
81de6df0c1 When omount() is called, check if the filesystem have a cmount method
and if so call it.

The cmount method will gather and interpret omount() style arguments,
and issue a kern_[v]mount() call to execute the corresponding nmount
operation.
2004-12-03 21:14:46 +00:00
phk
a3935187b0 typo in comment. 2004-12-03 20:36:55 +00:00
phk
3c01ff1abb Add vfs_cmount() method to vfs_ops, this is to convert old-style mount
args to nmount request.
2004-12-03 19:33:19 +00:00
phk
81f68b35d9 Add early checks for MNT_ROOTFS since we need to allow it later on in
the code path.
2004-12-03 19:25:44 +00:00
phk
05e3a601c2 Retire unused vfs_mount() function in the name of nmount migration. 2004-12-03 18:40:58 +00:00
mdodd
5f1d43e2ed - Simplify pcn_probe() by moving vendor/device matching code to pcn_match().
- Avoid LOR in pcn_probe() by removing useless mutex stuff.
2004-12-03 18:35:00 +00:00
mdodd
aa6945f506 - Move chip ID code into separate function.
- Initialize sc->pcn_type during ATTACH as softc contents may not surivive
  from PROBE.
- Print out chip-id to assist with ongoing pcn(4) debugging efforts.
2004-12-03 18:21:30 +00:00
phk
b0e48f2258 Do not blindly pass linux filesystem specific mount data across. 2004-12-03 18:14:22 +00:00
rik
0dc1d96706 Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
to privent running of PPP's state machine in non PPP mode.

MFC: after 3 days.
2004-12-03 16:57:15 +00:00
mdodd
03bb845633 Additional register definitions.
Obtained from:	 NetBSD
2004-12-03 16:45:11 +00:00
phk
0381adc1df Introduce vfs_byname_kld() which will try to load the filesystem
as a module if possible.

Use it so we don't have linker magic in the middle of the already
complex mount code.
2004-12-03 16:11:01 +00:00
phk
410936c3f9 Make NAMEI_DIAGNOSTIC compile again and add a stragic vprint() 2004-12-03 12:15:39 +00:00
phk
4b1a114436 Improve vprint() a little bit: break long lines, reduce indent and tell
if the VI_LOCK() is held.
2004-12-03 12:09:34 +00:00
phk
f004ee8cb0 Add missing vop_bypass (returning EOPNOTSUPP).
Tripped up:	marks
2004-12-03 08:56:30 +00:00
njl
d8d93368a0 ACPI is not on pc98 either.
Informed by:	nyan
2004-12-03 08:44:56 +00:00
njl
63e8d4f89a Non-x86 platforms cannot use the ACPI includes. This should be fixed but
for now, only include the headers for i386, amd64, or ia64.

Pointed out by:	grehan
2004-12-03 08:13:08 +00:00
njl
beb94b5a21 Enable the relaxed behavior for op regions and other workarounds for
non-standard BIOSen.  We used to implement this in local patches but
now that ACPI-CA has merged/re-implemented most of our fixes, they were
no longer needed and we just needed to turn this knob on.  Also, remove
an unnecessary cast.

Tested by:	phk
2004-12-03 08:01:09 +00:00
cognet
df8773eb4e Include <sys/signalvar.h> for trapsignal(). 2004-12-02 23:31:48 +00:00
mlaier
55253712b9 Am I smoking crack? Correct stupid, wrong ASSERT -> if conversion and make
it do what I had in mind.

Noticed by:	glebius
Pointyhat to:	me, myself and mlaier
2004-12-02 15:47:15 +00:00
phk
62476e023e Drop ffree() as a separate function and incorporate the only place used. 2004-12-02 12:17:27 +00:00
phk
660e2d8605 Style polishing.
Use grepable functions
Other minor nitpickings.
2004-12-02 11:56:13 +00:00
phk
de7e56a8ab Remove the de_devvp and stop VREF'ing it for every vnode we create. 2004-12-02 10:09:33 +00:00
obrien
8628145ec6 Specifically use the 32-bit version of fuword/suword since that's what
we really want vs. the size changing 'long' (i386 vs. AMD64).
This fixes the problem with DRM with Radeon's on AMD64.

Submitted by:	Jung-uk Kim <jkim@niksun.com>
2004-12-02 09:38:34 +00:00
njl
567a90b16c Turn ACPI and PCI devices off or to a lower power state in suspend and
back on again in resume.  Override the default of D3 with the value the
BIOS specifies in _SxD, if present.  Skip serial devices (PNP05xx) since
they seem to hang when set to D3 and may require special driver support.
Also, skip non-type 0 PCI devices (i.e., bridges) since our we don't yet
save/restore their config space and that seems to be necessary.

If this gives you trouble with suspend/resume, you can disable the new
ACPI and PCI power behavior separately with these tunables & sysctls:
    debug.acpi.do_powerstate
    hw.pci.do_powerstate

Approved by:	imp (pci)
Tested by:	acpi@ (numerous)
2004-12-02 08:07:12 +00:00
njl
e2200548dc Add the ACPI_PWR_FOR_SLEEP method. It takes a device and outputs the
appropriate power (Dx) state, if the BIOS suggests one.

MFC after:	3 weeks
2004-12-02 08:04:57 +00:00
alc
833856a521 For efficiency eliminate the call to pmap_pte() from pmap_protect()'s and
pmap_remove()'s inner loop.  Instead, call pmap_pde_to_pte(), a new
function, prior to the inner loop.

Reviewed by: peter@, tegge@
2004-12-02 04:06:40 +00:00
alc
38bcfbb659 For efficiency move the call to pmap_pte_quick() out of pmap_protect()'s
and pmap_remove()'s inner loop.

Reviewed by: peter@, tegge@
2004-12-02 03:29:17 +00:00
marks
966df7ef38 Catch up with AcpiOsSleep() interface change.
Catch up with some #define's renaming.
Implement AcpiOsGetTimer() as per ACPI 3.0.

Approved by:	njl
MFC after:	1 week
2004-12-02 00:25:35 +00:00
marks
56de2c5ba4 This commit was generated by cvs2svn to compensate for changes in r138298,
which included commits to RCS files with non-trunk default branches.
2004-12-02 00:12:19 +00:00
marks
fd493b6d5c Oops, remove unnecessary cast in original, out-commented code.
This was a debug leftover.

MFC after:	1 week
2004-12-02 00:12:19 +00:00
marks
bc7d6d9dd2 This commit was generated by cvs2svn to compensate for changes in r138296,
which included commits to RCS files with non-trunk default branches.
2004-12-02 00:05:02 +00:00
marks
128b57630d Local change: Supporting code not yet available, use previous behavior
instead for the time being. Intel should fix this.

Note that if this commit is correct, it is made on the vendor branch.
We expect the Intel folks to fix it, and we don't want to unnecessarily
take files off the vendor branch.

Approved by:	njl
MFC after:	1 week
2004-12-02 00:05:02 +00:00
marks
3d10c42dd0 Local change: Remove warnings from vendor files.
Approved by:	njl
MFC after:	1 week
2004-12-01 23:42:21 +00:00
marks
47a3ae4cbd Local change: In the resume path, give up after waiting for a while
for WAK_STS to be set.  Some BIOSs never set it.

Approved by:	njl
MFC after:	1 week
2004-12-01 23:40:48 +00:00
marks
64092a1d81 Local change: Put various debugging options under ACPI_DISASSEMBLER.
Approved by:	njl
MFC after:	1 week
2004-12-01 23:39:45 +00:00
marks
6a7971435d Unchanged files that are off the vendor branch.
Approved by:	njl
MFC after:	1 week
2004-12-01 23:34:39 +00:00
phk
59f305606c Back when VOP_* was introduced, we did not have new-style struct
initializations but we did have lofty goals and big ideals.

Adjust to more contemporary circumstances and gain type checking.

	Replace the entire vop_t frobbing thing with properly typed
	structures.  The only casualty is that we can not add a new
	VOP_ method with a loadable module.  History has not given
	us reason to belive this would ever be feasible in the the
	first place.

	Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc.

	Give coda correct prototypes and function definitions for
	all vop_()s.

	Generate a bit more data from the vnode_if.src file:  a
	struct vop_vector and protype typedefs for all vop methods.

	Add a new vop_bypass() and make vop_default be a pointer
	to another struct vop_vector.

	Remove a lot of vfs_init since vop_vector is ready to use
	from the compiler.

	Cast various vop_mumble() to void * with uppercase name,
	for instance VOP_PANIC, VOP_NULL etc.

	Implement VCALL() by making vdesc_offset the offsetof() the
	relevant function pointer in vop_vector.  This is disgusting
	but since the code is generated by a script comparatively
	safe.  The alternative for nullfs etc. would be much worse.

	Fix up all vnode method vectors to remove casts so they
	become typesafe.  (The bulk of this is generated by scripts)
2004-12-01 23:16:38 +00:00
marks
93c2522130 Vendor import of Intel ACPI-CA 20041119 2004-12-01 23:14:10 +00:00
marks
350be3accf This commit was generated by cvs2svn to compensate for changes in r138287,
which included commits to RCS files with non-trunk default branches.
2004-12-01 23:14:10 +00:00
rees
ed03a6d55b don't confuse NFSMNT_ flags with MNT_ flags in statfs
Approved by:	alfred
2004-12-01 21:47:51 +00:00
cperciva
ebbf4e4bde Fix unvalidated pointer dereference. This is FreeBSD-SA-04:17.procfs. 2004-12-01 21:33:02 +00:00
jhb
931ffd7d22 - Do a better job of handling any Dependent Functions (aka DPFs) that appear
in the _PRS or _CRS of link devices.  If faced with multiple DPFs in a
  _PRS, we just use the first one.  We assume that if _CRS has DPF tags they
  only contain a single set since multiple DPFs wouldn't make any sense.  In
  practice, the only DPFs I've seen so far for link devices are that the one
  IRQ resource is surrounded by a DPF tag pair for no apparent reason, and
  this should handle that case fine now.
- Only allocate link structures for IRQ resources for link devices rather
  than allocating a link structure for every resource.

Reviewed by:	njl
Tested by:	phk
2004-12-01 21:05:02 +00:00
phk
24f769137d hpfs_lookup() should have a vop_cachedlookup_t prototype an corresponding
argument.
2004-12-01 20:24:01 +00:00
phk
cb64ed501e Remove redundant functions (repo-copied from nfsclient) for dealing with
fifos.
2004-12-01 20:18:56 +00:00
phk
d0b2552098 Correctly prototype union_write with vop_write_t, not vop_read_t. 2004-12-01 19:15:00 +00:00
phk
ab549174e2 Scripted modification of vop_* prototypes to use typedefs. 2004-12-01 19:08:40 +00:00
rees
510cbe1e3e Fix for a bug in nfs_mkdir() that called vrele() instead of vput()
in the error cases, causing panics.

Adapted from similar fix to NFSv3 mkdir submitted by Mohan Srinivasan mohans
at yahoo-inc dot com

Approved by:	alfred
2004-12-01 17:58:37 +00:00
davidxu
44dde891d6 If a thread is resumed by thr_wake, it should return 0, especially it
should not return ERESTART after it caught a signal, otherwise
thr_wake() call will be lost, also a timeout wait should not be
restarted. Final, using wakeup not wakeup_one to be safeness.
2004-12-01 13:50:04 +00:00
phk
05b9cb2a46 Mechanically change prototypes for vnode operations to use the new typedefs. 2004-12-01 12:24:41 +00:00
glebius
0ee3c9a148 Mechanically rename s/ng_timeout/ng_callout/g, s/ng_untimeout/ng_uncallout/g.
This is done to keep both versions in RELENG_5 and support both APIs.

Reviewed by:	scottl
Approved by:	julian (mentor), implicitly
2004-12-01 11:56:32 +00:00
phk
5951763807 emit a "typedef vop_foo_t(struct vop_foo_args *);" which we can use
to prototype VOP functions with.
2004-12-01 11:51:20 +00:00
phk
a50f0bcbfd We already have a lock initialization function, use that for fdesc_mtx
also.

Polish badfo stuff.
2004-12-01 09:42:35 +00:00
phk
ea3f471ee5 Collect the stuff for the /dev/fd/{%d,std{in,out,err}} pseudo-device
driver at the bottom of the file.
2004-12-01 09:29:31 +00:00
phk
9b4cd725f1 "nfiles" is a bad name for a global variable. Call it "openfiles" instead
as this is more correct and matches the sysctl variable.
2004-12-01 09:22:26 +00:00
phk
31e045eaae Style: move data to top of file. 2004-12-01 08:06:27 +00:00