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