5.2 Asynchronous Event Request command
5.2 Asynchronous Event Request command
Asynchronous events are used to notify host software of status, error, and health information as these events occur. To enable asynchronous events to be reported by the controller, host software needs to submit one or more Asynchronous Event Request commands to the controller. The controller specifies an event to the host by completing an Asynchronous Event Request command. Host software should expect that the controller may not execute the command immediately; the command should be completed when there is an event to be reported.
The Asynchronous Event Request command is submitted by host software to enable the reporting of asynchronous events from the controller. This command has no timeout. The controller posts a completion queue entry for this command when there is an asynchronous event to report to the host. If Asynchronous Event Request commands are outstanding when the controller is reset, the commands are aborted.
All command specific fields are reserved.
Host software may submit multiple Asynchronous Event Request commands to reduce event reporting latency. The total number of simultaneously outstanding Asynchronous Event Request commands is limited by the Asynchronous Event Request Limit specified in the Identify Controller data structure in Figure 109.
Asynchronous events are grouped into event types. The event type information is indicated in Dword 0 of the completion queue entry for the Asynchronous Event Request command. When the controller posts a completion queue entry for an outstanding Asynchronous Event Request command and thus reports an asynchronous event, subsequent events of that event type are automatically masked by the controller until the host clears that event. An event is cleared by reading the log page associated with that event using the Get Log Page command (see section 5.14).
The following event types are defined:
Error event: Indicates a general error that is not associated with a specific command. To clear this event, host software reads the Error Information log (refer to section 5.14.1.1) using the Get Log Page command with the Retain Asynchronous Event field cleared to ‘0’.
SMART / Health Status event: Indicates a SMART or health status event. To clear this event, host software reads the SMART / Health Information log (refer to section 5.14.1.2) using Get Log Page with the Retain Asynchronous Event field cleared to ‘0’. The SMART / Health conditions that trigger asynchronous events may be configured in the Asynchronous Event Configuration feature using the Set Features command (see section 5.21).
I/O Command Set events: Events that are defined by an I/O command set.
NVM Command Set Events:
Reservation Log Page Available event: Indicates that one or more Reservation Notification log pages (refer to section 5.14.1.9.1) are available. To clear this event, host software reads the Reservation Notification log page using the Get Log Page command with the Retain Asynchronous Event field cleared to ‘0’.
Sanitize Operation Completed event: Indicates that a sanitize operation has completed and status is available in the Sanitize Status log page (refer to section 5.14.1.9.2). To clear this event, host software reads the Sanitize Status log page using the Get Log Page command with the Retain Asynchronous Event field cleared to ‘0’.
Vendor Specific event: Indicates a vendor specific event. To clear this event, host software reads the indicated vendor specific log page using Get Log Page command with the Retain Asynchronous Event field cleared to ‘0’.
Asynchronous events are reported due to a new entry being added to a log page (e.g., Error Information log) or a status update (e.g., status in the SMART / Health log). A status change may be permanent (e.g., the media has become read only) or transient (e.g., the temperature exceeded a threshold for a period of time). Host software should modify the event threshold or mask the event for transient and permanent status changes before issuing another Asynchronous Event Request command to avoid repeated reporting of asynchronous events.
If the controller needs to report an event and there are no outstanding Asynchronous Event Request commands, the controller should send a single notification of that Asynchronous Event Type when an Asynchronous Event Request command is received. If a Get Log Page command clears the event prior to receiving the Asynchronous Event Request command or if a power off condition occurs, then a notification is not sent.
5.2异步事件请求命令
异步事件用于在发生这些事件时向主机软件通知状态,错误和运行状况信息。为了使控制器能够报告异步事件,主机软件需要向控制器提交一个或多个异步事件请求命令。控制器通过完成“异步事件请求”命令为主机指定事件。主机软件应该期望控制器可能不会立即执行命令;当有事件要报告时,该命令应完成。
异步事件请求命令由主机软件提交,以启用来自控制器的异步事件的报告。此命令没有超时。当有异步事件要报告给主机时,控制器将为此命令发布完成队列条目。如果在重置控制器时未完成“异步事件请求”命令,则这些命令将中止。
保留所有命令特定字段。
主机软件可以提交多个异步事件请求命令,以减少事件报告延迟。同时未完成的异步事件请求命令的总数受在图109的“标识控制器”数据结构中指定的异步事件请求限制的限制。
异步事件分为事件类型。事件类型信息在异步事件请求命令的完成队列条目的Dword 0中指示。当控制器为未完成的异步事件请求命令发布完成队列条目并因此报告异步事件时,控制器会自动屏蔽该事件类型的后续事件,直到主机清除该事件为止。通过使用“获取日志页面”命令读取与该事件关联的日志页面来清除事件(请参阅第5.14节)。
定义了以下事件类型:
错误事件:指示与特定命令不相关的常规错误。为了清除此事件,主机软件使用“获取日志页面”命令将“保留异步事件”字段清除为“ 0”来读取错误信息日志(请参阅5.14.1.1)。
SMART /运行状况状态事件:指示SMART或运行状况状态事件。为了清除此事件,主机软件使用“获取日志页面”并将“保留异步事件”字段清除为“ 0”来读取SMART /运行状况信息日志(请参阅5.14.1.2)。可以使用“设置功能”命令在“异步事件配置”功能中配置触发异步事件的SMART /运行状况(请参阅5.21节)。
I / O命令集事件:由I / O命令集定义的事件。
NVM命令集事件:
预留日志页面可用事件:指示一个或多个预留通知日志页面(请参阅第5.14.1.9.1节)可用。要清除此事件,主机软件会使用“获取日志页面”命令读取“保留通知”页面,并将“保留异步事件”字段清除为“ 0”。
清理操作已完成事件:表明清理操作已完成,并且在“清理状态”日志页面中有可用状态(请参阅第5.14.1.9.2节)。为了清除此事件,主机软件使用“获取日志页面”命令将“保留异步事件”字段清除为“ 0”来读取“清除状态”日志页面。
供应商特定事件:指示供应商特定事件。为了清除此事件,主机软件使用“获取日志页面”命令将“保留异步事件”字段清除为“ 0”来读取指示的特定于供应商的日志页面。
由于将新条目添加到日志页面(例如,错误信息日志)或状态更新(例如,SMART /运行状况日志中的状态),因此报告了异步事件。状态更改可能是永久性的(例如,介质已变为只读状态),也可能是瞬态的(例如,温度在一段时间内超过阈值)。主机软件应在发出另一个“异步事件请求”命令之前修改事件阈值或为瞬态和永久状态更改屏蔽事件,以避免重复报告异步事件。
如果控制器需要报告事件,并且没有未完成的异步事件请求命令,则当接收到异步事件请求命令时,控制器应发送该异步事件类型的单个通知。如果“获取日志页面”命令在接收到“异步事件请求”命令之前清除了事件,或者发生了断电情况,则不会发送通知。
5.2.1 Command Completion
A completion queue entry is posted to the Admin Completion Queue if there is an asynchronous event to report to the host. Command specific status values associated with Asynchronous Event Request are defined in Figure 45.
5.2.1命令完成
如果有异步事件要报告给主机,则完成队列条目将发布到“管理完成队列”中。 与异步事件请求相关的命令特定状态值在图45中定义。
Dword 0 of the completion queue entry contains information about the asynchronous event. The definition of Dword 0 of the completion queue entry is in Figure 46.
完成队列条目的Dword 0包含有关异步事件的信息。 完成队列条目的Dword 0的定义在图46中。
The information in either Figure 47, Figure 48, or Figure 50 is returned in the Asynchronous Event Information field, depending on the Asynchronous Event Type.
根据异步事件类型,在“异步事件信息”字段中返回图47,图48或图50中的信息。