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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 16 Dec 2014 11:43:12 +0200
From:	Stanimir Varbanov <svarbanov@...sol.com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	Rob Herring <robh+dt@...nel.org>,
	Kumar Gala <galak@...eaurora.org>,
	Mark Rutland <mark.rutland@....com>,
	Grant Likely <grant.likely@...aro.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Kishon Vijay Abraham I <kishon@...com>,
	Russell King <linux@....linux.org.uk>,
	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
	linux-pci@...r.kernel.org
Subject: Re: [PATCH 4/5] PCI: qcom: Add Qualcomm PCIe controller driver

Hi Arnd,

Thanks for the comments!

On 12/12/2014 07:30 PM, Arnd Bergmann wrote:
> On Friday 12 December 2014 19:14:00 Stanimir Varbanov wrote:
>> The PCIe driver reuse the Designware common code for host
>> and MSI initialization, and also program the Qualcomm
>> application specific registers.
>>
>> Signed-off-by: Stanimir Varbanov <svarbanov@...sol.com>
> 
> Looks nice!
> 
>> +static int
>> +qcom_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, u32 *val)
>> +{
>> +	if (where == PCI_CLASS_REVISION && size == 4) {
>> +		*val = readl(pp->dbi_base + PCI_CLASS_REVISION);
>> +		*val &= ~(0xffff << 16);
>> +		*val |= PCI_CLASS_BRIDGE_PCI << 16;
>> +		return PCIBIOS_SUCCESSFUL;
>> +	}
>> +
>> +	return dw_pcie_cfg_read(pp->dbi_base + (where & ~0x3), where,
>> +				size, val);
>> +}
> 
> Could you add a comment here to explain what this is for?

Sure I will add a comment. The issue is that the pci device class is not
reported correctly from the register.

> 
>> +static int __init qcom_pcie_probe(struct platform_device *pdev)
>> +{
> 
> I think it's a bug to mark this function as __init. It breaks
> deferred probing and detaching/reattaching the device trough sysfs.
> 

My bad, I have tried to avoid mismatch section warnings came up from
dw_pcie_host_init() which is annotated as __init. Do you think we need
to remove __init from dw_pcie_host_init() declaration and fix the
drivers accordingly?

> After you fix that, you can remove the __refdata below.
> 
>> +static struct platform_driver __refdata qcom_pcie_driver = {
>> +	.probe = qcom_pcie_probe,
>> +	.remove = qcom_pcie_remove,
>> +	.driver = {
>> +		.name = "qcom-pcie",
>> +		.of_match_table = qcom_pcie_match,
>> +	},
>> +};
> 
> 	Arnd
> 

regards,
Stan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ