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
| ||
|
Message-ID: <CALHCpMgEZjnR39upkR6iozSk-b5A_GHRo9rcDSPXzzQi6x_qCw@mail.gmail.com> Date: Sat, 10 Dec 2022 12:52:12 +0300 From: Maxim Kiselev <bigunclemax@...il.com> To: linux-mtd@...ts.infradead.org Cc: linux-kernel@...r.kernel.org, Vignesh Raghavendra <vigneshr@...com>, Richard Weinberger <richard@....at>, Miquel Raynal <miquel.raynal@...tlin.com>, Maxim Kochetkov <fido_max@...ox.ru>, Maksim Kiselev <bigunclemax@...il.com> Subject: Fwd: nvmem-cells regression after adding 'call of_platform_populate() for MTD partitions' Hi, friends. After applying this commit 'mtd: call of_platform_populate() for MTD partitions' (bcdf0315), I faced with a problem that my ethernet device can't be probed because it wait when 'nvmem-cells' device will be probed first. But there is no such driver which is compatible with 'nvmem-cells' because 'nvmem-cells' is just a mark used by the 'mtd_nvmem_add' function. So this leads to appeating of unresolved dependency for the ethernet device. And that's why the ethernet device can't be added and probed. Here is a part of kernel log when spi flash probe start: > device: 'spi0': device_add > device: 'spi0.0': device_add > spi-nor spi0.0: mx66l51235f (65536 Kbytes) > 7 fixed-partitions partitions found on MTD device spi0.0 After 'm25p80' probe 'f1070000.ethernet' linked to 'partition@1' : > device: 'f1010600.spi:m25p80@0: partitions:partition@1': device_add > device: 'platform:f1010600.spi:m25p80@0:partitions:partition@...platform:f1070000.ethernet': device_add > devices_kset: Moving f1070000.ethernet to end of list > platform f1070000.ethernet: Linked as a consumer to f1010600.spi:m25p80@0:partitions:partition@1 > ethernet@...00 Dropping the fwnode link to partition@1 And as a result I got `-EPROBE_DEFER` for `f1070000.ethernet` > platform f1070000.ethernet: error -EPROBE_DEFER: supplier f1010600.spi:m25p80@0:partitions:partition@1 not ready Here is a part of my device tree: enet1: ethernet@...00 { status = "okay"; nvmem-cells = <&macaddr>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy = <&phy0>; }; spi@...00 { status = "okay"; m25p80@0 { compatible = "mx66l51235l"; reg = <0>; #address-cells = <1>; #size-cells = <1>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { reg = <0x00000000 0x000080000>; label = "SPI.U_BOOT"; }; partition@1 { compatible = "nvmem-cells"; reg = <0x000A0000 0x00020000>; label = "SPI.INV_INFO"; #address-cells = <1>; #size-cells = <1>; ranges = <0 0x000A0000 0x00020000>; macaddr: mac@6 { reg = <0x6 0x6>; }; }; }; }; }; In the example above 'ethernet@...00' requires 'macaddr: mac@6' which is located inside mtd 'partition@1' of 'm25p80@0' spi flash.
Powered by blists - more mailing lists