Changeset 2a5d4649 in mainline
- Timestamp:
- 2025-04-14T09:36:33Z (3 weeks ago)
- Branches:
- master
- Children:
- 11782da
- Parents:
- 6120b7b
- git-author:
- Jiri Svoboda <jiri@…> (2025-04-14 09:36:30)
- git-committer:
- Jiri Svoboda <jiri@…> (2025-04-14 09:36:33)
- Location:
- uspace/drv/block
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/isa-ide/main.c
r6120b7b r2a5d4649 169 169 isa_ide_ctrl_t *ctrl; 170 170 isa_ide_hwres_t res; 171 unsigned chans; 171 172 errno_t rc; 172 173 … … 187 188 ctrl->dev = dev; 188 189 190 chans = 0; 191 189 192 rc = isa_ide_channel_init(ctrl, &ctrl->channel[0], 0, &res); 190 if (rc == ENOENT) 193 if (rc == EOK) 194 ++chans; 195 else if (rc != ENOENT) 191 196 goto error; 192 197 193 198 rc = isa_ide_channel_init(ctrl, &ctrl->channel[1], 1, &res); 194 if (rc == ENOENT) 195 goto error; 196 197 if (rc != EOK) { 198 ddf_msg(LVL_ERROR, "Failed initializing ATA controller."); 199 if (rc == EOK) 200 ++chans; 201 else if (rc != ENOENT) 202 goto error; 203 204 if (chans == 0) { 205 ddf_msg(LVL_ERROR, "No ISA IDE devices found."); 199 206 rc = EIO; 200 207 goto error; -
uspace/drv/block/pci-ide/main.c
r6120b7b r2a5d4649 136 136 pci_ide_hwres_t res; 137 137 async_sess_t *parent_sess; 138 unsigned chans; 138 139 errno_t rc; 139 140 … … 157 158 goto error; 158 159 160 chans = 0; 161 159 162 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) 161 166 goto error; 162 167 163 168 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."); 169 176 rc = EIO; 170 177 goto error;
Note:
See TracChangeset
for help on using the changeset viewer.