From patchwork Mon Aug 22 08:09:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 661370 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sHmV26ZhMz9sCZ for ; Mon, 22 Aug 2016 18:10:50 +1000 (AEST) Received: from localhost ([::1]:40208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbkJk-000746-U3 for incoming@patchwork.ozlabs.org; Mon, 22 Aug 2016 04:10:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbkIg-0006E1-9R for qemu-devel@nongnu.org; Mon, 22 Aug 2016 04:09:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbkIf-0007Ml-67 for qemu-devel@nongnu.org; Mon, 22 Aug 2016 04:09:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbkIf-0007Mf-0K for qemu-devel@nongnu.org; Mon, 22 Aug 2016 04:09:41 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A8F9183F41; Mon, 22 Aug 2016 08:09:40 +0000 (UTC) Received: from jason-ThinkPad-T450s.redhat.com (vpn1-5-97.pek2.redhat.com [10.72.5.97]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7M89TjD007467; Mon, 22 Aug 2016 04:09:36 -0400 From: Jason Wang To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Mon, 22 Aug 2016 16:09:27 +0800 Message-Id: <1471853367-18474-3-git-send-email-jasowang@redhat.com> In-Reply-To: <1471853367-18474-1-git-send-email-jasowang@redhat.com> References: <1471853367-18474-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 22 Aug 2016 08:09:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] e1000e: remove internal interrupt flag X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S . Tsirkin" , Jason Wang , Markus Armbruster , Marcel Apfelbaum , Cao jin , Dmitry Fleytman , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Cao jin Commit 66bf7d58 removed internal msi state flag E1000E_USE_MSI, E1000E_USE_MSIX is not necessary too, remove it now. And interrupt flag field intr_state also can be removed now. CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin CC: Paolo Bonzini Signed-off-by: Cao jin Reviewed-by: Markus Armbruster Acked-by: Dmitry Fleytman Reviewed-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/e1000e.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index d001c96..bad43f4 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -69,7 +69,6 @@ typedef struct E1000EState { uint16_t subsys_ven_used; uint16_t subsys_used; - uint32_t intr_state; bool disable_vnet; E1000ECore core; @@ -89,8 +88,6 @@ typedef struct E1000EState { #define E1000E_MSIX_TABLE (0x0000) #define E1000E_MSIX_PBA (0x2000) -#define E1000E_USE_MSIX BIT(0) - static uint64_t e1000e_mmio_read(void *opaque, hwaddr addr, unsigned size) { @@ -302,8 +299,6 @@ e1000e_init_msix(E1000EState *s) } else { if (!e1000e_use_msix_vectors(s, E1000E_MSIX_VEC_NUM)) { msix_uninit(d, &s->msix, &s->msix); - } else { - s->intr_state |= E1000E_USE_MSIX; } } } @@ -311,7 +306,7 @@ e1000e_init_msix(E1000EState *s) static void e1000e_cleanup_msix(E1000EState *s) { - if (s->intr_state & E1000E_USE_MSIX) { + if (msix_enabled(PCI_DEVICE(s))) { e1000e_unuse_msix_vectors(s, E1000E_MSIX_VEC_NUM); msix_uninit(PCI_DEVICE(s), &s->msix, &s->msix); } @@ -601,7 +596,6 @@ static const VMStateDescription e1000e_vmstate = { VMSTATE_MSIX(parent_obj, E1000EState), VMSTATE_UINT32(ioaddr, E1000EState), - VMSTATE_UINT32(intr_state, E1000EState), VMSTATE_UINT32(core.rxbuf_min_shift, E1000EState), VMSTATE_UINT8(core.rx_desc_len, E1000EState), VMSTATE_UINT32_ARRAY(core.rxbuf_sizes, E1000EState,