Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/bhyve/pci_nvme.c
Show First 20 Lines • Show All 598 Lines • ▼ Show 20 Lines | pci_nvme_init_logpages(struct pci_nvme_softc *sc) | ||||
memset(&sc->err_log, 0, sizeof(sc->err_log)); | memset(&sc->err_log, 0, sizeof(sc->err_log)); | ||||
memset(&sc->health_log, 0, sizeof(sc->health_log)); | memset(&sc->health_log, 0, sizeof(sc->health_log)); | ||||
memset(&sc->fw_log, 0, sizeof(sc->fw_log)); | memset(&sc->fw_log, 0, sizeof(sc->fw_log)); | ||||
/* Set read/write remainder to round up according to spec */ | /* Set read/write remainder to round up according to spec */ | ||||
sc->read_dunits_remainder = 999; | sc->read_dunits_remainder = 999; | ||||
sc->write_dunits_remainder = 999; | sc->write_dunits_remainder = 999; | ||||
/* Set nominal Health values checked by implementations */ | |||||
sc->health_log.temperature = 310; | |||||
sc->health_log.available_spare = 100; | |||||
sc->health_log.available_spare_threshold = 10; | |||||
} | } | ||||
static void | static void | ||||
pci_nvme_init_features(struct pci_nvme_softc *sc) | pci_nvme_init_features(struct pci_nvme_softc *sc) | ||||
{ | { | ||||
sc->feat[0].set = nvme_feature_invalid_cb; | sc->feat[0].set = nvme_feature_invalid_cb; | ||||
sc->feat[0].get = nvme_feature_invalid_cb; | sc->feat[0].get = nvme_feature_invalid_cb; | ||||
▲ Show 20 Lines • Show All 2,198 Lines • Show Last 20 Lines |