[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0809182232230.4742@wrl-59.cs.helsinki.fi>
Date: Thu, 18 Sep 2008 22:34:22 +0300 (EEST)
From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To: Ivan Vecera <ivecera@...hat.com>
cc: Francois Romieu <romieu@...zoreil.com>, netdev@...r.kernel.org,
Edward Hsu <edward_hsu@...ltek.com.tw>
Subject: Re: [PATCH] r8169: read MAC address from EEPROM on init
On Thu, 18 Sep 2008, Ivan Vecera wrote:
> This fixes the problem when MAC address is set by ifconfig or by
> ip link commands and this address is stored in the device after
> reboot. The power-off is needed to get right MAC address.
> This is problem when Xen daemon is running because it renames the device
> name from ethX to pethX and sets its MAC address to FE:FF:FF:FF:FF:FF.
> After reboot the device is still using FE:FF:FF:FF:FF:FF.
>
> Signed-off-by: Ivan Vecera <ivecera@...hat.com>
> ---
> drivers/net/r8169.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 79 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
> index befc927..b09a4ec 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
> @@ -1910,6 +1910,81 @@ static void rtl_disable_msi(struct pci_dev *pdev, struct rtl8169_private *tp)
> }
> }
>
> +static int rtl_eeprom_read(struct pci_dev *pdev, int cap, int addr, u32 *val)
> +{
> + int ret, count = 100;
> + u16 status = 0;
> + u32 value;
...
> + *val = cpu_to_le32(value);
Did you check this with sparse?
--
i.
--
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