mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:58:14 +00:00
Kernel/Storage: Make the IDEChannel design more robust
The overall design is the same, but we change a few things, like decreasing the amount of blocking forever loops. The goal is to ensure the kernel won't hang forever when dealing with buggy hardware. Also, we reset the channel when initializing it, just in case the hardware was in bad state before we start use it.
This commit is contained in:
parent
ecf897f7c4
commit
05510e3994
2 changed files with 81 additions and 14 deletions
|
@ -59,6 +59,13 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
IOAddressGroup(const IOAddressGroup& other, IOAddress bus_master_base)
|
||||
: m_io_base(other.io_base())
|
||||
, m_control_base(other.control_base())
|
||||
, m_bus_master_base(bus_master_base)
|
||||
{
|
||||
}
|
||||
|
||||
// Disable default implementations that would use surprising integer promotion.
|
||||
bool operator==(const IOAddressGroup&) const = delete;
|
||||
bool operator<=(const IOAddressGroup&) const = delete;
|
||||
|
@ -126,7 +133,8 @@ protected:
|
|||
String channel_type_string() const;
|
||||
|
||||
void try_disambiguate_error();
|
||||
void wait_until_not_busy();
|
||||
bool wait_until_not_busy(bool slave, size_t milliseconds_timeout);
|
||||
bool wait_until_not_busy(size_t milliseconds_timeout);
|
||||
|
||||
void start_request(AsyncBlockDeviceRequest&, bool, u16);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue