All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH arm-devs v1 1/5] sd/sd.c: Fix "inquiry" ACMD41
@ 2013-05-22 13:37 Igor Mitsyanko
  2013-05-22 23:42 ` Peter Crosthwaite
  0 siblings, 1 reply; 7+ messages in thread
From: Igor Mitsyanko @ 2013-05-22 13:37 UTC (permalink / raw)
  To: peter.crosthwaite; +Cc: Peter Maydell, qemu-devel, edgar.iglesias

[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]

On 05/21/2013 10:50 AM, peter.crosthwaite@xilinx.com wrote:

From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
<peter.crosthwaite@xilinx.com>

the SD command ACMD41 can be used in a read only mode to query device
state without doing the SD card initialisation. This is valid even
which the device is already initialised. Fix the command to be
responsive when in the ready state accordingly.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
<peter.crosthwaite@xilinx.com>
---

 hw/sd/sd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 2e0ef3e..89bfb7a 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1277,6 +1277,7 @@ static sd_rsp_type_t sd_app_command(SDState *sd,
         }
         switch (sd->state) {
         case sd_idle_state:
+        case sd_ready_state:
             /* We accept any voltage.  10000 V is nothing.  */
             if (req.arg)
                 sd->state = sd_ready_state;


I couldn't find any info in SD specification that would confirm this change
correctness, what about
table "Table 4-29: Card State Transition Table" which states that ACMD41 is
illegal in "ready" state?

-- 
Best wishes,
Igor Mitsyanko
email: i.mitsyanko@gmail.com

[-- Attachment #2: Type: text/html, Size: 1710 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH arm-devs v1 0/5]  SD and SDHCI Fixes
@ 2013-05-21  6:49 peter.crosthwaite
  2013-05-21  6:50 ` [Qemu-devel] [PATCH arm-devs v1 1/5] sd/sd.c: Fix "inquiry" ACMD41 peter.crosthwaite
  0 siblings, 1 reply; 7+ messages in thread
From: peter.crosthwaite @ 2013-05-21  6:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, i.mitsyanko, edgar.iglesias

From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Fixes found in SD and SDHCI found doing some corner case testing.


Peter Crosthwaite (5):
  sd/sd.c: Fix "inquiry" ACMD41
  sd/sdhci.c: Only reset data_count on new commands
  sd/sdhci: Fix Buffer Write Ready interrupt
  sd/sdhci.c: Fix bdata_read DPRINT message
  sd/sdhci:ADMA: fix interrupt

 hw/sd/sd.c    |  1 +
 hw/sd/sdhci.c | 28 ++++++++++++++--------------
 2 files changed, 15 insertions(+), 14 deletions(-)

-- 
1.8.3.rc1.44.gb387c77.dirty

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

end of thread, other threads:[~2013-05-27 18:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 13:37 [Qemu-devel] [PATCH arm-devs v1 1/5] sd/sd.c: Fix "inquiry" ACMD41 Igor Mitsyanko
2013-05-22 23:42 ` Peter Crosthwaite
2013-05-23 10:31   ` Igor Mitsyanko
2013-05-24  5:07     ` Peter Crosthwaite
2013-05-27 18:20       ` [Qemu-devel] [PATCH arm-devs v3 1/1] " Igor Mitsyanko
  -- strict thread matches above, loose matches on Subject: below --
2013-05-21  6:49 [Qemu-devel] [PATCH arm-devs v1 0/5] SD and SDHCI Fixes peter.crosthwaite
2013-05-21  6:50 ` [Qemu-devel] [PATCH arm-devs v1 1/5] sd/sd.c: Fix "inquiry" ACMD41 peter.crosthwaite
2013-05-21  9:46   ` 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.