Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/USBFix/USBFix.c

1/*
2 * Copyright (c) 2009 Evan Lojewski. All rights reserved.
3 *
4 */
5
6#include "libsaio.h"
7#include "modules.h"
8#include "pci.h"
9
10extern int usb_loop();
11
12void notify_usb_dev(pci_dt_t *pci_dev);
13
14void USBFix_pci_hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6)
15{
16pci_dt_t* current = arg1;
17if(current->class_id == PCI_CLASS_SERIAL_USB)
18{
19notify_usb_dev(current);
20}
21}
22
23void USBFix_start_hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6)
24{
25usb_loop();
26}
27
28
29void USBFix_start()
30{
31register_hook_callback("PCIDevice", &USBFix_pci_hook);
32register_hook_callback("Kernel Start", &USBFix_start_hook);
33
34}
35
36

Archive Download this file

Revision: 789