From owner-p4-projects@FreeBSD.ORG Sat Dec 13 20:14:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C294106568A; Sat, 13 Dec 2008 20:14:36 +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 006741065687 for ; Sat, 13 Dec 2008 20:14:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id AB95F8FC28 for ; Sat, 13 Dec 2008 20:14:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id mBDK2tD5094677 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Dec 2008 12:02:56 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <494414EF.3080403@freebsd.org> Date: Sat, 13 Dec 2008 12:02:55 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Hans Petter Selasky References: <200812122326.mBCNQX6w024511@repoman.freebsd.org> <200812131005.33499.hselasky@c2i.net> In-Reply-To: <200812131005.33499.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: Perforce Change Reviews Subject: Re: PERFORCE change 154573 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:14:36 -0000 Hans Petter Selasky wrote: > On Saturday 13 December 2008, Sam Leffler wrote: > >> http://perforce.freebsd.org/chv.cgi?CH=154573 >> >> Change 154573 by sam@sam_ebb on 2008/12/12 23:25:40 >> >> Checkpoint cambria/ixp435 ehci support: add EHCI_SCFLG_BIGEDESC >> flag to force descriptor contents to be left in big-endian byte >> order intead of little-endian; this is required by the ixp435 >> builtin controllers. >> > > I would prefer if you could implement this using ifdefs. > > ehcireg.h: > > #ifdef HOST_ENDIAN_BUILD > #undef htole32 > #define htole32 htobe32 > ... > #define EXTERNAL(name) name##_be > #else > #define EXTERNAL(name) name##_le > #endif > I intend to add a global #define to control inclusion of this feature before I push it to the tree. > ehci_wrap.c: (new file) > > void > ehci_init(ehci_sc_t *sc) > { > if (force use bigendian) > ehci_init_be(sc); > else > ehci_init_le(sc); > return; > } > > And the same for all other globally exported functions from ehci.c which are > not so many! > > ehci.c: > > void > EXTERNAL(ehci_init)(ehci_sc_t *sc) > { > ... same like before ... > } > > ehci_be.c: > #define HOST_ENDIAN_BUILD > #include > Er, that's about as bad a coding practice as computed goto's. I haven't decided whether to make the initial ehci controller attach logic generic or leave it buried in the bus space ops as currently done. > >> Operations now go through the controller >> and are returned but always w/ an error; still working on why. >> >> > > Maybe a cache sync issue. > > No. But if you are interested in helping debug the problem I'm happy to send you debug output. The controller rejects all cmds setting the ERRINT status bit. The qTD contents and xfer contents look fine but I haven't been able to identify the cause given the overlay qTD contents. I'm in the process of collecting comparative traces from linux where usb works. Sam