lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 21 Dec 2017 21:15:47 -0600
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Honghui Zhang <honghui.zhang@...iatek.com>
Cc:     Yong Wu <yong.wu@...iatek.com>, youlin.pei@...iatek.com,
        devicetree@...r.kernel.org, hongkun.cao@...iatek.com,
        ryder.lee@...iatek.com, yu.yu@...iatek.com,
        linux-pci@...r.kernel.org, sean.wang@...iatek.com,
        linux-kernel@...r.kernel.org, yt.shen@...iatek.com,
        matthias.bgg@...il.com, lorenzo.pieralisi@....com,
        linux-mediatek@...ts.infradead.org, xinping.qian@...iatek.com,
        bhelgaas@...gle.com, yingjoe.chen@...iatek.com,
        eddie.huang@...iatek.com, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 2/2] PCI: mediatek: Fixup class type for MT7622

On Fri, Dec 22, 2017 at 08:56:34AM +0800, Honghui Zhang wrote:
> There's an internal control register that control the Vendor ID and
> device ID values, our designer leave the default value un-touched. I
> will set these values in that way for the next version of fix.

Then there's no problem.  The mtk_pcie driver is a platform driver
that claims the host controller based on an of_device_id from a device
tree.

Apparently the bridge is also materialized in PCI config space, which
is typical for x86 host bridges, and makes the bridge appear in
"lspci".  But drivers generally don't claim bridges that way.

You can just program the Vendor and Device IDs by writing the internal
control registers somewhere in the mtk_pci_probe() path.

Then you can set the class code the same way, using an internal
control register (if that's possible), or using a quirk with the
correct Mediatek Vendor ID (if there is no internal writable
register).

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ