From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 24 12:33:06 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6588F16A41F; Mon, 24 Oct 2005 12:33:06 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from ant.bwct.de (ant.bwct.de [85.159.14.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E6B943D5A; Mon, 24 Oct 2005 12:33:04 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by ant.bwct.de (8.12.11/8.12.11) with ESMTP id j9OCX2fJ023697; Mon, 24 Oct 2005 14:33:03 +0200 (CEST) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id j9OCWu5V080828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Oct 2005 14:32:57 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j9OCWuml051168; Mon, 24 Oct 2005 14:32:56 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j9OCWtnE051167; Mon, 24 Oct 2005 14:32:55 +0200 (CEST) (envelope-from ticso) Date: Mon, 24 Oct 2005 14:32:55 +0200 From: Bernd Walter To: Frank Behrens Message-ID: <20051024123254.GI31913@cicely12.cicely.de> References: <200510211216.37814.jhb@freebsd.org> <200510221516.j9MFGnqT026691@pinky.frank-behrens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510221516.j9MFGnqT026691@pinky.frank-behrens.de> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: freebsd-hackers@freebsd.org Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2005 12:33:06 -0000 On Sat, Oct 22, 2005 at 05:16:49PM +0200, Frank Behrens wrote: > Warner, John and others, > > thanks for your fast responses. > > John Baldwin wrote on 21 Oct 2005 12:16: > > But you could hack the sio(4) driver to check its IO port and return ENXIO if > > it has a certain value, for example. > > Yes, this would not be a problem for me. But I want to publish my > driver as port and make it for the user as easy as possible. That > includes not the need for building a new kernel. > > M. Warner Losh wrote on 21 Oct 2005 10:06: > > Another "soltution" is to not have sio in your kernel while you are > > debugging your driver. > > Well, you used already the quotes. It is not an option for me, > because my system has no keyboard and monitor attached and the serial > console is my only way to see the panic messages. ;-) > > > Another solution would be to have your driver use the tty layer > > instead of banging the hardware directly, if that is compatible with > > the goals of your driver. This solution isn't in quotes because for > > some class of devices (say a keyboard driver for a sun or apple newton > > keyboard that does serial), it might be the right one. > > Hm, this looks even more complicated and has more overhead. To show > shortly my requirements: The protocol is for an eib driver, (further > information on http://www.sax.de/~frank/eib4bsd/), it uses 9600 baud > on serial line. If the PC wants to send a telegram it resets RTS and > has to poll CTS. If CTS is active the transmission of one byte is > possible. If the last bit is sent (transceiver shift empty!) the PC > sets RTS and waits until CTS is inactive. Then a new handshake can > start and a transmission of about 30 bytes must be finished in 130 > ms. IMHO this can be handled only in an interrupt routine with low > overhead. PEI-16 design is evil IMO and PEI-10 capable BCU are less common. I already planed support for EIB using Weinzierl's USB hardware, it's just a matter of time. I dislike the protocol beeing based on UHID, but that's how it is standardized, at least other EIB USB devices are likly to work as well. Usually UHID is prefered so people don't have to write Windows-driver. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de