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: <MN0PR12MB5953872B976C38C430166DECB7BB9@MN0PR12MB5953.namprd12.prod.outlook.com>
Date:   Wed, 29 Jun 2022 15:24:55 +0000
From:   "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     "nicolas.ferre@...rochip.com" <nicolas.ferre@...rochip.com>,
        "claudiu.beznea@...rochip.com" <claudiu.beznea@...rochip.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "git (AMD-Xilinx)" <git@....com>,
        "Katakam, Harini" <harini.katakam@....com>
Subject: RE: [PATCH net-next] net: macb: In shared MDIO usecase make MDIO
 producer ethernet node to probe first

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Wednesday, June 29, 2022 10:39 AM
> To: Pandey, Radhey Shyam <radhey.shyam.pandey@....com>
> Cc: nicolas.ferre@...rochip.com; claudiu.beznea@...rochip.com;
> davem@...emloft.net; edumazet@...gle.com; pabeni@...hat.com;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org; git (AMD-Xilinx)
> <git@....com>; Katakam, Harini <harini.katakam@....com>
> Subject: Re: [PATCH net-next] net: macb: In shared MDIO usecase make MDIO
> producer ethernet node to probe first
> 
> On Tue, 28 Jun 2022 23:38:54 +0530 Radhey Shyam Pandey wrote:
> > In shared MDIO suspend/resume usecase for ex. with MDIO producer
> > (0xff0c0000) eth1 and MDIO consumer(0xff0b0000) eth0 there is a
> > constraint that ethernet interface(ff0c0000) MDIO bus producer has to
> > be resumed before the consumer ethernet interface(ff0b0000).
> 
> ERROR: modpost: "device_is_bound" [drivers/net/ethernet/cadence/macb.ko]
> undefined!
> make[2]: *** [../scripts/Makefile.modpost:128: modules-only.symvers] Error 1
> make[1]: *** [/home/nipa/net-next/Makefile:1757: modules] Error 2
> make: *** [Makefile:219: __sub-make] Error 2

Oh, I could also see this error when making it a module compilation.
I will fix it in v2. As an alternative to device_is_bound() i think we 
can check the presence of drvdata. Similar approach i see it in ongoing
onboard_usb_hub driver series[1]. Does it look ok?/any other suggestions?

-       if (mdio_pdev && !device_is_bound(&mdio_pdev->dev)) 
+       if (mdio_pdev && !dev_get_drvdata(&mdio_pdev->dev)) 

[1]: https://lore.kernel.org/all/20220622144857.v23.2.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeid/
Listed in v21 changes.

Please let me know if there is any other feedback on the
shared MDIO dependency implementation.

Thanks,
Radhey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ