From: Jan Vesely <jano.vesely@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Bug #757654: UHCI fails to signal stall response patch
Date: Sat, 16 Apr 2011 09:29:10 +0200 [thread overview]
Message-ID: <BANLkTi=gHLgzYFvuWEdNXcSfeyEKzFnJ8w@mail.gmail.com> (raw)
In-Reply-To: <201104161633.02418.bradh@frogmouth.net>
On Sat, Apr 16, 2011 at 8:33 AM, Brad Hards <bradh@frogmouth.net> wrote:
> On Sat, 16 Apr 2011 06:57:00 am Jan Vesely wrote:
>> + s->status |= UHCI_STS_USBERR;
> This is per UHCI 1.1D Section 4.1.5. Looks good.
>
>> + *int_mask |= 0x02;
>> + if (td->ctrl & TD_CTRL_IOC)
>> + *int_mask |= 0x01;
>> + uhci_update_irq(s);
> I see "A hardware interrupt is signalled to the system", but can you provide a
> little explanation of why this particular interrupt mask?
I used th code I found around in that same file (hw/usb-uhci.c),
lines 705-724 contain both masks. "if (td->ctrl & TD_CTRL_IOC)
*int_mask |= 0x01;", is in more places so I just copied that lines.
*int_mask |= 0x2, is used when SPD condition is detected.
that is strange, SPD should use the same interrupt as IOC, but return
value indicates that it is treated as error condition (unsuccessful
td) so I figured *int_mask |= 0x2 signals error interrupt (it does not
match bits in interrupt enable register- that was my first guess)
uhci_update_irq(s); to me it looks like a duplicate functionality to
int_mask parameter, I did not investigate further and included it just
to be sure (it's used on line 775, when error countdown reaches zero).
>
>> + s->status |= UHCI_STS_USBERR;
> This is per UHCI 1.1d Section 4.1.4. Looks good.
>
>> + *int_mask |= 0x02;
>> + if (td->ctrl & TD_CTRL_IOC)
>> + *int_mask |= 0x01;
>> + uhci_update_irq(s);
> I see "A hardware interrupt is signalled to the system", but can you provide a
> little explanation of why this particular interrupt mask?
>
>
next prev parent reply other threads:[~2011-04-16 7:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 20:57 [Qemu-devel] Bug #757654: UHCI fails to signal stall response patch Jan Vesely
2011-04-16 6:33 ` Brad Hards
2011-04-16 7:29 ` Jan Vesely [this message]
2011-04-16 8:40 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2011-05-05 12:05 ` [Qemu-devel] " Gerd Hoffmann
2011-05-06 8:07 ` Jan Vesely
2011-05-09 7:55 ` Gerd Hoffmann
2011-05-09 10:16 ` Jan Vesely
2011-05-09 11:43 ` Gerd Hoffmann
2011-05-11 11:33 ` Jan Vesely
2011-05-12 9:28 ` Gerd Hoffmann
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='BANLkTi=gHLgzYFvuWEdNXcSfeyEKzFnJ8w@mail.gmail.com' \
--to=jano.vesely@gmail.com \
--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 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).