Date: Sat, 10 Jul 2021 19:04:46 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e036ee6ce2e4 - main - Let the xhci_hw_root structure span exactly XHCI_PAGE_SIZE bytes by increasing the number of completion event TRBs. This avoids wasting memory. Message-ID: <202107101904.16AJ4k4x035408@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e036ee6ce2e4d6fe0564f8bb3aa99a2f61d48fc6 commit e036ee6ce2e4d6fe0564f8bb3aa99a2f61d48fc6 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2021-07-10 12:14:11 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2021-07-10 17:57:52 +0000 Let the xhci_hw_root structure span exactly XHCI_PAGE_SIZE bytes by increasing the number of completion event TRBs. This avoids wasting memory. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/controller/xhci.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h index c0427e0cf11f..e8841a05b134 100644 --- a/sys/dev/usb/controller/xhci.h +++ b/sys/dev/usb/controller/xhci.h @@ -33,7 +33,7 @@ #define XHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) #define XHCI_MAX_ENDPOINTS 32 /* hardcoded - do not change */ #define XHCI_MAX_SCRATCHPADS 256 /* theoretical max is 1023 */ -#define XHCI_MAX_EVENTS (16 * 13) +#define XHCI_MAX_EVENTS 232 #define XHCI_MAX_COMMANDS (16 * 1) #define XHCI_MAX_RSEG 1 #define XHCI_MAX_TRANSFERS 4 @@ -383,6 +383,8 @@ struct xhci_hw_root { struct xhci_trb hwr_commands[XHCI_MAX_COMMANDS]; }; +CTASSERT(sizeof(struct xhci_hw_root) == XHCI_PAGE_SIZE); + struct xhci_endpoint_ext { struct xhci_trb *trb; struct usb_xfer *xfer[XHCI_MAX_TRANSFERS * XHCI_MAX_STREAMS];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107101904.16AJ4k4x035408>