Jeremy Soller
00b06cb915
xhci: support 64-bit contexts (CSZ)
2025-09-12 09:42:58 -06:00
Jeremy Soller
12e601b336
xhcid: improvements based on real hardware testing
2025-09-11 21:06:21 -06:00
Jeremy Soller
69a80a6a13
xhcid: fix reset procedure on real hardware
2025-09-11 15:31:15 -06:00
bjorn3
7e3e841f69
xhcid: Fix reading EHB flag in received_irq
2025-08-31 15:58:56 +02:00
bjorn3
e4aab16782
xhcid: Don't exit the event loop when using irqs
2025-08-31 15:58:56 +02:00
bjorn3
2c9be2e9b8
xhcid: Remove unused InterruptSources methods and fields
2025-08-31 15:58:15 +02:00
bjorn3
2945b86b82
pcid: Helper to allocate first MSI interrupt
2025-08-30 19:14:01 +02:00
bjorn3
ea47c97bf8
Check for MSI-X before checking for MSI
2025-08-30 19:14:01 +02:00
bjorn3
0b6b5e0d04
pcid: Move MappedMsixRegs to pcid_interface
2025-08-30 19:14:01 +02:00
Wildan M
e8bfe4448c
Fix possible panic in device enumeration
2025-08-24 20:06:14 +07:00
bjorn3
04ae0158c9
Update most crates to redox-scheme 0.6
...
A couple of crates need to stay on redox-scheme 0.4 as they need
cancellation for async schemes.
2025-07-04 22:13:24 +02:00
Jeremy Soller
a813d93001
Reduce some logging
2025-03-31 08:11:44 -06:00
4lDO2
3ba8c99915
Fix rustfmt CI and make bcm2835-sdhcid compile.
2025-03-30 16:45:55 +02:00
Jeremy Soller
cd4cc3e519
Only fetch language IDs if required
2025-03-28 21:18:38 -06:00
Jeremy Soller
f58625b035
usbhubd/xhcid: fix port status for USB 3 hubs
2025-03-28 20:45:01 -06:00
Jeremy Soller
cbbcbc9ec3
usbhubd/xhcid: fix reading descriptor on USB 3 hubs
2025-03-28 18:27:29 -06:00
Jeremy Soller
ba0ca4ce05
Also fix packet size on USB 1
2025-03-28 18:02:18 -06:00
Jeremy Soller
8dcd85b546
Fix packet size for USB 3.0
2025-03-28 17:48:47 -06:00
Jeremy Soller
59edc11bee
xhcid: prepare for getting protocol speed from hubs
2025-03-22 20:00:07 -06:00
Jeremy Soller
a5f87735d2
xhcid: ignore alternate settings
2025-03-21 16:31:44 -06:00
Jeremy Soller
7c9801379d
xhcid: use lang id when reading string descriptors
2025-03-21 15:41:53 -06:00
Jeremy Soller
5afc5c9de4
xhcid: adjust logging
2025-03-21 14:45:06 -06:00
Jeremy Soller
f0d39b872d
xhcid: fix usage of portsc rwc bits
2025-03-21 13:58:56 -06:00
Jeremy Soller
58bd24da8c
Support addressing of hub devices
2025-03-21 10:15:36 -06:00
Jeremy Soller
2c349f7eb0
Cleanup to allow enumeration requests on any port id
2025-03-20 21:32:50 -06:00
Jeremy Soller
e3a13a0ce7
xhcid and friends: use newtype PortId to ensure route string can be passed where needed
2025-03-20 21:27:17 -06:00
Jeremy Soller
2299bb0b27
xhcid: fix panic when no ssc is available
2025-03-20 13:24:16 -06:00
bjorn3
5d76acfd74
Update to redox-scheme 0.4
2025-03-14 22:11:30 +01:00
bjorn3
374e5fbfab
xhcid: Use redox-scheme
2025-03-13 17:00:54 +01:00
Jeremy Soller
451480a3e0
xhcid: do not panic if unable to find configuration descriptor
2025-03-13 08:41:23 -06:00
bjorn3
674b8c6724
xhcid: Fix a bunch of things to make usb storage work
...
configuration_value is not an index into config_descs, so scan for a
config_desc with the right configuration_value instead. And fix get_desc
getting confused by companion descriptors.
2025-03-09 17:04:25 +01:00
bjorn3
e7fe3183b0
Make all pcid_interface methods abort the process on errors
...
Effectively the only way to recover from errors in the communication
with pcid is by restarting the driver from scratch possibly after
restarting pcid. As such moving the aborts from individual drivers to
pcid_interface simplifies drivers while at the same time allowing nicer
error messages.
2025-03-02 12:36:35 +01:00
bjorn3
581d9eea33
Replace a whole bunch more repr(packed) with repr(C, packed)
2025-02-22 16:19:25 +01:00
bjorn3
2c042f8c98
Fix a ton of unused import warnings
2024-12-26 16:05:04 +01:00
Andrey Turkin
2f9e28e23e
Rerun cargo fmt to bring CI back to norm
2024-12-18 21:16:17 +03:00
Jeremy Soller
5cf8bfda72
xhcid: remove transfer states on dead rings
2024-11-11 14:27:32 -07:00
Jeremy Soller
842fc73a34
Track all drivers launched for a port
2024-11-11 12:51:22 -07:00
Jeremy Soller
191c7973a9
Fix deadlock in xhcid detach_device
2024-11-11 12:10:01 -07:00
Timothy Finnegan
4dedbac4e5
Fixed the deadlock by only addressing devices in response to attach requests....
2024-11-05 17:35:57 +00:00
Jeremy Soller
6ff633863e
Allow usbhidd to run on multiple interfaces
2024-11-04 16:15:53 -07:00
Andrey Turkin
09b5033fbd
Wholesale cargo fmt to get CI back to green
2024-10-17 20:07:05 +03:00
Kamil Koczurek
d2c82add9d
Move Io/Pio/Mmio from redox_syscall to common
...
* Fix Mmio repr from transparent to packed.
* Rename Mmio::from to Mmio::new.
* Remove dead imports around affected code.
* Minor formatting.
2024-09-30 13:01:36 +02:00
Timothy Finnegan
39f43a51a1
Added some documentation to the XHCI daemon, clarified the scheme interface with a refactor
2024-09-10 00:43:42 +00:00
Jeremy Soller
897866d948
xhcid: switch back to polling and leave TODO
2024-09-06 20:09:04 -06:00
Jeremy Soller
b29d2c7c9e
xhcid: switch back to interrupts
2024-09-04 15:00:35 -06:00
bjorn3
7935ed0248
Deduplicate setup_logging between all drivers
...
This will make it easier to change the way logging is done for all
drivers. This also fixes the log category for a couple of drivers as
well as makes failing to set the logger a fatal error. Only when a
logger is already set is it impossible to set another logger.
2024-07-24 22:00:40 +02:00
bjorn3
fd8dabd1bc
Use the new scheme format in most places
...
The graphics subsystem still uses the old format as orbital manually
parses the fpath result.
2024-07-11 21:14:45 +02:00
bjorn3
4ffed8096d
Move all drivers to /usr/lib/drivers
...
This makes them harder to accidentally run them from the shell, which
would not work. In the future this may also allow embedding the driver
config in the driver executable itself without having to look at all
non-driver executables too.
2024-06-16 17:02:14 +02:00
bjorn3
0d926fb3f7
xhcid: Sleep for 2ms on every poll loop
...
This significantly reduces cpu usage. On my laptop before this change a
single core would be fully loaded while running at 3-4GHz. With this
change it would only be loaded for about 50% while running at 1-2GHz.
This improves battery lifetime while also preventing the fan from
spinning up to a distracting level.
This shouldn't noticably affect latency given that most keyboards and
mice don't support polling at 500Hz anyway.
2024-06-16 12:04:05 +02:00
bjorn3
23ac696491
pcid: Add PciFunctionHandle::map_bar method
...
This will enable the pcid driver interface to safely map the MSI-X table
in the future without having to worry about a BAR being mapped twice.
2024-06-15 15:47:48 +02:00