- Debugger: Getting mixed signals
- 'Packaging Infrastructure' Contract Weekly Report #4
- Haiku monthly activity report - 06/2015
- 'Packaging Infrastructure' Contract Weekly Report #3
- 'Packaging Infrastructure' Contract Weekly Report #2
- GCI 2014 winners trip report (mentor side)
- TeX Live and LyX; Changes to the boot code
- 'Packaging Infrastructure' Contract Weekly Report #1
- Beginning of 'Packaging Infrastructure' Contract
- Haiku monthly activity report - 05/2015
Browsing the USB Stack code
I said it already, but I'm going to say it a million of times, I've never EVER would expected to work on such a project for the Google Summer of Code, I actually didn't even think I would get in the soc. But anyway, here I am... so let's begin!
Last night after I got bored reading the Kernel Kit section of the Be Book (it was about threads and related functions), I opened my shell and I dived right into the USB stack code.
I tried to follow some functions with ctags, because I was interested about how the actual data is sent to the device, and here is what I found out.
This is the method used to send data to the device.
GetBusManager()->SubmitTransfer(transfer);
EHCI driver status...
status_t
EHCI::SubmitTransfer(Transfer *transfer)
{
...
if ((type & USB_OBJECT_INTERRUPT_PIPE) > 0
< || (type & USB_OBJECT_ISO_PIPE) > 0) {
TRACE(("usb_ehci: submitting periodic transfer\n"));
return SubmitPeriodicTransfer(transfer);
}
....
}
status_t
EHCI::SubmitPeriodicTransfer(Transfer *transfer)
{
return B_ERROR;
}
Ok this has to be implemented. I actually thought ehci and uhci were fully implemented as there is only a ticket about ohci. In the UHCI::SubmitTransfer() I actually didn't find anything about the isochronous stream. The OHCI is not even implemented, but that was known.
Anyway, let's back to how the actual data is sent to the device.
I followed the EHCI::SubmitAsyncTransfer since the periodic transfer
is not implemented. It start by creating a queue, which it fills with either
FillQueueWithRequest or FillQueueWithData and then pass it to
EHCI::AddPendingTransfer but I get lost in this latter method in the main if(directionIn).
I expected something like a write function, as I saw in other OS usb stack code.
I'll keep studying.
- emitrax's blog
- Login or register to post comments

Comments
Re: Browsing the USB Stack code
Ne approfitto per farti un "in bocca al lupo".. ti aspetta un duro lavoro :) Ma grazie a te a agli altri ragazzi del Google Summer of Code quest'estate ci sara' di che divertirsi con Haiku... ^___^
Re: Browsing the USB Stack code
Nice. Don't give up. ;) I think you could also ask Niels Reedijk or Michael Lotz if you have questions. Both of them worked on the USB stack. Niels might not have an Internet connection ATM, though.