From e6e1f4431d3922d089da780385f1f08ad8ee328e Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Thu, 3 Nov 2005 11:33:42 +0000 Subject: [PATCH] Make I/O port check less strict --- drivers/rtl8139/rtl8139.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/rtl8139/rtl8139.c b/drivers/rtl8139/rtl8139.c index 4faaf4a39..982dfc8fc 100755 --- a/drivers/rtl8139/rtl8139.c +++ b/drivers/rtl8139/rtl8139.c @@ -182,7 +182,7 @@ FORWARD _PROTOTYPE( unsigned my_inb, (U16_t port) ); FORWARD _PROTOTYPE( unsigned my_inw, (U16_t port) ); FORWARD _PROTOTYPE( unsigned my_inl, (U16_t port) ); static unsigned my_inb(U16_t port) { - U8_t value; + u32_t value; int s; if ((s=sys_inb(port, &value)) !=OK) printf("RTL8139: warning, sys_inb failed: %d\n", s); @@ -648,9 +648,11 @@ re_t *rep; pci_reserve(devind); /* printf("cr = 0x%x\n", pci_attr_r16(devind, PCI_CR)); */ bar= pci_attr_r32(devind, PCI_BAR) & 0xffffffe0; - if ((bar & 0x3ff) >= 0x100-32 || bar < 0x400) - panic("rtl_probe", - "base address is not properly configured", NO_NUM); + if (bar < 0x400) + { + panic("rtl_probe", + "base address is not properly configured", NO_NUM); + } rep->re_base_port= bar; ilr= pci_attr_r8(devind, PCI_ILR); -- 2.44.0