Subject: Re: nForce430 ATA133 is now DMA mode-2 by NetBSD ?
To: Juan RP <juan@xtrarom.org>
From: MASUDA Hideo <h-masuda@ootani.nagata.kobe.jp>
List: tech-kern
Date: 01/31/2006 12:59:06
Hi, Juan.

Juan RP wrote:
>>  I got the M/B with nForce430 ATA133/SATAII chip.
>>  Under NetBSD/i386 3.0, HDD access is very poor performance.
	(snip)
>> According to dmesg, HDD is recognized as DMA mode-2 (DMA33).
>>  I think that this causes the quirks (?) in dev/pci/viaide.c, and
>> apply the patch (this may be applied for current (rev. 1.27))
>> as following:
>>
>> Index: viaide.c
>> ===================================================================
>> RCS file: /cvs/cvsroot/src/sys/dev/pci/viaide.c,v
>> retrieving revision 1.24.2.1
>> diff -u -r1.24.2.1 viaide.c
>> --- viaide.c    5 Jan 2006 22:17:39 -0000       1.24.2.1
>> +++ viaide.c    31 Jan 2006 02:09:24 -0000
>> @@ -340,6 +340,9 @@
>>                 case PCI_PRODUCT_NVIDIA_NFORCE3_ATA133:
>>                 case PCI_PRODUCT_NVIDIA_NFORCE3_250_ATA133:
>>                 case PCI_PRODUCT_NVIDIA_NFORCE4_ATA133:
>> +               case PCI_PRODUCT_NVIDIA_NFORCE430_ATA133:
>> +               case PCI_PRODUCT_NVIDIA_NFORCE430_SATA1:
>> +               case PCI_PRODUCT_NVIDIA_NFORCE430_SATA2:
>>                         sc->sc_wdcdev.sc_atac.atac_udma_cap = 6;
>>                         break;
>>                 }
> 
> Thanks for your patch. I think you don't need to match the
> SATA controllers here, because they will be set to UDMA-6 in
> the via_sata_chip_map() function. 
> 
> The ATA controllers will exec the via_chip_map() function, so you
> only need to match against PCI_PRODUCT_NVIDIA_NFORCE430_ATA133.

 Hmm. I have no SATA devices now, so above "case PCI_PRODUCT_NVIDIA_NFORCE430_STAT{1,2}"
are not effective on my environment. But it seems that
"case PCI_PRODUCT_NVIDIA_NFORCE430_ATA133" is only needed in dev/pci/viaide.c.

Thank you in advance.
-- 
MASUDA Hideo (h-masuda@ootani.nagata.kobe.jp)
  FingerPrints = C532 9F5B 4D7D DA76 8BFF  CAA3 C073 5C9E 10FF 98EF