Hi guys!!
I'm just complete my DMA handling part in my EHCI driver for SGI IRIX. But right now I need to do further tests, and I'm in doubt about the numeric representation of USB commands for testing.
I would like to get descriptors, enumerate and so on...
Which hex numeric values would be ok to test with? something like a ping or similar stuff?
which USB commands is the most suggested in order to get something in the DMA and see the device is "there"??
Thanks in advance guys
Example generic USB commands for EHCI driver
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Example generic USB commands for EHCI driver
USB is _very_ complex (as someone who is implementing it at this very moment)
I suggest actually building up a basic USB stack first, testing on qemu (a custom build, with debugging printfs) and then writing the SGI EHCI driver.
Most of what makes USB complex, is it's all host-driven, so there isn't really a ping command (that I recall), if you feel up to it, try assigning an address then reading the device descriptor (read the USB spec to find out how to do that).
I suggest actually building up a basic USB stack first, testing on qemu (a custom build, with debugging printfs) and then writing the SGI EHCI driver.
Most of what makes USB complex, is it's all host-driven, so there isn't really a ping command (that I recall), if you feel up to it, try assigning an address then reading the device descriptor (read the USB spec to find out how to do that).
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: Example generic USB commands for EHCI driver
Hello,
USB is definitely complex. I have fully implemented EHCI Mass Storage support. So if you want any source code exemplars, I will provide them.
Actually, today I optimized the EHCI driver. Originally, it took about 15 seconds to read 64 sectors off of the device. I was working with a device formatted with FAT16 64sectors/cluster! By compressing the number of transactions and cutting the delays as short as possible (any shorter and the hardware won't update quick enough), I was able to cut that time down to about a quarter of a second!
Hoozim
USB is definitely complex. I have fully implemented EHCI Mass Storage support. So if you want any source code exemplars, I will provide them.
Actually, today I optimized the EHCI driver. Originally, it took about 15 seconds to read 64 sectors off of the device. I was working with a device formatted with FAT16 64sectors/cluster! By compressing the number of transactions and cutting the delays as short as possible (any shorter and the hardware won't update quick enough), I was able to cut that time down to about a quarter of a second!
Hoozim