Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2013 08:11:45 +0200
From:      Hans Petter Selasky <hps@bitfrost.no>
To:        "aseem.jolly" <aseem.jolly@gmail.com>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: USB DMA memory Allocation
Message-ID:  <52087CA1.7050701@bitfrost.no>
In-Reply-To: <1376270379430-5835590.post@n5.nabble.com>
References:  <1375489015367-5833506.post@n5.nabble.com> <zarafa.51fcc634.4d66.6bc5f4d2757b93c5@mail.lockless.no> <1375551235535-5833585.post@n5.nabble.com> <zarafa.51fe1344.72a4.2c750fca3ae0393f@mail.lockless.no> <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> <1376270379430-5835590.post@n5.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On 08/12/13 03:19, aseem.jolly wrote:
>          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.

You cannot assume this, unless it is written somewhere.

>
> Doubt 2) We should be using EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); instead of
> EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);

You are right!

http://svnweb.freebsd.org/changeset/base/254238

>
>
> #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))
>

--HPS




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