Re: [PATCH 30/46] libata-core: add postreset tracepoints

Bartlomiej Zolnierkiewicz
2020-02-10T15:47:32Z

On 2/4/20 5:55 PM, Hannes Reinecke wrote:
> From: Hannes Reinecke <hare@suse.com>
>
> Add additional tracepoints for postreset and remove
> the DPRINTK() call.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>

How's about merging this with "[PATCH 14/46] libata: add reset
tracepoints"?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
> drivers/ata/libata-eh.c | 5 ++++-
> drivers/ata/libata-sff.c | 4 +---
> include/trace/events/libata.h | 8 ++++++++
> 3 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 253dcf903c1b..ef3576eb5874 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -2900,8 +2900,11 @@ int ata_eh_reset(struct ata_link *link, int classify,
> */
> if (postreset) {
> postreset(link, classes);
> - if (slave)
> + trace_ata_link_postreset(link, classes, rc);
> + if (slave) {
> postreset(slave, classes);
> + trace_ata_slave_postreset(slave, classes, rc);
> + }
> }
>
> /*
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 228f801ef611..ffe633f13f55 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -2052,10 +2052,8 @@ void ata_sff_postreset(struct ata_link *link, unsigned int *classes)
> ap->ops->sff_dev_select(ap, 0);
>
> /* bail out if no device is present */
> - if (classes[0] == ATA_DEV_NONE && classes[1] == ATA_DEV_NONE) {
> - DPRINTK("EXIT, no device\n");
> + if (classes[0] == ATA_DEV_NONE && classes[1] == ATA_DEV_NONE)
> return;
> - }
>
> /* set up device control */
> if (ap->ops->sff_set_devctl || ap->ioaddr.ctl_addr) {
> diff --git a/include/trace/events/libata.h b/include/trace/events/libata.h
> index 446f56cb3f01..40027d8424f8 100644
> --- a/include/trace/events/libata.h
> +++ b/include/trace/events/libata.h
> @@ -526,6 +526,14 @@ DEFINE_EVENT(ata_link_reset_end_template, ata_link_softreset_end,
> TP_PROTO(struct ata_link *link, unsigned int *class, int rc),
> TP_ARGS(link, class, rc));
>
> +DEFINE_EVENT(ata_link_reset_end_template, ata_link_postreset,
> + TP_PROTO(struct ata_link *link, unsigned int *class, int rc),
> + TP_ARGS(link, class, rc));
> +
> +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_sff_hsm_template,
>
> TP_PROTO(struct ata_queued_cmd *qc, unsigned char status),
>