Source
x
/*
* FUJITSU Extended Socket Network Device driver
* Copyright (c) 2015-2016 FUJITSU LIMITED
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see <http://www.gnu.org/licenses/>.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
*/
/* tracepoints for fjes_hw.c */
TRACE_EVENT(fjes_hw_issue_request_command,
TP_PROTO(union REG_CR *cr, union REG_CS *cs, int timeout,
enum fjes_dev_command_response_e ret),
TP_ARGS(cr, cs, timeout, ret),
TP_STRUCT__entry(
__field(u16, cr_req)
__field(u8, cr_error)
__field(u16, cr_err_info)
__field(u8, cr_req_start)
__field(u16, cs_req)
__field(u8, cs_busy)
__field(u8, cs_complete)
__field(int, timeout)
__field(int, ret);
),
TP_fast_assign(
__entry->cr_req = cr->bits.req_code;
__entry->cr_error = cr->bits.error;
__entry->cr_err_info = cr->bits.err_info;
__entry->cr_req_start = cr->bits.req_start;
__entry->cs_req = cs->bits.req_code;
__entry->cs_busy = cs->bits.busy;
__entry->cs_complete = cs->bits.complete;
__entry->timeout = timeout;
__entry->ret = ret;
),
TP_printk("CR=[req=%04x, error=%u, err_info=%04x, req_start=%u], CS=[req=%04x, busy=%u, complete=%u], timeout=%d, ret=%d",
__entry->cr_req, __entry->cr_error, __entry->cr_err_info,
__entry->cr_req_start, __entry->cs_req, __entry->cs_busy,
__entry->cs_complete, __entry->timeout, __entry->ret)
);
TRACE_EVENT(fjes_hw_request_info,
TP_PROTO(struct fjes_hw *hw, union fjes_device_command_res *res_buf),
TP_ARGS(hw, res_buf),
TP_STRUCT__entry(
__field(int, length)
__field(int, code)
__dynamic_array(u8, zone, hw->max_epid)
__dynamic_array(u8, status, hw->max_epid)
),
TP_fast_assign(
int x;
__entry->length = res_buf->info.length;
__entry->code = res_buf->info.code;
for (x = 0; x < hw->max_epid; x++) {
*((u8 *)__get_dynamic_array(zone) + x) =
res_buf->info.info[x].zone;
*((u8 *)__get_dynamic_array(status) + x) =
res_buf->info.info[x].es_status;
}
),
TP_printk("res_buf=[length=%d, code=%d, es_zones=%s, es_status=%s]",
__entry->length, __entry->code,
__print_array(__get_dynamic_array(zone),
__get_dynamic_array_len(zone) / sizeof(u8),
sizeof(u8)),
__print_array(__get_dynamic_array(status),
__get_dynamic_array_len(status) / sizeof(u8),