Message ID | 20210726163654.1110969-2-sean.anderson@seco.com |
---|---|
State | New |
Headers | show |
Series | None | expand |
On Mon, 26 Jul 2021 at 18:37, Sean Anderson <sean.anderson@seco.com> wrote: > > Print out the contents of the offending tuples when we do print them. > This can make it easier to debug, since these tuples are not exposed to > userspace anywhere else. We are limited to 64 bytes, so keep printing > out the full length in case the tuple is truncated. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> Applied for next, thanks! Kind regards Uffe > --- > > drivers/mmc/core/sdio_cis.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c > index 7518b27bcef2..a705ba6eff5b 100644 > --- a/drivers/mmc/core/sdio_cis.c > +++ b/drivers/mmc/core/sdio_cis.c > @@ -334,7 +334,7 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) > if (time_after(jiffies, timeout)) > break; > > -#define FMT(type) "%s: queuing " type " CIS tuple 0x%02x (%u bytes)\n" > +#define FMT(type) "%s: queuing " type " CIS tuple 0x%02x [%*ph] (%u bytes)\n" > /* > * Tuples in this range are reserved for > * vendors, so don't warn about them > @@ -342,11 +342,13 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) > if (tpl_code >= 0x80 && tpl_code <= 0x8f) > pr_debug_ratelimited(FMT("vendor"), > mmc_hostname(card->host), > - tpl_code, tpl_link); > + tpl_code, tpl_link, this->data, > + tpl_link); > else > pr_warn_ratelimited(FMT("unknown"), > mmc_hostname(card->host), > - tpl_code, tpl_link); > + tpl_code, tpl_link, this->data, > + tpl_link); > } > > /* keep on analyzing tuples */ > -- > 2.25.1 >
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c index 7518b27bcef2..a705ba6eff5b 100644 --- a/drivers/mmc/core/sdio_cis.c +++ b/drivers/mmc/core/sdio_cis.c @@ -334,7 +334,7 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) if (time_after(jiffies, timeout)) break; -#define FMT(type) "%s: queuing " type " CIS tuple 0x%02x (%u bytes)\n" +#define FMT(type) "%s: queuing " type " CIS tuple 0x%02x [%*ph] (%u bytes)\n" /* * Tuples in this range are reserved for * vendors, so don't warn about them @@ -342,11 +342,13 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) if (tpl_code >= 0x80 && tpl_code <= 0x8f) pr_debug_ratelimited(FMT("vendor"), mmc_hostname(card->host), - tpl_code, tpl_link); + tpl_code, tpl_link, this->data, + tpl_link); else pr_warn_ratelimited(FMT("unknown"), mmc_hostname(card->host), - tpl_code, tpl_link); + tpl_code, tpl_link, this->data, + tpl_link); } /* keep on analyzing tuples */
Print out the contents of the offending tuples when we do print them. This can make it easier to debug, since these tuples are not exposed to userspace anywhere else. We are limited to 64 bytes, so keep printing out the full length in case the tuple is truncated. Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- drivers/mmc/core/sdio_cis.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)