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]

 



> +	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().

	Andrew



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux