diff options
author | Hannes Reinecke <hare@suse.de> | 2021-12-21 08:20:34 +0100 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-01-05 11:33:01 +0100 |
commit | c318458c9359ce3d10943b0c15a9b9f43dda7b2e (patch) | |
tree | 959313cf400df63d5e46fcf56973c83a78325a5b /include/trace/events/libata.h | |
parent | ata: libata-scsi: drop DPRINTK calls for cdb translation (diff) | |
download | linux-c318458c9359ce3d10943b0c15a9b9f43dda7b2e.tar.xz linux-c318458c9359ce3d10943b0c15a9b9f43dda7b2e.zip |
ata: libata: add tracepoints for ATA error handling
Add tracepoints for ATA error handling.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'include/trace/events/libata.h')
-rw-r--r-- | include/trace/events/libata.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/trace/events/libata.h b/include/trace/events/libata.h index fcb8fde39614..d4e631aa976f 100644 --- a/include/trace/events/libata.h +++ b/include/trace/events/libata.h @@ -490,6 +490,37 @@ TRACE_EVENT(ata_eh_link_autopsy_qc, __parse_eh_err_mask(__entry->eh_err_mask)) ); +DECLARE_EVENT_CLASS(ata_eh_action_template, + + TP_PROTO(struct ata_link *link, unsigned int devno, unsigned int eh_action), + + TP_ARGS(link, devno, eh_action), + + TP_STRUCT__entry( + __field( unsigned int, ata_port ) + __field( unsigned int, ata_dev ) + __field( unsigned int, eh_action ) + ), + + TP_fast_assign( + __entry->ata_port = link->ap->print_id; + __entry->ata_dev = link->pmp + devno; + __entry->eh_action = eh_action; + ), + + TP_printk("ata_port=%u ata_dev=%u eh_action=%s", + __entry->ata_port, __entry->ata_dev, + __parse_eh_action(__entry->eh_action)) +); + +DEFINE_EVENT(ata_eh_action_template, ata_eh_about_to_do, + TP_PROTO(struct ata_link *link, unsigned int devno, unsigned int eh_action), + TP_ARGS(link, devno, eh_action)); + +DEFINE_EVENT(ata_eh_action_template, ata_eh_done, + TP_PROTO(struct ata_link *link, unsigned int devno, unsigned int eh_action), + TP_ARGS(link, devno, eh_action)); + DECLARE_EVENT_CLASS(ata_link_reset_begin_template, TP_PROTO(struct ata_link *link, unsigned int *class, unsigned long deadline), @@ -570,6 +601,35 @@ DEFINE_EVENT(ata_link_reset_end_template, ata_slave_postreset, TP_PROTO(struct ata_link *link, unsigned int *class, int rc), TP_ARGS(link, class, rc)); +DECLARE_EVENT_CLASS(ata_port_eh_begin_template, + + TP_PROTO(struct ata_port *ap), + + TP_ARGS(ap), + + TP_STRUCT__entry( + __field( unsigned int, ata_port ) + ), + + TP_fast_assign( + __entry->ata_port = ap->print_id; + ), + + TP_printk("ata_port=%u", __entry->ata_port) +); + +DEFINE_EVENT(ata_port_eh_begin_template, ata_std_sched_eh, + TP_PROTO(struct ata_port *ap), + TP_ARGS(ap)); + +DEFINE_EVENT(ata_port_eh_begin_template, ata_port_freeze, + TP_PROTO(struct ata_port *ap), + TP_ARGS(ap)); + +DEFINE_EVENT(ata_port_eh_begin_template, ata_port_thaw, + TP_PROTO(struct ata_port *ap), + TP_ARGS(ap)); + DECLARE_EVENT_CLASS(ata_sff_hsm_template, TP_PROTO(struct ata_queued_cmd *qc, unsigned char status), |