fm10k/base: add PF Tx timestamp mode handler

We need a handler function to be able to listen for Tx timestamp mode
responses. Without this, core driver code for PTP can't determine if the
Timestamp mode request was successful. This was overlooked in the
previous commit.

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
This commit is contained in:
Wang Xiao W 2015-09-10 12:38:10 +08:00 committed by Thomas Monjalon
parent 6f21dcc645
commit 14d2d7d475
2 changed files with 17 additions and 0 deletions

View File

@ -1810,6 +1810,12 @@ const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[] = {
FM10K_TLV_ATTR_LAST
};
const struct fm10k_tlv_attr fm10k_tx_timestamp_mode_attr[] = {
FM10K_TLV_ATTR_LE_STRUCT(FM10K_PF_ATTR_ID_TIMESTAMP_MODE_RESP,
sizeof(struct fm10k_swapi_tx_timestamp_mode)),
FM10K_TLV_ATTR_LAST
};
/* currently there is no shared 1588 timestamp handler */
/**

View File

@ -118,6 +118,12 @@ struct fm10k_swapi_1588_timestamp {
__le16 sglort;
};
struct fm10k_swapi_tx_timestamp_mode {
__le16 glort;
__le16 maxmode;
__le32 status;
};
#define FM10K_PF_MSG_LPORT_CREATE_HANDLER(func) \
FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_LPORT_CREATE, NULL, func)
#define FM10K_PF_MSG_LPORT_DELETE_HANDLER(func) \
@ -139,6 +145,11 @@ extern const struct fm10k_tlv_attr fm10k_err_msg_attr[];
#define FM10K_PF_MSG_ERR_HANDLER(msg, func) \
FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_##msg, fm10k_err_msg_attr, func)
extern const struct fm10k_tlv_attr fm10k_tx_timestamp_mode_attr[];
#define FM10K_PF_MSG_TIMESTAMP_MODE_HANDLER(func) \
FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_TX_TIMESTAMP_MODE, \
fm10k_tx_timestamp_mode_attr, func)
extern const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[];
#define FM10K_PF_MSG_1588_TIMESTAMP_HANDLER(func) \
FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_1588_TIMESTAMP, \