Commit 9e574a27 authored by Alessandro Rubini's avatar Alessandro Rubini

control structure: define the alarms

"more_ctrl" is obsoleted by the TLV approach, and I simply forgot to
make this change we agreed about. We have two fields for alarm to
avoid endian issues when checking for errors system-wide (i.e., in all
ZIO devices, including remote ones). The version remains 1.0 as nobody
used the fields in their previous meaning.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 476b29e8
......@@ -78,6 +78,12 @@ struct zio_tlv {
uint8_t payload[8];
};
/*
* We have at most 8 zio alarms and at most 8 driver alarm. The former
* group is defined here, the latter group is driver-specific.
*/
#define ZIO_ALARM_LOST_BLOCK (1 << 0) /* It happened */
/*
* The following data item is the control structure that is being exchanged
* on the control device associated to each data device. The size of each
......@@ -89,8 +95,8 @@ struct zio_control {
/* byte 0 */
uint8_t major_version;
uint8_t minor_version;
uint8_t more_ctrl; /* number of further ctrl, for interleaved */
uint8_t alarms; /* set by channel, persistent, write 1 to clr */
uint8_t zio_alarms; /* alarms are persistent, until somebody */
uint8_t drv_alarms; /* clears them writing to a sysfs attribute */
/* byte 4*/
uint32_t seq_num; /* block sequence number */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment