From nobody Wed Apr 16 17:59:20 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15193143133171006.7955928969183; Thu, 22 Feb 2018 07:45:13 -0800 (PST) Received: from localhost ([::1]:39087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eot3Y-0007Cp-Jy for importer@patchew.org; Thu, 22 Feb 2018 10:45:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eosiq-00055a-Ln for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eosip-0001vz-L2 for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:48 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:46618) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eosip-0001vB-DD for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:47 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1eosio-00026h-EZ for qemu-devel@nongnu.org; Thu, 22 Feb 2018 15:23:46 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 22 Feb 2018 15:23:02 +0000 Message-Id: <20180222152307.7499-28-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180222152307.7499-1-peter.maydell@linaro.org> References: <20180222152307.7499-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 27/32] sdcard: use a more descriptive label 'unimplemented_spi_cmd' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Philippe Mathieu-Daud=C3=A9 Suggested-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20180215221325.7611-12-f4bug@amsat.org Signed-off-by: Peter Maydell --- 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 f13f33efca..34080f0e4c 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1179,8 +1179,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, =20 /* 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. */ @@ -1205,8 +1206,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, break; =20 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. */ @@ -1246,8 +1248,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, break; =20 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 =3D sd_receivingdata_state; @@ -1357,8 +1360,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, =20 /* 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 =3D sd_receivingdata_state; @@ -1409,7 +1413,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd); return sd_illegal; =20 - unimplemented_cmd: + unimplemented_spi_cmd: /* Commands that are recognised but not yet implemented in SPI mod= e. */ qemu_log_mask(LOG_UNIMP, "SD: CMD%i not implemented in SPI mode\n", req.cmd); --=20 2.16.1