Subject: Re: UDMA/66
To: Roger Brooks <R.S.Brooks@liverpool.ac.uk>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 02/16/2000 17:10:47
On Wed, Feb 16, 2000 at 02:29:01PM +0000, Roger Brooks wrote:
> Exactly!  Last night I got further.  I'm running with a kgdb kernel,
> and stepping through the driver I found that it is reading 0 from the
> interface register of the HPT366.  By adjusting the value read to 0x81
> at the appropriate points in the code I was able to attach a disk on
> the first UDMA66 channel.  As it was quite late, I didn't do much more
> than read from the disk using dd, but that seemed to work without error.

Good !

> 
> The HPT366 implements two single-channel controllers.  On the BP6 they
> both share IRQ11 with a PCI slot.
> 
> The driver was only working in DMA mode 2(?).  The BP6 machine is still
> on 1.4 (because I haven't managed to get a full snapshot of -current onto
> tape yet).  I presume that the 1.4 pciide driver doesn't know about UDMA
> modes 3 & 4 at all, and when confronted with a drive which offers UDMA
> mode 4 backs down to a DMA mode.

No that's not the problem. The pciide driver shoun't change anything, it
must be operating at the mode set by the bios (as it doesn't knows about the
chip's internals).

> 
> A couple of other points:
> 
> Could the pciide driver keep track internally of whether the primary
> and secondary compatibility ports have already been allocated, and
> refuse to configure any more controllers in comapibility mode thereafter?

It should already do this, from the bus_space_alloc accounting.
Alocation will fail when another driver (or another instance of the driver)
already claims this adress.

> If the the HPT366 had appeared as a IDE controller (instead of miscellaneous
> mass storage) it would be impossible to boot NetBSD on this motherboard
> (except by disabling the HPT366 in the BIOS, and I can't remember if that's
> possible).  
> 
> Is it not be possible to attach the PIIX4 in native PCI mode?  It would
> presumably save an IRQ (or two, as the single IRQ should be sharable with
> a PCI slot).

No, all controllers from the PIIX family are compatible-mode only.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--