From 5d05434d4662e2a95cceadfe7868f28e7ff5ed48 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 28 Jun 2021 01:03:24 +0200 Subject: [PATCH] Fixed NE2000 I/O port handlers, per report by waltje. --- src/network/net_ne2000.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index 4ae8d1968..ddca366d4 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -571,13 +571,7 @@ static void nic_ioset(nic_t *dev, uint16_t addr) { if (dev->is_pci) { - io_sethandler(addr, 16, - nic_readb, nic_readw, nic_readl, - nic_writeb, nic_writew, nic_writel, dev); - io_sethandler(addr+16, 16, - nic_readb, nic_readw, nic_readl, - nic_writeb, nic_writew, nic_writel, dev); - io_sethandler(addr+0x1f, 1, + io_sethandler(addr, 32, nic_readb, nic_readw, nic_readl, nic_writeb, nic_writew, nic_writel, dev); } else { @@ -593,9 +587,6 @@ nic_ioset(nic_t *dev, uint16_t addr) nic_readb, nic_readw, NULL, nic_writeb, nic_writew, NULL, dev); } - io_sethandler(addr+0x1f, 1, - nic_readb, NULL, NULL, - nic_writeb, NULL, NULL, dev); } } @@ -604,13 +595,7 @@ static void nic_ioremove(nic_t *dev, uint16_t addr) { if (dev->is_pci) { - io_removehandler(addr, 16, - nic_readb, nic_readw, nic_readl, - nic_writeb, nic_writew, nic_writel, dev); - io_removehandler(addr+16, 16, - nic_readb, nic_readw, nic_readl, - nic_writeb, nic_writew, nic_writel, dev); - io_removehandler(addr+0x1f, 1, + io_removehandler(addr, 32, nic_readb, nic_readw, nic_readl, nic_writeb, nic_writew, nic_writel, dev); } else { @@ -626,9 +611,6 @@ nic_ioremove(nic_t *dev, uint16_t addr) nic_readb, nic_readw, NULL, nic_writeb, nic_writew, NULL, dev); } - io_removehandler(addr+0x1f, 1, - nic_readb, NULL, NULL, - nic_writeb, NULL, NULL, dev); } }