提交 1fa63e43 编写于 作者: M Michael Buesch 提交者: Anthony Liguori

usb-ohci: Fix endianness issue

This fixes a possible endianness issue in the usb-ohci hw module.
hcca.frame and ohci->frame_number are 16bit, so use cpu_to_le16().
Signed-off-by: NMichael Buesch <mb@bu3sch.de>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 e6a0575e
......@@ -1150,9 +1150,9 @@ static void ohci_frame_boundary(void *opaque)
/* Frame boundary, so do EOF stuf here */
ohci->frt = ohci->fit;
/* XXX: endianness */
/* Increment frame number and take care of endianness. */
ohci->frame_number = (ohci->frame_number + 1) & 0xffff;
hcca.frame = cpu_to_le32(ohci->frame_number);
hcca.frame = cpu_to_le16(ohci->frame_number);
if (ohci->done_count == 0 && !(ohci->intr_status & OHCI_INTR_WD)) {
if (!ohci->done)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册