Root/
Source at commit 1166 created 13 years 10 days ago. By meklort, Fixed recent Makefile changes. Please do not use /Users/evan/SourceCode/tmp/chameleon/trunk or VPATH. the *only* time you should use /Users/evan/SourceCode/tmp/chameleon/trunk is when setting the SRCROOT variable. Also note that very soon make pkg is going to be removed. The pkg build script in trunk is very out of date. Instead please use the package maker at http://forge.voodooprojects.org/p/chameleonApplications/. Once this is ready for trunk it will be merged. | |
---|---|
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 | ␊ |
10 | int usb_loop();␊ |
11 | void notify_usb_dev(pci_dt_t *pci_dev);␊ |
12 | ␊ |
13 | void USBFix_pci_hook(void* arg1, void* arg2, void* arg3, void* arg4)␊ |
14 | {␊ |
15 | ␉pci_dt_t* current = arg1;␊ |
16 | ␉if(current->class_id == PCI_CLASS_SERIAL_USB)␊ |
17 | ␉{␊ |
18 | ␉␉notify_usb_dev(current);␊ |
19 | ␉}␊ |
20 | }␊ |
21 | ␊ |
22 | void USBFix_start_hook(void* arg1, void* arg2, void* arg3, void* arg4)␊ |
23 | {␊ |
24 | ␉usb_loop();␊ |
25 | }␊ |
26 | ␊ |
27 | ␊ |
28 | void USBFix_start()␊ |
29 | {␊ |
30 | ␉register_hook_callback("PCIDevice", &USBFix_pci_hook);␊ |
31 | ␉register_hook_callback("Kernel Start", &USBFix_start_hook);␊ |
32 | ␊ |
33 | }␊ |
34 | ␊ |
35 |