ladybird/Kernel/Devices
Conrad Pankoff 072bf8cbb9 Kernel: Fix non-DMA writes to IDE drives
Our logic for using the ATA_CMD_CACHE_FLUSH functionality was a bit wrong,
and now it's better.

The ATA spec says these two things:

> The device shall enter the interrupt pending state when:
> 1) any command except a PIO data-in command reaches command completion
>    successfully;
> ...
> The device shall exit the interrupt pending state when:
> 1) the device is selected, BSY is cleared to zero, and the Status
>		 register is read;

This means that our sequence of actions was probably never going to work.
We were waiting in a loop checking the status register until it left the
busy state, _then_ waiting for an interrupt. Unfortunately by checking the
status register, we were _clearing_ the interrupt we were about to wait
for.

Now we just wait for the interrupt - we don't poll the status register at
all. This also means that once we get our `wait_for_irq` method sorted out
we'll spend a bunch less CPU time waiting for things to complete.
2019-08-12 13:25:59 +02:00
..
BlockDevice.cpp Kernel: Move devices into Kernel/Devices/. 2019-04-03 12:36:40 +02:00
BlockDevice.h Kernel: Move VirtualAddress.h into VM/ 2019-07-09 15:04:45 +02:00
BXVGADevice.cpp Kernel: Use established device name and number for framebuffer 2019-08-12 12:56:55 +02:00
BXVGADevice.h Kernel: Remove unnecessary use of LibDraw. 2019-07-18 10:36:26 +02:00
CharacterDevice.cpp Kernel: Move devices into Kernel/Devices/. 2019-04-03 12:36:40 +02:00
CharacterDevice.h Add clang-format file 2019-05-28 17:31:20 +02:00
DebugLogDevice.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
DebugLogDevice.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
Device.cpp Kernel: Run clang-format on everything. 2019-06-07 11:43:58 +02:00
Device.h Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
DiskDevice.cpp Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
DiskDevice.h DiskDevice: Add missing override and remove unnecessary class_name() 2019-08-07 07:21:28 +02:00
DiskPartition.cpp Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
DiskPartition.h Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
FileBackedDiskDevice.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
FileBackedDiskDevice.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
FloppyDiskDevice.cpp Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
FloppyDiskDevice.h Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
FullDevice.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
FullDevice.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
KeyboardDevice.cpp Kernel: Hack the default keymap to support UK pipe/backslash 2019-08-10 14:29:32 +02:00
KeyboardDevice.h Kernel: Remove use of [[gnu::pure]]. 2019-07-16 13:44:41 +02:00
MBRPartitionTable.cpp Kernel: Remove use of copy_ref() in favor of regular RefPtr copies. 2019-07-11 15:40:04 +02:00
MBRPartitionTable.h Kernel: Remove use of copy_ref() in favor of regular RefPtr copies. 2019-07-11 15:40:04 +02:00
NullDevice.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
NullDevice.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
PATAChannel.cpp Kernel: Fix non-DMA writes to IDE drives 2019-08-12 13:25:59 +02:00
PATAChannel.h Kernel: Expand PATA driver to support multiple hard drives (#365) 2019-07-28 15:44:01 +02:00
PATADiskDevice.cpp Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
PATADiskDevice.h Kernel: mount system call (#396) 2019-08-02 15:18:47 +02:00
PCSpeaker.cpp Kernel: Move File.{cpp,h} into FileSystem/ 2019-07-09 15:04:45 +02:00
PCSpeaker.h Kernel: Add a beep() syscall that beeps the PC speaker. 2019-05-15 21:40:41 +02:00
PS2MouseDevice.cpp Kernel: Allow boot without mouse attached by checking for presence 2019-08-12 12:51:52 +02:00
PS2MouseDevice.h Kernel: Allow boot without mouse attached by checking for presence 2019-08-12 12:51:52 +02:00
RandomDevice.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
RandomDevice.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
SB16.cpp Thread: Return a result from block() indicating why the block terminated 2019-07-20 12:15:24 +02:00
SB16.h Kernel: Add Thread::block_until(Condition). 2019-07-14 14:54:54 +02:00
SerialDevice.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
SerialDevice.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
ZeroDevice.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
ZeroDevice.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00