Commit Graph

37635 Commits

Author SHA1 Message Date
John Baldwin
10deca7e68 - Move enable_sse()'s prototype to machine/md_var.h.
- Sort definition of cpu_* variables appropriately.
- Move cpu_fxsr out of the magic non-BSS set of variables and stick it in
  the BSS along with hw_instruction_sse (make the latter static as well).

Submitted by:	bde (partially)
2003-01-22 18:18:45 +00:00
Hajimu UMEMOTO
bdc5f6a345 Added comment why this workaround is required.
Suggested by:	sam
MFC after:	1 week
2003-01-22 18:03:06 +00:00
John Baldwin
caf3197636 Rename cpuid_cpuinfo to cpu_procinfo. bde requested that I rename this
variable to something in the cpu_* namespace since that's what all the
other cpuid variables were named and cpu_procinfo is what I came up with.

Requested by:	bde
2003-01-22 17:54:12 +00:00
John Baldwin
f4e27c448b Bah, add in a missing space char I noticed when MFC'ing this. 2003-01-22 17:26:18 +00:00
Mike Silbersack
e02d5926c3 Correctly identify the 3C920B chipset; although it may ship with some Nforce2
boards, it's definitely not an Nvidia chip.

Info from: Nvidia's Linux Network driver & pciids.sourceforge.net
2003-01-22 17:14:33 +00:00
Joerg Wunsch
d50ea522c1 Make the arguments to d_close() match the arguments to d_open(), since
otherwise the close operation is void, and the underlying device remains
marked as being busy.

Thanks to phk for finding this.

MFC after:	3 days
2003-01-22 14:06:46 +00:00
Hajimu UMEMOTO
56b3905f15 getpeername() returns with no error but didn't fill struct sockaddr
correctly against PF_LOCAL.  It seems that the test always fails then
sockaddr was not filled.  So, I added else clause for workaround.
I doubt if it is right fix.  However, it is better than nothing.  I
found that NetBSD has same potential problem.  But, fortunately,
NetBSD has equivalent else clause.

MFC after:	1 week
2003-01-22 13:13:13 +00:00
Jeffrey Hsu
033aebebc4 Add yet another Sony Vaio PS/2 mouse ID. This one is found on a VX88.
Submitted by:	marcel
2003-01-22 03:31:08 +00:00
Peter Grehan
cb87db740e Remove BAT invalidation. This is done later in the boot sequence,
so isn't required here, and seems to cause problems when booting
from disk.

Approved by:  benno
2003-01-22 01:47:05 +00:00
Peter Grehan
e24f6473f7 Convert remaining .s files to .S
Approved by:  benno
2003-01-22 01:34:37 +00:00
Peter Grehan
731df24777 - remove dead conditional CFLAG setting
- switch locore .s -> .S

Approved by:  benno
2003-01-22 01:34:10 +00:00
Dag-Erling Smørgrav
ecf031c9ad There's absolutely no need for a struct-within-a-struct, so move the
counters out of the inner struct and remove it.
2003-01-21 20:33:27 +00:00
Jeffrey Hsu
a448a15bc1 Add missing SMP file locks around read-modify-write operations on
the flag field.

Reviewed by:	rwatson
2003-01-21 20:20:48 +00:00
Peter Wemm
302b6cd1fe Remove OBE prototype for iszerodev() - it was replaced by the
D_MMAP_ANON device switch flag.
2003-01-21 19:26:17 +00:00
Thomas Moestl
a00f3148b6 Fixes for a number of problems in the IOMMU code:
1.) Fix an off-by-one in the DVMA space handling, which would make it
    possible to allocate one page beyond the end of the DVMA area.
    This page was aliased to the first page. Apparently, this bug was
    responsible for the trashed nvram/eeprom some people were reporting,
    in conjunction with a number of unfortunate coincidences.
2.) Fix broken boundary and and lowaddr calculations.
3.) Fix a memory leak on an error path.
4.) Update a outdated comment to reflect the introduction of IOMMU_MAX_PRE,
    make the usage of IOMMU_MAX_PRE more consistent and KASSERT that the
    preallocation size is not 0.
5.) Fix a case where an error return was lost.
6.) When signalling an error to the caller by invoking the callback, do
    not use a segment pointer of NULL for compatability with existing
    drivers.

Also, increase the maximum segment number to 64; it is rather arbitrary,
with the exception of the of the stack space consumed by the segment
array.

Special thanks go to Harti Brandt <brandt@fokus.fraunhofer.de> for
spotting 4 and 5, and testing many iterations of patches.

Pointy hats to:	tmm
2003-01-21 18:22:26 +00:00
Thomas Moestl
3437dbef6d Free resources when failing to set up the interrupt. 2003-01-21 17:28:36 +00:00
Thomas Moestl
aaa160f357 bus_dmamap_sync() overhaul:
- Remove NetBSD-style or-ed together BUS_DMASYNC operations, in some
  cases relaxing the (intended) syncing operation a bit.
- Add syncs before reading the descriptor rings.
- Try to combine syncs where possible to avoid overhead.
- Sync all maps before unloading them.
2003-01-21 17:22:52 +00:00
Thomas Moestl
b2d59f4234 bus_dmamap_sync() overhaul:
- Remove NetBSD-style or-ed together BUS_DMASYNC operations, in some
  cases relaxing the (intended) syncing operation a bit.
- Stop pretending that that we can sync part of a dmamap: replace the
  GEM_CDTXSYNC and GEM_CDRXSYNC macros with GEM_CDSYNC to sync the
  complete control map, and combine syncs wherever possible to avoid
  the overhead.
- Sync all maps before unloading them.
- Remove a few syncs which should be unnecessary.
2003-01-21 17:17:01 +00:00
Thomas Moestl
d2ccea1588 Fix iommu_dvmamap_sync(): it was still operating as if the BUS_DMASYNC_*
constants where flag bits (as in NetBSD), although they are consecutively
numbered in FreeBSD. This would cause unnecessary flushing in the
BUS_DMASYNC_POSTWRITE case, but was otherwise mostly harmless.
2003-01-21 17:08:22 +00:00
Thomas Moestl
72aeb19aba Correct an off-by-one in the boundary check. Otherwise, resource
allocations would fail if the desired allocation size was equal to
the boundary.
2003-01-21 17:02:21 +00:00
Hidetoshi Shimokawa
93001c7214 Define misc structs outside of struct firewire_comm. 2003-01-21 16:37:01 +00:00
Hidetoshi Shimokawa
b9b35d1965 Ignore events of unused IR DMA. 2003-01-21 16:24:35 +00:00
Yoshihiro Takahashi
34526ea4d5 Remove NEXTDOSPART. 2003-01-21 14:02:11 +00:00
Yoshihiro Takahashi
dc5cb962f7 Use NDOSPART instead of NEXTDOSPART. 2003-01-21 13:59:53 +00:00
Yoshihiro Takahashi
5aca100a9e MFi386: revision 1.63. 2003-01-21 13:57:43 +00:00
Warner Losh
cf19012356 Needs wlan for wi. 2003-01-21 13:31:52 +00:00
Poul-Henning Kamp
718af14fe4 #ifdef NO_GEOM some bits here too. 2003-01-21 11:39:19 +00:00
Josef Karthauser
d617f4ca0c Regen 2003-01-21 11:38:17 +00:00
Josef Karthauser
652fde6f1f Add support for Epson 1660 scanner.
Submitted by:	Bruno Schwander <bruno@tinkerbox.org>
MFC after:	3 days
2003-01-21 11:37:54 +00:00
Alfred Perlstein
c3dfdfd132 use 'void *' instead of 'caddr_t' for useracc, kernacc, vslock and vsunlock. 2003-01-21 11:34:57 +00:00
Poul-Henning Kamp
a63935c3f6 #ifdef NO_GEOM all of this file. 2003-01-21 10:40:46 +00:00
Poul-Henning Kamp
c6eeff600d Bandaid to make the kernel compile until the scsi-crew can find out what
is happening.
2003-01-21 10:31:43 +00:00
Marcel Moolenaar
99fd68d987 Add yet another Sony Vaio PS/2 mouse ID. This one is found in a R505GL.
The ACPI data for the mouse includes the compatibility ID, but we
apparently don't make use of it.
2003-01-21 10:00:32 +00:00
Poul-Henning Kamp
3bc7d563e3 Add a missing '{' 2003-01-21 09:57:01 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Søren Schmidt
d7b64c95c0 Remove the fake disklabel, no longer needed.
Fix potential malloc panic.

Prodded by: phk
2003-01-21 08:33:48 +00:00
Sam Leffler
07ff231fcb preserve the order of tags copied by m_tag_copy_chain
Obtained from:	OpenBSD
2003-01-21 06:14:38 +00:00
Jake Burkholder
4875819c6e Run kldxref on sparc64, it works now. 2003-01-21 05:52:48 +00:00
Jake Burkholder
a438ad0718 Fix module dependency (pre)loading on sparc64 by relocating the variables
read from the raw kld files.

Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
PR:		46870
Tested on:	alpha (obrien), i386, sparc64
2003-01-21 05:46:46 +00:00
Jeff Roberson
04de47b0d3 - Add a VM_WAIT in the appropriate cases where vm_page_alloc() fails and flags
indicate that uma_small_alloc should not.  This code should be refactored so
   that there is not so much cross arch duplication.

Reviewed by:	jake
Spotted by:	tmm
Tested on:	alpha, sparc64
Pointy hat to:	jeff and everyone who cut and pasted the bad code. :-)
2003-01-21 05:44:52 +00:00
Jeffrey Hsu
34c54d9f74 Rewrite the SMP filedesc locking in knote_attach() in order to
1.  eliminate unnecessary loop which frees and re-allocates
	the just allocated array
  2.  eliminate the newsize recomputation
  3.  eliminate unnecessary unlock and relock around free
  4.  correctly match the free with the malloc into M_KQUEUE instead of M_TEMP
  5.  eliminate conditional assignment of oldlist, which is equivalent to a
	simple assignment
  6.  eliminate the oldlist temporary variable completely

Reviewed by:    jhb
2003-01-21 04:05:49 +00:00
Robert Watson
4273cc51a5 GC an unused reference to vop_refreshlabel_desc; reference to
opt_mac.h was removed previously so it was never compiled in.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-01-21 04:05:37 +00:00
Robert Watson
ec35c2af68 Perform VOP_GETATTR() before mac_check_vnode_exec() so that
the cached attributes are available to MAC modules.

Submitted by:   mike halderman <mrh@nosc.mil>
Obtained from:	TrustedBSD Project
2003-01-21 03:26:28 +00:00
Jake Burkholder
7251b4bf93 Resolve relative relocations in klds before trying to parse the module's
metadata.  This fixes module dependency resolution by the kernel linker on
sparc64, where the relocations for the metadata are different than on other
architectures; the relative offset is in the addend of an Elf_Rela record
instead of the original value of the location being patched.
Also fix printf formats in debug code.

Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
PR:		46732
Tested on:	alpha (obrien), i386, sparc64
2003-01-21 02:42:44 +00:00
Justin T. Gibbs
256081f980 Fix a missed goal.period -> goal.offset change. In
this case, the bug resulted in comparing a period
against an offset.
2003-01-20 23:51:18 +00:00
Andrew Gallatin
87c48ca382 include cdefs.h so as to unbreak the libc build 2003-01-20 22:05:39 +00:00
Sam Leffler
70be8cba19 move sysctl's under hw.hifn; change max batching default to 1 (no batching)
based on what I learned from the Broadcom h/w
2003-01-20 21:11:56 +00:00
Sam Leffler
ee94ed449a move sysctl's under hw.ubsec 2003-01-20 21:07:30 +00:00
Sam Leffler
2a363b8963 correct default setting of hw.wi.txerate; it must be -1, not zero,
to silence all msgs (like the old driver)
2003-01-20 21:06:58 +00:00
Sam Leffler
1c56cdce18 correct sysctl names and move them to hw.wi: hw.wi.txerate controls the rate
at which tx errors are printed (default to 0); hw.wi.debug control the debug
msgs and is only present when WI_DEBUG is defined at compile time (the default
for the moment)

Requested by:	imp
2003-01-20 20:55:37 +00:00
Justin T. Gibbs
70b41139c3 aic7xxx.reg:
Add a constant for the controller's stack size and the
	maximum scsi offset.

aic7xxx.seq:
	Style nit.  The source is implied to be the destination
	unless overridden in an "and" instruction.

	Update target mode code for changes in identify seen
	sequencer flags.

aic7xxx_pci.c:
	Ensure that the PCIERRGENDIS bit is set in the
	PCIERRGEN config space register.  Perhaps this
	is a reason for the spurios parity errors reported
	on U160 controllers.

	Honor the AHC_NO_BIOS_INIT flag.

	Allow PCI interrupt reporting to be disabled,
	by clearing the PERRRESEN bit in the command
	register.  This option is now enabled via a new
	softc flag: AHC_DISABLE_PCI_PERR.

	Disable SERR and pause the controller prior to performing
	our mmapped I/O test.  This should handle the case of
	controllers that do not "auto-access pause".  For legacy
	controllers, use SCB ram instead of scratch ram since
	the latter may contain settings left over from the BIOS
	that we will use if an seeprom is not found.

	Make use of new ahc_inl/outl() inlines.

aic7xxx.h:
	Reformat a few comments to follow driver style.

	Add a controller flags that indicate that a controller
	has not been initialized by the BIOS and whether to
	disable PCI parity errors..

	Remove stack probing softc members.

	Add a few more syncrate constants that are useful in speed
	fallback calculations.

	Add the SHOW_MASKED_ERRORS debug flag.

aic7xxx.h:
aic7xxx.c:
	Implement the SCB_SILENT flag.  This is useful for
	hushing up the driver during DV or other operations
	that we expect to cause transmission errors.  The
	messages will still print if the SHOW_MASKED_ERRORS
	debug option is enabled.

aic7xxx_inline.h:
	Implement ahc_[in|out][w|l|q].  This removes the need
	for manual 'or and shift" type operations throughout
	the driver.

aic7xxx.c:
	Move SELTO dignostic so that the SCB is still valid
	when we use it for printing path information.

	If we are narrow, limit syncrate to Ultra2.

	Don't clobber ppr_options when forcing a renegotiation.
	The current ppr_options may be referenced while queuing
	new commands.  Don't set our width to unknown when forcing
	negotiation on narrow controllers.  This will confuse the
	negotiation code into negotiating with a wide message on
	narrow controllers.

	Add an "asserting atn" diagnostic with controller/target
	information.

	Remove the probe_stack code.  The stack is always
	4 deep on legacy controllers, so probing is pointless.
	This also avoids an issue where probing the stack would
	upset the aic7770.

	In ahc_reset(), record whether or not we found the
	controller in a reset state.  If the controller was
	already reset, assume that no BIOS has initialized
	the controller and ignore left over scratch ram
	settings.

	Fix an ifdef bug that caused sequencer debugging to
	be enabled always.

	Clear the ultraenb flag in our tstate during startup.
	The ultraenbled'ness of a device is recorded in the user
	transfer settings.  tstate->ultraenb bitmask indicates
	which devices we have negotiated an ultra speed with.
	Just after initialization, we are async.  Setting the
	ultraenb flag while async seems to be harmless, but it
	was confusing to see the ULTRAENB flag set in the SCB.

	Enhance residual diagnostic to indicate if the residual
	if for sense information or normal data transfers.

	Indicate the features, bugs, and flags set in the softc
	that are used to control firmware patch download when
	booting verbose.

	In ahc_dump_card_state() fix a logic reversal.  The
	SCSIPHASE register only exists on U160 controllers.
	The SCSISIGI register exists on all controllers.  Not
	the other way around.  Also print out the ERROR register.

	Allow ahc_dump_card_state() to be called when the sequencer
	is not paused.  Add dump card state markers as in the U320
	driver.
2003-01-20 20:44:55 +00:00
Jimmy Olgeni
1897ae9644 Fix typo in comment: inlcude -> include. 2003-01-20 20:23:56 +00:00
Justin T. Gibbs
0794987d01 aic79xx.c:
Implement the SCB_SILENT flag.  This is useful for
	hushing up the driver during DV or other operations
	that we expect to cause transmission errors.  The
	messages will still print if the SHOW_MASKED_ERRORS
	debug option is enabled.

	Save and restore the NEGOADDR address when setting
	new transfer settings.  The sequencer performs lookups
	in the negotiation table too and it expects NEGOADDR
	to remain consistent across pause/unpause sessions.

	Consistently use "offset" instead of "period" to determine
	if we are running sync or not.

	Add a SHOW_MESSAGES diagnostic for when we assert ATN
	during message processing.

	Print out IU, QAS, and RTI features when showing transfer options.

	Limit the syncrate after all option conformance
	changes have taken place in ahd_devlimited_syncrate.
	Changes in options may change the final syncrate we
	accept.

	Keep a copy of the hs_mailbox in our softc so that
	we can perform read/modify/write operations on the
	hs_mailbox without having to pause the sequencer to
	read the last written value.  Use the ENINT_COALESS
	flag in the hs_mailbox to toggle interrupt coalessing.

	Add entrypoints for enabling interrupt coalessing and
	setting both a timeout (how long to wait for commands
	to be coalessed) and a maximum commands to coaless value.
	Add a statistics timer that decides when to enable or
	disable interrupt coalessing based on load.

	Add a routine, ahd_reset_cmds_pending() which is used
	to update the CMDS_PENDING sequencer variable whenever
	error recovery compeltes SCBs without notifying the
	sequencer.  Since ahd_reset_cmds_pending is called
	during ahd_unpause() only if we've aborted SCBs, its
	call to ahd_flush_qoutfifo should not cause recursion
	through ahd_run_qoutfifo().  A panic has been added to
	ensure that this recursion does not occur.

	In ahd_search_qinfifo, update the CMDS_PENDING sequencer
	variable directly.  ahd_search_qinififo can be called
	in situations where using ahd_reset_cmds_pending() might
	cause recursion.  Since we can safely determine the
	exact number to reduce CMDS_PENDING by in this scenario
	without running the qoutfifo, the manual update is sufficient.

	Clean up diagnostics.
	Add ahd_flush_qoutfifo() which will run the qoutfifo
	as well as complete any commands sitting on the
	sequencer's COMPLETE_SCB lists or the good status FIFO.
	Use this routine in several places that did similar
	things in an add-hoc, but incomplete, fashion.  A call
	to this routine was also added to ahd_abort_scbs() to
	close a race.

	In ahd_pause_and_flushwork() only return once selections
	are safely disabled.  Flush all completed commands via
	ahd_flush_qoutfifo().

	Remove "Now packetized" diagnostic now that this
	information is incorperated into the actual negotiation
	messages that are displayed.

	When forcing renegotiation, don't clober the current
	ppr_options.  Much of the driver uses this information
	to determine if we are currently packetized or not.

	Remove some stray spaces at column 1 in ahd_set_tags.

	When complaining about getting a host message loop
	request with no pending messages, print out the
	SCB_CONTROL register down on the card.

	Modify the ahd_sent_msg() routine to handle a search
	for an outgoing identify message.  Use this to detect
	a msg reject on an identify message which typically
	indicates that the target thought we were packetized.
	Force a renegotiation in this case.

	In ahd_search_qinfifo(), wait more effectively for SCB
	DMA activities to cease.  We also disable SCB fetch
	operations since we are about to change the qinfifo
	and any fetch in progress will likely be invalidated.

	In ahd_qinfifo_count(), fix the qinfifo empty case.

	In ahd_dump_card_state(), print out CCSCBCTL in the
	correct mode.

	If we are a narrow controller, don't set the current
	width to unknown when forcing a future negotiation.
	This just confuses the code into attempting a wide
	negotiation on a narrow bus.

	Add support for task management function completions.

	Modify ahd_handle_devreset so that it can handle
	lun resets in addition to target resets.  Use
	ahd_handle_devreset for lun and target reset task
	management functions.

	Handle the abort task TMF race case better.  We now
	wait until any current selections are over and then
	set the TMF back to zero.  This should cause the sequencer
	to ignore the abort TMF completion should it occur.

	Correct a bug in the illegal phase handler that
	caused us to drop down to narrow when handling the
	unexpected command phase case after 3rd party
	reset of a packetized device.

	Indicate the features, bugs, and flags set in the softc
	that are used to control firmware patch download when
        booting verbose.

aic79xx.h:
	Add coalessing and HS_MAILBOX fields.

	Add per-softc variables for the stats "daemon".

	Add a debug option for interrupt coalessing activities.

	Add two new softc flags:
	o AHD_UPDATE_PEND_CMDS
	  Run ahd_reset_cmds_pending() on the next unpause.

	o AHD_RUNNING_QOUTFIFO
	  Used to catch recursion through ahd_run_qoutfifo().

aic79xx.reg:
	Correct register addresses related to the software timer
	and the DFDBCTL register.

	Add constants paramaterizing the software timer.

	Add scratch ram locations for storing interrupt coalessing
	tunables.

	Break INTMASK in SEQITNCTL out into INTMASK1 and INTMASK2.
	In at least the REV A, these are writable bits.  We make
	use of that for a swtimer workaround in the sequencer.

	Since HS_MAILBOX autoclears, provide a sequencer variable
	to store its contents.

	Add SEQINT codes for handling task management completions.

aic79xx.seq:
	Correct ignore wide residue processing check for
	a wide negotiation being in effect.  We must be
	in the SCSI register window in order to access the
	negotiation table.

	Use the software timer and a commands completed count to
	implement interrupt coalessing.  The command complete is
	deferred until either the maximum command threshold or a
	the expiration of a command deferral timer.  If we have
	more SCBs to complete to the host (sitting in COMPLETE_SCB
	lists), always try to coaless them up to our coalessing limit.
	If coalessing is enabled, but we have fewer commands oustanting
	than the host's min coalessing limit, complete the command
	immediately.

	Add code to track the number of commands outstanding.
	Commands are outstanding from the time they are placed
	into the execution queue until the DMA to post completion
	is setup.

	Add a workaround for intvec_2 interrupts on the H2A4.
	In H2A4, the mode pointer is not saved for intvec2, but
	is restored on iret.  This can lead to the restoration
	of a bogus mode ptr.  Manually clear the intmask bits and
	do a normal return to compensate.  We use intvec_2 to
	track interrupt coalessing timeouts.

	Since we cannot disable the swtimer's countdown, simply
	mask its interrupt once we no longer care about it firing.

	In idle_loop_cchan, update LOCAL_HS_MAILBOX everytime
	we are notified of an HS_MAILBOX update via the
	HS_MAILBOX_ACT bit in QOFF_CTLSTA.  We have to use a
	local copy of persistant portions of the HS_MAILBOX as
	the mailbox auto-clears on any read.

	Move the test for the cfg4istat interrupt up an instruction
	to hopefully close a race between the next outgoing selection
	and our disabling of selections.

	Add a missing ret to the last instruction in load_overrun_buf.

	Add notifications to the host of task management
	completions as well as the completions for commands
	that completed successfully before their corresponding
	TMF could be sent.

	Hold a critical section during select-out processing
	until we have a fully identified connection.  This
	removes a race condition with the legacy abort handler.

	Correct a few spelling errors in some comments.

aic79xx_inline.h:
	Call ahd_reset_cmds_pending() in ahd_unpause if required.

	Update cmdcmplt interrupt statistics in our interrupt
	handler.

	Allow callers to ahd_send_scb() to set the task management
	function.

aic79xx_pci.c:
	Disable SERR and pause the controller prior to performing
	our mmapped I/O test.  The U320 controllers do not support
	"auto-access-pause".

aic79xx_osm.c:
	Set the task management function now that
	ahd_send_scb() doesn't do it for us.  We
	also perform a lun reset in response to BDR
	requests to packetized devices.
2003-01-20 20:17:35 +00:00
Matthew Dillon
8575a17e02 Fix swapping to a file, it was broken when SPECSTRATEGY was introduced. 2003-01-20 20:00:32 +00:00
Sam Leffler
fa15ece030 gc dead code 2003-01-20 19:45:09 +00:00
Poul-Henning Kamp
552947cc40 #if 0 one more line to make this compile without subr_disklabel.c.
Hopefully forgiven by:	scottl
2003-01-20 19:43:46 +00:00
Sam Leffler
8eab61f3de o add BIOCGDLTLIST and BIOCSDLT ioctls to get the data link type list
and set the link type for use by libpcap and tcpdump
o move mtx unlock in bpfdetach up; it doesn't need to be held so long
o change printf in bpf_detach to distinguish it from the same one in bpfsetdlt

Note there are locking issues here related to ioctl processing; they
have not been addressed here.

Submitted by:	Guy Harris <guy@alum.mit.edu>
Obtained from:	NetBSD (w/ locking modifications)
2003-01-20 19:08:46 +00:00
Poul-Henning Kamp
19f7043db0 Remove the deprecated IOCTL bits raidframe used, it doesn't anymore. 2003-01-20 18:22:30 +00:00
Justin T. Gibbs
b085809de9 Add definitions for the task management codes sent in SPI4
command information units.
2003-01-20 18:05:46 +00:00
Justin T. Gibbs
3d46a68893 Allow constants to be complex expressions so long as those
expressions can be fully evaluated during assembly.

Remove the numerical_value portion of the grammer which is
no longer referenced.
2003-01-20 18:02:11 +00:00
Justin T. Gibbs
357c1c6a4c Fix the last reference to the reg_print.c file handle
in symtable_dump.  This allows the assembler to operate
without generating this file.
2003-01-20 18:01:37 +00:00
Matthew Dillon
2d5c7e4506 Close the remaining user address mapping races for physical
I/O, CAM, and AIO.  Still TODO: streamline useracc() checks.

Reviewed by:	alc, tegge
MFC after:	7 days
2003-01-20 17:46:48 +00:00
Scott Long
866723162a Remove stale reference to deprecated mini-disklayer stuff. 2003-01-20 16:15:47 +00:00
Poul-Henning Kamp
355f192528 Hide the ioctls behind #ifdef _KERNEL to avoid kdump getting upset. 2003-01-20 13:04:03 +00:00
Maxim Konovalov
2adf7582da De-anonymity a couple of messages I missed in a previous sweep.
Move one of them under DEB macro.

Noticed by:	Wiktor Niesiobedzki <w@evip.pl>
2003-01-20 13:03:34 +00:00
Maxim Konovalov
8ec22a9363 If the first action is O_LOG adjust a pointer to the real one, unbreaks
skipto + log rules.

Reported by:	Wiktor Niesiobedzki <w@evip.pl>
MFC after:	1 week
2003-01-20 11:58:34 +00:00
Poul-Henning Kamp
901ea9c5aa #ifdef this file into three pieces: The bit which raidframe needs to
stop using.  The bit which the sys/boot code needs to stop using and
the bit which is NO_GEOM only.
2003-01-20 11:49:24 +00:00
Poul-Henning Kamp
c0805171aa disk_dev_synth() is a NO_GEOM hack. 2003-01-20 11:29:07 +00:00
Poul-Henning Kamp
0b4583e873 Only include <sys/diskslice.h> ifdef NO_GEOM 2003-01-20 11:28:37 +00:00
Poul-Henning Kamp
30f5ffb8d9 Remove need for <sys/diskslice.h> but retain numerical compatibilty just in case. 2003-01-20 11:23:00 +00:00
Poul-Henning Kamp
63fc86da6f Use NEXTDOSPART instead of MAX_SLICES. 2003-01-20 11:15:12 +00:00
Poul-Henning Kamp
5a3d3419f8 We need neither <sys/diskslice.h> nor <sys/disklabel.h> here. 2003-01-20 11:11:51 +00:00
Poul-Henning Kamp
4661bf1666 Add a NEXTDOSPART definition here as well, for the benefit of biosdisk.c in
the bootcode.  I don't think there acturally are any extended partitions on
pc98, and this define may merely help cover up the fact that the biosdisk.c
was insufficiently scrubbed when copy&pasted from i386.
2003-01-20 11:09:51 +00:00
Poul-Henning Kamp
619394c052 Add NEXTDOSPART (N-Extended-Dos-Partitions) as replacement for the
misplaced MAX_SLICES from <sys/diskslice.h>.
2003-01-20 11:06:24 +00:00
Alan Cox
28ec30cd9f - Hold the page queues lock around vm_page_hold().
- Assert that the page queues lock rather than Giant is held in
   vm_page_hold().
2003-01-20 09:24:03 +00:00
Alan Cox
a5382a0701 Move the vm_page_busy() in pmap_dispose_thread() to a place where it is
covered by the page queues lock.  (This actually makes alpha's
pmap_dispose_thread() look more like the i386's.)
2003-01-20 08:14:35 +00:00
Julian Elischer
67f7c1bbe1 Remove a KASSERT that can now happen and add a missing setrunnable. 2003-01-20 03:41:04 +00:00
Jeff Roberson
ebc85edf5e - M_WAITOK is 0 and not a real flag. Test for this properly.
Submitted by:	tmm
Pointy hat to:	jeff
2003-01-20 01:32:56 +00:00
Orion Hodson
4a532ff091 Re-implemention of the interpolation code used for sample rate
conversion.  The new version has improved interpolation accuracy and
maintains the timing relationship between the input and output signals
exactly.

Approved by:	cg
2003-01-20 00:54:24 +00:00
Josef Karthauser
f4e618b499 Regen 2003-01-20 00:51:19 +00:00
Sam Leffler
c9def0f441 default tx error rate limiting to 0 to disable tx error msgs; this is
consistent with how the old driver worked
2003-01-20 00:50:36 +00:00
Josef Karthauser
6ee4bee25a Support for the "Seiko Epson Perfection 1260 scanner".
Submitted by:	Michael Lestinsky <michael@lestinsky.de>
MFC After:	3 days
2003-01-20 00:41:30 +00:00
Søren Schmidt
7fc7425df3 Small change to the previous commit, zero out the 48BIT flag in ata_command
instead of in dmadone.
2003-01-19 20:18:07 +00:00
Sam Leffler
9142ac5760 accept short WEP keys for backward compatibility 2003-01-19 20:13:43 +00:00
Mike Barcroft
72ea009571 Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in the
'int nsegments' argument to bus_dma_tag_create().  ~0ul does not fit in
an int on machines with 64 bit longs.

Noticed by:	alpha tinderbox
2003-01-19 15:13:41 +00:00
Poul-Henning Kamp
0f76d6d822 Finally give CCD the disk mini-layer treatment:
CAUTION:

        Previously CCD would be different from all other disks in
        the system in that there were no "ccd0" device, only a
        "ccd0c" device.

        This is no longer so after this commit.  If you access a
        ccd device through the "/dev/ccd0c" device _and_ have not
        actually put a BSD disklabel on the device, you will have
        to use the name "/dev/ccd0".  If your CCD device contains
        a BSD disklabel there should be no difference.

        You need to recompile ccdconfig(8) using the changed
        src/sys/sys/ccdvar.h for the -g "show me" option to work.

        I have run the regression test I created before I started
        overhauling CCD and it flags no problems, but this code
        is mildly evil, so take care.  If you would cry if you lost
        what's on CCD, make a back before you upgrade.

Create separate cdevsw for the /dev/ccd.ctl device.

Remove the cloning function, the disk-minilayer will do all naming
for us.

Remove the ccdunit and ccdpart functions and carry the softc pointer
in the relevant dev_t's and structures.

Release all memory when a CCD device is unconfigured, previously
the softc would linger behind.

Remove all traces of BSD disklabel fiddling code.

Remove ccdpsize, the disk mini-layer does this for us.

Don't allocate memory with M_WAITOK in ccdstrategy().

Remove boundary checks which the disk mini-layer does for us.

Don't allocate space for more than 2 ccdbuf, RAID was never implemented.

NB: I have not tried to address any of the preexisting ailments of CCD.
2003-01-19 15:00:58 +00:00
Poul-Henning Kamp
1dccd08a34 Unifdef -UDEBUG on the CCD driver. The debugging is mostly useless
and can be added back selectively, should anybody start to interest
themselves for the internal workings of ccd.

This commit will make the diffs for the following commits much more
readable.
2003-01-19 14:35:38 +00:00
Søren Schmidt
188869473d Add support for the ServerWorks CSB6.
The support for the 3'rd channel is only experimental.
2003-01-19 13:03:20 +00:00
Poul-Henning Kamp
8a5c54f72d #ifdef NO_GEOM these files entirely. When NO_GEOM is removed as an
option the files can be removed.
2003-01-19 11:51:35 +00:00
Poul-Henning Kamp
f712aa0861 Remove the last stray NO_GEOM option in our example kernel config files. 2003-01-19 11:50:45 +00:00
Søren Schmidt
15fa4bd593 Fix the 48bit access support for the older Promise 66/100 controllers, the
first attempt was wrong and could cause r/w timeouts.

Add yet another Promise PCI id.
2003-01-19 11:47:32 +00:00
Tim J. Robbins
5cb6b2cada Remove unnecessary locking of Giant around nanotime() in clock_gettime(). 2003-01-19 11:28:22 +00:00
Poul-Henning Kamp
5ecd6fd411 Mark more code #ifdef NODEVFS 2003-01-19 11:26:13 +00:00
Poul-Henning Kamp
7e760e148a Originally when DEVFS was added, a global variable "devfs_present"
was used to control code which were conditional on DEVFS' precense
since this avoided the need for large-scale source pollution with
#include "opt_geom.h"

Now that we approach making DEVFS standard, replace these tests
with an #ifdef to facilitate mechanical removal once DEVFS becomes
non-optional.

No functional change by this commit.
2003-01-19 11:03:07 +00:00
Poul-Henning Kamp
ec2c4225ce When we use DEVFS, we don't need the /dev/tty pseudo-driver to do
more than return ENXIO from its open routine, so most of this file
is unneeded.

A straight #ifdef'ing would look quite messy, and make the file
quite unreadable, so instead I have simply added the DEVFS version
of the file at the top, protected by #ifndef NODEVFS.

Once we have removed NODEVFS option, we can retain 86 the 86 lines at
the top and drop the other 287 lines.
2003-01-19 10:23:47 +00:00
Poul-Henning Kamp
d3cd81e026 Move NODEVFS and NO_GEOM to opt_global.h.
This allows me to mark code which they control with #ifdef without
polluting files with #includes of opt_devfs.h and opt_geom.h.

Once these two options are removed, this will allow mechanical removal
of the bits their removal makes obsolete.
2003-01-19 10:02:47 +00:00
Sam Leffler
024906dc2c fix ioctl handling for setting wep keys 2003-01-19 07:08:03 +00:00
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