Difference between revisions of "/dev/usb/usb"
Jump to navigation
Jump to search
(→Ioctls) |
|||
(9 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{stub}} | |
− | |||
− | |||
− | + | This device is internally used by several USB resource managers. Not much information is known at this time. | |
− | + | It is implemented by a module (USB) in IOS58 that runs under UID 17 (PID_USB). This resource manager can only be opened from that UID. It appears to be able to generically address devices via /dev/usb/oh0 and /dev/usb/ehc. It is accessed via several ioctls. | |
+ | |||
+ | Because all of the USB related modules run under the same UID, they all share the same file descriptor table. This allows ioctl 1 (GetDeviceList) to return FDs to /dev/usb/ehc and /dev/usb/oh0. These are directly used by VEN, HID, etc. when submitting transfers, without going through /dev/usb/usb. | ||
+ | |||
+ | [[File:New_IOS_USB_modules.svg|center|600px]] | ||
+ | |||
+ | == Ioctls == | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 15: | Line 19: | ||
| 0 | | 0 | ||
| 0 / 4 | | 0 / 4 | ||
− | | | + | | GetVersion |
| puts "0x10001" into the io_buf | | puts "0x10001" into the io_buf | ||
|- | |- | ||
Line 26: | Line 30: | ||
| 8 / >= 8 | | 8 / >= 8 | ||
| GetDeviceInfo | | GetDeviceInfo | ||
− | | | + | | |
|- | |- | ||
− | | | + | | 4 |
| 8 / 0 | | 8 / 0 | ||
− | | | + | | SuspendResume |
− | | calls ? ioctl 4 and/or 6 | + | | calls ? ioctl 4 and/or 6?. inbuf: u32 at offset 0, u8 at offset 4 |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− |
Latest revision as of 13:30, 26 September 2021
This article is a stub. You can help WiiBrew by expanding it. |
This device is internally used by several USB resource managers. Not much information is known at this time.
It is implemented by a module (USB) in IOS58 that runs under UID 17 (PID_USB). This resource manager can only be opened from that UID. It appears to be able to generically address devices via /dev/usb/oh0 and /dev/usb/ehc. It is accessed via several ioctls.
Because all of the USB related modules run under the same UID, they all share the same file descriptor table. This allows ioctl 1 (GetDeviceList) to return FDs to /dev/usb/ehc and /dev/usb/oh0. These are directly used by VEN, HID, etc. when submitting transfers, without going through /dev/usb/usb.
Ioctls
Ioctl | Parameters (inbuf_len / iobuf_len) | Function | Notes |
---|---|---|---|
0 | 0 / 4 | GetVersion | puts "0x10001" into the io_buf |
1 | 0 / > =0x300 | GetDeviceChange | |
2 | 8 / >= 8 | GetDeviceInfo | |
4 | 8 / 0 | SuspendResume | calls ? ioctl 4 and/or 6?. inbuf: u32 at offset 0, u8 at offset 4 |