On 2015/09/27 11:03, Christos Zoulas wrote:
> In article <5604d1be.3080...@execsw.org>,
> Masanobu SAITOH  <msai...@execsw.org> wrote:
>> On 2015/09/11 19:44, Masanobu SAITOH wrote:
>>
>> More machines support the extended configuration area than before.
>>
>>   Is it OK to commit?
> 
> LGTM, but since this is not performance critical can't we centralize the
> range test and do it in a wrapper?

 We have no good idea... :-(

> Plus this can't be negative so perhaps
> it should be unsigned or checked for < 0 too??
> 
> +     if (reg >= PCI_CONF_SIZE)
> +             return (pcireg_t) -1;
> +

 Done.

> Finally a few more constants could be defined instead
> of hard-coded values....
> 
> +     switch (pcie_devtype) {
> +     case 0x4:       /* Root Port of PCI Express Root Complex */
> +     case 0xa:       /* Root Complex Event Collector */

 Done.

> christos

 Updated patch:

        
http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/tmp/20150928-nbsd-pci-extconf-support.diff

OK?

-- 
-----------------------------------------------
                SAITOH Masanobu (msai...@execsw.org
                                 msai...@netbsd.org)

Reply via email to