From nobody Tue Feb 10 15:29:35 2026 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; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528395065880459.3761478698368; Thu, 7 Jun 2018 11:11:05 -0700 (PDT) Received: from localhost ([::1]:59620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQzNJ-0004xE-06 for importer@patchew.org; Thu, 07 Jun 2018 14:11:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQzJX-0002DJ-Fs for qemu-devel@nongnu.org; Thu, 07 Jun 2018 14:07:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQzJU-0004W9-8s for qemu-devel@nongnu.org; Thu, 07 Jun 2018 14:07:11 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:35001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQzJU-0004Vs-4W; Thu, 07 Jun 2018 14:07:08 -0400 Received: by mail-qt0-x243.google.com with SMTP id s9-v6so10799337qtg.2; Thu, 07 Jun 2018 11:07:08 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s15-v6sm26838414qtc.81.2018.06.07.11.07.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 11:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jac/D2I0BeGJ5N/WGcM7hCJ30SgLrQ/6pcubjDWhWFw=; b=bHnXy4XQKFtpADUOkL7Q01IVLizwHQPoOQSXoWRLigQh9i0pqFzjXTi+A8wFFHklNc jU+0iKMP2c6K7IisyldG5EH5IhE5o1wWDk9JBBBlWMwK4PrKn1nN+tBO9aizolum7RMv gbQQK7Pb/itMN6wQd2A3cNv78USrRPjqqLPhj2VR30lJ2S+HTpoHx8OO/SXASOayrt8n b0kUVh9vTvjoU61X0PpNVz8qImfNT/1KsQFMMlhaB2hXqOJKSerx9TCK6fm7zRuwiVS7 6dzQCwDL4rEl43mxgzu2/nAJicbuak1G48c9W7EjVjvsJhyFIdxAX7RW/lxOjtPxruTo q7PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jac/D2I0BeGJ5N/WGcM7hCJ30SgLrQ/6pcubjDWhWFw=; b=b1SwuNyY1IGQcg6WVHD/ztC3UGU6N2AmOBaG5z1Lo11ia9Gwgai7veVCBmrUPmrc+q qAhi9Vod1LzbOAI/2tk0UvbbnrtiX5VeMVmfsTRn+bj+Mc/XpSM/KuxOwijUPLahFd/+ eh34mPd2jUmG4kj4Qz06wk03bYAK+xBNhW7FrFaucYOhbOyILyFeOIecn5OPSEF1wvKh LeRx4Set2EUBOepsJJiyuO5u7PNTm74jXgFV1YJYr3n6AAag5vvuFLbyMBj+r2D0ifOt pepCVEK5vsSTsNUJVS1nfYGoLAQ3gG+nJOeRLTQLQQ65b2ZjSiGMZE1iKsZ7fEpojOaS PFzQ== X-Gm-Message-State: APt69E0MZ8bsWh4gQo/fVxBeunENgoCQccBIMIRAKMBwfA/xezQBRnbl zQcYYhymYNcaTCnOihZs+RC/F9/+ X-Google-Smtp-Source: ADUXVKJEBOe1zhNPTu8AqsZG2FvTVbIrA1phAP/MP7FAOS3gS4N3XEp7kJFh3xyXUMKiFRF+FOP3JQ== X-Received: by 2002:a0c:b116:: with SMTP id q22-v6mr2702808qvc.19.1528394827733; Thu, 07 Jun 2018 11:07:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Alistair Francis , Peter Maydell Date: Thu, 7 Jun 2018 15:06:40 -0300 Message-Id: <20180607180641.874-7-f4bug@amsat.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180607180641.874-1-f4bug@amsat.org> References: <20180607180641.874-1-f4bug@amsat.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: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH v2 6/7] sdcard: Disable CMD19/CMD23 for Spec v2 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: , Cc: Paolo Bonzini , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 These commands got introduced by Spec v3 (see 0c3fb03f7ec and 4481bbc79d2). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/sd/sd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 4e49a3827a..540bccb8d1 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1179,6 +1179,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) break; =20 case 19: /* CMD19: SEND_TUNING_BLOCK (SD) */ + if (sd->spec_version < SD_PHY_SPECv3_01_VERS) { + break; + } if (sd->state =3D=3D sd_transfer_state) { sd->state =3D sd_sendingdata_state; sd->data_offset =3D 0; @@ -1187,6 +1190,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) break; =20 case 23: /* CMD23: SET_BLOCK_COUNT */ + if (sd->spec_version < SD_PHY_SPECv3_01_VERS) { + break; + } switch (sd->state) { case sd_transfer_state: sd->multi_blk_cnt =3D req.arg; --=20 2.17.1