-c <id>::
--controller=<id>::
- Controller ID of the controller associated wit the PCIe port to be
+ Controller ID of the controller associated with the PCIe port to be
measured.
-o <fmt>::
SYNOPSIS
--------
[verse]
-'nvme wdc namespace-resize' <device> [--nsid=<NAMSPACE ID>, -n <NAMSPACE ID>]
+'nvme wdc namespace-resize' <device> [--nsid=<NAMESPACE ID>, -n <NAMSPACE ID>]
[--op_option=<OP OPTION>, -o <OP OPTION>]
DESCRIPTION
OPTIONS
-------
--n <NAMSPACE ID>::
---namespace-id=<NAMSPACE_ID>::
+-n <NAMESPACE ID>::
+--namespace-id=<NAMESPACE_ID>::
Namespace ID; ID of the namespace to resize
-o <OP OPTION>::
`blktests` for the FC transport, the `nvme-cli` udev rules can be triggered. To
prevent interference with a test, `blktests` can create a JSON configuration
file in `/run/nvme` to inform `nvme-cli` that it should not perform any actions
-trigged from the udev context. This behavior can be controlled using the
+triggered from the udev context. This behavior can be controlled using the
`--context` argument.
For example a `blktests` volatile configuration could look like:
'get-log:retrieve any log in raw format'
'predictable-lat-log:retrieve predictable latency per nvmset log'
'pred-lat-event-agg-log:retrieve predictable latency event aggregate log'
- 'persistent-event-log:retrieve presistent event log'
+ 'persistent-event-log:retrieve persistent event log'
'telemetry-log:retrieve telemetry log'
'fw-log:retrieve fw log'
'changed-ns-list-log:retrieve changed namespaces log'
set-dssd-power-state-feature"
)
- # Associative array mapping plugins to coresponding option completions
+ # Associative array mapping plugins to corresponding option completions
typeset -Ar _plugin_funcs=(
[intel]="plugin_intel_opts"
[amzn]="plugin_amzn_opts"
ENTRY("endurance-log", "Retrieve Endurance Group Log, show it", get_endurance_log)
ENTRY("predictable-lat-log", "Retrieve Predictable Latency per Nvmset Log, show it", get_pred_lat_per_nvmset_log)
ENTRY("pred-lat-event-agg-log", "Retrieve Predictable Latency Event Aggregate Log, show it", get_pred_lat_event_agg_log)
- ENTRY("persistent-event-log", "Retrieve Presistent Event Log, show it", get_persistent_event_log)
+ ENTRY("persistent-event-log", "Retrieve Persistent Event Log, show it", get_persistent_event_log)
ENTRY("endurance-event-agg-log", "Retrieve Endurance Group Event Aggregate Log, show it", get_endurance_event_agg_log)
ENTRY("lba-status-log", "Retrieve LBA Status Information Log, show it", get_lba_status_log)
ENTRY("resv-notif-log", "Retrieve Reservation Notification Log, show it", get_resv_notif_log)
json_object_add_value_string(root, "type", "nvme-mi");
break;
default:
- json_object_add_value_string(root, "type", "unknow");
+ json_object_add_value_string(root, "type", "unknown");
break;
}
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Copyright (C) 2020 Micron Techology Inc. All rights reserved.
+ * Copyright (C) 2020 Micron Technology Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
.salg_name = { 0 }
};
- /* copy algorith name */
+ /* copy algorithm name */
if (strlen(algo) > sizeof(provider_sa.salg_name)) {
fprintf(stderr, "%s: algorithm name overflow", __func__);
return hash;
goto out;
}
- /* re-use response buffer */
+ /* reuse response buffer */
memset(rsp, 0, rsp_size);
err = recv_rpmb_rsp(fd, req->target, rsp_size, rsp);
if (err != 0) {
cfg.blocks,
(regs.access_size + 1));
if (err > 0 && msg_buf != NULL) {
- printf("Writting %d bytes to file %s\n",
+ printf("Writing %d bytes to file %s\n",
err * 512, cfg.msgfile);
write_file(msg_buf, err * 512, NULL,
cfg.msgfile, NULL);
int log_level;
/*
- * LOG_NOTICE is unsued thus the user has to provide two 'v' for getting
+ * LOG_NOTICE is unused thus the user has to provide two 'v' for getting
* any feedback at all. Thus skip this level
*/
verbose++;
ms = ns->lbaf[lba_index].ms;
if (NVME_FLBAS_META_EXT(ns->flbas)) {
/*
- * No meta data is transfered for PRACT=1 and MD=8:
+ * No meta data is transferred for PRACT=1 and MD=8:
* 5.2.2.1 Protection Information and Write Commands
- * 5.2.2.2 Protection Informatio and Read Commands
+ * 5.2.2.2 Protection Information and Read Commands
*/
if (!(cfg.prinfo == 0x1 && ms == 8))
logical_block_size += ms;
};
err = nvme_get_features(&args);
if (err) {
- fprintf(stderr, "Quering thresholds failed. ");
+ fprintf(stderr, "Querying thresholds failed. ");
nvme_show_status(err);
goto close_dev;
}
}
/*
- * High latency log page definiton
+ * High latency log page definition
* Total 32 bytes
*/
struct log_page_high_latency {
#define RAISIN_SI_VD_THERMAL_THROTTLE_TIME_ID 0xEB
#define RAISIN_SI_VD_FLASH_MEDIA_ERROR_ID 0xED
-/* Raisin Addtional smart internal ID */
+/* Raisin Additional smart internal ID */
typedef enum
{
/* smart attr following intel */
/**
* change 512 to 4096.
* because micron's getlogpage request,the size of many commands have changed to 4k.
- * request size > user malloc size,casuing parameters that are closed in momery are dirty.
+ * request size > user malloc size,casuing parameters that are closed in memery are dirty.
*/
__u8 resv[SMART_INFO_NEW_SIZE - sizeof(struct nvme_p4_smart_log_item) * NR_SMART_ITEMS];
};
else
sprintf(ptr, "| pass");
- /* replace all null charecters with spaces */
+ /* replace all null characters with spaces */
ptr = formatted_entry;
while (index < entry_size) {
if (ptr[index] == '\0')
goto out;
}
- /* check if we have atleast one entry to print */
+ /* check if we have at least one entry to print */
struct micron_fw_activation_history_table *table =
(struct micron_fw_activation_history_table *)logC2;
/* check for models that support 0xC0 log */
if (eModel != M51CX) {
- printf("Unsupported drive model for vs-smart-add-log commmand\n");
+ printf("Unsupported drive model for vs-smart-add-log command\n");
err = -1;
goto out;
}
/**
* ocp_get_uuid_index() - Get OCP UUID index
* @dev: nvme device
- * @index: integer ponter to here to save the index
+ * @index: integer pointer to here to save the index
* @result: The command completion result from CQE dword0
*
* Return: Zero if nvme device has UUID list log page, or result of get uuid list otherwise.
if (trg_in_4k < provisoned_cap_4k ||
trg_in_4k > ((__u64)provisoned_cap_4k * 4)) {
fprintf(stderr,
- "WARNING: Only support 1.0~4.0 x provisoned capacity!\n");
+ "WARNING: Only support 1.0~4.0 x provisioned capacity!\n");
if (trg_in_4k < provisoned_cap_4k)
fprintf(stderr,
"WARNING: The target capacity is less than 1.0 x provisioned capacity!\n");
*
* @param str, prompt string
*
- * @return 0, cancled; 1 confirmed
+ * @return 0, canceled; 1 confirmed
*/
static int sfx_confirm_change(const char *str)
{
fprintf(stderr, "Confirm Y/y, Others cancel:\n");
confirm = (unsigned char)fgetc(stdin);
if (confirm != 'y' && confirm != 'Y') {
- fprintf(stderr, "Cancled.\n");
+ fprintf(stderr, "Canceled.\n");
return 0;
}
fprintf(stderr, "Sending operation ...\n");
/**
* Here we should identify if the drive is a Panthor or Jaguar.
* Here we need to extract the model no from ctrl-id abd use it
- * to deternine drive family.
+ * to determine drive family.
*/
err = nvme_identify_ctrl(dev_fd(dev), &ctrl);
char buf[80];
if (fwActivHis.numValidFwActHisEnt > 0) {
- printf("\n\nSeagate FW Activation Histry :\n");
+ printf("\n\nSeagate FW Activation History :\n");
printf("%-9s %-21s %-7s %-13s %-9s %-5s %-15s %-9s\n", "Counter ", " Timestamp ", " PCC ", "Previous FW ", "New FW ", "Slot", "Commit Action", "Result");
for (i = 0; i < fwActivHis.numValidFwActHisEnt; i++) {
}
if (strcmp(cfg.output_format, "json"))
- printf("Seagate FW Activation Histry Information :\n");
+ printf("Seagate FW Activation History Information :\n");
err = nvme_get_log_simple(dev_fd(dev), 0xC2, sizeof(fwActivHis), &fwActivHis);
if (!err) {
#include <string.h>
#include "config.h"
-// max 16 bit unsigned integer nummber 65535
+// max 16 bit unsigned integer number 65535
#define MAX_16BIT_NUM_AS_STRING_SIZE 6
#define OBJ_NAME_PREFIX "UID_"
char err_msg[MAX_WARNING_SIZE];
snprintf(err_msg, MAX_WARNING_SIZE,
- "Value crossing 64 bit, byte aligned bounday, not supported. size_bit=%u, offset_bit_from_byte=%u.",
+ "Value crossing 64 bit, byte aligned boundary, not supported. size_bit=%u, offset_bit_from_byte=%u.",
size_bit, offset_bit_from_byte);
*val_obj = json_object_new_string(err_msg);
struct __packed wdc_ocp_C4_dev_cap_log {
__le16 num_pcie_ports; /* 0000 - Number of PCI Express Ports */
__le16 oob_mgmt_support; /* 0002 - OOB Management Interfaces Supported */
- __le16 wrt_zeros_support; /* 0004 - Write Zeros Commmand Support */
+ __le16 wrt_zeros_support; /* 0004 - Write Zeros Command Support */
__le16 sanitize_support; /* 0006 - Sanitize Command Support */
__le16 dsm_support; /* 0008 - Dataset Management Command Support */
__le16 wrt_uncor_support; /* 0010 - Write Uncorrectable Command Support */
WDC_DEV_CAP_LOG_ID))
capabilities |= WDC_DRIVE_CAP_OCP_C4_LOG_PAGE;
- /* verify the 0xC5 (OCP Unsupported Requirments) log page is supported */
+ /* verify the 0xC5 (OCP Unsupported Requirements) log page is supported */
if (wdc_nvme_check_supported_log_page(r, dev,
WDC_UNSUPPORTED_REQS_LOG_ID))
capabilities |= WDC_DRIVE_CAP_OCP_C5_LOG_PAGE;
if (wdc_nvme_check_supported_log_page(r, dev, WDC_DEV_CAP_LOG_ID))
capabilities |= WDC_DRIVE_CAP_OCP_C4_LOG_PAGE;
- /* verify the 0xC5 (OCP Unsupported Requirments) log page is supported */
+ /* verify the 0xC5 (OCP Unsupported Requirements) log page is supported */
if (wdc_nvme_check_supported_log_page(r, dev, WDC_UNSUPPORTED_REQS_LOG_ID))
capabilities |= WDC_DRIVE_CAP_OCP_C5_LOG_PAGE;
remaining_len = 0;
valid_log = false;
- /* The struture is invalid, so any match that was found is invalid. */
+ /* The structure is invalid, so any match that was found is invalid. */
*p_p_found_log_entry = NULL;
} else {
/* Structure must have at least one valid entry to be considered valid */
printf(" Minimum DSSD Power State : 0x%x\n", le16_to_cpu(log_data->min_dssd_ps));
for (j = 0; j < WDC_OCP_C4_NUM_PS_DESCR; j++)
- printf(" DSSD Power State %d Desriptor : 0x%x\n", j, log_data->dssd_ps_descr[j]);
+ printf(" DSSD Power State %d Descriptor : 0x%x\n", j, log_data->dssd_ps_descr[j]);
printf(" Log Page Version : 0x%x\n", le16_to_cpu(log_data->log_page_version));
printf(" Log page GUID : 0x");
NVME_NSID_ALL);
if (ret) {
- fprintf(stderr, "ERROR: WDC: %s : Failed to retreive NAND stats\n", __func__);
+ fprintf(stderr, "ERROR: WDC: %s : Failed to retrieve NAND stats\n", __func__);
goto out;
} else {
fmt = validate_output_format(format);
ret = nvme_get_log_simple(dev_fd(dev), WDC_NVME_NAND_STATS_LOG_ID,
WDC_NVME_NAND_STATS_SIZE, (void *)output);
if (ret) {
- fprintf(stderr, "ERROR: WDC: %s : Failed to retreive NAND stats\n", __func__);
+ fprintf(stderr, "ERROR: WDC: %s : Failed to retrieve NAND stats\n", __func__);
goto out;
} else {
fmt = validate_output_format(format);
rev = (double)(cpu_to_le32(result) & 0x0000ffff);
if (fmt == NORMAL) {
- printf("Drive HW Revison: %4.1f\n", (.1 * rev));
+ printf("Drive HW Revision: %4.1f\n", (.1 * rev));
printf("FTL Unit Size: 0x%x KB\n", size);
printf("Customer SN: %-.*s\n", (int)sizeof(ctrl.sn), &ctrl.sn[0]);
} else if (fmt == JSON) {
root = json_create_object();
sprintf(rev_str, "%4.1f", (.1 * rev));
- json_object_add_value_string(root, "Drive HW Revison", rev_str);
+ json_object_add_value_string(root, "Drive HW Revision", rev_str);
json_object_add_value_int(root, "FTL Unit Size", le16_to_cpu(size));
wdc_StrFormat(formatter, sizeof(formatter), &ctrl.sn[0], sizeof(ctrl.sn));
/**
* Compares the strings ignoring their cases.
*
- * @param pcSrc Points to a null terminated string for comapring.
- * @param pcDst Points to a null terminated string for comapring.
+ * @param pcSrc Points to a null terminated string for comparing.
+ * @param pcDst Points to a null terminated string for comparing.
*
* @returns zero if the string matches or
* 1 if the pcSrc string is lexically higher than pcDst or
/* Table Title */
printf("Additional Smart Log for NVME device:%s namespace-id:%x\n",
dev->name, nsid);
- /* Clumn Name*/
+ /* Column Name*/
printf("key normalized raw\n");
/* 00 SI_VD_PROGRAM_FAIL */
get_ymtc_smart_info(smart, SI_VD_PROGRAM_FAIL, nm, raw);
#define SI_VD_THERMAL_THROTTLE_TIME_ID 0xEB
#define SI_VD_FLASH_MEDIA_ERROR_ID 0xED
-/* Addtional smart internal ID */
+/* Additional smart internal ID */
typedef enum
{
/* smart attr following intel */
const char *desc = "Set Zone Descriptor Extension\n";
const char *zslba = "starting LBA of the zone for this command";
const char *zrwaa = "Allocate Zone Random Write Area to zone";
- const char *data = "optional file for zone extention data (default stdin)";
+ const char *data = "optional file for zone extension data (default stdin)";
const char *timeout = "timeout value, in milliseconds";
int ffd = STDIN_FILENO, err;
if (!data_len || data_len < 0) {
fprintf(stderr,
- "zone format does not provide descriptor extention\n");
+ "zone format does not provide descriptor extension\n");
errno = EINVAL;
err = -1;
goto close_dev;
ENTRY("report-zones", "Report zones associated to a Zoned Namespace", report_zones)
ENTRY("reset-zone", "Reset one or more zones", reset_zone)
ENTRY("close-zone", "Close one or more zones", close_zone)
- ENTRY("finish-zone", "Finishe one or more zones", finish_zone)
+ ENTRY("finish-zone", "Finish one or more zones", finish_zone)
ENTRY("open-zone", "Open one or more zones", open_zone)
ENTRY("offline-zone", "Offline one or more zones", offline_zone)
ENTRY("set-zone-desc", "Attach zone descriptor extension data to a zone", set_zone_desc)
echo "configs with meson:"
echo " [default] default settings"
echo " fallback download all dependencies"
- echo " and build them as shared libaries"
+ echo " and build them as shared libraries"
echo " cross use cross toolchain to build"
echo " coverage build coverage report"
echo " appimage build AppImage target"
if [[ -f subprojects/libnvme.wrap ]]; then
git -C subprojects/libnvme fetch --all
- # extract the vesion string from libnvme by using the ref
+ # extract the version string from libnvme by using the ref
# defined in libnvme.wrap.
libnvme_ref=$(sed -n "s/revision = \([0-9a-z]\+\)/\1/p" subprojects/libnvme.wrap)
libnvme_VERSION=$(git -C subprojects/libnvme describe "${libnvme_ref}")
elif [ -d "doc" ]; then
doc_dir="doc"
else
- echo "documenation directory not found"
+ echo "documentation directory not found"
exit 1
fi
command : [python, linter_script, 'format'],
)
else
- message('autopep8 or isort not found. Python formating disabled')
+ message('autopep8 or isort not found. Python formatting disabled')
endif
Post Section for TestNVMeAttachDetachNSCmd
- Create primary namespace.
- - Atttach it to controller.
+ - Attach it to controller.
- Call super class's destructor.
"""
self.assertEqual(self.create_and_validate_ns(self.default_nsid,
Post Section for TestNVMeAttachDetachNSCmd
- Create primary namespace.
- - Atttach it to controller.
+ - Attach it to controller.
- Call super class's destructor.
"""
self.assertEqual(self.create_and_validate_ns(self.default_nsid,
Post Section for TestNVMeFormatCmd
- Create primary namespace.
- - Atttach it to controller.
+ - Attach it to controller.
- Call super class's destructor.
"""
self.assertEqual(self.create_and_validate_ns(self.default_nsid,
- Attributes:
- feature_id_list : list of the mandatory features.
- get_vector_list_cmd : vector list collection for 09h.
- - vector_list_len : numer of the interrupt vectors.
+ - vector_list_len : number of the interrupt vectors.
"""
def setUp(self):
class TestNVMe(unittest.TestCase):
"""
- Represents a testcase, each testcase shuold inherit this
+ Represents a testcase, each testcase should inherit this
class or appropriate subclass which is a child of this class.
Common utility functions used in various testcases.
shutil.rmtree(self.log_dir, ignore_errors=True)
def validate_pci_device(self):
- """ Validate underlaying device belogs to pci subsystem.
+ """ Validate underlying device belongs to pci subsystem.
- Args:
- None
- Returns:
return ctrl_id
def get_ns_list(self):
- """ Wrapper for extrating the namespace list.
+ """ Wrapper for extracting the namespace list.
- Args:
- None
- Returns:
return ns_list
def get_max_ns(self):
- """ Wrapper for extracting maximum number of namspaces supported.
+ """ Wrapper for extracting maximum number of namespaces supported.
- Args:
- None
- Returns: