[Bug 212021] xhci(4) broken with qemu-devel

2016-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212021

Hans Petter Selasky  changed:

   What|Removed |Added

Summary|xhci(4) broken on   |xhci(4) broken with
   |big-endian systems  |qemu-devel

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 212021] xhci(4) broken on big-endian systems

2016-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212021

--- Comment #7 from Hans Petter Selasky  ---
Created attachment 173916
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=173916=edit
Fix XHCI compatibility with QEMU

Hi,

Can you test the attached patch. Looks like a XHCI compatibility issue.

--HPS

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 212021] xhci(4) broken on big-endian systems

2016-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212021

--- Comment #6 from Nathan Whitehorn  ---
(In reply to Hans Petter Selasky from comment #5)

The QEMU code that is printing the error is this in xhci_configure_slot():


if ((ictl_ctx[0] & 0x3) != 0x0 || (ictl_ctx[1] & 0x3) != 0x1) {
DPRINTF("xhci: invalid input context control %08x %08x\n",
ictl_ctx[0], ictl_ctx[1]);
return CC_TRB_ERROR;
}

Unfortunately, they have several identical error messages from different
places. Does QEMU's emulated xhci work with the amd64 target?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 212021] xhci(4) broken on big-endian systems

2016-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212021

--- Comment #4 from Nathan Whitehorn  ---
(In reply to Hans Petter Selasky from comment #3)

That is probably true, but I think that can't be the problem in this case, for
two reasons:
1. The host CPU for my QEMU is little-endian, so that change would be a no-op.
2. I have exactly the same problem on real hardware.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 212021] xhci(4) broken on big-endian systems

2016-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212021

--- Comment #3 from Hans Petter Selasky  ---
Got it. OK, Look at this error:

xhci: output context at 831a000
xhci: invalid input context control  0003
13236@1471749323.871077:usb_xhci_queue_event v 0, idx 8, ER_COMMAND_COMPLETE,
CC_TRB_ERROR, p 0499fdf0, s 0500, c 0x01008401
13236@1471749323.871080:usb_xhci_irq_intx level 1

And this piece of code which I simply Googled:

hcd-xhci.c:

cpu_physical_memory_read(ictx, (uint8_t *) ictl_ctx, sizeof(ictl_ctx));

if (ictl_ctx[0] != 0x0 || ictl_ctx[1] != 0x3) {
fprintf(stderr, "xhci: invalid input context control %08x %08x\n",
ictl_ctx[0], ictl_ctx[1]);
return CC_TRB_ERROR;
}

It looks like the ictl_ctx[1] read should have a le32_to_cpu() wrapper around
it.

--HPS

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 212021] xhci(4) broken on big-endian systems

2016-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212021

--- Comment #2 from Nathan Whitehorn  ---
(In reply to Hans Petter Selasky from comment #1)

You misunderstand, I think. This is a bog-standard PCI-E XHCI card with
little-endian registers. The driver just doesn't work when the CPU is
big-endian (or, at least, it doesn't work on ppc64 -- I'm assuming the problem
is an endianness one).

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


[Bug 212021] xhci(4) broken on big-endian systems

2016-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212021

Hans Petter Selasky  changed:

   What|Removed |Added

 CC||hsela...@freebsd.org

--- Comment #1 from Hans Petter Selasky  ---
Hi,

The FreeBSD XHCI driver only supports little endian PCI interface / register
set and DMA descriptors.

There are no wrappers or flags to support big-endian XHCI yet like with the
EHCI driver.

--HPS

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"