Rev 1616 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1616 | Rev 1875 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | #include |
2 | #include |
3 | #include |
3 | #include |
4 | #include |
4 | #include |
5 | #include |
5 | #include |
- | 6 | #include |
|
6 | #include "usb.h" |
7 | #include "usb.h" |
7 | 8 | ||
Line 8... | Line 9... | ||
8 | int __stdcall srv_usb(ioctl_t *io); |
9 | int __stdcall srv_usb(ioctl_t *io); |
Line 37... | Line 38... | ||
37 | return 0; |
38 | return 0; |
38 | }; |
39 | }; |
39 | 40 | ||
40 | qh_slab.available = 256; |
41 | hcd_buffer_create(); |
Line -... | Line 42... | ||
- | 42 | ||
- | 43 | qh_slab.available = 256; |
|
41 | qh_slab.start = KernelAlloc(4096); |
44 | qh_slab.start = KernelAlloc(4096); |
42 | qh_slab.nextavail = (addr_t)qh_slab.start; |
45 | qh_slab.nextavail = (addr_t)qh_slab.start; |
43 | qh_slab.dma = GetPgAddr(qh_slab.start); |
46 | qh_slab.dma = GetPgAddr(qh_slab.start); |
44 | 47 | ||
45 | qh_t *p; |
48 | qh_t *p; |
46 | addr_t dma; |
49 | addr_t dma; |
47 | 50 | ||
48 | for (i = 0, p = (qh_t*)qh_slab.start, dma = qh_slab.dma; |
51 | for (i = 0, p = (qh_t*)qh_slab.start, dma = qh_slab.dma; |
49 | i < 256; i++, p++, dma+= sizeof(qh_t)) |
52 | i < 256; i++, p++, dma+= sizeof(qh_t)) |
50 | { |
53 | { |
51 | p->qlink = (addr_t)(p+1); |
54 | p->qlink = (addr_t)(p+1); |
52 | p->qelem = 1; |
55 | p->qelem = 1; |
53 | p->dma = dma; |
56 | p->dma = dma; |
54 | p->r1 = 0; |
57 | p->r1 = 0; |
55 | }; |
58 | }; |
56 | 59 | ||
Line 57... | Line 60... | ||
57 | hc = (hc_t*)hc_list.next; |
60 | hc = (hc_t*)hc_list.next; |
Line 58... | Line 61... | ||
58 | 61 | ||
59 | while( &hc->list != &hc_list) |
62 | while( &hc->list != &hc_list) |