From dc4906a23fa591ec58cd71bf15274c2459fce9b1 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 3 Jun 2021 17:30:50 -0300 Subject: [PATCH] Fix ISAPnP logical devices going missing --- src/device/isapnp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device/isapnp.c b/src/device/isapnp.c index 69da4ca13..e948d97f9 100644 --- a/src/device/isapnp.c +++ b/src/device/isapnp.c @@ -813,7 +813,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size) while (ld && (ld->number != ldn)) ld = ld->next; } - if (ld) { + if (ld && (ld->number == ldn)) { /* Reset some logical device state. */ ld->mem_upperlimit = ld->io_16bit = ld->irq_types = 0; memset(ld->io_len, 0, sizeof(ld->io_len)); @@ -960,7 +960,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size) } /* We're done with the last logical device. */ - if (ld) + if (ld && !existing) isapnp_reset_ld_regs(ld); }