Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: devzero@web.de
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH RESEND] natsemi: fix timing issue for reading mac from eeprom via dp8381x
Date: Thu, 20 Nov 2014 23:00:14 -0500 (EST)	[thread overview]
Message-ID: <20141120.230014.1345689976107929686.davem@davemloft.net> (raw)
In-Reply-To: <trinity-d8a7b1cb-ed12-4c9d-ab97-aeb44e03addf-1416435970952@3capp-webde-bs23>

From: "Roland Kletzing" <devzero@web.de>
Date: Wed, 19 Nov 2014 23:26:11 +0100

> diff --git a/drivers/net/ethernet/natsemi/natsemi.c b/drivers/net/ethernet/natsemi/natsemi.c
> index b83f7c0..96f0029 100644
> --- a/drivers/net/ethernet/natsemi/natsemi.c
> +++ b/drivers/net/ethernet/natsemi/natsemi.c
> @@ -987,7 +987,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
>     The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is
>     deprecated.
>  */
> -#define eeprom_delay(ee_addr)  readl(ee_addr)
> +#define eeprom_delay(ee_addr)  readl(ee_addr);  readl(ee_addr)

Your email client has corrupted this patch, changing TAB characters
into sequences of spaces.

Also, you should not just have a macro expanding to two statements,
because now things like:

	if (x)
		eeprom_delay(addr);

doesn't do what you intended.

Either make this an inline function, or enclose the two readl()
statements inside of a "do { } while (0)"

      reply	other threads:[~2014-11-21  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 22:26 [PATCH RESEND] natsemi: fix timing issue for reading mac from eeprom via dp8381x Roland Kletzing
2014-11-21  4:00 ` David Miller [this message]

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=20141120.230014.1345689976107929686.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=devzero@web.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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