Changeset 443695e in mainline for uspace/lib/c/generic/device/hw_res.c


Ignore:
Timestamp:
2024-05-21T11:33:56Z (12 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
3526f4f3
Parents:
1801005
git-author:
Jiri Svoboda <jiri@…> (2024-05-20 17:33:43)
git-committer:
Jiri Svoboda <jiri@…> (2024-05-21 11:33:56)
Message:

Basic PCI-IDE driver (no DMA support)

Also, make sure we avoid attaching ISA IDE and PCI IDE
at the same time. For simplicity, use ISA IDE on ISA systems
and PCI IDE on PCI-based systems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/hw_res.c

    r1801005 r443695e  
    11/*
     2 * Copyright (c) 2024 Jiri Svoboda
    23 * Copyright (c) 2010 Lenka Trochtova
    34 * All rights reserved.
     
    161162}
    162163
     164/** Get bus flags.
     165 *
     166 * @param sess HW res session
     167 * @param rflags Place to store the flags
     168 *
     169 * @return Error code.
     170 *
     171 */
     172errno_t hw_res_get_flags(async_sess_t *sess, hw_res_flags_t *rflags)
     173{
     174        async_exch_t *exch = async_exchange_begin(sess);
     175
     176        sysarg_t flags;
     177        const errno_t ret = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
     178            HW_RES_GET_FLAGS, &flags);
     179
     180        async_exchange_end(exch);
     181
     182        if (ret == EOK)
     183                *rflags = flags;
     184
     185        return ret;
     186}
     187
    163188/** @}
    164189 */
Note: See TracChangeset for help on using the changeset viewer.