Commit Graph

37488 Commits

Author SHA1 Message Date
Alfred Perlstein
31f3e2ad8e useracc() is mpsafe so we only need to hold Giant
over the call to nanosleep1()

Pointed out by: tjr
2003-01-19 06:51:10 +00:00
Marcel Moolenaar
9d683ffd4b o Move the contents of <machine/floatingpoint.h> over to
<machine/ieeefp.h> where it belongs.
o  Remove the i386 specific inclusion of <machine/floatingpoint.h>
   from <ieeefp.h>, now that including <machine/ieeefp.h> is enough
   for all architectures.
o  Allow <machine/ieeefp.h> to inline the functions exposed by the
   headers by checking for _IEEEFP_INLINED_ in the MI header. When
   defined, prototypes are not given and it is assumed that the MD
   headers, when inlining only a subset of the functions provide
   prototypes for the functions not being inlined.

Based on patch from: Terry Lambert <tlambert2@mindspring.com>
Tested with: make release.
2003-01-19 06:01:33 +00:00
David E. O'Brien
aac0e9388e Complete the support of the on-board xl(4) on nVidia nForce2 mobo's.
Submitted by:	Mikko S. Hyvarinen <morphy@morphy.iki.fi>
2003-01-19 04:47:54 +00:00
David E. O'Brien
2d3ce7133a Remove miidevs.h and generate it from miidevs at compile time.
The devlist2h.awk tool to do this has been repocopied to sys/tools/.
2003-01-19 02:59:34 +00:00
Warner Losh
b47d073500 Fix comment about what we do when there are no listeners. 2003-01-19 00:34:17 +00:00
Thomas Moestl
a712d94e68 Make the xl driver work on sparc64:
- Add conversions to/from little endian for fields that the NIC accesses
  by DMA as required.
- Add some bus_dmamap_sync() calls, and correct some existing ones.
- Read the receiver information from the EEPROM in an endian-neutral
  manner.
- Load all RX and TX descriptors in a single DMA map up front, and
  get the bus addresses of individual descriptors by address arithmetic;
  this fixes multiple use of the descriptor tags, which would have
  undesired effects.
It seems that xl still does not work on e250 boxen, for reasons which
are not clear yet.

Reviewed by:	mux
2003-01-19 00:23:59 +00:00
David E. O'Brien
cdede1b424 Protect against multiple inclusions. 2003-01-18 23:43:12 +00:00
David E. O'Brien
90949c8331 Simplify the Makefile by just using our standard PROG variable. 2003-01-18 23:09:56 +00:00
David E. O'Brien
c4aa0a2e38 Rev 1.16 renamed VM_METER to VM_TOTAL. This is breaking 3rd-party apps.
So add a VM_METER compat define.

Submitted by:	Andy Fawcett <andy@athame.co.uk>
2003-01-18 21:14:02 +00:00
Jeffrey Hsu
314e5a3daf Optimize away call to bzero() in the common case by directly checking
if a connection has any cached TAO information.
2003-01-18 19:03:26 +00:00
Maxime Henrion
1d8dc7e4a3 Don't try to free() map in bus_dmamap_destroy() when it's
set to &nobounce_dmamap.  A similar bug was fixed by wpaul
in revision 1.19 of sys/alpha/alpha/busdma_machdep.c.
2003-01-18 18:33:56 +00:00
Poul-Henning Kamp
e9fe7d1f7f Inline now trivial functions getccdbuf() and putccdbuf().
Fix another trivial memory-leak.
2003-01-18 12:23:49 +00:00
Peter Grehan
8a7f89713e Removed unnecessary includes and brought up to date with ata
common code by adding lock functions.
2003-01-18 11:46:50 +00:00
Poul-Henning Kamp
6b267654ab Fix minor memory-leak. 2003-01-18 11:33:06 +00:00
Peter Grehan
f48649e525 Stub profile.h, required for userland builds.
Approved by:  Benno
2003-01-18 11:31:58 +00:00
Peter Grehan
4e84a94d6b <machine/ieee.h>, taken from sparc64
Approved by:  Benno
2003-01-18 11:30:59 +00:00
Peter Grehan
8e9238c604 Fix bugs with operand ordering and unnecessary sync/eieio ops. Mostly
obtained from Alpha atomic.h

Approved by:  Benno
2003-01-18 11:28:36 +00:00
Peter Grehan
add0e67094 Allow the MD frame definition to be seen in. Required for truss/ptrace.
Approved by:  Benno
2003-01-18 11:25:21 +00:00
Peter Grehan
5cbdd8139a RAIDframe requires LONG_BIT
Approved by:  Benno
2003-01-18 11:23:42 +00:00
Peter Grehan
0a9b03cb65 Prepended underscores to macro local vars, avoiding gcc "declaration
shadows global" warning

Approved by:  benno
2003-01-18 11:20:06 +00:00
Peter Grehan
0212856f3c Change definition of int64 to avoid gcc3.2.1 complaints. Taken from i386
Approved by:  benno
2003-01-18 11:18:42 +00:00
Poul-Henning Kamp
b51ea35631 Use the M_CCD malloc bucket instead of M_DEVBUF.
Don't keep a private freelist of a low number of trivially small structures.
2003-01-18 11:04:41 +00:00
Poul-Henning Kamp
360d71d1b5 Inline trivial function ccdintr() into its one caller ccdiodone().
Only call ccdfind() once in ccdiodone() and cache the result.
2003-01-18 10:44:17 +00:00
Poul-Henning Kamp
3b1746df8b Sanitize the copyright section a bit: We do not need two copies of the
four-clause BSD license in the file, one will do.
2003-01-18 10:08:27 +00:00
Yoshihiro Takahashi
bb0e369994 Remove unneeded entries. 2003-01-18 08:29:10 +00:00
Yoshihiro Takahashi
1f23083ab9 Fixed comment. 2003-01-18 08:26:42 +00:00
Matthew N. Dodd
95ca467a68 - Removed unecesary code.
- Correct smapi32_new() asm (still doesn't work.)
- Attach to mainboard not isa.
2003-01-18 04:36:12 +00:00
Marcel Moolenaar
da5e9a5bd6 MFp4: Add support for memory mapped UARTs, but don't add any devices
yet that depend on it because sio(4) needs support for it before it
can be used. There's no reason why zs(4) couldn't attach to puc(4)
in the (near?) future (in principle), so don't make memory mapped I/O
support in sio(4) a precondition for this change.
2003-01-18 02:54:16 +00:00
Takeshi Shibagaki
5770575cfc Add BUFFALO LPC-CF-CLT(10Base-T Compact Flash Ether Card). 2003-01-18 02:14:23 +00:00
Takeshi Shibagaki
d7c38c4ccc Regen. 2003-01-18 02:13:10 +00:00
Takeshi Shibagaki
708d4a51e6 Add Accton EN2216. 2003-01-18 01:14:48 +00:00
Takeshi Shibagaki
4779186a05 Regen. 2003-01-18 01:14:01 +00:00
Jeffrey Hsu
f5c5746047 Fix long-standing bug predating FreeBSD where calling connect() twice
on a raw ip socket will crash the system with a null-dereference.
2003-01-18 01:10:55 +00:00
Tim J. Robbins
d1841903a0 Fake up a struct componentname to pass to VOP_WHITEOUT instead of passing
NULL. union_whiteout() expects the componentname argument to be non-NULL.
Fixes a NULL dereference panic when an existing union mount becomes the
upper layer of a new union mount.
2003-01-18 01:01:20 +00:00
Poul-Henning Kamp
6fb6c30600 Remove subr_diskslice.c and subr_diskmbr.c which I can see no traces off
a need for in the x86_64 files.  Not compile tested.
2003-01-17 23:02:13 +00:00
Poul-Henning Kamp
03cb40281e Remove subr_diskslice.c and subr_diskmbr.c which I can find no trace of
why should be needed in the powerpc files.  Not compile tested.
2003-01-17 23:01:09 +00:00
Matthew N. Dodd
146cc87269 - Style fixes.
- llabs() -> qabs(); long long isn't valid for the kernel.

Submitted by:	 bde
2003-01-17 22:58:32 +00:00
Poul-Henning Kamp
f527e9857e ia64 didn't need subr_diskslice.c and subr_diskmbr.c either. 2003-01-17 22:09:12 +00:00
Poul-Henning Kamp
123bf099ea We do not need subr_diskslice.c and subr_diskmbr.c any more on alpha. 2003-01-17 20:02:46 +00:00
Poul-Henning Kamp
ffffe9203f Move alpha_fix_srm_checksum() from subr_diskmbr.c to subr_disklabel.c 2003-01-17 19:37:55 +00:00
Poul-Henning Kamp
40f683a443 Remove the unused DSO_* options. 2003-01-17 19:36:14 +00:00
Thomas Moestl
6f7cab9301 Disallow listen() on sockets which are in the SS_ISCONNECTED or
SS_ISCONNECTING state, returning EINVAL (which is what POSIX mandates
in this case).
listen() on connected or connecting sockets would cause them to enter
a bad state; in the TCP case, this could cause sockets to go
catatonic or panics, depending on how the socket was connected.

Reviewed by:	-net
MFC after:	2 weeks
2003-01-17 19:20:00 +00:00
Poul-Henning Kamp
5269d202cc Sparc64 does not need subr_diskslice.c and subr_mbr.c now. 2003-01-17 19:15:26 +00:00
Poul-Henning Kamp
e948321c7a Move dkmodpart() from subr_diskslice.c to subr_disklabel.c. 2003-01-17 19:05:58 +00:00
Takeshi Shibagaki
3f9970c831 Add Allied Telesis WR211PCM. 2003-01-17 18:41:32 +00:00
Takeshi Shibagaki
57fc3d9703 Regen. 2003-01-17 18:40:31 +00:00
Poul-Henning Kamp
2a2c796213 Move subr_disklabel.c and subr_diskslice.c from being MI to MD files,
so that they can be left out where they are unneeded.
2003-01-17 18:32:39 +00:00
Hidetoshi Shimokawa
ae8c82bbe9 Replace M_DONTWAIT with M_NOWAIT for malloc().
Pointed out by: nate@root.org
2003-01-17 15:15:21 +00:00
Hidetoshi Shimokawa
0ef6095d41 Improve some debug massages. 2003-01-17 15:03:57 +00:00
Hidetoshi Shimokawa
6340b71e5f Fix bus manager election process.
- Lock response 0x3f means that the host becomes the bus manager.
- Add missing htonl().
2003-01-17 15:03:25 +00:00
Poul-Henning Kamp
ddbf51af0c Find places to store the previously implicityly passed unit number in
the three configuration ioctls which need a unit number.

Add a "ccd.ctl" device for config operations.

Implement ioctls on ccd.ctl which rely on the explicityly passed
unit numbers.

Update ccdconfig to use the new ccd.ctl interface.

Add code to the kernel to detect old ccdconfig binaries, and whine
about it.

Add code to ccdconfig to detect old kernels, and whine about it.

These two compatibility measures will be retained only for a limited
period since they are in the way of GEOM'ification of ccd.
2003-01-17 14:53:53 +00:00
Matthew N. Dodd
7534ac7ab7 A driver for the System Management Application Program
Interface (SMAPI) BIOS, which is present on some IBM
Thinkpad models (560, 600, 770 to name a few.)

The SMAPI BIOS provides access to System Information,
System Configuration, and Power Management.
2003-01-17 08:10:18 +00:00
Matthew N. Dodd
8ff601b27c - Add a major for SMAPI.
- Claim a few majors I have responsibility for.
2003-01-17 08:01:35 +00:00
Jeffrey Hsu
c996428c32 SMP locking for ARP. 2003-01-17 07:59:35 +00:00
Scott Long
f50568a863 Bump __FreeBSD_version to 500100 to allow us to differentiate HEAD from
RELENG_5_0 and allow RELENG_5_) to grow.
2003-01-17 06:18:25 +00:00
Hidetoshi Shimokawa
7643dc189d Detect underrun of IT queue for debugging.
Add some comments.
2003-01-17 03:52:48 +00:00
Joerg Wunsch
652dfa8341 Make vinum disk-related devices readable by group "operator" to match
the configuration of any other disk-like devices.

(This is the DEVFS-only part, so no need to MFC.)

PR:		bin/28294, bin/32588
2003-01-16 23:47:04 +00:00
Warner Losh
e2fcd48525 Restore a comment that was lost in the shuffle. 2003-01-16 23:38:08 +00:00
Greg Lehey
0fd9f133ba Correct typo.
Submitted by:	Alan Day <alan@alanday.com>
MFC after:	2 weeks
2003-01-16 23:37:26 +00:00
Poul-Henning Kamp
ce9fac0072 Move a local variable to avoid the compiler warning about it being unused. 2003-01-16 20:06:45 +00:00
John Hay
b1e7e2019e hardpps() wants the raw hardware counter value converted to nanoseconds. 2003-01-16 19:22:13 +00:00
Yoshihiro Takahashi
e2a5388194 MFi386: revision 1.372 2003-01-16 13:38:58 +00:00
Hidetoshi Shimokawa
e2ad5d6e8c Improve memory allocation.
- Don't use contigmalloc() and allocate page by page to avoid
	allocation failure.
- allocate buffer by PAGE_SIZE.
2003-01-16 13:09:33 +00:00
Matthew N. Dodd
060daf4376 The abs() function isn't defined locally; include a header file that
defines it.
2003-01-16 08:53:03 +00:00
Alan Cox
6eb07b4ac2 Fix two long-standing, but likely harmless, errors in the use of
vm_pageout_deficit:
1. Update vm_pageout_deficit before VM_WAIT.  There is no sense in
   delaying the update; the sooner the pageout daemon receives this
   information the better.  Reviewed by: tegge
2. Update vm_pageout_deficit according to the number of pages still
   needed to complete the allocation, not the original size of the
   allocation.  Submitted by: tegge

(These errors have existed since the introduction of vm_pageout_deficit
in revision 1.144.)
2003-01-16 08:14:56 +00:00
Hidetoshi Shimokawa
97ae6c1f15 Use cycleMatch for precise IT DMA start timing. 2003-01-16 07:01:54 +00:00
Nate Lawson
031bacf859 kernel:
* Fix a bug where devices weren't cleaned up on close(): CAM_REQ_CMP != 0

user:
* Increase timeout in usermode to CAM_TIME_INFINITY.  The initiator is in
  charge of timeouts and the value was in ms, not seconds.
* Bring two debugging printfs under the debug flag
* Clean up man page to show increased testing on isp(4)

Submitted by:	gibbs (bugfixes)
2003-01-16 00:24:29 +00:00
Sam Leffler
18bf5d2ba6 wi now needs wlan
Reviewed by:	imp
2003-01-16 00:21:52 +00:00
Sam Leffler
be7b82cdd8 config glue for new wi driver and wlan module
Reviewed by:	imp
Forgotten by:	sam
2003-01-16 00:20:10 +00:00
Matthew Dillon
e3669cee72 Merge all the various copies of vm_fault_quick() into a single
portable copy.
2003-01-16 00:02:21 +00:00
Matthew Dillon
f597900329 Merge all the various copies of vmapbuf() and vunmapbuf() into a single
portable copy.  Note that pmap_extract() must be used instead of
pmap_kextract().

This is precursor work to a reorganization of vmapbuf() to close remaining
user/kernel races (which can lead to a panic).
2003-01-15 23:54:35 +00:00
Alfred Perlstein
332a7241de remove wi_hostap.c from files as it's been removed. 2003-01-15 21:50:33 +00:00
Poul-Henning Kamp
c441cdb88a Add machdep.elan_freq sysctl which can be used to set the CPU clock
frequency in Hz.  The default is still 33.333 MHz.  Please notice
that the number is round to a multiple of four internally so it may
not read back exactly the same as written.

Add compile time ELAN_XTAL option to override the 33.333 MHz default.

Add compile time ELAN_PPS option to enable code for high precision
(250 nanoseconds) timestamping of external signals.
2003-01-15 20:15:33 +00:00
Sam Leffler
a7c02787d0 remove wi-specific host ap code; the wi driver now depends on the
wlan module for 802.11 core support
2003-01-15 20:13:30 +00:00
Sam Leffler
11411c79c7 wi-specific host ap support no longer needed now that it uses
the core 802.11 code

Reviewed by:	imp
2003-01-15 20:12:50 +00:00
Sam Leffler
474b12ddf0 new wi driver that uses the 802.11 link layer code
Reviewed by:	imp
Obtained from:	NetBSD (originally)
2003-01-15 20:11:31 +00:00
SUZUKI Shinsuke
8d95b0ce40 sync with KAME to simplify rev 1.28's patch (no functional changes)
Obtained from: KAME
Reviewd by: fenner
Approved by: re (jhb)
2003-01-15 20:09:52 +00:00
Sam Leffler
0ac19bd5dc hookup wlan and rcv4 modules to the build
Reviewed by:	imp
2003-01-15 20:06:38 +00:00
Sam Leffler
241ab3c6ef add module for 802.11 link layer code
Reviewed by:	imp
2003-01-15 20:05:52 +00:00
Sam Leffler
a190a9598f 802.11 link layer support. This code implements the basic 802.11
state machine to provide station and host ap functionality for drivers.

More work will follow to split out the state machine and protocol
support from the ioctl interfaces to ease portability/sharing with
NetBSD and forthcoming ports to other systems.

Reviewed by:	imp
Obtained from:	NetBSD (originally)
2003-01-15 20:01:50 +00:00
Sam Leffler
50b25cd7d2 make rc4 crypto support a module so other modules can depend on it
Submitted by:	imp
Reviewed by:	imp
2003-01-15 19:55:17 +00:00
Poul-Henning Kamp
9b8104b200 Allow linters to override the CTASSERT macro, since they are unlikely to
like the results.
2003-01-15 19:18:49 +00:00
David Xu
4e77d3c6a2 Don't forget to disconnect object from class. 2003-01-15 14:58:07 +00:00
Yoshihiro Takahashi
6f40e92346 Merged from sys/isa/syscons_isa.c revision 1.21. 2003-01-15 13:12:12 +00:00
Hidetoshi Shimokawa
744bdf5752 DV_PAL shouldn't be here. 2003-01-15 05:28:50 +00:00
Hidetoshi Shimokawa
6d6f7f2891 Add DV_PAL for PAL users. 2003-01-15 05:26:23 +00:00
Matthew N. Dodd
bf1446b754 Minimally document hw.syscons.sc_no_suspend_vtswitch.
Requested by:	 Nate Lawson <nate@root.org>
2003-01-15 05:26:10 +00:00
Hidetoshi Shimokawa
4ed65ce9e1 Fix IT DMA underun while bus reset.
- Reduce number of DELAY's
2003-01-15 04:21:16 +00:00
Matthew N. Dodd
dcb65c595d Make the SC_NO_SUSPEND_VTYSWITCH kernel option available as a loader
tunable and sysctl (hw.syscons.sc_no_suspend_vtswitch).
2003-01-15 03:45:27 +00:00
Matthew N. Dodd
6dc61b5ae5 - GC a few more hand-rolled 'abs' macros.
- GC a few hand-rolled min()/max() macros while I'm here.
2003-01-15 02:15:57 +00:00
Matthew N. Dodd
e2fdcaf285 - Add inline functions for {ll,l,}abs() to libkern.
- Remove hand rolled abs() functions.
2003-01-15 02:02:33 +00:00
Matthew N. Dodd
c94b6ebc27 Suspend/resume support (mostly for MiniPCI Prism2.5 boards).
Reviewed by:	 imp
2003-01-14 23:19:32 +00:00
Josef Karthauser
e22514406d Some USB devices are not prepared to deal with a single byte string
descriptor request, which usbd_get_string_desc() uses to get the
length of a descriptor.  One device for instance returns a full 8
byte long packet instead which confuses the rest of the stack and
leads to the USB port being reset.  The fix is to instead request
two bytes, but not to complain if we only get one.

Submitted by:	kan
MFC after:	3 days
2003-01-14 23:07:43 +00:00
Poul-Henning Kamp
d2128d818f Add a very simple but functional GEOM mirror class.
This is committed more as an instructive tool than as a production
facility, but this will change over time.
2003-01-14 22:44:48 +00:00
Matthew Dillon
de6edd1bd9 Add missing #include
Submitted by:	"Sam Leffler" <sam@errno.com>
2003-01-14 21:31:31 +00:00
Poul-Henning Kamp
d320fdbca7 Now that we have non-geom_disk based drivers, we need to cover for those,
in case they return EOPNOTSUPP on an ioctl.

Found by:	jhb
2003-01-14 21:31:00 +00:00
Nate Lawson
d6b992c723 For the cpu throttling message, s/enabled/available
Requested by:	many
2003-01-14 19:39:41 +00:00
Matthew Dillon
fe41ca530c Introduce the ability to flag a sysctl for operation at secure level 2 or 3
in addition to secure level 1.  The mask supports up to a secure level of 8
but only add defines through CTLFLAG_SECURE3 for now.

As per the missif in the log entry for 1.11 of ip_fw2.c which added the
secure flag to the IPFW sysctl's in the first place, change the secure
level requirement from 1 to 3 now that we have support for it.

Reviewed by:	imp
With Design Suggestions by:	imp
2003-01-14 19:35:33 +00:00
Nate Lawson
608654d473 Remove bogus locking from dc(4). Instead, move interrupt allocation
and ether_ifattach() to end.  This fixes a "could sleep" case and
simplifies error exit cases as well.  Also be sure to set errno
and clean up resources in !mac error case.

Tested by:	Ryan Beasley
2003-01-14 19:31:27 +00:00
Olivier Houchard
e550089d43 Don't call destroy_dev it a channel has children.
vchan creation doesn't lead to /dev entry creation if the new vchan is the
first child of a channel,
This fix a panic that happens when loading a sound driver module, creating
vchans and unloading the driver.

Approved by:	cg
MFC after:	3 days
2003-01-14 17:13:52 +00:00
Warner Losh
b24431ad30 Save 4 more bytes by not initializing opts to 0. This moves it from
the data section to the bss section givig us initialization for free.

Noticed by: bde
2003-01-14 16:33:37 +00:00
Benno Rice
2c2d1d071e Make the base pcib_route_interrupt method available to other pci-pci bridge
sub-classes.

This allows the powerpc kernel to build again.

Forgotten by:	benno
Spotted by:	grehan
2003-01-14 11:37:56 +00:00
Hidetoshi Shimokawa
5dda08514e Fix for FreeBSD-4.
- Protect whole fw_tbuf_update() with splfw().
2003-01-14 08:35:45 +00:00
Alan Cox
b0ef8c5fe4 - Update vm_pageout_deficit using atomic operations. It's a simple
counter outside the scope of existing locks.
 - Eliminate a redundant clearing of vm_pageout_deficit.
2003-01-14 06:57:03 +00:00
Alan Cox
ff2023a5df Make vm_pageout_page_free() static. 2003-01-14 02:28:39 +00:00
Scott Long
2ffaffaa6e Since reseting the SCSI busses via the passthrough interface usually
confuses the controller, tell CAM not to do it.  Also report the
correct error condition to CAM when it tries to probe a target that
doesn't exists.
This should make the CAM interface less risky to use.

MFC After:	3 days
2003-01-13 23:51:14 +00:00
Matthew Dillon
3db161e079 It is possible for an active aio to prevent shared memory from being
dereferenced when a process exits due to the vmspace ref-count being
bumped.  Change shmexit() and shmexit_myhook() to take a vmspace instead
of a process and call it in vmspace_dofree().  This way if it is missed
in exit1()'s early-resource-free it will still be caught when the zombie is
reaped.

Also fix a potential race in shmexit_myhook() by NULLing out
vmspace->vm_shm prior to calling shm_delete_mapping() and free().

MFC after:	7 days
2003-01-13 23:04:32 +00:00
Matthew Dillon
1c33791c80 Apply bandaid to bring svr4_sys_waitsys() in line with exit1(). This
routine really need to be gutted and merged with exit1().

Reviewed by:	jhb
2003-01-13 22:44:23 +00:00
Poul-Henning Kamp
9c71cb4bef Even if the permissions deny it, a process should be allowed to
access its controlling terminal.

In essense, history dictates that any process is allowed to open
/dev/tty for RW, irrespective of credential, because by definition
it is it's own controlling terminal.

Before DEVFS we relied on a hacky half-device thing (kern/tty_tty.c)
which did the magic deep down at device level, which at best was
disgusting from an architectural point of view.

My first shot at this was to use the cloning mechanism to simply
give people the right tty when they ask for /dev/tty, that's why
you get this, slightly counter intuitive result:

        syv# ls -l /dev/tty `tty`
        crw--w----  1 u1  tty    5,   0 Jan 13 22:14 /dev/tty
        crw--w----  1 u1  tty    5,   0 Jan 13 22:14 /dev/ttyp0

Trouble is, when user u1 su(1)'s to user u2, he cannot open
/dev/ttyp0 anymore because he doesn't have permission to do so.

The above fix allows him to do that.

The interesting side effect is that one was previously only able
to access the controlling tty by indirection:
        date > /dev/tty
but not by name:
        date > `tty`

This is now possible, and that feels a lot more like DTRT.

PR:             46635
MFC candidate:  could be.
2003-01-13 22:20:36 +00:00
Poul-Henning Kamp
ca94e7c4ca We can get past here on a normal vnode as well, so use VOP_STRATEGY if so. 2003-01-13 21:32:16 +00:00
Warner Losh
8e6206d943 Fix interactive booting:
o Revision 1.38 introduced the -n flag.  It conflicted with the
  RB_BOOTINFO flag, so was in effect always on.  Change the -n flag to
  be bit 0x1c instead of 0x1f.  This also had the consequence that a mal-formed
  /boot.config would render the system unbootable because the user was
  unable to enter anything at all on the command line.
o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit
  out and do not otherwise use it.

Reviewed by: jhb
MFC after: 3 days
2003-01-13 21:28:24 +00:00
Poul-Henning Kamp
26d48b4044 OK Ok, so I didn't check the NO_GEOM case for the final version...
Stumbled on by:	bde
2003-01-13 20:19:04 +00:00
Orion Hodson
916aaded05 Add Realtek ALC650 id.
Submitted by:	"Mikko S. Hyvarinen" <morphy@morphy.iki.fi>
MFC after:	5 days
2003-01-13 17:43:49 +00:00
Orion Hodson
a7697e5514 Add nForce2 device id.
Submitted by:	"Mikko S. Hyvarinen" <morphy@morphy.iki.fi>
MFC after:	5 days
2003-01-13 17:42:13 +00:00
Poul-Henning Kamp
a4f8615810 Enable the new h0h0magic code which on GEOM kernels make the md(4)
driver a _real_ GEOM driver.
2003-01-13 17:31:46 +00:00
Hidetoshi Shimokawa
0aaa9a23cd Minimal fix for DV part.
- Don't panic on contigmalloc failure.
- Calculate timestamp by feedforward rather than feedback which depends on
	unreliable interrupt timing.
- Overwrite timestamp in CIP header correctly.
- Add debug code for timestamp synchronization.
- Add comments.
2003-01-13 16:08:09 +00:00
Hidetoshi Shimokawa
d0035474c3 Merge big endian and little endian case.
Fill fdf bit fields and others.
2003-01-13 15:08:48 +00:00
Alfred Perlstein
ac41f2ef0b style(9) fixes, mostly add parens around return arguments. 2003-01-13 15:06:05 +00:00
Poul-Henning Kamp
4b2f4ce94e Always issue ioctls as BIO_GEATTR requests. The direction of data copies on
ioctls are no reliable indication of the ioctls "set" or "get" nature or if
such simplistic categories can even be applied.

MFC candidate:	boot0cfg issue.
2003-01-13 11:34:35 +00:00
Jeffrey Hsu
cb942153c8 Fix NewReno.
Reviewed by: Tom Henderson <thomas.r.henderson@boeing.com>
2003-01-13 11:01:20 +00:00
Poul-Henning Kamp
0f8500a5b3 Add a mutex around the per unit bioqueue.
Only grab giant in the per unit kthread for SWAP and VNODE backed devices.

Initialize the bioq before the kthread gets a chance to study it.

Don't lock Giant in mddone_swap, we shouldn't need it.
2003-01-13 08:50:23 +00:00
Poul-Henning Kamp
d675a1ed14 Remove four members of struct nameidata which have been commented
out since rev 1.1 (24 may 1994) of this file.

Add a nail to the K&R coffin by removing the #ifdef'ed K&R function
declaration for NDINIT.
2003-01-13 08:49:36 +00:00
Poul-Henning Kamp
abb50a48e8 Remove g_silence(). It does not do anything anymore. 2003-01-13 08:46:32 +00:00
Poul-Henning Kamp
bf1dae82da Fix typo. 2003-01-13 08:44:03 +00:00
Poul-Henning Kamp
528e3c946d Add opt_geom.h to the list. 2003-01-13 08:31:41 +00:00
Poul-Henning Kamp
64bfc43b26 Remove the printf which announces the creation of malloc disks: it is
inconsistent when we do not do it for swap or vnode.

We still printf for preloaded disks because of the weak debugging
options people have in embedded/tiny environments where this is
usually used.
2003-01-13 08:01:09 +00:00
Yoshihiro Takahashi
6b4cc2d7fe Fixed typo and style.
Submitted by:	Toru Morimoto <too@os.gulf.or.jp>
2003-01-13 06:51:16 +00:00
Nate Lawson
ec693c0e79 Quirk for Sony USB disk-on-key device.
PR:		kern/46386
Submitted by:	dillon
MFC after:	3 days
2003-01-13 05:09:07 +00:00
David E. O'Brien
497c45b6e1 Enable rl(4). It is now fully working using busdma. 2003-01-13 04:06:38 +00:00
David E. O'Brien
44ea4fc8d6 Regenerate 2003-01-13 03:58:41 +00:00
Jeff Roberson
8fb913face - Unbreak world. I did not notice that libkvm was still used in some places
to access the pctcpu.  This will have to be sorted out more later as the
   new scheduler requires a procedural interface for this data.  A more
   complete solution will follow.
2003-01-13 03:42:41 +00:00
Benno Rice
e9a0b8260e Correct an off-by-one error in the calculation of the number of interrupt
resources we're managing.
2003-01-13 03:24:07 +00:00
Matthew Dillon
48e3128b34 Bow to the whining masses and change a union back into void *. Retain
removal of unnecessary casts and throw in some minor cleanups to see if
anyone complains, just for the hell of it.
2003-01-13 00:33:17 +00:00
Alan Cox
a15700fe32 Make vm_page_alloc() return PG_ZERO only if VM_ALLOC_ZERO is specified.
The objective being to eliminate some cases of page queues locking.
(See, for example, vm/vm_fault.c revision 1.160.)

Reviewed by:	tegge

(Also, pointed out by tegge that I changed vm_fault.c before changing
vm_page.c.  Oops.)
2003-01-12 23:32:46 +00:00
Poul-Henning Kamp
6f4f00f114 Add code to make md(4) a GEOM device driver instead of relying in
the disk mini-layer.

This is currently not enabled.
2003-01-12 21:16:49 +00:00
David E. O'Brien
f9b7742405 Partial support for the nVidia nForce2 chipset's on-board Broadcom/Altima PHY
and 3com MAC.  Specifications for the Altima PHY are available at:
   http://www.altimacom.com/products/ac101L.html

Submitted by:	Mikko S. Hyvarinen <morphy@morphy.iki.fi>
2003-01-12 21:03:38 +00:00
Jeff Roberson
bcb06d5980 - Move ke_pctcpu and ke_cpticks into the scheduler specific datastructure.
This will prevent access through mechanisms other than the published
   interfaces.
2003-01-12 19:04:49 +00:00
Poul-Henning Kamp
a522a15950 Shift things around a bit in preparation for future evilness. 2003-01-12 17:39:29 +00:00
Tim J. Robbins
ae3b195fcf Allowing nent < 0 in aio_suspend() and lio_listio() is just asking for
trouble. Return EINVAL instead.
2003-01-12 09:40:23 +00:00
Tim J. Robbins
44a2c818de Remove "XXX undocumented" comment from lio_listio(). 2003-01-12 09:33:16 +00:00
Warner Losh
26b6ab4e45 Make compile cleanly when USB_DEBUG is defined. 2003-01-12 08:28:14 +00:00
Alan Cox
1761f1829d vm_fault_copy_entry() needn't clear PG_ZERO because it didn't pass
VM_ALLOC_ZERO to vm_page_alloc().
2003-01-12 07:33:16 +00:00
Alan Cox
8febaa4df0 vm_hold_load_pages() needn't clear PG_ZERO because it didn't pass
VM_ALLOC_ZERO to vm_page_alloc(). (PG_ZERO is clear by default.)
2003-01-12 06:30:15 +00:00
Yoshihiro Takahashi
7a6794e9c4 Merged from sys/isa/fd.c revision 1.244. 2003-01-12 03:11:21 +00:00
Matthew Dillon
cd72f2180b Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it.

Change struct xfile xf_data to xun_data (ABI is still compatible).

If we need to add a #define for f_data and xf_data we can, but I don't
think it will be necessary.  There are no operational changes in this
commit.
2003-01-12 01:37:13 +00:00
Joerg Wunsch
294d88444b Bail out of fd_clone() if the parsed unit number doesn't match our
expectation.

This solves the problem, where in a constellation with two (or more)
drives, an attempt is made to access a device name for that device
using a historic partition letter, like /dev/fd1c.  This is supposed
to create a symlink to the master device, but previously, the link was
always created to /dev/fd0, even if the request was for fd1*.
2003-01-11 20:10:41 +00:00
Eric Anholt
55dbef54ca Add support for the Intel 82820 UP-only AGP bridge.
PR:		41466
Submitted by:	NIIMI Satoshi <sa2c@sa2c.net>
MFC after:	1 week
2003-01-11 20:08:28 +00:00
Alan Cox
b5dc830507 In vm_page_alloc(), fuse two if statements that are conditioned on the same
expression.
2003-01-11 20:07:17 +00:00
Dag-Erling Smørgrav
9af714a731 FBSDIDize and clean up whitespace nits. 2003-01-11 16:11:21 +00:00
Dag-Erling Smørgrav
f4be139a67 Read sanpei's mind, and unbreak the build. 2003-01-11 16:08:59 +00:00
Takeshi Shibagaki
2b687084b6 Change to correct card entry. RATOC REX-R280 is 10Base-T Ether Card,
RATOC REX-9530 is SCSI2 Card.
2003-01-11 13:04:59 +00:00
Takeshi Shibagaki
ef967a91bd Regen. 2003-01-11 13:01:40 +00:00
Takeshi Shibagaki
b40e62fd9d RATOC REX-R280(10Base-T Ether Card) and REX-9530(SCSI2 Card) have
same product id. So use CIS info(PCCARD_CISTPL_VERS_1).
2003-01-11 13:00:56 +00:00
Maxime Henrion
5d9155dfee Fix kernel build.
Pointy hats to:	dillon, Hiten Pandya <hiten@unixdaemons.com>
2003-01-11 12:39:45 +00:00
Poul-Henning Kamp
78b9d70000 Don't restrict MBR sectorsize to 512 bytes.
Test data provided by:	Andrey Koklin <aka@veco.ru>
2003-01-11 12:30:51 +00:00
Tim J. Robbins
b3f1af6b8e Don't count mbufs with m_type == MT_HEADER or MT_OOBDATA as control data
in sballoc(), sbcompress(), sbdrop() and sbfree(). Fixes fstat() st_size
reporting and kevent() EVFILT_READ on TCP sockets.
2003-01-11 07:51:52 +00:00
Matthew Dillon
f7550ecf3f Make 'sysctl vm.vmtotal' work properly using updated patch from Hiten.
(the patch in the PR was stale).

PR:             kern/5689
Submitted by:   Hiten Pandya <hiten@unixdaemons.com>
2003-01-11 07:29:47 +00:00
MIHIRA Sanpei Yoshiro
fe41c67cfc Add support for Corega FEtherII CB-TXD (CardBus 100M/10M).
Fix typo (Coreaga->Corega)
2003-01-11 07:10:35 +00:00
Sam Leffler
4f0797a36d correct printf format
Noticed by:	alpha tinderbox
2003-01-11 04:55:52 +00:00
Jake Burkholder
776c5378cb Reset the channel in attach if its not the console. 2003-01-11 04:15:46 +00:00
Dima Dorfman
797159bde3 Add symlink support to devfs_rule_matchpath(). This allows the user
to unhide symlinks as well as hide them.
2003-01-11 02:36:20 +00:00
Scott Long
f30ac74cb0 Major bugfixes for large memory and fast systems.
aac.c:
        Re-arrange the interrupt handler to optimize the common case of
        the adapter interrupting us because one or more commands are complete,
        and do a read across the pci bus to ensure that all posted status
        writes are flushed.  This should close a race that could cause command
        completion interrupts to be lost.
        Follow the spec a bit closer when filling out command structures.
        Enable the Fast Response feature to eliminate the need for the card
        to DMA successfull command completions back into host memory.
        Tell the controller how much physical memory we have.  Without this
        there was a chance that our DMA regions would collide with the
        memory window used by the cache on the controller.  The result would
        be massive data corruption.  This seemed to mainly affect systems with
        >2GB of memory.
        Fix a few whitespace problems.

aac_debug.c:
        Add an extra diagnostic when printing out commands.

aac_disk.c:
        Add extra sanity checks.

aacreg.h:
        Prepare for making this 64-bit clean by reducing the use of enumeration
        types in structures.

Many thanks to Justin Gibbs for helping track these down.
2003-01-11 01:59:21 +00:00
Matthew Dillon
57e6d29b1e Remove all use of the LOG2() macro/inline, undoing some non-optimal cruft
that crept in recently.  GCC will optimize the divides and multiplies for us.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	1 day
2003-01-11 01:09:51 +00:00
Alfred Perlstein
b3890a1c42 make sem_leave return a usable errno instead of -1.
make ksem_close return that usable errno instead of -1 (ERESTART).

PR: 46957
2003-01-10 23:13:16 +00:00
John Baldwin
3a8790a13b Output the fstype of each partition in a disklabel in the configuration
text similar to the way that the MBR module dumps its slice types.
2003-01-10 19:44:14 +00:00
Yoshihiro Takahashi
cba862a39c MFi386: revision 1.552. 2003-01-10 13:31:29 +00:00
David Xu
7be6584678 Don't record thread pointer, it's not permanent in process life cycle,
use process pointer instead.
2003-01-10 09:54:51 +00:00
Martin Blapp
bcd1ede826 Make newer integrated SiS900 cards working.
Allow to read EEPROM from LAN. It is shared
between a 1394 controller and the NIC and each
time we access it, we need to set SIS_EECMD_REQ.

Idea from:	linux driver source

Reviewed by:	luoqi
Obtained from:	linux driver source (idea)
2003-01-10 08:16:03 +00:00
Martin Blapp
b9e58d7b73 Sis no longer implements the enhanced phy control
register, and phy has to be directly accessed via mdio.

Patch converted to CURRENT from STABLE.

Submitted by:	luoqi
Reviewed by:	luoqi (again)
MFC after:	2 weeks
2003-01-10 08:14:07 +00:00
Martin Blapp
91f8432fab SIS_CFG_EDB_MASTER_EN indicates the EDB bus is used instead of
the PCI bus. When this bit is set, the Max DMA Burst Size
for TX/RX DMA should be no larger than 64 bytes.

Reviewed by:	luoqi
Obtained from:	(idea from linux driver source)
MFC after:	2 weeks
2003-01-10 08:12:20 +00:00
Martin Blapp
e808cf6260 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.

Reviewed by:	luoqi
MFC after:	2 weeks
2003-01-10 08:09:58 +00:00
Marcel Moolenaar
cc4a858397 o Improve wording of the comment that accompanies fs_pad. The
padding is not specific to non-i386 architectures. It is
   caused by non-i386 specific alignment requirements of
   fs_swuid,
o  Add a CTASSERT to catch a change in the size of struct fs
   at compile-time rather than run-time.

Ok'd: gordon
Tested on: i386 ia64
2003-01-10 06:59:34 +00:00
Warner Losh
948c244d94 Add preliminary support for the Hawking PN672TX CardBus cards.
# Preliminary because there are some subtle things the NetBSD driver does
# that we don't do yet.  My card works for me w/o them.
2003-01-10 05:37:15 +00:00
Jake Burkholder
4ee5222bac Don't allow user process to set an invalid window state through sigreturn.
Spotted by:	tmm
2003-01-10 00:04:56 +00:00
Thomas Moestl
a9a7a91220 Clear the target hardware address field when generating an ARP request.
Reviewed by:	nectar
MFC after:	1 week
2003-01-10 00:04:53 +00:00
Gordon Tetlow
963cae780f Fix superblock alignment problems on non-i386 platforms. Also change fs_uuid
to fs_swuid, making it more descriptive.

Submitted by:	marcel
Reviewed by:	peter
Pointy hat to:	gordon
2003-01-09 23:53:30 +00:00
Eric Moore
d163d5b8c8 Fix for DELL PERC firmware. Driver was hanging
during load time; this attributed to the mailbox
busy byte not being set prior to issuing a
polling command.

Approved by: ps
MFC: 7 days
2003-01-09 21:02:28 +00:00
Tom Rhodes
38deb45fc3 Add support for the Davicom DM9009 chipset.
PR:		46859
Submitted by:	Boaz Haberman <boaz@ool-182f8b09.dyn.optonline.net>
Approved by:	rwatson
2003-01-09 20:51:39 +00:00
John Baldwin
0d238da886 Remove earlysetcpuclass() as it has been OBE.
Suggested by:	bde
2003-01-09 19:59:28 +00:00
John Baldwin
f85b149dae Rework part of the previous processor name changes so that we read
cpu_exthigh and cpu_brand in printcpuinfo() instead of in identify_cpu().
We also only do it for known-good values of cpu_vendor which is a bit more
conservative.

Reviewed by:	bde (mostly)
2003-01-09 19:54:49 +00:00
David E. O'Brien
73badb2452 Build gem(4) on powerpc also. 2003-01-09 16:37:37 +00:00
David E. O'Brien
d16723e8e7 Moved if_hme to hme.
(I need a score card to keep track of the /sys layout fights)
2003-01-09 16:32:12 +00:00
David E. O'Brien
1c65ef9352 Add an hme(4) module.
PR:		46871
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
2003-01-09 16:29:03 +00:00
Jake Burkholder
be0800e85e Oops, add zstty to the witness order list.
Noticed by:	benno
2003-01-09 15:45:28 +00:00
Søren Schmidt
610e02649a Dont probe PnP devices.
Submitted by: Takahashi Yoshihiro <nyan@FreeBSD.org>
2003-01-09 14:00:07 +00:00
Søren Schmidt
2768d40bf1 Fix typo
PR: 45375
2003-01-09 13:54:07 +00:00
Benno Rice
f13d93ce55 Make ofw_pci_find_node() use the reg property instead of the
assigned-addresses property. This works a lot better.
2003-01-09 12:24:19 +00:00
Benno Rice
a65a280612 Add a pcib variant to allow us to fix up interrupt assignments.
We probably want to do something wrt bus enumeration as well at some point.
2003-01-09 12:04:18 +00:00
Hidetoshi Shimokawa
435dd29b27 - Add error messages for bulkxfer.
- Reduce register access.
2003-01-09 10:25:07 +00:00
Benno Rice
3599b2baf7 Allocate interrupts from the resource list. 2003-01-09 09:15:42 +00:00
Benno Rice
30081705c6 - Remove the ignore list and replace it with a quirk list of sorts.
- Add a quirk type for devices whose interrupt properties are actually
  attached to their children.
- Flag the "escc" (zs-alike serial controller) device as having this quirk.
- Rework the interrupt discovery code to deal with devices that have more than
  one interrupt.
2003-01-09 06:21:42 +00:00
Sam Leffler
f7890744d0 Invoke the driver directly when a request is submitted via crypto_dispatch
or crypto_kdispatch unless the driver is currently blocked.  This eliminates
the context switch to the dispatch thread for virtually all requests.

Note that this change means that for software crypto drivers the caller
will now block until the request is completed and the callback is dispatched
to the callback thread (h/w drivers will typically just dispatch the op to
the device and return quickly).  If this is an issue we can either implement
a non-blocking interface in the s/w crypto driver or use either the
"no delay" flag in the crypto request or the "software driver" capability
flag to control what to do.

Sponsored by:	Vernier Networks
2003-01-09 05:39:04 +00:00
Sam Leffler
972136fa24 o handle jumbograms in m_clone
o fixup some comments

Submitted by:	Doug Ambrisko <ambrisko@verniernetworks.com>
2003-01-09 05:30:25 +00:00
Warner Losh
52b019b3ed Merge from NetBSD and arrange for FreeBSD's slight differences in
ucom.

This gets my Sanyo SCP-4900 working.

Approved by: joe
2003-01-09 04:24:28 +00:00
Peter Grehan
1fbe1353ad - remove unneeded includes
- fix big in use of rid for SYS_RES_IRQ
- catch up with ATA common code by adding lock function
2003-01-09 01:22:30 +00:00
Peter Grehan
a5bd7d2982 Remove obsolete GEOM option, and bring diskless options up-to-date
Approved by:  benno
2003-01-09 01:09:41 +00:00
Thomas Moestl
2f28543e59 Include if_hme_sbus.c, so that the module can also be used on sbus
machines. Remove opt_bdg.h, which is not needed.
2003-01-09 00:46:41 +00:00
Thomas Moestl
a0de7a9e73 Add detach, shutdown, suspend and resume methods.
Tested by:	jake
2003-01-09 00:45:10 +00:00
Jake Burkholder
5f7d4c49d3 Add sbus specific zs file. 2003-01-08 23:36:59 +00:00
Jake Burkholder
6bfa8a2ef2 Split this into bus specific front end(s), so that it can be used by ppc.
This abstracts out all the differences I could see between the netbsd
sparc64 and macppc zs drivers.   In particular the offsets of the csr and
data registers are different, so we use a separate bus handle for each and
use bus_space_subregion to add the bus specific offsets.

Requested by:	benno
2003-01-08 23:36:16 +00:00