From owner-freebsd-arch@FreeBSD.ORG Thu Nov 18 22:21:04 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1000C106564A for ; Thu, 18 Nov 2010 22:21:04 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9BEE58FC1D for ; Thu, 18 Nov 2010 22:21:03 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAIML0Ck007079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Nov 2010 09:21:01 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id oAIML0jP048098 for ; Fri, 19 Nov 2010 09:21:00 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id oAIML0T5048097 for freebsd-arch@freebsd.org; Fri, 19 Nov 2010 09:21:00 +1100 (EST) (envelope-from peter) Date: Fri, 19 Nov 2010 09:21:00 +1100 From: Peter Jeremy To: freebsd-arch@freebsd.org Message-ID: <20101118222100.GA47116@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Migrating ISA/PCI drivers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 22:21:04 -0000 --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm (belatedly) looking at porting digi(4) to the MPSAFE TTY system and have some architectural questions. The digi(4) driver appears to support 5 different Digi card variants, at least two of which exist in both ISA and PCI variants. Looking at the Digi website, it appears that both PCI and ISA cards are still available (as well as a PCIe card which is unlikely to work with the current driver). I only have access to PCI/Xem cards and so can't test my changes on any other card types. I presume Digi cards are not that popular because noone else has shown any interest in the driver since the MPSAFE TTY changes were announced about 2.5 years ago. How much effort should I invest in adapting code for other card types? In particular, the ISA cards use windowed memory accesses and IO ports where the PCI cards have a single flat memory aperture. Removing support for ISA cards would simplify the code (and remove the need to make decisions about whether I need to do window switches in new code), as well as potentially allowing finer grained locks. My options would seem to be: 1) Rip out the ISA support - this is the cleanest for me but maximises effort for a future person wanting to support ISA Digi cards. 2) Carry forward the ISA code as best I can and ensure new code includes appropriate window switches etc. This maximises my effort but hopefully makes it easier for someone to get ISA cards working. 3) Ignore the ISA code. This is fairly easy but probably requires similar effort to (1) to get it going on ISA since all the code would need to be reviewed to add necessary ISA-specific locking/ window switching. My preference is 1 since it leaves the least cruft (from my point of view) in the code and doesn't give users the false impression that ISA cards work. I would appreciate some advice on the best way forward. In the absence of any input, I will probably stick with option 3 for now but may move to option 1 if the ISA code starts getting in the way. Keep in mind that digi(4) does not currently compile on FreeBSD-8 or later, so any of the above options are an improvement over the status quo, though all are a regression from FreeBSD-7. Of course, if someone has access to other Digi card types and wants to assist with porting and testing, I would be happy to work with them. --=20 Peter Jeremy --AqsLC8rIMeq19msA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkzlpswACgkQ/opHv/APuIducQCgvFKipOlZLB5vBDxLyzVnmR9I bHoAnR49um1WrxSB2LmBcwHiRUXyd1xB =HTRC -----END PGP SIGNATURE----- --AqsLC8rIMeq19msA--