Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Aug 2016 09:48:49 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ravi Pokala <rpokala@mac.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, karu.pruun@gmail.com
Subject:   Re: problem attaching driver at LPC bus
Message-ID:  <CANCZdfrpKg09dPv77ibrVt=qp9Sjb9xf1QkhTPFAbGF1Fwc0KA@mail.gmail.com>
In-Reply-To: <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com>
References:  <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> <CANCZdfpzvvsA8JTLiKZAjyWjifFMzJN3KZ76HWW=%2BYnH326w3w@mail.gmail.com> <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 23, 2016 at 9:45 AM, Ravi Pokala <rpokala@mac.com> wrote:
> -----Original Message-----
> From: <wlosh@bsdimp.com> on behalf of Warner Losh <imp@bsdimp.com>
> Date: 2016-08-23, Tuesday at 08:20
> To: Ravi Pokala <rpokala@mac.com>
> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, <karu.pruun@gmail.com>
> Subject: Re: problem attaching driver at LPC bus
>
> On Tue, Aug 23, 2016 at 9:13 AM, Ravi Pokala <rpokala@mac.com> wrote:
>>> ...
>>>
>>> One thing to note is that I was careful about keeping track of the RIDs. Several of the existing drivers in the tree seem to just use 0 indiscriminately, and it works because they only use one resource.
>>
>> For ISA drivers, RID is just a number, best thought of as an index.
>> So incrementing here like you've done is the right call.
>>
>> Warner
>
> Right, someone (jhb?) explained that to me at the time. My point is that the common practice of just passing in 0 doesn't always DTRT, especially if you're dealing with multiple resources.

And in PCI drivers :) But yes, you're correct. I just wanted to state
simply the ISA policy: They are numbered 0 to N-1.

Warner



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