Changeset 29e7cc7 in mainline for uspace/drv/block/pci-ide/main.c


Ignore:
Timestamp:
2025-04-18T15:14:10Z (3 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
e77c3ed
Parents:
800d188 (diff), 25fdb2d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'upstream/master' into helenraid

File:
1 edited

Legend:

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

    r800d188 r29e7cc7  
    136136        pci_ide_hwres_t res;
    137137        async_sess_t *parent_sess;
     138        unsigned chans;
    138139        errno_t rc;
    139140
     
    157158                goto error;
    158159
     160        chans = 0;
     161
    159162        rc = pci_ide_channel_init(ctrl, &ctrl->channel[0], 0, &res);
    160         if (rc == ENOENT)
     163        if (rc == EOK)
     164                ++chans;
     165        else if (rc != ENOENT)
    161166                goto error;
    162167
    163168        rc = pci_ide_channel_init(ctrl, &ctrl->channel[1], 1, &res);
    164         if (rc == ENOENT)
    165                 goto error;
    166 
    167         if (rc != EOK) {
    168                 ddf_msg(LVL_ERROR, "Failed initializing ATA controller.");
     169        if (rc == EOK)
     170                ++chans;
     171        else if (rc != ENOENT)
     172                goto error;
     173
     174        if (chans == 0) {
     175                ddf_msg(LVL_ERROR, "No PCI IDE devices found.");
    169176                rc = EIO;
    170177                goto error;
Note: See TracChangeset for help on using the changeset viewer.