diff options
author | Hannes Reinecke <hare@suse.de> | 2016-04-25 12:45:49 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-05-09 12:36:45 -0400 |
commit | a57038496422d7d21b7e41ed70d63bf0c6ff6068 (patch) | |
tree | 3766fb4bf92f20c2131bc81f8249b27ad5152af2 /drivers/ata | |
parent | fe5af0cc3029d52e31d282f5d53787d308e9695a (diff) | |
download | linux-a57038496422d7d21b7e41ed70d63bf0c6ff6068.tar.gz linux-a57038496422d7d21b7e41ed70d63bf0c6ff6068.tar.bz2 linux-a57038496422d7d21b7e41ed70d63bf0c6ff6068.zip |
libata-trace: decode subcommands
Some commands like FPDMA RECEIVE or NCQ NON DATA can encapsulate
other commands to NCQ transport. So decode the subcmds, too.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-trace.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/ata/libata-trace.c b/drivers/ata/libata-trace.c index fd30b8c10cf5..99ec1e8cb95d 100644 --- a/drivers/ata/libata-trace.c +++ b/drivers/ata/libata-trace.c @@ -149,3 +149,46 @@ libata_trace_parse_qc_flags(struct trace_seq *p, unsigned int qc_flags) return ret; } + +const char * +libata_trace_parse_subcmd(struct trace_seq *p, unsigned char cmd, + unsigned char feature, unsigned char hob_nsect) +{ + const char *ret = trace_seq_buffer_ptr(p); + + switch (cmd) { + case ATA_CMD_FPDMA_RECV: + switch (hob_nsect & 0x5f) { + case ATA_SUBCMD_FPDMA_RECV_RD_LOG_DMA_EXT: + trace_seq_printf(p, " READ_LOG_DMA_EXT"); + break; + } + break; + case ATA_CMD_FPDMA_SEND: + switch (hob_nsect & 0x5f) { + case ATA_SUBCMD_FPDMA_SEND_WR_LOG_DMA_EXT: + trace_seq_printf(p, " WRITE_LOG_DMA_EXT"); + break; + case ATA_SUBCMD_FPDMA_SEND_DSM: + trace_seq_printf(p, " DATASET_MANAGEMENT"); + break; + } + break; + case ATA_CMD_NCQ_NON_DATA: + switch (feature) { + case ATA_SUBCMD_NCQ_NON_DATA_ABORT_QUEUE: + trace_seq_printf(p, " ABORT_QUEUE"); + break; + case ATA_SUBCMD_NCQ_NON_DATA_SET_FEATURES: + trace_seq_printf(p, " SET_FEATURES"); + break; + case ATA_SUBCMD_NCQ_NON_DATA_ZERO_EXT: + trace_seq_printf(p, " ZERO_EXT"); + break; + } + break; + } + trace_seq_putc(p, 0); + + return ret; +} |