NVME - 7.8 Feature Values

The Get Features command, (refer to section 5.13), and Set Features command, (refer to section 5.21), 
may be used to read and modify operating parameters of the controller. The operating parameters are 
grouped and identified by Feature Identifiers. Each Feature Identifier contains one or more attributes that 
may affect the behavior of the Feature. 

1. Get Features  command 和Set Features command被用来读和修改 controller 的操作参数。 这些参数信息分属与各个FID。

If bit 4 is set to ‘1’ in the Optional NVM Command Support (ONCS) field of the Identify Controller data 
structure in Figure 247, then for each Feature, there are three settings: default, saveable, and current. If bit 
4 is cleared to ‘0’ in the Optional NVM Command Support field of the Identify Controller data structure, then 
the controller only supports a current and default value for each Feature. In this case, the current value may 
be persistent across power states based on the information specified in Figure 271 and Figure 272.
 

2. Identify controller structure ONCS bit4 是为1, 则每个feature支持 default, saveable,current三个设置,

如果Identify controller structure ONCS bit4是0,则每个feature支持default和current两种设置。

The default value for each Feature is vendor specific and set by the manufacturer unless otherwise 
specified. The default value is not changeable. The saveable value is the value that the Feature has after 
a power on or reset event. The controller may not support a saveable value for a Feature; this is discovered 
by using the ‘supported capabilities’ value in the Select field in Get Features. If the controller does not 
support a saveable value for a Feature, then the default value is used after a power on or reset event. The 
current value for a Feature is the value in active use by the controller for that Feature.

3.各个feature 的default值是不可以修改的,vendor在manufacture的时候设置,如果不支持saveable设置,则在power和reset之后,用的是default的值。

A Set Features command may be used to modify the saveable value, if supported, and the current value 
for a Feature. A Get Features command may be used to read the default value, the saveable value, if 
supported, and the current value for a Feature. If the controller does not support a saveable value for a 
Feature, then the default value is returned for the saveable value in a Get Features command

4. Set feature命令可以修改saveable的值(如果支持savelabe),这个时候就会变为这个feature的current的值。

5. Get feature命令可以读 defatule 值, save able的值,和current的值。如果controller 不支持saveable值, Get feature 命令中是save able的时候的,会返回defatule值。

Set feature适用于 controller或者namespace

For feature values that apply to the controller:

a) if the NSID field is cleared to 0h or set to FFFFFFFFh, then:
• the Set Features command shall set the specified feature value for the controller; and
• the Get Features command shall return the current setting of the requested feature value for the controller;
b) if the NSID field is set to a valid namespace identifier (refer to section 6.1), then:
• the Set Features command shall fail with a status code of Feature Not Namespace Specific; 
• the Get Features command shall return the current setting of the requested feature value for the controller;

1. 如果 NSID filed 为0x0h或者为0x FFFFFFFFh, set features命令会将设置的参数适用于整个controller, get feature命令会返回controller对应select(defatule/saveable/current)的当前的设置的值.

2. 如果NSID filed 是一个无效 值, set feature命令会回一个Feature Not Namespace Specific的status code. 如果发的是get feature命令,返回controller对应select(defatule/saveable/current)的当前的设置的值.

 

For feature values that apply to a namespace:
a) if the NSID field is set to an active namespace identifier (refer to section 6.1), then:
• the Set Features command shall set the specified feature value of the specified namespace; 
and
• the Get Features command shall return the current setting of the requested feature value for 
the specified namespace;
b) if the NSID field is set to FFFFFFFFh, then:
• the Set Features command shall, unless otherwise specified, set the specified feature value 
for all namespaces attached to the controller processing the command; and
• the Get Features command shall, unless otherwise specified in section 5.21.1, fail with a status 
code of Invalid Namespace or Format;
and
c) if the NSID field is set to any other value, then the Set Features command and the Get Features 
command shall fail as described in the rules for namespace identifier usage in Figure 105

1. 如果NSID filed 是一个有效值,set feature 命令会将设置的参数值对这个指定的namespace生效,get feature命令会返回指定的namespace对应select(defatule/saveable/current)的当前的设置的值.

2. 如果 NSID filed 为0x FFFFFFFFh,set feature命令设置的参数对当前attach到当前controller的所有的namespace生效。 get feature 命令则会返回Invalid Namespace or Format 的 错误类型

3. 如果NSID field设置的是其他的值,get/set feature命令都会失败。

If the controller supports the Save field in the Set Features command and the Select field in the Get Features 
command, then any Feature Identifier that is namespace specific may be saved on a per namespace basis.
There are mandatory and optional Feature Identifiers defined in Figure 271 and Figure 272. If a Get 
Features command or Set Features command is processed that specifies a Feature Identifier that is not 
supported, then the controller shall abort the command with a status of Invalid Field in Command。

1. 如果controller支持saveable,  所有的FID的set feature命令会基于namespace保留值.

2.如果FID 不支持,发送的get/set feature命令会回Invalid Field in Command status code.

 

 

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值