Commit Graph

106872 Commits

Author SHA1 Message Date
Poul-Henning Kamp
1b67be7b75 Rewrite of the floppy driver to make it MPsafe & GEOM friendly:
Centralize the fdctl_wr() function by adding the offset in
	the resource to the softc structure.

	Bugfix: Read the drive-change signal from the correct place:
	same place as the ctl register.

	Remove the cdevsw{} related code and implement a GEOM class.

	Ditch the state-engine and park a thread on each controller
	to service the queue.

	Make the interrupt FAST & MPSAFE since it is just a simple
	wakeup(9) call.

	Rely on a per controller mutex to protect the bioqueues.
	Grab GEOMs topology lock when we have to and Giant when
	ISADMA needs it.  Since all access to the hardware is
	isolated in the per controller thread, the rest of the
	driver is lock & Giant free.

	Create a per-drive queue where requests are parked while
	the motor spins up.  When the motor is running the requests
	are purged to the per controller queue.  This allows
	requests to other drives to be serviced during spin-up.

	Only setup the motor-off timeout when we finish the last
	request on the queue and cancel it when a new request
	arrives.  This fixes the bug in the old code where the motor
	turned off while we were still retrying a request.

	Make the "drive-change" work reliably.  Probe the drive on
	first opens.  Probe with a recal and a seek to cyl=1 to
	reset the drive change line and check again to see if we
	have a media.

	When we see the media disappear we destroy the geom provider,
	create a new one, and flag that autodetection should happen
	next time we see a media (unless a specific format is configured).

	Add sysctl tunables for a lot of drive related parameters.
	If you spend a lot of time waiting for floppies you can
	grab the i82078 pdf from Intels web-page and try tuning
	these.

	Add sysctl debug.fdc.debugflags which will enable various
	kinds of debugging printfs.

	Add central definitions of our well known floppy formats.

	Simplify datastructures for autoselection of format and
	call the code at the right times.

	Bugfix: Remove at least one piece of code which would have
	made 2.88M floppies not work.

	Use implied seeks on enhanced controllers.

	Use multisector transfers on all controllers.  Increase
	ISADMA bounce buffers accordingly.

	Fall back to single sector when retrying.  Reset retry count
	on every successful transaction.

	Sort functions in a more sensible order and generally tidy
	up a fair bit here and there.

	Assorted related fixes and adjustments in userland utilities.

WORKAROUNDS:
	Do allow r/w opens of r/o media but refuse actual write
	operations.  This is necessary until the p4::phk_bufwork
	branch gets integrated (This problem relates to remounting
	not reopening devices, see sys/*/*/${fs}_vfsops.c for details).

	Keep PC98's private copy of the old floppy driver compiling
	and presumably working (see below).

TODO (planned)

	Move probing of drives until after interrupts/timeouts work
	(like for ATA/SCSI drives).

TODO (unplanned)

	This driver should be made to work on PC98 as well.

	Test on YE-DATA PCMCIA floppy drive.

	Fix 2.88M media.

This is a MT5 candidate (depends on the bioq_takefirst() addition).
2004-08-20 15:14:25 +00:00
Dag-Erling Smørgrav
0f81131e63 Immortalize the words of a -current reader. 2004-08-20 13:39:28 +00:00
Pawel Jakub Dawidek
c14401c00f - fflush() standard output before fork()ing.
- Remove redundant 'break'.
2004-08-20 12:49:09 +00:00
Pawel Jakub Dawidek
e19f32a461 Add the raidtest tool, which can be used for performance tests of storage devices.
It uses random offsets, random requests size and random operation type (READ or
WRITE). It also allows to run many processes to send I/O requests in parallel.
2004-08-20 12:02:34 +00:00
Dejan Lesjak
a9c303ee09 Add my birthday.
Approved by:	anholt (mentor)
2004-08-20 12:01:19 +00:00
Dag-Erling Smørgrav
c59826b3fc Remove a couple of warnings and tweak an error message. 2004-08-20 10:23:22 +00:00
Dag-Erling Smørgrav
f95052e5e6 Copy open_locked() from tinderbox.pl and use it to optionally acquire a
lock file upon startup.  If this fails, tbmaster will simply terminate.
2004-08-20 08:10:30 +00:00
John-Mark Gurney
d8abb5b00b document that the sk driver now supports the Belkin F5D5005 gige card. 2004-08-20 06:27:58 +00:00
John-Mark Gurney
c3e8b950c7 fix LOR's in sk. Original patch from dwhite. This moves the memory
allocation earlier on in sk_attach so we don't have to lock until a bit
later.

PR:		69752
2004-08-20 06:22:04 +00:00
Søren Schmidt
d04d789463 DONT PANIC
Only call dmainit() if there is a valid busmaster resource.
2004-08-20 06:19:25 +00:00
Scott Long
2384290ced Revert the previous change. It works great for 4BSD but causes major
problems for ULE.  The reason is quite unknown and worrisome.
2004-08-20 05:58:38 +00:00
Tom Rhodes
7a18f5c985 Replace the ERRORS section with a DIAGNOSTICS section.
Requested by:	ru
2004-08-20 05:25:11 +00:00
Scott Long
2c86298c6c In maybe_preempt(), ignore threads that are in an inconsistent state. This
is an effective band-aid for at least some of the scheduler corruption seen
recently.  The real fix will involve protecting threads while they are
inconsistent, and will come later.

Submitted by: julian
2004-08-20 05:18:50 +00:00
John-Mark Gurney
e7290ad28f put function's name at begining of column... 2004-08-20 05:09:31 +00:00
Tom Rhodes
d34ae0bc00 Replace the ERRORS section with a DIAGNOSTICS section.
Requested by:	ru
2004-08-20 05:07:02 +00:00
John-Mark Gurney
50a6c77a02 add pci id for Belkin F5D5005 Gigabit ethernet card. 2004-08-20 05:06:10 +00:00
Tom Rhodes
348aeef5b0 Fix a few style nits.
Noticed by:	Mr. mdoc(7) himself, ru
2004-08-20 04:52:00 +00:00
John-Mark Gurney
5d6dd4685a make sure that the socket is either accepting connections or is connected
when attaching a knote to it...  otherwise return EINVAL...

Pointed out by:	benno
2004-08-20 04:15:30 +00:00
Julian Elischer
f036d4081d Align netgraph message fields ready for 64-bit (and 128 bit :-) machines.
requires a recompile of netgraph users.
Also change the size of a field in the bluetooth code
that was waiting for the next change that needed recompiles so
it could piggyback its way in.

Submitted by:	jdp, maksim
MFC after:	2 days
2004-08-20 01:24:23 +00:00
Andre Oppermann
ce63226177 Fix a stupid typo which prevented an ipfw KLD unload from successfully cleaning
up its remains.  Do not terminate 'if' lines with ';'.

Spotted by:	claudio@OpenBSD.ORG (sitting 3m from my desk)
Pointy hat to:	andre
2004-08-20 00:36:55 +00:00
David Xu
aea0abf3e3 build libthr on amd64. 2004-08-19 23:51:42 +00:00
David Xu
9027ac471c Adjust code to support AMD64, on AMD64, thread needs to set fsbase by
itself before it can execute any other code, so new thread should be
created with all signals are masked until after fsbase is set.
2004-08-19 23:49:04 +00:00
David Xu
f5eb80a9d3 Add AMD64 support code. 2004-08-19 23:41:12 +00:00
Andre Oppermann
70222723f3 When unloading ipfw module use callout_drain() to make absolutely sure that
all callouts are stopped and finished.  Move it before IPFW_LOCK() to avoid
deadlocking when draining callouts.
2004-08-19 23:31:40 +00:00
Simon L. B. Nielsen
cc52f21870 - Remove note about device listings going away.
- Add a note about possibility for duplicate listing of devices.
- Auto generate device listings for the following drivers: ncr, sym,
  umodem, and uscanner

MFC after:	3 days
2004-08-19 22:03:20 +00:00
Simon L. B. Nielsen
1e4b1b9c6a Add a HARDWARE section which lists supported devices based on the
Hardware Notes.

MFC after:	3 days
2004-08-19 21:37:32 +00:00
Simon L. B. Nielsen
86ae836293 Add a HARDWARE section which lists supported devices.
MFC after:	3 days
2004-08-19 21:34:31 +00:00
Simon L. B. Nielsen
1bdb6db159 Add a HARDWARE section which lists supported devices.
MFC after:	3 days
2004-08-19 21:24:45 +00:00
David E. O'Brien
f49f2ca64e Unconditionally support the AMD64 GART HW. 2004-08-19 20:58:24 +00:00
Simon L. B. Nielsen
cc99ac24db Move listing of DTC 3290 to aha(4).
MFC after:	3 days
2004-08-19 20:49:39 +00:00
Andre Oppermann
6f2d4ea6f8 For IPv6 access pointer to tcpcb only after we have checked it is valid.
Found by:	Coverity's automated analysis (via Ted Unangst)
2004-08-19 20:16:17 +00:00
Nate Lawson
0b54748fec Add a newline. 2004-08-19 20:16:09 +00:00
Ken Smith
7a4cf071fc Temporary bandaid to help sparc64 systems with ATA disks boot. Recent
changes to the ATA driver cause a kernel crash, no fault of the ATA
code.  Work is in progress to add the necessary feature to the sparc64
kernel and this commit will be backed out when it is complete.  This
bandaid is being put in mostly in the interests of getting the first
release snapshot done and out the door.

Tested on:	Ultra-10 exhibiting the insta-panic.
MFC:		Real Soon
2004-08-19 20:13:31 +00:00
Poul-Henning Kamp
d298f91974 Add bioq_takefirst().
If the bioq is empty, NULL is returned.  Otherwise the front element
is removed and returned.

This can simplify locking in many drivers from:

	lock()
	bp = bioq_first(bq);
	if (bp == NULL) {
		unlock()
		return
	}
	bioq_remove(bp, bq)
	unlock
to:
	lock()
	bp = bioq_takefirst(bq);
	unlock()
	if (bp == NULL)
		return;
2004-08-19 19:51:51 +00:00
Andre Oppermann
0ce70eb477 Fix spelling error in my last blurb.
Pointed out by:	ru
2004-08-19 19:45:28 +00:00
Wilko Bulte
924a8cd9d8 - Note that Adaptec 3940UW won't be recognised by the 164sx SRM
- Warn that 164SX is a picky customer with regards to DIMMs.
2004-08-19 19:27:33 +00:00
David E. O'Brien
a886592542 86 new vendor ID's from USB.org, and 3 corrections of existing vendor ID's. 2004-08-19 19:21:14 +00:00
Andre Oppermann
b067abfa8b Put in a note about the ipfw to pfil_hooks conversion and the requirement
of having said in the kernel to be able to use ipfw.
2004-08-19 18:54:54 +00:00
Nate Lawson
d3bdd24ea9 Disable interrupts after using pmap_enter() to add the identity mapping.
Since pmap_enter() calls pmap_invalidate_page(), which needs interrupts
enabled in the SMP case, we defer the disable to right before saving the
register context.  This has been incorrect for about a year but caused no
real problems because the identity page never actually replaces a previously
mapped page and suspend/resume on SMP systems has been uncommon.

Tested by:	sos
MFC after:	3 days
2004-08-19 18:48:17 +00:00
Andre Oppermann
50ab727669 Give a useful error message if someone tries to compile IPFIREWALL into the
kernel without specifying PFIL_HOOKS as well.
2004-08-19 18:38:23 +00:00
Andre Oppermann
6c493365ce Add comment that IPFIREWALL now requires option PFIL_HOOKS. 2004-08-19 18:29:55 +00:00
Andre Oppermann
1cc2c797b3 Note that IPFIREWALL depends on PFIL_HOOKS compiled into the kernel as well.
Submitted by:	ceri, simon (mdoc fixes)
2004-08-19 18:04:10 +00:00
Andre Oppermann
9108601915 Do not unconditionally ignore IPDIVERT and IPFIREWALL_FORWARD when building
the ipfw KLD.

 For IPFIREWALL_FORWARD this does not have any side effects.  If the module
 has it but not the kernel it just doesn't do anything.

 For IPDIVERT the KLD will be unloadable if the kernel doesn't have IPDIVERT
 compiled in too.  However this is the least disturbing behaviour.  The user
 can just recompile either module or the kernel to match the other one.  The
 access to the machine is not denied if ipfw refuses to load.
2004-08-19 17:59:26 +00:00
Andre Oppermann
e4c97eff8e Bring back the sysctl 'net.inet.ip.fw.enable' to unbreak the startup scripts
and to be able to disable ipfw if it was compiled directly into the kernel.
2004-08-19 17:38:47 +00:00
Nate Lawson
c003dab8ff Add debugging to rman_manage_region() as well. This is useful since we
manage subregions in ACPI.

MFC after:	3 days
2004-08-19 16:41:12 +00:00
Alfred Perlstein
65da79c4be Reword recent addition about memory moving.
Requested by: keramida

Bump .Dd

Requested by: ru
2004-08-19 16:34:31 +00:00
Cheng-Lung Sung
180ece11dc Add my birthday.
Approved by:	leeym (mentor)
2004-08-19 16:18:39 +00:00
Robert Watson
16239786ca Remove GIANT_REQUIRED from setugidsafety() as knote_fdclose() no longer
requires Giant.
2004-08-19 14:59:51 +00:00
Christian Brueffer
7284291340 Add a HARDWARE section and bump the document date
MFC after:	3 days
2004-08-19 14:33:53 +00:00
Maxim Konovalov
57c645c7d9 Remove an unnecessary .It.
Reviewed by:	ru
2004-08-19 13:41:06 +00:00