Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.c

    r7acd787 r94ab1fe  
    11/*
    2  * Copyright (c) 2019 Jiri Svoboda
    32 * Copyright (c) 2010 Lenka Trochtova
     3 * Copyright (c) 2018 Jiri Svoboda
    44 * All rights reserved.
    55 *
     
    5858#include <pci_dev_iface.h>
    5959
    60 #include "ctl.h"
    6160#include "pci.h"
    62 #include "pci_regs.h"
    6361
    6462#define NAME "pciintel"
     
    7573
    7674/** Obtain PCI bus soft-state from DDF device node */
    77 pci_bus_t *pci_bus(ddf_dev_t *dnode)
     75#if 0
     76static pci_bus_t *pci_bus(ddf_dev_t *dnode)
    7877{
    7978        return ddf_dev_data_get(dnode);
    8079}
     80#endif
    8181
    8282/** Obtain PCI bus soft-state from function soft-state */
     
    448448
    449449        /* TODO add subsys ids, but those exist only in header type 0 */
    450 }
    451 
    452 /** Get first PCI function.
    453  *
    454  * @param bus PCI bus
    455  * @return First PCI function on @a bus or @c NULL if there is none
    456  */
    457 pci_fun_t *pci_fun_first(pci_bus_t *bus)
    458 {
    459         link_t *link;
    460 
    461         link = list_first(&bus->funs);
    462         if (link == NULL)
    463                 return NULL;
    464 
    465         return list_get_instance(link, pci_fun_t, lfuns);
    466 }
    467 
    468 /** Get next PCI function.
    469  *
    470  * @param cur Current function
    471  * @return Next PCI function on the same bus or @c NULL if there is none
    472  */
    473 pci_fun_t *pci_fun_next(pci_fun_t *cur)
    474 {
    475         link_t *link;
    476 
    477         link = list_next(&cur->lfuns, &cur->busptr->funs);
    478         if (link == NULL)
    479                 return NULL;
    480 
    481         return list_get_instance(link, pci_fun_t, lfuns);
    482450}
    483451
     
    723691                                continue;
    724692                        }
    725 
    726                         list_append(&fun->lfuns, &bus->funs);
    727693                }
    728694        }
     
    752718                goto fail;
    753719        }
    754 
    755         list_initialize(&bus->funs);
    756720        fibril_mutex_initialize(&bus->conf_mutex);
    757721
     
    838802        }
    839803
    840         ddf_fun_set_conn_handler(ctl, pci_ctl_connection);
    841 
    842804        /* Enumerate functions. */
    843805        ddf_msg(LVL_DEBUG, "Enumerating the bus");
     
    854816        }
    855817
    856         rc = ddf_fun_add_to_category(ctl, "pci");
    857         if (rc != EOK) {
    858                 ddf_msg(LVL_ERROR, "Failed adding control function to category "
    859                     "'pci'.");
    860                 goto fail;
    861         }
    862 
    863818        hw_res_clean_resource_list(&hw_resources);
    864819
Note: See TracChangeset for help on using the changeset viewer.