From 3e0422f2aa18861176c600ea4560ab0d14100d64 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 11 Mar 2014 14:29:10 +0000 Subject: [PATCH] Fixed bug in PCNET32 driver which allowed it to be loaded multiple times. git-svn-id: svn://kolibrios.org@4629 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/ethernet/RTL8029.asm | 7 ++++--- drivers/ethernet/i8255x.asm | 2 +- drivers/ethernet/mtd80x.asm | 2 +- drivers/ethernet/pcnet32.asm | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/ethernet/RTL8029.asm b/drivers/ethernet/RTL8029.asm index 7a4f4b34cf..56dca42e2c 100644 --- a/drivers/ethernet/RTL8029.asm +++ b/drivers/ethernet/RTL8029.asm @@ -1183,12 +1183,12 @@ PIO_write: -;all initialized data place here +; place all initialized data here align 4 devices dd 0 version dd (DRIVER_VERSION shl 16) or (API_VERSION and 0xFFFF) -my_service db 'RTL8029',0 ;max 16 chars include zero +my_service db 'RTL8029',0 ; max 16 chars include zero ;device_1 db 'Realtek 8029',0 ;device_2 db 'Realtek 8019',0 @@ -1198,7 +1198,8 @@ my_service db 'RTL8029',0 ;max 16 chars include zero include_debug_strings -section '.data' data readable writable align 16 ;place all uninitialized data place here +section '.data' data readable writable align 16 +; place all uninitialized data here device_list rd MAX_DEVICES diff --git a/drivers/ethernet/i8255x.asm b/drivers/ethernet/i8255x.asm index 7f7315a57d..20ff966529 100644 --- a/drivers/ethernet/i8255x.asm +++ b/drivers/ethernet/i8255x.asm @@ -1181,7 +1181,7 @@ end data include '../peimport.inc' -my_service db 'i8255x', 0 ; max 16 chars include zero +my_service db 'I8255X', 0 ; max 16 chars include zero devicename db 'Intel Etherexpress pro/100', 0 confcmd_data db 22, 0x08, 0, 0, 0, 0x80, 0x32, 0x03, 1 diff --git a/drivers/ethernet/mtd80x.asm b/drivers/ethernet/mtd80x.asm index 95b09f0df9..478bfc54c5 100644 --- a/drivers/ethernet/mtd80x.asm +++ b/drivers/ethernet/mtd80x.asm @@ -494,7 +494,7 @@ probe: invoke PciWrite32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header00.command, eax ; Check vendor/device id's - invoke PciRead32, [ebx + device.pci_bus], [ebx + device.pci_dev], 0 + invoke PciRead32, [ebx + device.pci_bus], [ebx + device.pci_dev], 0 cmp ax, 0x1516 jne .notfound shr eax, 16 diff --git a/drivers/ethernet/pcnet32.asm b/drivers/ethernet/pcnet32.asm index e3a1767cba..d64457f1b0 100644 --- a/drivers/ethernet/pcnet32.asm +++ b/drivers/ethernet/pcnet32.asm @@ -1527,7 +1527,7 @@ end data include '../peimport.inc' -my_service db 'PCnet',0 ; max 16 chars include zero +my_service db 'PCNET32',0 ; max 16 chars include zero device_l2 db "PCnet/PCI 79C970",0 device_l4 db "PCnet/PCI II 79C970A",0