All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/14] sdcard: Proper implementation of CRC7
@ 2018-05-09  3:46 Philippe Mathieu-Daudé
  2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 01/14] sdcard: Use the ldst API Philippe Mathieu-Daudé
                   ` (14 more replies)
  0 siblings, 15 replies; 27+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-09  3:46 UTC (permalink / raw)
  To: Peter Maydell, Edgar E . Iglesias
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, Paolo Bonzini, Stefan Hajnoczi, Alistair Francis

Hi,

This series emerged after last Coverity scan and Peter suggestion in:
http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg05046.html

    (3) "proper" implementation of CRC, so that an sd controller
    can either (a) mark the SDRequest as "no CRC" and have
    sd_req_crc_validate() always pass, or (b) mark the SDRequest
    as having a CRC and have sd_req_crc_validate() actually
    do the check which it currently stubs out with "return 0"

- Coverity issues fixed
- new functions documented
- qtests added

This series would be much smaller without qtests (less refactor and code
movement), but I feel more confident having them passing :)

v2:
- simplified (do not touch CRC16: less code added)
- added R-b

v1: http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg01130.html

Regards,

Phil.

Philippe Mathieu-Daudé (14):
  sdcard: Use the ldst API
  sdcard: Constify sd_crc*()'s message argument
  sdcard: Fix sd_crc*() style
  sdcard: Extract sd_frame48/136_calc_checksum()
  sdcard: Move sd_crc7() and calc_checksum() out for qtesting
  sdcard: Add test_sd_verify_cksum_frame136()
  sdcard: Invert the sd_req_crc_is_valid() logic
  sdcard: Extract sd_frame48_verify_checksum() out for qtesting
  sdcard: Add sd_frame136_verify_checksum()
  sdcard: Remove the SDRequest argument from internal functions
  sdcard: Add sd_frame48_init(), replace SDRequest by a raw buffer
  sdcard: Add tests to validate the 7-bit CRC checksum of 48-bit SD frame
  sdcard: Add a "validate-crc" property
  hw/sd/ssi-sd: Enable CRC validation

 include/hw/sd/sd.h        |  64 +++++++++++++---
 hw/sd/bcm2835_sdhost.c    |  21 +++---
 hw/sd/core.c              |   7 +-
 hw/sd/milkymist-memcard.c |  14 +---
 hw/sd/omap_mmc.c          |  14 ++--
 hw/sd/pl181.c             |  21 +++---
 hw/sd/pxa2xx_mmci.c       |   8 +-
 hw/sd/sd.c                | 153 ++++++++++++++++++--------------------
 hw/sd/sdhci.c             |  35 ++++-----
 hw/sd/sdmmc-internal.c    |  59 +++++++++++++++
 hw/sd/ssi-sd.c            |  19 ++---
 tests/sdcard-test.c       | 121 ++++++++++++++++++++++++++++++
 tests/Makefile.include    |   4 +
 13 files changed, 369 insertions(+), 171 deletions(-)
 create mode 100644 tests/sdcard-test.c

-- 
2.17.0

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2018-06-28 17:13 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09  3:46 [Qemu-devel] [PATCH v2 00/14] sdcard: Proper implementation of CRC7 Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 01/14] sdcard: Use the ldst API Philippe Mathieu-Daudé
2018-06-28 17:13   ` Peter Maydell
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 02/14] sdcard: Constify sd_crc*()'s message argument Philippe Mathieu-Daudé
2018-05-09 17:58   ` Alistair Francis
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 03/14] sdcard: Fix sd_crc*() style Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 04/14] sdcard: Extract sd_frame48/136_calc_checksum() Philippe Mathieu-Daudé
2018-05-09 18:00   ` Alistair Francis
2018-05-09 19:15     ` Philippe Mathieu-Daudé
2018-05-09 23:04       ` Alistair Francis
2018-05-10  0:16         ` Philippe Mathieu-Daudé
2018-05-10 17:41           ` Alistair Francis
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 05/14] sdcard: Move sd_crc7() and calc_checksum() out for qtesting Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 06/14] sdcard: Add test_sd_verify_cksum_frame136() Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 07/14] sdcard: Invert the sd_req_crc_is_valid() logic Philippe Mathieu-Daudé
2018-05-09 18:02   ` Alistair Francis
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 08/14] sdcard: Extract sd_frame48_verify_checksum() out for qtesting Philippe Mathieu-Daudé
2018-05-10  0:02   ` Alistair Francis
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 09/14] sdcard: Add sd_frame136_verify_checksum() Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 10/14] sdcard: Remove the SDRequest argument from internal functions Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 11/14] sdcard: Add sd_frame48_init(), replace SDRequest by a raw buffer Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 12/14] sdcard: Add tests to validate the 7-bit CRC checksum of 48-bit SD frame Philippe Mathieu-Daudé
2018-05-09  3:46 ` [Qemu-devel] [PATCH v2 13/14] sdcard: Add a "validate-crc" property Philippe Mathieu-Daudé
2018-05-21 12:59   ` Michael Walle
2018-05-09  3:46 ` [Qemu-devel] [RFC PATCH v2 14/14] hw/sd/ssi-sd: Enable CRC validation Philippe Mathieu-Daudé
2018-05-09 23:06   ` Alistair Francis
2018-05-10 15:18 ` [Qemu-devel] [PATCH v2 00/14] sdcard: Proper implementation of CRC7 Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.