Received: from eggs.gnu.org ([2001:4830:134:3::10]:37383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2LPy-0000Kv-2F for qemu-devel@nongnu.org; Wed, 02 Jul 2014 10:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2LPl-0006dm-8q for qemu-devel@nongnu.org; Wed, 02 Jul 2014 10:21:50 -0400 Received: from mail-qa0-x22e.google.com ([2607:f8b0:400d:c00::22e]:51224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2LPl-0006dg-47 for qemu-devel@nongnu.org; Wed, 02 Jul 2014 10:21:37 -0400 Received: by mail-qa0-f46.google.com with SMTP id i13so8840346qae.19 for ; Wed, 02 Jul 2014 07:21:36 -0700 (PDT) Date: Wed, 2 Jul 2014 10:21:34 -0400 From: "Gabriel L. Somlo" Message-ID: <20140702142133.GW1688@ERROL.INI.CMU.EDU> References: <1404147350-28904-1-git-send-email-somlo@cmu.edu> <1404147350-28904-3-git-send-email-somlo@cmu.edu> <20140630175554.GA2871@redhat.com> <20140702090207.GA2945@crash.ini.cmu.edu> <20140702093316.GA3692@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140702093316.GA3692@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH v1 2/2] e1000: adjust initial autoneg timing (for piix/osx) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: "pbonzini@redhat.com" , Alexander Graf , "stefanha@redhat.com" , "qemu-devel@nongnu.org" On Wed, Jul 02, 2014 at 12:33:16PM +0300, Michael S. Tsirkin wrote: > Just poking around the spec I find more things > we don't implement correctly wrt to auto-negotiation. > For example, MII_SR_AUTONEG_CAPS isn't set, is it? > Maybe that's why your guest doesn't work: > it doesn't expect to get autonegotation at all? > > So I have a question: does your patch actually help any guests? > If not, maybe we should defer it to after release, > and try to clean up autonegotiation more thouroughly for 2.2? I'll re-submit after 2.1 is officially out. But, since we're talking about MII_SR_AUTONEG_CAPS: PHY_STATUS is initialized to 0x794d, which includes setting the MII_SR_AUTONEG_CAPS bit (|= 0x8). Did you mean: we should check for MII_SR_AUTONEG_CAPS in have_autoneg() ? (i.e., on the chance it gets turned off by a guest-side write to PHY_STATUS) ? Thx, --G PS. Maybe also spell out the individual bits in phy_reg_init[] ? Like, instead of: [PHY_STATUS] = 0x794d, do this: [PHY_STATUS] = MII_SR_EXTENDED_CAPS | MII_SR_LINK_STATUS | MII_SR_AUTONEG_CAPS | MII_SR_PREAMBLE_SUPPRESS | MII_SR_EXTENDED_STATUS | MII_SR_10T_HD_CAPS | MII_SR_10T_FD_CAPS | MII_SR_100X_HD_CAPS | MII_SR_100X_FD_CAPS, ... for all registers ? Much more verbose, but IMHO that'd be a good thing :)