From owner-freebsd-current@FreeBSD.ORG Thu Dec 11 08:50:27 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DDB610656D6 for ; Thu, 11 Dec 2008 08:50:27 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id B0B7C8FC20 for ; Thu, 11 Dec 2008 08:50:26 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=pmcQa7uAQ7+AbKZkTKJgFa5uFMnuVV1Loti8Ez+Y2QH1SaJvlhiKKrHqBcL+QgjCJG02EfcpsBzstUif5MnAKjfQieOUcX27WNgvjiMzsmFMwIlTFMvTXTtTD6KpiZ8Xx9NkAHHLWLSSXQZ2OMNo4vUUahni1qbOfLlgkaID15Q=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1LAhFZ-0003Py-NC; Thu, 11 Dec 2008 11:50:25 +0300 Date: Thu, 11 Dec 2008 11:50:24 +0300 From: Eygene Ryabinkin To: Marcel Moolenaar Message-ID: References: <92804393@bb.ipt.ru> <26722819@bb.ipt.ru> <26719629@bb.ipt.ru> <19F75E66-0535-4982-9726-E2C0A03117EA@mac.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: <19F75E66-0535-4982-9726-E2C0A03117EA@mac.com> Sender: rea-fbsd@codelabs.ru Cc: Boris Samorodov , freebsd-current@FreeBSD.org Subject: Re: Timeda 8-multiport adapter: only 2 ports available X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 08:50:27 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Marcel, Boris, good day. Wed, Dec 10, 2008 at 05:00:24PM -0800, Marcel Moolenaar wrote: > > Seems that just the same card should work: > > http://lists.freebsd.org/pipermail/freebsd-stable/2008-May/042505.html > > > > I've added some diagnistic. But 'rid' is not what you want, I guess: > > The RID is fine. It should always be 0. Seems like a dumb question, but nevertheless. What I don't understand is the following: BAR to port mapping for the Timedia is tricky, it mixes BARs and offsets for the different ports (you should know this, since you wrote the support ;)). But in uart_bus_probe you're passing rid =3D 0 and it is used for resource allocation and consequently the same rid is used for all ports (at least I read the code in this way). But puc_get_bar() uses calculated rid values, but does essentially the same thing: resource allocation via bus_alloc_resource(). And sc->sc_bas is initialized from the obtained sc->sc_rres (inside uart_bus_probe) and it is subsequently used for ns8250_probe() that is failing. I see that uart_bus_pci.c calls uart_bus_probe() with the actual rid. It does not mean that puc code should do the same, but ... Boris, could you please add the line ----- printf("%s: BAS, handle is 0x%lx, tag is 0x%x\n", __func__, (unsigned long)bas->bsh, (unsigned int)bas->bst); ----- to the beginning of ns8250_probe() and show the results. Thanks! --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklA1FAACgkQthUKNsbL7YiBXQCgnOuvK3iWtbSIJA2Bti+7CF0Z DpcAni17Xm64G5S/gq5Va7xjmaB8ENQD =JoL1 -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--