Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 2010 15:49:39 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 181869 for review
Message-ID:  <201008051549.o75FndPS006236@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@181869?ac=10

Change 181869 by hselasky@hselasky_laptop001 on 2010/08/05 15:49:38

	USB controller (XHCI):
		- scratchpad buffers are per HC and not per USB device.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/controller/xhci.h#15 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/controller/xhci.h#15 (text+ko) ====

@@ -51,9 +51,11 @@
 #define	XHCI_PAGE_SIZE			4096	/* bytes */
 
 struct xhci_dev_ctx_addr {
-	volatile uint64_t	qwBaaDevCtxAddr;
-	volatile uint64_t	qwBaaScratchAddr;
-#define	XHCI_BAA_MASK	0xFFFFFFFFFFFFFFE0ULL
+	volatile uint64_t	qwBaaDevCtxAddr[USB_MAX_DEVICES + 1];
+	struct {
+		volatile uint64_t dummy;
+	} __aligned(64) padding;
+	volatile uint64_t	qwSpBufPtr[XHCI_MAX_SCRATCHPADS];
 };
 
 #define	XHCI_EPNO2EPID(x) ((((x) & UE_DIR_IN) ? 1 : 0) | (2 * ((x) & UE_ADDR)))
@@ -151,7 +153,6 @@
 	struct xhci_input_ctx	ctx_input;
 	struct xhci_slot_ctx	ctx_slot;
 	struct xhci_endp_ctx	ctx_ep[XHCI_MAX_ENDPOINTS - 1];
-	volatile uint64_t	ctx_sp_buf_ptr[XHCI_MAX_SCRATCHPADS];
 };
 
 struct xhci_dev_ctx {
@@ -359,12 +360,10 @@
 	struct usb_page_cache device_pc;
 	struct usb_page_cache input_pc;
 	struct usb_page_cache endpoint_pc;
-	struct usb_page_cache scratch_pc[XHCI_MAX_SCRATCHPADS];
 
 	struct usb_page device_pg;
 	struct usb_page input_pg;
 	struct usb_page endpoint_pg;
-	struct usb_page scratch_pg[XHCI_MAX_SCRATCHPADS];
 
 	struct xhci_endpoint_ext endp[XHCI_MAX_ENDPOINTS];
 };
@@ -372,9 +371,11 @@
 struct xhci_hw_softc {
 	struct usb_page_cache root_pc;
 	struct usb_page_cache ctx_pc;
+	struct usb_page_cache scratch_pc[XHCI_MAX_SCRATCHPADS];
 
 	struct usb_page root_pg;
 	struct usb_page ctx_pg;
+	struct usb_page scratch_pg[XHCI_MAX_SCRATCHPADS];
 
 	struct xhci_hw_dev devs[XHCI_MAX_DEVICES];
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008051549.o75FndPS006236>