From nobody Tue Feb 10 12:13:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1624604319233227.59638881105354; Thu, 24 Jun 2021 23:58:39 -0700 (PDT) Received: from localhost ([::1]:57112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwfnS-0005FX-4E for importer@patchew.org; Fri, 25 Jun 2021 02:58:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwfjM-0005p9-Nu for qemu-devel@nongnu.org; Fri, 25 Jun 2021 02:54:24 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:58718 helo=mail.default.ilande.bv.iomart.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwfjG-0001rj-Uu for qemu-devel@nongnu.org; Fri, 25 Jun 2021 02:54:24 -0400 Received: from host109-153-84-9.range109-153.btcentralplus.com ([109.153.84.9] helo=kentang.home) by mail.default.ilande.bv.iomart.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwfj2-0006FO-5i; Fri, 25 Jun 2021 07:54:04 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, hpoussin@reactos.org, aleksandar.rikalo@syrmia.com, f4bug@amsat.org, aurelien@aurel32.net, jiaxun.yang@flygoat.com, jasowang@redhat.com, fthain@telegraphics.com.au, laurent@vivier.eu Date: Fri, 25 Jun 2021 07:53:56 +0100 Message-Id: <20210625065401.30170-6-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210625065401.30170-1-mark.cave-ayland@ilande.co.uk> References: <20210625065401.30170-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 109.153.84.9 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 05/10] dp8393x: remove onboard PROM containing MAC address and checksum X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.bv.iomart.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.bv.iomart.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" According to the datasheet the dp8393x chipset does not contain any NVRAM c= apable of storing a MAC address or checksum. Now that both the MIPS jazz and m68k = q800 boards generate the PROM region and checksum themselves, remove the generat= ed PROM from the dp8393x device itself. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/dp8393x.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index ea5b22f680..252c0a2664 100644 --- a/hw/net/dp8393x.c +++ b/hw/net/dp8393x.c @@ -30,8 +30,6 @@ #include "qom/object.h" #include "trace.h" =20 -#define SONIC_PROM_SIZE 0x1000 - static const char *reg_names[] =3D { "CR", "DCR", "RCR", "TCR", "IMR", "ISR", "UTDA", "CTDA", "TPS", "TFC", "TSA0", "TSA1", "TFS", "URDA", "CRDA", "CRBA0", @@ -157,7 +155,6 @@ struct dp8393xState { NICConf conf; NICState *nic; MemoryRegion mmio; - MemoryRegion prom; =20 /* Registers */ uint8_t cam[16][6]; @@ -966,16 +963,12 @@ static void dp8393x_instance_init(Object *obj) dp8393xState *s =3D DP8393X(obj); =20 sysbus_init_mmio(sbd, &s->mmio); - sysbus_init_mmio(sbd, &s->prom); sysbus_init_irq(sbd, &s->irq); } =20 static void dp8393x_realize(DeviceState *dev, Error **errp) { dp8393xState *s =3D DP8393X(dev); - int i, checksum; - uint8_t *prom; - Error *local_err =3D NULL; =20 address_space_init(&s->as, s->dma_mr, "dp8393x"); memory_region_init_io(&s->mmio, OBJECT(dev), &dp8393x_ops, s, @@ -986,23 +979,6 @@ static void dp8393x_realize(DeviceState *dev, Error **= errp) qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); =20 s->watchdog =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, dp8393x_watchdog, s); - - memory_region_init_rom(&s->prom, OBJECT(dev), "dp8393x-prom", - SONIC_PROM_SIZE, &local_err); - if (local_err) { - error_propagate(errp, local_err); - return; - } - prom =3D memory_region_get_ram_ptr(&s->prom); - checksum =3D 0; - for (i =3D 0; i < 6; i++) { - prom[i] =3D s->conf.macaddr.a[i]; - checksum +=3D prom[i]; - if (checksum > 0xff) { - checksum =3D (checksum + 1) & 0xff; - } - } - prom[7] =3D 0xff - checksum; } =20 static const VMStateDescription vmstate_dp8393x =3D { --=20 2.20.1