From: John Hodge Date: Wed, 16 May 2012 03:03:58 +0000 (+0800) Subject: Modules - Little debugging fixes (and planning VESA fb cache) X-Git-Tag: rel0.15~611^2~102 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=88547c29ae10d9bd709b7382a4bf78d94f0b2be4;hp=d45d4025353e79b7986edbd90c21d849eb61931e;p=tpg%2Facess2.git Modules - Little debugging fixes (and planning VESA fb cache) --- diff --git a/KernelLand/Modules/Display/VESA/main.c b/KernelLand/Modules/Display/VESA/main.c index 3f2f1c9c..71cd72bf 100644 --- a/KernelLand/Modules/Display/VESA/main.c +++ b/KernelLand/Modules/Display/VESA/main.c @@ -67,11 +67,19 @@ tTimer *gpVesaCursorTimer; int gbVesa_CursorVisible = 0; // --- 2D Video Stream Handlers --- tDrvUtil_Video_BufInfo gVesa_BufInfo; +// --- Settings --- +// int gbVesa_DisableFBCache; // Disables the main-memory framebuffer cache // === CODE === int Vesa_Install(char **Arguments) { int rv; + +// for( int i = 0; Arguments[i]; i ++ ) +// { +// if( strcmp(Aguments[i], "nocache") == 0 ) +// gbVesa_DisableFBCache = 1; +// } gpVesa_BiosState = VM8086_Init(); diff --git a/KernelLand/Modules/USB/Core/usb_devinit.c b/KernelLand/Modules/USB/Core/usb_devinit.c index 7b1b724f..fb44bb04 100644 --- a/KernelLand/Modules/USB/Core/usb_devinit.c +++ b/KernelLand/Modules/USB/Core/usb_devinit.c @@ -115,6 +115,7 @@ void USB_DeviceConnected(tUSBHub *Hub, int Port) size_t total_length; USB_int_ReadDescriptor(dev, 0, 2, i, sizeof(desc), &desc); + // TODO: Check return length? (Do we get a length?) #if DUMP_DESCRIPTORS LOG("Configuration Descriptor %i = {", i); LOG(" .Length = %i", desc.Length); @@ -133,6 +134,11 @@ void USB_DeviceConnected(tUSBHub *Hub, int Port) } #endif + if( desc.NumInterfaces == 0 ) { + Log_Notice("USB", "Device does not have any interfaces"); + continue ; + } + // TODO: Split here and allow some method of selection // Allocate device now that we have the configuration @@ -179,13 +185,11 @@ void USB_DeviceConnected(tUSBHub *Hub, int Port) LOG(" .InterfaceClass = 0x%x", iface->InterfaceClass); LOG(" .InterfaceSubClass = 0x%x", iface->InterfaceSubClass); LOG(" .InterfaceProcol = 0x%x", iface->InterfaceProtocol); - # if DEBUG if( iface->InterfaceStr ) { char *tmp = USB_int_GetDeviceString(dev, 0, iface->InterfaceStr); LOG(" .InterfaceStr = %i '%s'", iface->InterfaceStr, tmp); free(tmp); } - # endif LOG("}"); #endif @@ -246,11 +250,11 @@ void USB_DeviceConnected(tUSBHub *Hub, int Port) ); } else { + LOG("Driver '%s' in use", dev_if->Driver->Name); dev_if->Driver->Connected( dev_if, full_buf + iface_base_ofs, ptr_ofs - iface_base_ofs ); - // dev_if->Driver->Connected( dev_if ); } }