Commit Graph

2232 Commits

Author SHA1 Message Date
Søren Schmidt 55bfaed1c0 Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.

DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.

The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.

Fixed problems:

    All known hang problems should be solved
	The probe code has been sligthly changed, this should solve
	the reports I have lying around (I hope).

    Hangs when accessing ata & atapi device on the same channel simultaniously.
	A real braino in ata_start caused this, fixed.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, agaiin you have been warned :)

But please tell me how it works for you!

Enjoy!

-Søren
1999-03-28 18:57:20 +00:00
Greg Lehey dfb9ab7989 Add definition LongJmp for longjmp if -DVINUMDEBUG.
Change some comment texts
1999-03-28 08:55:04 +00:00
Greg Lehey d7c4c59f03 set_sd_state: Handle sd_empty correctly. In particular, require
force to bring a subdisk of a RAID-5 plex out of this
		state.

update_plex_state:  Rewrite yet again.
1999-03-28 08:54:48 +00:00
Greg Lehey d8118f9d41 Put some \ns in some log messages. 1999-03-28 08:54:25 +00:00
Greg Lehey 1238689209 Add function LongJmp which checks the parameters before calling
longjmp.  I suspect that the occasional double panic may be the result
of incorrect parameters to longjmp.  This happens, of course, like the
entire file, only with -DVINUMDEBUG.
1999-03-28 08:54:03 +00:00
Greg Lehey 738082e8b0 Remove longjmp declaration. 1999-03-28 08:53:46 +00:00
Greg Lehey d0fe90e337 Add declaration for forceup () (in vinumstate.c)
Add declarations for setjmp, cmd_buf and longjmp.
1999-03-28 08:53:23 +00:00
Greg Lehey f41c5231bf Remove longjmp declaration.
give_sd_to_plex: Don't set Raid-5 subdisk state here.

config_subdisk: handle the name parameter correctly when the subdisk
		was referenced in a previous plex definition.  The
		name parameter must come first.

		Handle autosizing relatively correctly.  There is
		still a danger of losing drive space if problems
		occur with an autosized subdisk.

		Set state to empty, not up, when complete.  This also
		solves a nagging problem about enforcing the need to
		initialize RAID-5 plexes.

config_plex:    handle the name parameter correctly when the plex
		was referenced in a previous volume definition.  The
		name parameter must come first.

		Handle initial state better.

update_plex_config:
		Calculate the trim factor for RAID-5 plexes correctly.

		Set the number of down subdisks correctly when reading
		from disk config.
1999-03-28 08:53:02 +00:00
Greg Lehey cec9815419 Remove longjmp declaration.
free_vinum:	Put a timeout on waiting for the daemon to die.
1999-03-28 08:52:33 +00:00
Greg Lehey bd51f0eff9 Add 'referenced' states to subdisks and plexes. 1999-03-28 08:52:11 +00:00
Nick Hibma e1c81f1d94 Cleaning up of code, remove unneeded cruft and make
code more compact.
1999-03-27 23:08:44 +00:00
Matt Jacob 3bd28825dd Annoying little nigglet- apparently *some* Qlogic temporarily ignore
settings you've just sent them and return random values if you follow
the set by a get. This causes problems when you latter run a Tag-enabled
command when you've command tagged mode off.
1999-03-26 00:33:13 +00:00
Matt Jacob 92c49d78da enable 1080 LVD support 1999-03-25 22:53:56 +00:00
Matt Jacob 4394c92f52 Add in 1080 LVD support and some basis also for the 1240. The port database
printout is now enabled.
1999-03-25 22:52:45 +00:00
Matt Jacob 7aae9d1348 roll internal tag level 1999-03-25 19:53:54 +00:00
Matt Jacob dcb409d935 roll internal tag level 1999-03-25 19:47:33 +00:00
Nick Hibma acf3654412 Added a number of device names: Konica, Microsoft, Macally 1999-03-24 07:46:53 +00:00
Peter Wemm 67ef82978d Update Specialix download microcode for the transputer based serial host
cards from the 3.0-beta to 3.0.4 release.

Submitted-by:  Nick Sayer <nsayer@quack.kfu.com>
PR: 10674
1999-03-24 02:49:43 +00:00
Greg Lehey 1d2ade2043 Correct the text of an obscure error message. 1999-03-24 00:43:05 +00:00
Nick Hibma d0ef08ba15 Check whether the PIRQD enable bit is set in LegSup and if not, set it.
On my PIIX4 chip rev 1 this is required. Have not had any complaints from
other people so it might be a problem with this stepping.
1999-03-23 21:37:45 +00:00
Nick Hibma 7dfd509563 1) clean up debugging output
2) remove erroneous querying of PCI LegSup register while it should be
   fetched from PCI config space
3) change name of define for this register
1999-03-23 21:35:57 +00:00
Justin T. Gibbs 1652f91eb5 Fix a typo.
PR: 10722
Submitted by:	Chris Costello <chris@holly.dyndns.org>
1999-03-23 07:27:38 +00:00
Justin T. Gibbs 73c9c6dd62 Add support for the 3950U2B controller.
Recognize aic7895 controllers that have been "acquired" by a RAIDPort
card as normal aic7895s.

Recognize the aic7815 Raid Parity/Memory controller chip and notify
the user that it's RAID functionality will be ignored.
1999-03-23 07:26:41 +00:00
Justin T. Gibbs e287abc83c Use TCL_CHANNEL/SCSI_ID/etc. macros in more locations.
Don't mess with the IRQMS bit in the host control register unless
we are an aic7770 chip.

Use calling context to determine if the card is already paused when
we update the target message request bit field in controller scratch
ram.  Looking at the paused bit in the HCNTRL register opened up a
race condition.

Insert delays in the target message request update routine as a temporary
work around for what looks like a chip bug.  I'm still investigating this
one.

Fix the Abort/Abort Tag/BDR handler to pull its message from the message
buffer in our softc instead of attempting to get it from a register on
the controller.  The message is never recorded by the controller in the
new message scheme.

Don't rely on having an SCB when a BDR occurs.  We can issue these during
invalid reconnects to.

Fix a few cases where we were restarting the sequencer but then still
falling out of a switch statement to unpause the sequencer again.
This could cause us to mess up sequencer state if it generated another
pausing interrupt between the time of the restart and unpause.

Kill the 'transceiver settle' loop during card initialization.  I
failed to realize that a controller that is not connected to any
cables will never settle or enable the SCSI transceivers at all.
The correct solution is to monitor the IOERR interrupt which indicates
that the transceiver state has changed (UW<->LVD).

Modify the aic7xxx assembler to properly echo input when stdin is not
a tty.
1999-03-23 07:24:29 +00:00
Greg Lehey 6100b4d0c5 Change the definition of VINUM_STARTCONFIG to take an int write parameter. 1999-03-23 04:50:40 +00:00
Greg Lehey 6d723f4eb0 Add flag VF_FORCECONFIG for use by the config_drive and friends. 1999-03-23 04:49:32 +00:00
Greg Lehey ec79ff6a85 vinum_start:
remove the splbio() around the call to launch read requests.

launch_requests:
  Move the splbio() protection outside the entire launch_loop.  The
  previous location was causing problems with IDE drives, where the
  call to the strategy routine often did not complete until after
  complete_rqe deallocated the request structure.

Solution-independently-found-by: Russell Neeper <r-neeper@tamu.edu>
Problem-reported-by: Vallo Kallaste <vallo@matti.ee>
		     John Saunders <john@nlc.net.au>
		     Bernd Walter <ticso@cicely.de> (maybe)
1999-03-23 04:49:08 +00:00
Greg Lehey 8d2eda6481 VINUM_STARTCONFIG:
Pass the 'data' parameter to start_config, which uses it as the
  parameter 'force.
1999-03-23 04:48:31 +00:00
Greg Lehey dae797bc58 init_drive:
Check for partition types FS_VINUM and FS_UNUSED.  Accept both, but
  complain about FS_UNUSED.  At a later date, only FS_VINUM will be
  accepted.

Threatened-since: over a year
1999-03-23 04:48:05 +00:00
Greg Lehey b555657ffa Change the declaration of start_config. 1999-03-23 04:47:33 +00:00
Greg Lehey 7c0052fe03 start_config:
Add a flag `force' (VF_FORCECONFIG) to force name changes of
  existing drives.
config_drive:
  If the drive already has a vinum label, and name doesn't match the
  specified drive, do it anyway if the 'force' flag is specified.
finish_config:
  Reset the `force' flag.

Continually-tripped-over-by:  Karl Pielorz <kpielorz@tdx.co.uk>

give_sd_to_drive:
  If the drive is down, take the subdisk down and don't try to fix
  things.

update_plex_config:
  Don't try to update the config parameters of a plex which isn't
  fully configured (state plex_init or plex_unallocated).

  Correctly calculate the amount to trim off a striped or RAID-5 plex
  whose size is not a multiple of the stripe size.
1999-03-23 04:47:09 +00:00
Nick Hibma 83fac6ab3f Cosmetical changes. 1999-03-22 19:58:59 +00:00
Nick Hibma 86df1e04cc Implementation of the keyboard driver.
Done by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-03-22 19:55:30 +00:00
Nick Hibma 5e294a20cf Moved timeout initialisation a bit earlier in the process. The
untimeout function triggered panics once in a while.
1999-03-22 19:52:28 +00:00
Wes Peters df373873b5 Turn on PCI bus mastering in driver attach routine
to avoid hanging the system if the BIOS has not
initialized the interface.

PR:		10150
Reviewed by:	dg
1999-03-20 04:51:25 +00:00
Greg Lehey 3c7e349bca Define two superdevices for vinum(8), depending on whether they are
compiled with or without debugging support.  This enables us to catch
(fatal) mismatches between the kernel and userland.

Coalesce flags VINUM_DISKCONFIG and VINUM_READING_CONFIG.  They did
essentially the same thing.

Add VINUM_BIGDRIVE for pretending we have macho hardware.
1999-03-19 07:19:52 +00:00
Greg Lehey def602f62b VolState: return an enum volumestate, not a (non-existent) enum volstate.
Strangely, neither gcc nor EGCS noticed this bug.

Eagle-eyed by: arno@heho.snv.jussieu.fr (Arno J. Klaassen)
1999-03-19 07:17:05 +00:00
Greg Lehey 1f3cd6add9 Perform all of vinumstrategy at splbio. This doesn't appear
necessary, but might explain some weird problems that some people have
been getting.
1999-03-19 07:15:24 +00:00
Greg Lehey 82ca4fa74c Use microtime, not getmicrotime, to note the times in the malloc and
free histories.
1999-03-19 07:14:18 +00:00
Greg Lehey 6e6d6dd86e Add debug flags DEBUG_BIGDRIVE, designed for testing only. It
pretends that each drive is 100 times as large as it really is.  Not
for use at home.

Coalesce flags VINUM_DISKCONFIG and VINUM_READING_CONFIG.  They did
essentially the same thing.
1999-03-19 07:13:31 +00:00
Greg Lehey 9e89208b39 Coalesce flags VINUM_DISKCONFIG and VINUM_READING_CONFIG. They did
essentially the same thing.

Reset flags at the right point at the end of configuration.  The
previous code disabled configuration saving at the end.
1999-03-19 07:10:19 +00:00
Greg Lehey 66c4363288 free_vinum: don't change loop bounds for deleting drives while in the loop.
This solved a problem where 'vinum resetconfig' only reset half
	    the drives.

Reported-by:  Brad Knowles <blk@skynet.be>
	      Karl Pielorz <kpielorz@tdx.co.uk>

Change the super device.  We now have three super devices:

  1.  The normal superdevice used by vinum(8).
  2.  The superdevice used by vinum(8) when compiled with debug support.
  3.  The superdevice used by the daemon.

This method allows vinum(8) to determine debug mismatches.  Also check
correctly for the device type.  The old code did not check all bits of
the minor number.

  Reported-by: a cast of thousands, most recently by Brad Knowles
               <blk@skynet.be>.
1999-03-19 07:08:40 +00:00
Greg Lehey 6f70e1c542 Modify to compile with egcs.
Prodded-by: obrien
1999-03-18 23:26:22 +00:00
Luigi Rizzo ab090e5b4e MF22... add bridging support to the device drivers. Without this
bridging cannot work on -current/releng3!
1999-03-17 16:44:53 +00:00
Matt Jacob d59bd46908 Prep for 1080/1240 support. Those fine h/w engineers at Qlogic
gave yet another internal register layout model for what is
*still* the same architecture. I hope they saved billyuns of gates
'coz otherwise this is *really* annoying.
1999-03-17 05:07:18 +00:00
Matt Jacob 57c801f5cf A wad of changes- prepping for 1080/1240 support (which caused a massive
thwank in register layout goop). A different mboxcmd approach. Some PDB change
infrastructure. Some better management of loopdown/loopup events (keep them
distinct from resource starvation for simq freeze/unfreeze actions).
1999-03-17 05:04:39 +00:00
Julian Elischer a5296b05b4 Submitted by: Matt Dillon <dillon@freebsd.org>
The old VN device broke in -4.x when the definition of B_PAGING
changed. This patch fixes this plus implements additional capabilities.
The new VN device can be backed by a file ( as per normal ), or it can
be directly backed by swap.

Due to dependencies in VM include files  (on opt_xxx options) the new
vn device cannot be a module yet. This will be fixed in a later commit.
This commit delimitted by tags {PRE,POST}_MATT_VNDEV
1999-03-14 09:20:01 +00:00
Peter Wemm ac3101276b Merge NetBSD 1.80->1.82 changes from vendor branch into mainline. 1999-03-14 08:32:52 +00:00
Semen Ustimenko 29563129dd Implemented workaround for EPIC's Application Note 7-15 (concerning
chip int. and ext. clock synchronisation). Fixed workaround for
transmit threshold underrun. Added volatile keyword to CSR_READ_* and
CSR_WRITE_* macroses. Added DELAYs to eliminate randomness caused
by processor speed. Fixed all TXCON and RXCON registers to be accessed
only when chip is idle, as manual told. Changed epic_init_phy to
drop link by isolating and going loopback, should should force link
partner to restart autonegotiation.

PR: kern/10535,	kern/9742, kern/10575
Submitted by:	Peter Jeremy, David Greenman
1999-03-14 08:30:23 +00:00
Greg Lehey e21b9d8321 deallocrqg: deallocate the correct object, also check that the object
is really in the chain.
1999-03-14 04:04:23 +00:00