From: Aurelien Jarno <aurelien@aurel32.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/sd.c: Add missing state change for SD_STATUS, SEND_NUM_WR_BLOCKS
Date: Thu, 24 Feb 2011 09:03:53 +0100 [thread overview]
Message-ID: <20110224080353.GA4459@volta.aurel32.net> (raw)
In-Reply-To: <1298036340-11363-1-git-send-email-peter.maydell@linaro.org>
On Fri, Feb 18, 2011 at 01:39:00PM +0000, Peter Maydell wrote:
> The SD_STATUS and SEND_NUM_WR_BLOCKS commands are supposed to cause
> the card to send data back to the host. However sd.c was missing the
> state change to sd_sendingdata_state for these commands, with the effect
> that the Linux driver would either hang indefinitely waiting for
> nonexistent data (pl181) or read zeroes and provoke a qemu warning
> message (omap).
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/sd.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
Thanks, applied.
> diff --git a/hw/sd.c b/hw/sd.c
> index 789ca84..5e29752 100644
> --- a/hw/sd.c
> +++ b/hw/sd.c
> @@ -1168,6 +1168,7 @@ static sd_rsp_type_t sd_app_command(SDState *sd,
> case 13: /* ACMD13: SD_STATUS */
> switch (sd->state) {
> case sd_transfer_state:
> + sd->state = sd_sendingdata_state;
> sd->data_start = 0;
> sd->data_offset = 0;
> return sd_r1;
> @@ -1182,6 +1183,7 @@ static sd_rsp_type_t sd_app_command(SDState *sd,
> case sd_transfer_state:
> *(uint32_t *) sd->data = sd->blk_written;
>
> + sd->state = sd_sendingdata_state;
> sd->data_start = 0;
> sd->data_offset = 0;
> return sd_r1;
> --
> 1.7.1
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2011-02-24 8:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 13:39 [Qemu-devel] [PATCH] hw/sd.c: Add missing state change for SD_STATUS, SEND_NUM_WR_BLOCKS Peter Maydell
2011-02-24 8:03 ` Aurelien Jarno [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110224080353.GA4459@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.