From patchwork Thu Mar 22 10:02:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 148213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D97B0B6F6E for ; Thu, 22 Mar 2012 21:27:03 +1100 (EST) Received: from localhost ([::1]:33185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAfEP-0007dj-T3 for incoming@patchwork.ozlabs.org; Thu, 22 Mar 2012 06:26:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAevS-0000cK-7e for qemu-devel@nongnu.org; Thu, 22 Mar 2012 06:07:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAevM-0006RA-2Z for qemu-devel@nongnu.org; Thu, 22 Mar 2012 06:07:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAevL-0006Qy-Qn for qemu-devel@nongnu.org; Thu, 22 Mar 2012 06:07:15 -0400 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 q2MA7CRI025807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 22 Mar 2012 06:07:13 -0400 Received: from amd-6168-8-1.englab.nay.redhat.com (amd-6168-8-1.englab.nay.redhat.com [10.66.104.52]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2MA7AY9020625; Thu, 22 Mar 2012 06:07:11 -0400 To: qemu-devel@nongnu.org, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, mst@redhat.com From: Jason Wang Date: Thu, 22 Mar 2012 18:02:34 +0800 Message-ID: <20120322100234.44393.86465.stgit@amd-6168-8-1.englab.nay.redhat.com> In-Reply-To: <20120322100141.44393.14528.stgit@amd-6168-8-1.englab.nay.redhat.com> References: <20120322100141.44393.14528.stgit@amd-6168-8-1.englab.nay.redhat.com> User-Agent: StGit/0.16-1-g60c4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 7/7] e1000: set E1000_ICR_INT_ASSERTED only for 8257x X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org E1000_ICR_INT_ASSERTED were introduced only for 8257x, so we need to check the E1000_DEVID before setting this bit in ICS. Signed-off-by: Jason Wang --- hw/e1000.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 921f0cc..5584cc6 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -199,8 +199,10 @@ static const char phy_regcap[0x20] = { static void set_interrupt_cause(E1000State *s, int index, uint32_t val) { - if (val) + if (val && (E1000_DEVID >= E1000_DEV_ID_82547EI_MOBILE)) { + /* Only for 8257x */ val |= E1000_ICR_INT_ASSERTED; + } s->mac_reg[ICR] = val; s->mac_reg[ICS] = val; qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);