Subject: Re: Problems with Promise IDE controllers (and a solution!)
To: None <port-alpha@netbsd.org>
From: Dave Huang <khym@bga.com>
List: port-alpha
Date: 10/23/2000 19:21:41
On Wed, 11 Oct 2000, Joel Votaw wrote:
> I dug around on the mailing list archives for port-netbsd and dug up the
> following patch. If you're having problems with Promise IDE controllers
> on recent kernels on Alphas, this should work. (I have not yet tried it
> myself, but will when I get home tonight.)
I just got a Promise Ultra100, and of course, had the same problem...
here's the patch, updated so that it'll apply to 1.5_ALPHA2/1.5_BETA.
It's working great for me so far (with a 45GB IBM DTLA (75GXP)).
--- /usr/src/sys/dev/pci/pciide.c Thu Oct 5 05:40:37 2000
+++ pciide.c Wed Oct 18 19:50:42 2000
@@ -3063,12 +3063,29 @@
int channel;
pcireg_t interface, st, mode;
bus_size_t cmdsize, ctlsize;
+ bus_addr_t addr, forceaddr = 0x8000;
+ int i;
st = pci_conf_read(sc->sc_pc, sc->sc_tag, PDC2xx_STATE);
WDCDEBUG_PRINT(("pdc202xx_setup_chip: controller state 0x%x\n", st),
DEBUG_PROBE);
if (pciide_chipen(sc, pa) == 0)
return;
+
+ /* XXX Force IO addresses if BIOS doesn't set them up for me */
+ for (i = 0x10; i <= 0x20; i += 4) {
+ addr = pci_conf_read (sc->sc_pc, sc->sc_tag, i);
+ printf("%s: Changing IO from 0x%lx to 0x%lx\n",
+ sc->sc_wdcdev.sc_dev.dv_xname,
+ addr & PCI_MAPREG_IO_ADDR_MASK,
+ /* addr & 0xffff & PCI_MAPREG_IO_ADDR_MASK */
+ forceaddr);
+
+ pci_conf_write (sc->sc_pc, sc->sc_tag,
+ i, /* addr & 0xffff & PCI_MAPREG_IO_ADDR_MASK */
+ forceaddr | PCI_MAPREG_TYPE_IO);
+ forceaddr += 16;
+ }
/* turn off RAID mode */
st &= ~PDC2xx_STATE_IDERAID;