Don't let bugs in ide_pci.c break wdprobe(), at least for standard

IDE hardare.  The attempted fix in rev.1.182 was a no-op except for
adding dozens of style bugs.  The undocumented options ALI_V and
DISABLE_PCI_IDE go away as a side effect.  ALI_V was a no-op because
rev.1.182 was a no-op.  DISABLE_PCI_IDE didn't actually disable
PCI IDE.  It disabled the buggy code in wdprobe() at a cost of
completely breaking support for Promise controllers.

Broken in:	rev.1.139
This commit is contained in:
Bruce Evans 1999-01-16 01:06:23 +00:00
parent 38c9282d5c
commit 86485cc940

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.183 1999/01/11 22:14:22 julian Exp $
* $Id: wd.c,v 1.184 1999/01/12 01:04:38 eivind Exp $
*/
/* TODO:
@ -69,7 +69,6 @@
#include "opt_hw_wdog.h"
#include "opt_ide_delay.h"
#include "opt_wd.h"
#include "pci.h"
#include <sys/param.h>
#include <sys/dkbad.h>
@ -312,30 +311,16 @@ wdprobe(struct isa_device *dvp)
du->dk_ctrlr = dvp->id_unit;
interface = du->dk_ctrlr / 2;
du->dk_interface = interface;
#if !defined(DISABLE_PCI_IDE) && (NPCI > 0)
#ifdef ALI_V
if ((wddma[interface].wdd_candma) &&
((du->dk_dmacookie = wddma[interface].wdd_candma(dvp->id_iobase,du->dk_ctrlr)) != NULL))
{
du->dk_port = dvp->id_iobase;
du->dk_altport = wddma[interface].wdd_altiobase(du->dk_dmacookie);
} else {
du->dk_port = dvp->id_iobase;
du->dk_altport = du->dk_port + wd_ctlr;
}
#endif
if (wddma[interface].wdd_candma) {
du->dk_dmacookie = wddma[interface].wdd_candma(dvp->id_iobase,du->dk_ctrlr);
du->dk_port = dvp->id_iobase;
du->dk_altport = wddma[interface].wdd_altiobase(du->dk_dmacookie);
} else {
du->dk_port = dvp->id_iobase;
du->dk_altport = du->dk_port + wd_ctlr;
}
#else
du->dk_port = dvp->id_iobase;
du->dk_altport = du->dk_port + wd_ctlr;
#endif
if (wddma[interface].wdd_candma != NULL) {
du->dk_dmacookie =
wddma[interface].wdd_candma(dvp->id_iobase, du->dk_ctrlr);
du->dk_altport =
wddma[interface].wdd_altiobase(du->dk_dmacookie);
}
if (du->dk_altport == 0)
du->dk_altport = du->dk_port + wd_ctlr;
/* check if we have registers that work */
outb(du->dk_port + wd_sdh, WDSD_IBM); /* set unit 0 */
outb(du->dk_port + wd_cyl_lo, 0xa5); /* wd_cyl_lo is read/write */