tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PCI extended configuration support
On 2015/09/27 11:03, Christos Zoulas wrote:
> In article <5604D1BE.3080502%execsw.org@localhost>,
> Masanobu SAITOH <msaitoh%execsw.org@localhost> 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 (msaitoh%execsw.org@localhost
msaitoh%netbsd.org@localhost)
Home |
Main Index |
Thread Index |
Old Index