Subject: Re: PCI device identification
To: Matthias Scheler <tron@zhadum.de>
From: IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>
List: tech-kern
Date: 10/16/2001 10:24:04
At Sat, 13 Oct 2001 22:17:10 +0000 (UTC),
Matthias Scheler wrote:
> I've got a SiS 735 chipset based motherboard which supports Ultra DMA mode 5.
> But our current PCI IDE only allows Ultra DMA mode 2 for this chipset. It is
> easy to change this with the following fix:

Your change is causing sis_udma_tim[] array overflow; see
pciide_sis_reg.h.

A friend of mine who owns a SiS 735 motherboard says the following
patch is necessary:

$ cvs diff pciide_sis_reg.h
Index: pciide_sis_reg.h
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/pciide_sis_reg.h,v
retrieving revision 1.6
diff -r1.6 pciide_sis_reg.h
44c44
< #define SIS_TIM_UDMA_TIME_OFF(drive) (13 + 16 * (drive))
---
> #define SIS_TIM_UDMA_TIME_OFF(drive) (12 + 16 * (drive))
72c72
< static int8_t sis_udma_tim[] = {3, 2, 1};
---
> static int8_t sis_udma_tim[] = {7, 5, 3, 2, 1, 0};

But I'm not sure this change is OK for older SiS chips, because the
driver will write different values to the register even with UDMA <= 2.
(Apologies for not doing any programming myself..., but I have no SiS
hardware to play with.)

--
IWAMOTO Toshihiro