Date: Tue, 20 Aug 2002 00:05:33 -0700 From: Peter Wemm <peter@wemm.org> To: "Kenneth D. Merry" <ken@kdm.org> Cc: Terry Lambert <tlambert2@mindspring.com>, Gardner Buchanan <gardner.buchanan@adobe.com>, "'freebsd-hackers@freebsd.org'" <freebsd-hackers@FreeBSD.ORG> Subject: Re: CAM "wiring", LUNs and duplicate wired entries Message-ID: <20020820070533.342CF2A7D6@canning.wemm.org> In-Reply-To: <20020819145538.A89963@panzer.kdm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"Kenneth D. Merry" wrote:
> On Mon, Aug 19, 2002 at 13:52:33 -0700, Terry Lambert wrote:
> > "Kenneth D. Merry" wrote:
> > > I don't think that's the problem. I think the problem is that the device
> > > at target 8 is getting identified to camperiphnextunit() as a wired devic
e,
> > > when it isn't.
> > >
> > > Try the attached patch and see if it fixes things for you.
> > >
> > > I haven't tried compiling or running this, so beware.
> >
> >
> > That's some sneaky code. 8-). If this works and you commit it,
> > can you add an expository comment?
>
> Maybe. Peter Wemm wrote the hardwiring code, and would likely be in a
> slightly better position to explain it.
Actually, Justin implemented the original design, I just changed the
underlying mechanism that it uses. It still uses Justin's algorithms but
looks in different places for the source data. I sort-of understand it,
but it has been a while since I looked at it. :-)
Regarding the patch, yes, it does look like the 'hit = 0' should go inside
the loop. I would have done it more explicitly though, eg:
+++ cam_periph.c 2002/08/20 06:48:50
@@ -332,3 +332,2 @@
unit = 0;
- hit = 0;
@@ -338,2 +337,3 @@
while ((i = resource_locate(i, periph_name)) != -1) {
+ hit = 0;
dname = resource_query_name(i);
The same problem is on -current too. It is probably worth changing "hit"
to "wired" since that is what it means.
I think this bug came from an earlier verson of the changes where this was
a multi-layered loop, and the resetting of 'hit' got moved too far out when
it collapsed to a single loop.
Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020820070533.342CF2A7D6>
