Skip to main content

submit_async_cmd

Function submit_async_cmd 

Source
fn submit_async_cmd(
    port: &AhciPort,
    lba: u64,
    count: u16,
    write: bool,
    ata_cmd: u8,
    dma_buf: DmaBuffer,
) -> Result<(), AhciError>
Expand description

Submit a command asynchronously ; returns immediately without blocking.

The caller must have already set PORT_ASYNC_ACTIVE[idx] to true and stored the ring / user-data / buffer info in the per-port statics.

On success the operation is in-flight; the IRQ handler will deliver the CQE. On failure (device busy, allocation error) the metadata is cleared and the caller must push an error CQE itself.