qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 2/2] rtl8139: update HMP only when the addre


From: Eric Blake
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

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 <address@hidden>
> ---

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]