Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/pci_ahci.c
Show First 20 Lines • Show All 2,434 Lines • ▼ Show 20 Lines | #endif | ||||
pi->pi_arg = sc; | pi->pi_arg = sc; | ||||
sc->asc_pi = pi; | sc->asc_pi = pi; | ||||
pthread_mutex_init(&sc->mtx, NULL); | pthread_mutex_init(&sc->mtx, NULL); | ||||
sc->ports = 0; | sc->ports = 0; | ||||
sc->pi = 0; | sc->pi = 0; | ||||
slots = 32; | slots = 32; | ||||
ports_nvl = find_relative_config_node(nvl, "port"); | ports_nvl = find_relative_config_node(nvl, "port"); | ||||
for (p = 0; p < MAX_PORTS; p++) { | for (p = 0; ports_nvl != NULL && p < MAX_PORTS; p++) { | ||||
struct ata_params *ata_ident = &sc->port[p].ata_ident; | struct ata_params *ata_ident = &sc->port[p].ata_ident; | ||||
char ident[AHCI_PORT_IDENT]; | char ident[AHCI_PORT_IDENT]; | ||||
snprintf(node_name, sizeof(node_name), "%d", p); | snprintf(node_name, sizeof(node_name), "%d", p); | ||||
port_nvl = find_relative_config_node(ports_nvl, node_name); | port_nvl = find_relative_config_node(ports_nvl, node_name); | ||||
if (port_nvl == NULL) | if (port_nvl == NULL) | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 418 Lines • Show Last 20 Lines |