Module Name:    src
Committed By:   skrll
Date:           Thu Aug 18 07:08:32 UTC 2016

Modified Files:
        src/sys/dev/usb: xhci.c

Log Message:
Byte swap the address in xhci_new_device appropriately.  From t-hash


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/usb/xhci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.63 src/sys/dev/usb/xhci.c:1.64
--- src/sys/dev/usb/xhci.c:1.63	Sun Jul 17 20:13:19 2016
+++ src/sys/dev/usb/xhci.c	Thu Aug 18 07:08:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.63 2016/07/17 20:13:19 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.64 2016/08/18 07:08:32 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.63 2016/07/17 20:13:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.64 2016/08/18 07:08:32 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2229,7 +2229,7 @@ xhci_new_device(device_t parent, struct 
 
 		cp = xhci_slot_get_dcv(sc, xs, XHCI_DCI_SLOT);
 		//hexdump("slot context", cp, sc->sc_ctxsz);
-		uint8_t addr = XHCI_SCTX_3_DEV_ADDR_GET(cp[3]);
+		uint8_t addr = XHCI_SCTX_3_DEV_ADDR_GET(le32toh(cp[3]));
 		DPRINTFN(4, "device address %u", addr, 0, 0, 0);
 		/* XXX ensure we know when the hardware does something
 		   we can't yet cope with */

Reply via email to