Re: [net v2 1/1] net: ethernet: adi: adin1110: Fix notifiers

From: Alexandru Tachici
Date: Thu Oct 20 2022 - 09:11:14 EST


> > +
> > + err = adin1110_setup_notifiers();
> > + if (err) {
> > + spi_unregister_driver(&adin1110_driver);
> > + return err;
> > + }
>
> And you setup the notifier after, so there is a window when
> notifications could be lost. Is this safe?

At boot time this should be ok. If the module is inserted and then user starts
bridging/bonding etc. will lose some events. Will move notifiers registration
before registering device. Should be fine as the driver checks in all callbacks
if it is meant for him or not the event.

Thanks,
Alexandru