Subject: Re: UDMA/66
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Roger Brooks <R.S.Brooks@liverpool.ac.uk>
List: netbsd-help
Date: 02/16/2000 14:29:01
On Mon, 14 Feb 2000, Manuel Bouyer wrote:

>
>This is wrong ! This controller can't be in compatible mode, as
>the PIIX4 is already here. My guess is that this thing doesn't have the
>standart pciide registers.

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.

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.

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?
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).

Finally, the Linux driver has a long list of Maxtor drives for which
UDMA66 is disabled.  It's not exactly clear if this means that UDMA66
doesn't work at all, or just not with the HPT366.  I'll post the drive
list later (it's at home), and would be grateful if anyone with one of
these drives and any UDMA66 controller could tell me whether it works
or not.


Roger

------------------------------------------------------------------------------
Roger Brooks (Systems Programmer),          |  Email: R.S.Brooks@liv.ac.uk
Computing Services Dept,                    |  Tel:   +44 151 794 4441
The University of Liverpool,                |  Fax:   +44 151 794 4442
PO Box 147, Liverpool L69 3BX, UK           | 
------------------------------------------------------------------------------