Ignore:
File:
1 edited

Legend:

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

    r07039850 r645d3832  
    11/*
    2  * Copyright (c) 2025 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4949static errno_t pci_ide_dev_remove(ddf_dev_t *dev);
    5050static errno_t pci_ide_dev_gone(ddf_dev_t *dev);
    51 static errno_t pci_ide_dev_quiesce(ddf_dev_t *dev);
    5251static errno_t pci_ide_fun_online(ddf_fun_t *fun);
    5352static errno_t pci_ide_fun_offline(ddf_fun_t *fun);
     
    5655
    5756static driver_ops_t driver_ops = {
    58         .dev_add = pci_ide_dev_add,
    59         .dev_remove = pci_ide_dev_remove,
    60         .dev_gone = pci_ide_dev_gone,
    61         .dev_quiesce = pci_ide_dev_quiesce,
    62         .fun_online = pci_ide_fun_online,
    63         .fun_offline = pci_ide_fun_offline
     57        .dev_add = &pci_ide_dev_add,
     58        .dev_remove = &pci_ide_dev_remove,
     59        .dev_gone = &pci_ide_dev_gone,
     60        .fun_online = &pci_ide_fun_online,
     61        .fun_offline = &pci_ide_fun_offline
    6462};
    6563
     
    135133        pci_ide_ctrl_t *ctrl;
    136134        pci_ide_hwres_t res;
    137         async_sess_t *parent_sess;
    138135        errno_t rc;
    139136
     
    167164        if (rc != EOK) {
    168165                ddf_msg(LVL_ERROR, "Failed initializing ATA controller.");
    169                 rc = EIO;
    170                 goto error;
    171         }
    172 
    173         parent_sess = ddf_dev_parent_sess_get(dev);
    174         if (parent_sess == NULL) {
    175                 rc = ENOMEM;
    176                 goto error;
    177         }
    178 
    179         /* Claim legacy I/O range to prevent ISA IDE from attaching there. */
    180         rc = hw_res_claim_legacy_io(parent_sess, hwc_isa_ide);
    181         if (rc != EOK) {
    182                 ddf_msg(LVL_ERROR, "Failed claiming legacy I/O range.");
    183166                rc = EIO;
    184167                goto error;
     
    369352}
    370353
    371 static errno_t pci_ide_dev_quiesce(ddf_dev_t *dev)
    372 {
    373         pci_ide_ctrl_t *ctrl = (pci_ide_ctrl_t *)ddf_dev_data_get(dev);
    374 
    375         ddf_msg(LVL_DEBUG, "pci_ide_dev_quiesce(%p)", dev);
    376 
    377         pci_ide_channel_quiesce(&ctrl->channel[0]);
    378         pci_ide_channel_quiesce(&ctrl->channel[1]);
    379 
    380         return EOK;
    381 }
    382 
    383354static errno_t pci_ide_fun_online(ddf_fun_t *fun)
    384355{
Note: See TracChangeset for help on using the changeset viewer.