From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vjbda-0007AH-8v for qemu-devel@nongnu.org; Thu, 21 Nov 2013 16:18:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjbdV-0003nb-Cx for qemu-devel@nongnu.org; Thu, 21 Nov 2013 16:18:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjbdV-0003nX-3F for qemu-devel@nongnu.org; Thu, 21 Nov 2013 16:18:05 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALLI4Sp030029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Nov 2013 16:18:04 -0500 Message-ID: <528E788B.7000907@redhat.com> Date: Thu, 21 Nov 2013 14:18:03 -0700 From: Eric Blake MIME-Version: 1.0 References: <1385064260-20962-1-git-send-email-vyasevic@redhat.com> <1385064260-20962-3-git-send-email-vyasevic@redhat.com> In-Reply-To: <1385064260-20962-3-git-send-email-vyasevic@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t7UNdoqLnSGVNfXRsbFrQQEjR8tMvi80B" Subject: Re: [Qemu-devel] [RFC PATCH 2/2] rtl8139: update HMP only when the address is fully written List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vlad Yasevich , qemu-devel@nongnu.org Cc: alex.williamson@redhat.com, akong@redhat.com, stefanha@redhat.com, mst@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --t7UNdoqLnSGVNfXRsbFrQQEjR8tMvi80B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > Signed-off-by: Vlad Yasevich > --- Comment-only review (ie. I didn't validate the code, just fixing grammar)= > + } else if (opmode =3D=3D 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 e= vent. 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 =3D true; > + } else if (addr =3D=3D MAC0+5) { Doesn't coding style recommend s/MAC0+5/MAC0 + 5/ --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --t7UNdoqLnSGVNfXRsbFrQQEjR8tMvi80B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSjniLAAoJEKeha0olJ0NqqpoIAJ7D7UKNSM6JcXV7HumnRFRq NEM4DPBSMptywi2ikKRpc3l2IImeDm20O/DdpkGaW7y19IKVelbB9rNMh6cNvNbD FP6ZUgOme9P4yB0yFwkjhyRGQzMioiIjWCqrgx8xx5Ht6VYHmpI8ebU8N1yzlu4+ YfCxUXGCjdJGXl50AC08eTL7Wkdta0Kt4OZIa4HuBukC2jkGIU65xAZ0m38z4pID VF0LafzclwSyDy6wIdy2oeeLcwNl6lIW3bmElHa9ynuaG2sEsYbtxN9zhY0yP7oB Enr6VRhhBHZFZL6FfAs5J8407sGFgFm+l8zVAtJ50gUfcK4t8B0NNnVNtmQs0n0= =51NC -----END PGP SIGNATURE----- --t7UNdoqLnSGVNfXRsbFrQQEjR8tMvi80B--