lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 20 Nov 2014 23:00:14 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	devzero@....de
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH RESEND] natsemi: fix timing issue for reading mac from
 eeprom via dp8381x

From: "Roland Kletzing" <devzero@....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)"

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists