public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Lino Sanfilippo <LinoSanfilippo@gmx•de>
To: Bryan.Whitehead@microchip•com, davem@davemloft•net
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next,V2] Add LAN9352 Ethernet Driver
Date: Fri, 12 Feb 2016 01:14:24 +0100	[thread overview]
Message-ID: <56BD23E0.1090403@gmx.de> (raw)
In-Reply-To: <90A7E81AE28BAE4CBDDB3B35F187D264402EF4A2@CHN-SV-EXMX02.mchp-main.com>

Hi,

> +static int mchp9352_open(struct net_device *dev)
> +{

> +
> +	MCHP_TRACE(pdata, ifup, "Testing irq handler using IRQ %d", dev->irq);
> +	pdata->software_irq_signal = 0;
> +
> +	/* Testing irq handler */
> +	smp_wmb();

Should not there at least be a matching smp_rmb() in the irq handler?
Maybe an atomic_t would be a better choice for a flag like
software_irq_signal here.

> +
> +static int mchp9352_drv_probe(struct platform_device *pdev)

> +
> +	netif_carrier_off(dev);
> +
> +	retval = register_netdev(dev);
> +	if (retval) {
> +		MCHP_WARN(pdata, probe, "Error %i registering device", retval);
> +		goto out_free_irq;
> +	} else {
> +		MCHP_TRACE(pdata, probe,
> +			   "Network interface: \"%s\"", dev->name);
> +	}

Note that as soon as the network device is registered "open" may be
called so everything should be set up already. In this case the mac
address (dev->dev_addr) is accessed in open but may not yet contain
valid data when register_netdev is called.

Regards,
Lino

  parent reply	other threads:[~2016-02-12  0:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 18:58 [PATCH net-next,V2] Add LAN9352 Ethernet Driver Bryan.Whitehead
2016-02-11 21:55 ` Andrew Lunn
2016-02-12 16:51   ` Bryan.Whitehead
2016-02-12 17:11     ` Andrew Lunn
2016-02-16 19:34       ` Bryan.Whitehead
2016-02-16 19:51         ` David Miller
2016-02-16 20:21         ` Andrew Lunn
2016-02-12  0:14 ` Lino Sanfilippo [this message]
2016-02-12 19:10   ` Bryan.Whitehead
2016-02-16 22:09     ` Lino Sanfilippo
2016-02-12  2:18 ` Florian Fainelli
2016-02-12  7:20   ` Andrew Lunn
2016-02-12 16:53     ` Bryan.Whitehead
2016-02-12 17:18       ` Andrew Lunn
2016-02-16 19:41         ` Bryan.Whitehead
2016-02-16 19:52           ` David Miller
2016-02-16 20:36           ` Andrew Lunn
2016-02-16 20:43             ` David Miller
2016-02-16 20:48               ` Bryan.Whitehead
2016-02-16 20:52                 ` David Miller
2016-02-16 21:32                   ` Bryan.Whitehead
2016-02-16 21:38                     ` David Miller
2016-02-16 22:15                     ` Andrew Lunn
2016-02-17  0:06                       ` Florian Fainelli
2016-02-17  0:31                         ` Andrew Lunn
2016-02-19 19:29                       ` Bryan.Whitehead
2016-02-19 20:14                         ` Andrew Lunn
2016-02-19 21:21                           ` Bryan.Whitehead
2016-03-24 21:16                           ` Bryan.Whitehead
2016-03-24 22:06                             ` Andrew Lunn
2016-03-24 22:36                             ` Florian Fainelli
2016-02-16 20:57                 ` Andrew Lunn
2016-02-16 21:37                   ` Bryan.Whitehead
2016-02-16 21:40                     ` David Miller
2016-02-12 23:21   ` Bryan.Whitehead

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56BD23E0.1090403@gmx.de \
    --to=linosanfilippo@gmx$(echo .)de \
    --cc=Bryan.Whitehead@microchip$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox