All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Juergen Lock <nox@jelal.kn-bremen.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix e1000 emulation for FreeBSD 8.0-current
Date: Sat, 13 Jun 2009 17:21:42 -0500	[thread overview]
Message-ID: <4A342676.6030900@us.ibm.com> (raw)
In-Reply-To: <20090607192912.GA16996@triton.kn-bremen.de>

Juergen Lock wrote:
> FreeBSD 8.0-current svn rev >= 190872 changed the way initial
> MAC addresses are read in the em(4) driver, it now reads them from
> E1000_RA instead of from the EEPROM.  See e1000_read_mac_addr_generic()
> in sys/dev/e1000/if_em.c:
> 	http://svn.freebsd.org/viewvc/base/head/sys/dev/e1000/e1000_nvm.c?view=markup&pathrev=190872
> 	http://svn.freebsd.org/viewvc/base?view=revision&revision=190872
>   

Needs a Signed-off-by.

> diff --git a/hw/e1000.c b/hw/e1000.c
> index 2665792..5d614bd 100644
> --- a/hw/e1000.c
> +++ b/hw/e1000.c
> @@ -1102,6 +1102,16 @@ static void pci_e1000_init(PCIDevice *pci_dev)
>      memmove(d->phy_reg, phy_reg_init, sizeof phy_reg_init);
>      memset(d->mac_reg, 0, sizeof d->mac_reg);
>      memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init);
> +    /*
> +     * FreeBSD 8.0-current svn rev >= 190872 expects the mac address here,
> +     * see e1000_read_mac_addr_generic() in sys/dev/e1000/if_em.c:
> +     * http://svn.freebsd.org/viewvc/base/head/sys/dev/e1000/e1000_nvm.c?view=markup&pathrev=190872
> +     * http://svn.freebsd.org/viewvc/base?view=revision&revision=190872
> +     */
> +    d->mac_reg[RA] = (macaddr[3]<<24) | (macaddr[2]<<16) |
> +        (macaddr[1]<<8) | macaddr[0]; 
> +    d->mac_reg[RA+1] = (macaddr[5]<<8) | macaddr[4]; 
> +
>      d->rxbuf_min_shift = 1;
>      memset(&d->tx, 0, sizeof d->tx);
>  
>
>
>
>   


-- 
Regards,

Anthony Liguori

      parent reply	other threads:[~2009-06-13 22:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07 19:29 [Qemu-devel] [PATCH] Fix e1000 emulation for FreeBSD 8.0-current Juergen Lock
2009-06-07 20:07 ` Juergen Lock
2009-06-13 22:21 ` Anthony Liguori [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=4A342676.6030900@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=nox@jelal.kn-bremen.de \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.