Changeset 832cbe7 in mainline for uspace/lib/device/src/devman.c


Ignore:
Timestamp:
2025-02-05T12:30:20Z (7 days ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
accdf882
Parents:
0dab4850
git-author:
Jiri Svoboda <jiri@…> (2025-02-04 21:30:06)
git-committer:
Jiri Svoboda <jiri@…> (2025-02-05 12:30:20)
Message:

Add proper IDE PCI to ISA fallback mechanism.

To determine if legacy IDE I/O ports are free, isa-ide asks isa,
who asks pciintel. pciintel waits for bus enumeration to complete,
then waits for all functions except the one who is asking
(which is ISA bus) to stabilize. During attach pci-ide will claim
the legacy IDE ports. Thus, if at this point legacy IDE ports
are unclaimed, pciintel tells ISA they are free, which tells isa-ide,
which continues to attach. If they are not free, isa-ide will not
attach.

This works for all use cases, including system without PCI bus,
system with PCI bus, but no (or disabled) PCI IDE, system with PCI
IDE with unrecognized VID/PID (which we will handle in legacy ISA mode).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/device/src/devman.c

    r0dab4850 r832cbe7  
    11/*
     2 * Copyright (c) 2025 Jiri Svoboda
    23 * Copyright (c) 2007 Josef Cejka
    3  * Copyright (c) 2013 Jiri Svoboda
    44 * Copyright (c) 2010 Lenka Trochtova
    55 * All rights reserved.
     
    343343}
    344344
     345errno_t devman_drv_fun_wait_stable(devman_handle_t funh)
     346{
     347        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
     348        if (exch == NULL)
     349                return ENOMEM;
     350
     351        errno_t retval = async_req_1_0(exch, DEVMAN_DRV_FUN_WAIT_STABLE, funh);
     352
     353        devman_exchange_end(exch);
     354        return retval;
     355}
     356
    345357async_sess_t *devman_parent_device_connect(devman_handle_t handle,
    346358    unsigned int flags)
Note: See TracChangeset for help on using the changeset viewer.