Changeset eebecdc in mainline for uspace/drv/nic/e1k/e1k.c


Ignore:
Timestamp:
2025-03-13T18:30:36Z (12 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
e3e53cc
Parents:
e494d7b (diff), da54714 (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 upstream/master into helenraid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/e1k/e1k.c

    re494d7b reebecdc  
    11/*
     2 * Copyright (c) 2025 Jiri Svoboda
    23 * Copyright (c) 2011 Zdenek Bouska
    34 * All rights reserved.
     
    220221
    221222static errno_t e1000_dev_add(ddf_dev_t *);
     223static errno_t e1000_dev_quiesce(ddf_dev_t *);
    222224
    223225/** Basic driver operations for E1000 driver */
    224226static driver_ops_t e1000_driver_ops = {
    225         .dev_add = e1000_dev_add
     227        .dev_add = e1000_dev_add,
     228        .dev_quiesce = e1000_dev_quiesce
    226229};
    227230
     
    12691272 *
    12701273 */
    1271 inline static errno_t e1000_register_int_handler(nic_t *nic,
     1274static errno_t e1000_register_int_handler(nic_t *nic,
    12721275    cap_irq_handle_t *handle)
    12731276{
     
    19181921 *
    19191922 */
    1920 inline static void e1000_delete_dev_data(ddf_dev_t *dev)
     1923static void e1000_delete_dev_data(ddf_dev_t *dev)
    19211924{
    19221925        assert(dev);
     
    22232226}
    22242227
     2228/** Quiesce E1000 device.
     2229 *
     2230 * @param dev E1000 device.
     2231 *
     2232 */
     2233errno_t e1000_dev_quiesce(ddf_dev_t *dev)
     2234{
     2235        nic_t *nic = ddf_dev_data_get(dev);
     2236        e1000_t *e1000 = DRIVER_DATA_NIC(nic);
     2237        errno_t rc;
     2238
     2239        ddf_msg(LVL_DEBUG, "e1000_dev_quiesce()");
     2240
     2241        e1000_disable_interrupts(e1000);
     2242        rc = e1000_reset(nic);
     2243        if (rc != EOK)
     2244                ddf_msg(LVL_ERROR, "e1000_dev_quiesce failed");
     2245        return rc;
     2246}
     2247
    22252248/** Read 16-bit value from EEPROM of E1000 adapter
    22262249 *
Note: See TracChangeset for help on using the changeset viewer.