From: anonym@riseup.net
To: qemu-devel@nongnu.org
Cc: anonym <anonym@riseup.net>
Subject: [Qemu-devel] [PATCH] xhci: bump the link TRB cycle detection limit.
Date: Tue, 17 Jan 2017 20:00:56 +0100 [thread overview]
Message-ID: <20170117190056.1195-2-anonym@riseup.net> (raw)
In-Reply-To: <20170117190056.1195-1-anonym@riseup.net>
From: anonym <anonym@riseup.net>
While formatting partitions (on virtual USB drives and the nec-xhci
virtual USB controller) to EXT4, I have observed errors like these:
kernel: sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ABORT
driverbyte=DRIVER_OK
kernel: sd 8:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 00 66 49 86
00 08 00 00
kernel: blk_update_request: I/O error, dev sda, sector 6703494
kernel: Buffer I/O error on dev dm-0, logical block 1573254, lost
async page write
Raising TRB_LINK_LIMIT fixes the limit, but the new value was
admittedly arbitrarily chosen.
Regarding cycle detection in general, allowing at most 4 levels of
links seems pretty low. This bump should be safe: a high number only
means that we get a performance hit when encountering cycles but then
we should have a fatal error any way; a low number instead means that
we'll incorrectly identify cycles and abort operations that otherwise
would succeed, like in the case above.
Signed-off-by: anonym <anonym@riseup.net>
---
hw/usb/hcd-xhci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 4acf0c6dd8..d14ce126a2 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -53,7 +53,7 @@
* to the specs when it gets them */
#define ER_FULL_HACK
-#define TRB_LINK_LIMIT 4
+#define TRB_LINK_LIMIT 32
#define LEN_CAP 0x40
#define LEN_OPER (0x400 + 0x10 * MAXPORTS)
--
2.11.0
next prev parent reply other threads:[~2017-01-17 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 19:00 [Qemu-devel] [PATCH] xhci: bump the link TRB cycle detection limit anonym
2017-01-17 19:00 ` anonym [this message]
2017-04-20 9:35 ` anonym
-- strict thread matches above, loose matches on Subject: below --
2017-05-19 19:42 anonym
2017-05-22 6: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=20170117190056.1195-2-anonym@riseup.net \
--to=anonym@riseup.net \
--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).