Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2004 10:47:05 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        cvs-src@freebsd.org
Subject:   Re: cvs commit: src/sys/compat/ndis kern_ndis.c subr_ndis.c
Message-ID:  <20040330104458.J81785@root.org>
In-Reply-To: <20040325.171634.59655793.imp@bsdimp.com>
References:  <xzpvfksfztc.fsf@dwp.des.no> <20040325.151018.82302651.imp@bsdimp.com> <20040325.171634.59655793.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 25 Mar 2004, M. Warner Losh wrote:
> In message: <20040325234024.GJ26131@elvis.mu.org>
>             Alfred Perlstein <alfred@freebsd.org> writes:
> : * M. Warner Losh <imp@bsdimp.com> [040325 14:11] wrote:
> : > In message: <xzpvfksfztc.fsf@dwp.des.no>
> : >             des@des.no (Dag-Erling Sm?rgrav) writes:
> : > : Bill Paul <wpaul@FreeBSD.org> writes:
> : > :
> : > : des@dwp ~% gf BUS_GET_RESOURCE_LIST
> : > : qsrc/sys/compat/ndis/kern_ndis.c:       brl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev);
> : > : src/sys/dev/if_ndis/if_ndis_pci.c:      rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev);
> : > : src/sys/kern/subr_bus.c:        rl = BUS_GET_RESOURCE_LIST(dev, child);
> : > : src/sys/kern/subr_bus.c:        rl = BUS_GET_RESOURCE_LIST(dev, child);
> : > : src/sys/kern/subr_bus.c:        rl = BUS_GET_RESOURCE_LIST(dev, child);
> : > : src/sys/kern/subr_bus.c:        rl = BUS_GET_RESOURCE_LIST(dev, child);
> : > : src/sys/kern/subr_bus.c:        rl = BUS_GET_RESOURCE_LIST(dev, child);
> : >
> : > Acutally, there are alot of downstream users of rl.
> :
> : :(
> :
> : Shouldn't we have macros:
> :
> : BUS_GET_RESOURCE_NEXT ?
> :
> : (instead of SLIST_NEXT)
>
> We already do.  bus_generic_rl_get_resource, et al.  The problem here
> is that the pci bus never intended its resources to be exposed outside
> of the bus layer.  But windows drivers need it, so there needs to be
> some tweaks need to be made.
>
> It looks like I was incorrect about the downstream uses of it.  I
> thought that pci and pccard did that, but it appears that they now use
> the common functions that matt dodd moved into subr_bus a while ago.

Fixing this to be FIFO instead of LIFO would also have helped for floppy
devices that specified a 6-port resource as three 2-port resources.  When
put in LIFO order, this gave 5-6,3-4,1-2 instead of 1-2,3-4,5-6.  The
latter would have been easier to parse.

-Nate



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