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]
Message-Id: <201401301344.59196.arnd@arndb.de>
Date:	Thu, 30 Jan 2014 13:44:58 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Pratyush Anand <pratyush.anand@...com>
Cc:	Kishon Vijay Abraham I <kishon@...com>,
	Mohit KUMAR DCG <Mohit.KUMAR@...com>,
	"spear-devel" <spear-devel@...t.st.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH V3 4/8] phy: Initialize phy core with subsys_initcall

On Thursday 30 January 2014, Pratyush Anand wrote:
> On Thu, Jan 30, 2014 at 07:43:37PM +0800, Kishon Vijay Abraham I wrote:
> > Hi,
> > 
> > On Thursday 30 January 2014 04:18 PM, Mohit Kumar wrote:
> > > From: Pratyush Anand <pratyush.anand@...com>
> > > 
> > > PCIe RC drivers are initialized with subsys_initcall. Few PCIe drivers
> > > like SPEAr13xx needs phy drivers to be initialized.
> > 
> > Instead change PCIe RC drivers to module init. Phy drivers should be loaded
> > very early otherwise. (Hint: drivers/Makefile).
> 
> I think PCIe RC driver can not be made module init. Bjorn can comment
> better.

I don't think there is any problem here: the PCI devices will only appear
after the PCIe root bus has been probed. All drivers using the regular
pci_driver framework should work fine even if they are loaded before the
device is found. There are a handful of drivers using 'pci_get_device'
rather than pci_register_driver, and those will break. As far as I can
tell, those drivers are all x86 specific, and you should not worry about
them.

Having the PHY driver get initialized after the PCI root driver should
also work, but it requires correct handling of -EPROBE_DEFER: if phy_get
returns this error, the PCI driver must silently return the same error
from its probe() function so it will get called again at a later time
(after some other devices have been probed successfully).

	Arnd
--
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