Commit Graph

37522 Commits

Author SHA1 Message Date
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