Skip to content

SDCard: housekeeping, add tracing (part 4)

Philippe Mathieu-Daudé qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest11 patches 10 repliesIn review
  2. v312 patches 9 repliesSuperseded
  3. v225 patches 4 repliesSuperseded

Changes in v4 from the cover letter

- use assert() in sd_state_name() and sd_response_name() (Alistair review)
- added sdmmc-internal.h & sdmmc-common.c to reuse helpers with hw/sd/core.c

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11sdcard: reorder SDState struct membershw/sd/sd.c+9 -70 replies
2/11sdcard: replace DPRINTF() by trace eventshw/sd/sd.c hw/sd/trace-events+32 -61 reply
3/11sdcard: add a trace event for command responseshw/sd/sd.c hw/sd/trace-events+25 -31 reply
4/11sdcard: replace fprintf() by qemu_hexdump()hw/sd/sd.c+1 -150 replies
5/11sdcard: add more trace eventshw/sd/sd.c hw/sd/trace-events+39 -60 replies
6/11sdcard: do not trace CMD55 when expecting ACMDhw/sd/sd.c+5 -32 replies
7/11sdcard: define SDMMC_CMD_MAX instead of using the magic '64'hw/sd/sd.c hw/sd/sdmmc-internal.h+31 -60 replies
8/11sdcard: display command name when tracing CMD/ACMDhw/sd/Makefile.objs hw/sd/sd.c hw/sd/sdmmc-common.c +2 more+88 -102 replies
9/11sdcard: display protocol used when tracinghw/sd/sd.c hw/sd/trace-events+14 -82 replies
10/11sdcard: use G_BYTE from cutilshw/sd/sd.c+2 -10 replies
11/11sdcard: use the registerfields API to access the OCR registerhw/sd/sd.c include/hw/sd/sd.h+13 -90 replies

Reviews trailers per patch

10 of 11 patches have a Reviewed-by or Acked-by.

PatchAlistair FrancisPeter Maydell
1/11R-b
2/11R-b
3/11R-b
4/11R-b
5/11A-b
6/11A-b
7/11R-b
8/11
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 00/11] SDCard: housekeeping, add tracing (part 4)

Since v3:
- use assert() in sd_state_name() and sd_response_name() (Alistair review)
- added sdmmc-internal.h & sdmmc-common.c to reuse helpers with hw/sd/core.c

Since v2:
- split again in 2... this part is cleanup/tracing
- add more tracepoints
- move some code reusable by sdbus in sdmmc-internal.h

Since v1:
- rewrote mostly all patches to keep it simpler.

$ git backport-diff
001/11:[----] [--] 'sdcard: reorder SDState struct members'
002/11:[0003] [FC] 'sdcard: replace DPRINTF() by trace events'
003/11:[0001] [FC] 'sdcard: add a trace event for command responses'
004/11:[0007] [FC] 'sdcard: replace fprintf() by qemu_hexdump()'
005/11:[----] [--] 'sdcard: add more trace events'
006/11:[----] [--] 'sdcard: do not trace CMD55 when expecting ACMD'
007/11:[0014] [FC] 'sdcard: define SDMMC_CMD_MAX instead of using the magic '64''
008/11:[0020] [FC] 'sdcard: display command name when tracing CMD/ACMD'
009/11:[----] [--] 'sdcard: display protocol used when tracing'
010/11:[----] [-C] 'sdcard: use G_BYTE from cutils'
011/11:[----] [-C] 'sdcard: use the registerfields API to access the OCR register'

Philippe Mathieu-Daudé (11):
sdcard: reorder SDState struct members
sdcard: replace DPRINTF() by trace events
sdcard: add a trace event for command responses
sdcard: replace fprintf() by qemu_hexdump()
sdcard: add more trace events
sdcard: do not trace CMD55 when expecting ACMD
sdcard: define SDMMC_CMD_MAX instead of using the magic '64'
sdcard: display command name when tracing CMD/ACMD
sdcard: display protocol used when tracing
sdcard: use G_BYTE from cutils
sdcard: use the registerfields API to access the OCR register

 hw/sd/sdmmc-internal.h |  18 +++++
 include/hw/sd/sd.h     |   1 -
 hw/sd/sd.c             | 184 ++++++++++++++++++++++++++++++++++---------------
 hw/sd/sdmmc-common.c   |  72 +++++++++++++++++++
 hw/sd/Makefile.objs    |   2 +-
 hw/sd/trace-events     |  20 ++++++
 6 files changed, 241 insertions(+), 56 deletions(-)
 create mode 100644 hw/sd/sdmmc-internal.h
 create mode 100644 hw/sd/sdmmc-common.c
Signature · 1 line
2.16.1