RE: [PATCH v6 2/3] net: ethernet: renesas: Add support for "Ethernet Switch"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

> From: Andrew Lunn, Sent: Sunday, October 30, 2022 3:05 AM
> 
> > +	for (i = 0; i < RSWITCH_NUM_PORTS; i++) {
> > +		err = register_netdev(priv->rdev[i]->ndev);
> > +		if (err) {
> > +			for (i--; i >= 0; i--)
> > +				unregister_netdev(priv->rdev[i]->ndev);
> > +			goto err_register_netdev;
> > +		}
> > +	}
> > +
> > +	err = rswitch_ether_port_init_all(priv);
> > +	if (err)
> > +		goto err_ether_port_init_all;
> 
> As soon as you call register_netdev() the devices are active, and can
> be in use. E.G. NFS root can start mounting the filesystem before
> register_netdev() even returns. Is it safe to call driver operations
> before rswitch_ether_port_init_all().

Thank you for your review! It's not safe. So, I'll modify this driver somehow.

Best regards,
Yoshihiro Shimoda





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux