From 9f98e14be5f9c64df43dddc46e2f5917e058887c Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 30 Jun 2004 03:11:56 +0000 Subject: [PATCH] Fix an endianness problem (EHCI_NULL was being double-swapped). --- sys/dev/usb/ehci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 510a4aab8d32..d08e01962852 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.65 2004/06/29 03:58:14 mycroft Exp $ */ +/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.65 2004/06/29 03:58:14 mycroft Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $"); #include "ohci.h" #include "uhci.h" @@ -2167,7 +2167,7 @@ printf("status=%08x toggle=%d\n", epipe->sqh->qh.qh_qtd.qtd_status, next = ehci_alloc_sqtd(sc); if (next == NULL) goto nomem; - nextphys = next->physaddr; + nextphys = htole32(next->physaddr); } else { next = NULL; nextphys = EHCI_NULL; @@ -2187,7 +2187,7 @@ printf("status=%08x toggle=%d\n", epipe->sqh->qh.qh_qtd.qtd_status, #endif } cur->nextqtd = next; - cur->qtd.qtd_next = cur->qtd.qtd_altnext = htole32(nextphys); + cur->qtd.qtd_next = cur->qtd.qtd_altnext = nextphys; cur->qtd.qtd_status = qtdstatus | htole32(EHCI_QTD_SET_BYTES(curlen)); cur->xfer = xfer;