Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Dec 2002 19:35:42 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        perforce@freebsd.org
Subject:   Re: PERFORCE change 22623 for review
Message-ID:  <20021223033542.GA2039@athlon.pn.xcllnt.net>
In-Reply-To: <20021222.200921.66023382.imp@bsdimp.com>
References:  <200212221912.gBMJCf5i009504@repoman.freebsd.org> <20021222.150927.83284721.imp@bsdimp.com> <20021222231958.GA1414@athlon.pn.xcllnt.net> <20021222.200921.66023382.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 22, 2002 at 08:09:21PM -0700, M. Warner Losh wrote:
> : > 
> : > It is not obsolete.  There's no way to say that the ISA serial ports
> : > have reserved sio0 and sio1 so that the pci serial port should attach
> : > to sio2 or sio4.  Until there is, this kludge is needed.
> : 
> : Can you tell me why or when this would be useful?
> 
> Consider that we probe sio on isa after sio on pci.  When probing sio
> on pci, we get sio0 because the sio on isa stuff hasn't happened yet.
> So, pci steal sio0 and the sio on the isa bus get sio1 and sio2.  When
> using a serial console, this can cause problems with the console code
> because sio0 is flagged as the conosle, but sio1 is attached and there
> were (are?) problems in the console code that caused a panic if you
> ran in this combo.  If that's no longer the case, then we have the
> 'usual' disconnect between the hints and the actual instances.

The diconnect is unavoidable and not even specific to sio(4). The
console problem is easily solved now that we don't care about the
unit anymore. All we care about it the address of the UART. When
we find the UART during bus enumeration we'll automaticly use the
right unit and everything is fine.

As I said, the disconnect between hints and actual unit number is
unavoidable. I think the best way to treat the hint "unit" is by
viewwing it as a (random) identifier that binds independent hints.
Once we find a sio hint that tells us that we have a potential
console (by mean of hint.sio.XXX.flags), we look up the hints for
sio XXX to find the port. We should not attach any more value to
it than that. The device could easily end up as sio9...

> I just remeber when I did it that it was a big deal to me and to the
> folks that hired me to create a pci driver for the controller based
> modems.  Maybe things have changed, and if so I'm cool with things
> going away.  But if they haven't changed, this needs to stay around
> until the underlying problems are fixed.

The console problem has gone now that we only care about the tag
and handle. The disconnect can still be confusing to people, but
as I said above, this applies to any device that uses/needs hints.

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel@xcllnt.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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