From: John Snow <jsnow@redhat.com>
To: Stefan Fritsch <sf@sfritsch.de>, qemu-block@nongnu.org
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] ahci: Force ICC bits in PxCMD to zero
Date: Fri, 17 Jul 2015 13:47:58 -0400 [thread overview]
Message-ID: <55A93FCE.8000008@redhat.com> (raw)
In-Reply-To: <E1ZFpg7-00027N-HW@eru.sfritsch.de>
On 07/16/2015 03:54 PM, Stefan Fritsch wrote:
> The AHCI spec requires that the HBA sets the ICC bits to zero after the
> ICC change is done. Since we don't do any ICC change, force the bits to
> zero all the time.
>
> This fixes delays with some OSs (e.g. OpenBSD) waiting for the ICC bits
> to change to 0.
>
> Signed-off-by: Stefan Fritsch <sf@sfritsch.de>
> ---
> hw/ide/ahci.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> index bb6a92f..48749c1 100644
> --- a/hw/ide/ahci.c
> +++ b/hw/ide/ahci.c
> @@ -279,8 +279,13 @@ static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val)
> break;
> case PORT_CMD:
> /* Block any Read-only fields from being set;
> - * including LIST_ON and FIS_ON. */
> - pr->cmd = (pr->cmd & PORT_CMD_RO_MASK) | (val & ~PORT_CMD_RO_MASK);
> + * including LIST_ON and FIS_ON.
> + * The spec requires to set ICC bits to zero after the ICC change
> + * is done. We don't support ICC state changes, therefore always
> + * force the ICC bits to zero.
> + */
> + pr->cmd = (pr->cmd & PORT_CMD_RO_MASK) |
> + (val & ~(PORT_CMD_RO_MASK|PORT_CMD_ICC_MASK));
>
> /* Check FIS RX and CLB engines, allow transition to false: */
> ahci_cond_start_engines(&s->dev[port], true);
>
I guess I'll need to start testing with OpenBSD...
Looks good to me -- (If there's a next time, please also CC qemu-devel
so patch management tools pick this up.)
Reviewed-by: John Snow <jsnow@redhat.com>
and:
Thanks, applied to my IDE tree:
https://github.com/jnsnow/qemu/commits/ide
https://github.com/jnsnow/qemu.git
--js
parent reply other threads:[~2015-07-17 17:48 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <E1ZFpg7-00027N-HW@eru.sfritsch.de>]
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=55A93FCE.8000008@redhat.com \
--to=jsnow@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sf@sfritsch.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).