2025-02-16 12:20:48 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/*
|
2025-02-16 12:26:52 +01:00
|
|
|
* Copyright (c) 2022-2024 Solidigm.
|
2025-02-16 12:20:48 +01:00
|
|
|
*
|
|
|
|
* Author: leonardo.da.cunha@solidigm.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nvme.h"
|
|
|
|
|
2025-02-16 12:26:52 +01:00
|
|
|
/*
|
|
|
|
* UUID assigned for OCP.
|
|
|
|
*/
|
|
|
|
extern const unsigned char ocp_uuid[NVME_UUID_LEN];
|
|
|
|
|
2025-02-16 12:20:48 +01:00
|
|
|
/**
|
|
|
|
* ocp_get_uuid_index() - Get OCP UUID index
|
|
|
|
* @dev: nvme device
|
2025-02-16 12:25:41 +01:00
|
|
|
* @index: integer pointer to here to save the index
|
2025-02-16 12:20:48 +01:00
|
|
|
*
|
2025-02-16 12:26:52 +01:00
|
|
|
* Return: Zero if nvme device has UUID list identify page, or positive result of get uuid list
|
|
|
|
* or negative POSIX error code otherwise.
|
|
|
|
*/
|
|
|
|
int ocp_get_uuid_index(struct nvme_dev *dev, __u8 *index);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ocp_find_uuid_index() - Find OCP UUID index in UUID list
|
|
|
|
* @uuid_list: uuid_list retrieved from Identify UUID List (CNS 0x17)
|
|
|
|
* @index: integer pointer to here to save the index
|
|
|
|
*
|
|
|
|
* Return: Zero if nvme device has UUID list log page, Negative POSIX error code otherwise.
|
2025-02-16 12:20:48 +01:00
|
|
|
*/
|
2025-02-16 12:26:52 +01:00
|
|
|
int ocp_find_uuid_index(struct nvme_id_uuid_list *uuid_list, __u8 *index);
|