From owner-freebsd-usb@FreeBSD.ORG Mon Aug 12 01:19:40 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C12F4E1 for ; Mon, 12 Aug 2013 01:19:40 +0000 (UTC) (envelope-from aseem.jolly@gmail.com) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F1202088 for ; Mon, 12 Aug 2013 01:19:40 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1V8gnL-0003BZ-E7 for freebsd-usb@freebsd.org; Sun, 11 Aug 2013 18:19:39 -0700 Date: Sun, 11 Aug 2013 18:19:39 -0700 (PDT) From: "aseem.jolly" To: freebsd-usb@freebsd.org Message-ID: <1376270379430-5835590.post@n5.nabble.com> In-Reply-To: <5207378A.40804@bitfrost.no> References: <1375489015367-5833506.post@n5.nabble.com> <1375551235535-5833585.post@n5.nabble.com> <1375752286864-5834206.post@n5.nabble.com> <52009EEB.1040404@bitfrost.no> <1375842752147-5834384.post@n5.nabble.com> <5201E517.3050200@bitfrost.no> <1376189272784-5835461.post@n5.nabble.com> <5207378A.40804@bitfrost.no> Subject: Re: USB DMA memory Allocation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Aug 2013 01:19:40 -0000 if (EHCI_HCC_64BIT(cparams)) { DPRINTF("HCC uses 64-bit structures\n"); /* MUST clear segment register if 64 bit capable */ EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); } sc->sc_bus.usbrev = USB_REV_2_0; /* Reset the controller */ DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); err = ehci_hcreset(sc); Doubt 1) Whats the need to clear 'CTRLDSSEGMENT' register when host controller reset is going to set it to default value(0x00000000) anyways. I think we should move this code to after reset or before we turn on the controller. Doubt 2) We should be using EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); instead of EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); #define EOWRITE4(sc, a, x) \ bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, (sc)->sc_offs+(a), (x)) #define EWRITE4(sc, a, x) \ bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, (a), (x)) -- View this message in context: http://freebsd.1045724.n5.nabble.com/USB-DMA-memory-Allocation-tp5833506p5835590.html Sent from the freebsd-usb mailing list archive at Nabble.com.