On Thu, Feb 15, 2018 at 2:13 PM, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > Suggested-by: Alistair Francis <alistair.fran...@xilinx.com> > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Alistair Francis <alistair.fran...@xilinx.com> Alistair > --- > hw/sd/sd.c | 22 +++++++++++++--------- > 1 file changed, 13 insertions(+), 9 deletions(-) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index 0457f5214b..4f82638735 100644 > --- a/hw/sd/sd.c > +++ b/hw/sd/sd.c > @@ -1183,8 +1183,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, > SDRequest req) > > /* Block write commands (Class 4) */ > case 24: /* CMD24: WRITE_SINGLE_BLOCK */ > - if (sd->spi) > - goto unimplemented_cmd; > + if (sd->spi) { > + goto unimplemented_spi_cmd; > + } > switch (sd->state) { > case sd_transfer_state: > /* Writing in SPI mode not implemented. */ > @@ -1209,8 +1210,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, > SDRequest req) > break; > > case 25: /* CMD25: WRITE_MULTIPLE_BLOCK */ > - if (sd->spi) > - goto unimplemented_cmd; > + if (sd->spi) { > + goto unimplemented_spi_cmd; > + } > switch (sd->state) { > case sd_transfer_state: > /* Writing in SPI mode not implemented. */ > @@ -1250,8 +1252,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, > SDRequest req) > break; > > case 27: /* CMD27: PROGRAM_CSD */ > - if (sd->spi) > - goto unimplemented_cmd; > + if (sd->spi) { > + goto unimplemented_spi_cmd; > + } > switch (sd->state) { > case sd_transfer_state: > sd->state = sd_receivingdata_state; > @@ -1361,8 +1364,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, > SDRequest req) > > /* Lock card commands (Class 7) */ > case 42: /* CMD42: LOCK_UNLOCK */ > - if (sd->spi) > - goto unimplemented_cmd; > + if (sd->spi) { > + goto unimplemented_spi_cmd; > + } > switch (sd->state) { > case sd_transfer_state: > sd->state = sd_receivingdata_state; > @@ -1413,7 +1417,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, > SDRequest req) > qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd); > return sd_illegal; > > - unimplemented_cmd: > + unimplemented_spi_cmd: > /* Commands that are recognised but not yet implemented in SPI mode. > */ > qemu_log_mask(LOG_UNIMP, "SD: CMD%i not implemented in SPI mode\n", > req.cmd); > -- > 2.16.1 > >