Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/isa-ide/isa-ide.c

    r443695e r07039850  
    11/*
    2  * Copyright (c) 2024 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    101101        ata_params_t params;
    102102
    103         ddf_msg(LVL_DEBUG, "isa_ide_ctrl_init()");
     103        ddf_msg(LVL_DEBUG, "isa_ide_channel_init()");
     104
     105        memset(&params, 0, sizeof(params));
    104106
    105107        chan->ctrl = ctrl;
     
    133135        irq_inited = true;
    134136
    135         ddf_msg(LVL_DEBUG, "isa_ide_ctrl_init(): Initialize IDE channel");
     137        ddf_msg(LVL_DEBUG, "isa_ide_channel_init(): Initialize IDE channel");
    136138
    137139        params.arg = (void *)chan;
     140        params.use_dma = false;
    138141        params.have_irq = (chan->irq >= 0) ? true : false;
    139142        params.write_data_16 = isa_ide_write_data_16;
     
    160163                goto error;
    161164
    162         ddf_msg(LVL_DEBUG, "isa_ide_ctrl_init: DONE");
     165        ddf_msg(LVL_DEBUG, "isa_ide_channel_init: DONE");
    163166        return EOK;
    164167error:
     168        if (chan->channel != NULL) {
     169                (void) ata_channel_destroy(chan->channel);
     170                chan->channel = NULL;
     171        }
    165172        if (irq_inited)
    166173                isa_ide_fini_irq(chan);
     
    174181        errno_t rc;
    175182
    176         ddf_msg(LVL_DEBUG, ": isa_ide_ctrl_remove()");
     183        ddf_msg(LVL_DEBUG, ": isa_ide_channel_fini()");
    177184
    178185        fibril_mutex_lock(&chan->lock);
     
    189196
    190197        return EOK;
     198}
     199
     200/** Quiesce ISA IDE channel. */
     201void isa_ide_channel_quiesce(isa_ide_channel_t *chan)
     202{
     203        ddf_msg(LVL_DEBUG, ": isa_ide_channel_quiesce()");
     204
     205        fibril_mutex_lock(&chan->lock);
     206        ata_channel_quiesce(chan->channel);
     207        fibril_mutex_unlock(&chan->lock);
    191208}
    192209
Note: See TracChangeset for help on using the changeset viewer.