From owner-p4-projects@FreeBSD.ORG Thu Aug 5 15:49:40 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4B901065678; Thu, 5 Aug 2010 15:49:39 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88F391065676 for ; Thu, 5 Aug 2010 15:49:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5B67D8FC16 for ; Thu, 5 Aug 2010 15:49:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o75FndPj006238 for ; Thu, 5 Aug 2010 15:49:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o75FndPS006236 for perforce@freebsd.org; Thu, 5 Aug 2010 15:49:39 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 5 Aug 2010 15:49:39 GMT Message-Id: <201008051549.o75FndPS006236@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 181869 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2010 15:49:40 -0000 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]; };