From 24a52dc748126b1449a104c7f756b201c8ac1b02 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 25 Dec 2013 08:46:21 +0800 Subject: [PATCH] Modules/VirtIO - Debug disabled, added some new messages --- KernelLand/Modules/Libraries/VirtIO/virtio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/KernelLand/Modules/Libraries/VirtIO/virtio.c b/KernelLand/Modules/Libraries/VirtIO/virtio.c index 65f4cc9f..614bd357 100644 --- a/KernelLand/Modules/Libraries/VirtIO/virtio.c +++ b/KernelLand/Modules/Libraries/VirtIO/virtio.c @@ -5,7 +5,7 @@ * virtio.c * - Core */ -#define DEBUG 1 +#define DEBUG 0 #define VERSION 0x100 #include #include @@ -154,8 +154,7 @@ tVirtIO_Dev *VirtIO_InitDev(Uint16 IOBase, Uint IRQ, Uint32 Features, int MaxQue // Register IRQ Handler IRQ_AddHandler(IRQ, VirtIO_IRQHandler, ret); - Uint8 isr = inb(IOBase + VIRTIO_REG_ISRSTS); - LOG("isr = %x", isr); + LOG("isr = %x", inb(IOBase + VIRTIO_REG_ISRSTS)); // Start outb(IOBase + VIRTIO_REG_DEVSTS, VIRTIO_DEVSTS_DRIVER_OK); @@ -410,6 +409,7 @@ void VirtIO_int_ProcessUsedList(tVirtIO_Dev *Dev, tVirtIO_Queue *Queue, int Used if( !Queue->NoAutoRel ) { + LOG("Releasing"); // Return the buffer to the avaliable pool VirtIO_ReleaseBuffer(&Queue->Buffers[qent]); if(Queue->NextUsedPop == UsedIdx) @@ -440,6 +440,7 @@ void VirtIO_IRQHandler(int IRQ, void *Ptr) queue->LastSeenUsed ++; VirtIO_int_ProcessUsedList(Dev, queue, idx); } + LOG("- Done"); } } -- 2.20.1