From nobody Tue Feb 10 15:46:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.66 as permitted sender) client-ip=209.85.128.66; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f66.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602444796; cv=none; d=zohomail.com; s=zohoarc; b=WU06FaiQdROfKga3PYANAdVwqTjX8UXssG08Vk7zAtAn5lUC8S8R/p6yf2pptyMGLtb/h5/j1UCDCb8cI1UN65L61fkSmobdg93ePqMnPggA8vSOWMUDLSuXIbkFhVe1EH4UvW8QqIRw0GZYfw6pnF8Gv9SKxaOJz8qHnDgVrfU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602444796; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ottyxadkfdG6t1j9EHj71mxgUhLG6Ki7NMaGNynZJD0=; b=VSaaKhpkhhyIBGjqOluO8RE1Xobqr1+1Nv2y1p/jON9ocwOUZ7/VMoldqf2dbJDIGNWct96Shez/UvMdJKQTx6Mk6U27u/7qBHg9U64NydINBVQU2tCyXHlBN5lRNKsMDobAQ1Enqa0WkgmDgrYL+qpCT36mr9b9bFActcwmVSY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.zohomail.com with SMTPS id 1602444796908393.138254902442; Sun, 11 Oct 2020 12:33:16 -0700 (PDT) Received: by mail-wm1-f66.google.com with SMTP id e2so15335161wme.1 for ; Sun, 11 Oct 2020 12:33:16 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (106.red-83-59-162.dynamicip.rima-tde.net. [83.59.162.106]) by smtp.gmail.com with ESMTPSA id 88sm22673596wrl.76.2020.10.11.12.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 12:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ottyxadkfdG6t1j9EHj71mxgUhLG6Ki7NMaGNynZJD0=; b=qEwwLhXfmlgPiK25yyOcjxsJ3q6RS8jvY3+SEaEz2+i7iO1P0LlvcWHDK4l3Ri4LPB qGpOdydfbM0UerCDmcJ94eviy2yU5Sb2QSx5PCS3a9QmWlP6G4lmErLaesEeYq33Eqk8 Oq78gsC/3iuwPT39zyXdDhPj8J+50eBMUnUYHnZxrdpgtDRdcFOqnLT2l88GYI1PwJy+ SAP4Eqycljc26DjboqgJ+oXEl852pxyECm7Fyg1eLe7CaIhjeqiMnkVMGG1AYRdlgKoF F75IVc/9m9kzcxiIa8Ts3FWnLnRpJQXeCvUZQBxZFW7R5dbuW5PBhnAz/sjMa4x7qfmq 8Ugw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ottyxadkfdG6t1j9EHj71mxgUhLG6Ki7NMaGNynZJD0=; b=uNUwIvO7NCcK7e1QiGchjYePq406aPbktO6T4DK9W7Ty3zaTmpQ0TjUTZufONyV3pP CHqnUlTVBsn/t9v7sgWfkNuMkvbiRIK9nEYNaxGnyYB9TdF4e7pR9hy4Amb8I2teNVBE NC6ZrWNOG7uREcQ363HPhIPyivJFoSYEdHc+1dzKG0H9LgeNOrbGnjz3IAZmjb+MA/+e WH57NMkGF0Z+GOyNsQmOjEecIptgUipMCv8O/ueMQoryHE8wy6TwN4fP+M1nre45UvDg D+oM18ZaMlzbtLj1CqRgfxadKAlylqU7rAlauaovPyBi6GjzLP5dlgJJePYuwKz3z3ei p1DA== X-Gm-Message-State: AOAM530B/lp8A/5ldZyGcN6sA2K16bB95eQuC1pYfSgLMbm8Cppc0UJ6 5MyCFu6Fx56daDVk4s//vYs= X-Google-Smtp-Source: ABdhPJxwCHk9ZmaUKr7CkbYZxWaEQIWMZ6rAQBHwbNpxGejuErNgC8kytvS3q5p8QQv7R4bsOtQhNQ== X-Received: by 2002:a1c:3b8a:: with SMTP id i132mr7793744wma.178.1602444795066; Sun, 11 Oct 2020 12:33:15 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Eduardo Habkost , Corey Minyard , Paolo Bonzini , Aurelien Jarno , Kevin Wolf , Mark Cave-Ayland , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Berger , qemu-ppc@nongnu.org, Marcel Apfelbaum , Max Reitz , "Michael S. Tsirkin" , Laurent Vivier , Thomas Huth , John Snow , Igor Mammedov , Richard Henderson , qemu-trivial@nongnu.org, Artyom Tarasenko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jason Wang Subject: [PATCH 08/10] hw/isa: Add the ISA_IRQ_NET_DEFAULT definition Date: Sun, 11 Oct 2020 21:32:27 +0200 Message-Id: <20201011193229.3210774-9-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201011193229.3210774-1-f4bug@amsat.org> References: <20201011193229.3210774-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) The network devices use IRQ #9 by default. Add this default definition to the IsaIrqNumber enum. Avoid magic values in the code, replace them by the newly introduced definition. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/isa/isa.h | 1 + hw/net/ne2000-isa.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 9f78ff11246..11166592246 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -15,6 +15,7 @@ enum IsaIrqNumber { ISA_IRQ_FDC_DEFAULT =3D 6, ISA_IRQ_PAR_DEFAULT =3D 7, ISA_IRQ_RTC_DEFAULT =3D 8, + ISA_IRQ_NET_DEFAULT =3D 9, ISA_NUM_IRQS =3D 16 }; =20 diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index dd6f6e34d3c..e31e86c14af 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -80,7 +80,7 @@ static void isa_ne2000_realizefn(DeviceState *dev, Error = **errp) =20 static Property ne2000_isa_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISANE2000State, iobase, 0x300), - DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, 9), + DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, ISA_IRQ_NET_DEFAULT), DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c), DEFINE_PROP_END_OF_LIST(), }; --=20 2.26.2