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.
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to