xref: /illumos-gate/usr/src/lib/libnvme/common/libnvme_phison.c (revision 915b01506f3f3c1e5c947b41a979e15bb1acc449)
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 2025 Oxide Computer Company
14  */
15 
16 /*
17  * libnvme logic specific to Phison devices. This currently supports the Phison
18  * X200.
19  */
20 
21 #include <sys/sysmacros.h>
22 #include <sys/nvme/phison.h>
23 
24 #include "libnvme_impl.h"
25 
26 static const nvme_vsd_ident_t phison_x200_idents[] = {
27 	{
28 		.nvdi_vid = PHISON_PCI_VID,
29 		.nvdi_did = PHISON_X200_DID,
30 		.nvdi_human = "Phison X200"
31 	}
32 };
33 
34 static const nvme_log_page_info_t *phison_x200_log_pages[] = {
35 	&ocp_log_smart, &ocp_log_errrec, &ocp_log_fwact, &ocp_log_lat,
36 	&ocp_log_devcap, &ocp_log_unsup
37 };
38 
39 const nvme_vsd_t phison_x200 = {
40 	.nvd_ident = phison_x200_idents,
41 	.nvd_nident = ARRAY_SIZE(phison_x200_idents),
42 	.nvd_logs = phison_x200_log_pages,
43 	.nvd_nlogs = ARRAY_SIZE(phison_x200_log_pages)
44 };
45