1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2024 Oxide Computer Company 14 */ 15 16 /* 17 * libnvme logic specific to Kioxia devices. This currently supports the Kioxia 18 * CD8 and CD8P. 19 */ 20 21 #include <sys/sysmacros.h> 22 #include <sys/debug.h> 23 #include <sys/nvme/kioxia.h> 24 25 #include "libnvme_impl.h" 26 27 static const nvme_vsd_ident_t kioxia_cd8_idents[] = { 28 { 29 .nvdi_vid = KIOXIA_PCI_VID, 30 .nvdi_did = KIOXIA_CD8_DID, 31 .nvdi_human = "Kioxia CD8" 32 }, { 33 .nvdi_vid = KIOXIA_PCI_VID, 34 .nvdi_did = KIOXIA_CD8P_DID, 35 .nvdi_human = "Kioxia CD8P" 36 } 37 }; 38 39 static const nvme_log_page_info_t kioxia_cd8_log_extsmart = { 40 .nlpi_short = "kioxia/extsmart", 41 .nlpi_human = "Extended SMART", 42 .nlpi_lid = KIOXIA_CD8_LOG_EXTSMART, 43 .nlpi_csi = NVME_CSI_NVM, 44 .nlpi_kind = NVME_LOG_ID_VENDOR_SPECIFIC, 45 .nlpi_source = NVME_LOG_DISC_S_DB, 46 .nlpi_scope = NVME_LOG_SCOPE_CTRL, 47 .nlpi_len = sizeof (kioxia_vul_cd8_smart_t) 48 }; 49 50 static const nvme_log_page_info_t *kioxia_cd8_log_pages[] = { 51 &ocp_log_smart, &ocp_log_errrec, &ocp_log_fwact, &ocp_log_lat, 52 &ocp_log_devcap, &ocp_log_unsup, &kioxia_cd8_log_extsmart 53 }; 54 55 const nvme_vsd_t kioxia_cd8 = { 56 .nvd_ident = kioxia_cd8_idents, 57 .nvd_nident = ARRAY_SIZE(kioxia_cd8_idents), 58 .nvd_logs = kioxia_cd8_log_pages, 59 .nvd_nlogs = ARRAY_SIZE(kioxia_cd8_log_pages) 60 }; 61