From: Eric Blake <eblake@redhat.com>
To: Vlad Yasevich <vyasevic@redhat.com>, qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, akong@redhat.com,
stefanha@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH 2/2] rtl8139: update HMP only when the address is fully written
Date: Thu, 21 Nov 2013 14:18:03 -0700 [thread overview]
Message-ID: <528E788B.7000907@redhat.com> (raw)
In-Reply-To: <1385064260-20962-3-git-send-email-vyasevic@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
On 11/21/2013 01:04 PM, Vlad Yasevich wrote:
> rtl8139 hardware requires 9346 config register to be set into
> write mode before mac address can be changed even though it is
> not documented. Every driver inspected so far appears to do
> this along with comments that this is an undocumented requirement.
>
> We can use this to help us identify when the mac address has been
> completely written. Simple set a flag whenever mac has changed
s/Simple/Simply/
> and at the next transition of 9346 register from Write to Normal
> mode, we update the HMP.
>
> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
> ---
Comment-only review (ie. I didn't validate the code, just fixing grammar)
> + } else if (opmode == Cfg9346_Normal && s->mac_changed) {
> + /* Even though it is not documented, it is required to set
> + * opmode to Cfg9346_ConfigWrite when changing the mac address
> + * of the card and to set to Cfg9346_Normal when done. We
> + * can use this as an idication to kick off the notification event.
s/idication/indication/
> - qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys);
> + if (s->compat_flags & RTL8139_FLAG_MAC_COMPLETE) {
> + s->mac_changed = true;
> + } else if (addr == MAC0+5) {
Doesn't coding style recommend s/MAC0+5/MAC0 + 5/
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
prev parent reply other threads:[~2013-11-21 21:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 20:04 [Qemu-devel] [RFC PATCH 0/2] Update HMP only upon mac change completion Vlad Yasevich
2013-11-21 20:04 ` [Qemu-devel] [RFC PATCH 1/2] e1000: Use Address_Available bit as HW latch Vlad Yasevich
2013-11-21 21:15 ` Eric Blake
2013-11-22 9:47 ` Jason Wang
2013-11-22 14:37 ` Vlad Yasevich
2013-11-25 9:23 ` Jason Wang
2013-11-21 20:04 ` [Qemu-devel] [RFC PATCH 2/2] rtl8139: update HMP only when the address is fully written Vlad Yasevich
2013-11-21 21:18 ` Eric Blake [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=528E788B.7000907@redhat.com \
--to=eblake@redhat.com \
--cc=akong@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vyasevic@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).