From owner-freebsd-hackers Tue Sep 11 12:26:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from hamster.franken.de (hamster.franken.de [193.141.110.13]) by hub.freebsd.org (Postfix) with ESMTP id DEFE737B401 for ; Tue, 11 Sep 2001 12:26:14 -0700 (PDT) Received: from karnickel.franken.de (karnickel.franken.de [193.141.110.11]) by hamster.franken.de (8.11.5/8.11.5) with ESMTP id f8BJQAX72519; Tue, 11 Sep 2001 21:26:10 +0200 (CEST) (envelope-from tanis@gaspode.franken.de) Received: from gaspode.franken.de (lengfeld.core.main.franken.de [193.141.110.4]) by karnickel.franken.de (8.11.3/8.11.3) with ESMTP id f8BJQAJ64370; Tue, 11 Sep 2001 21:26:10 +0200 (CEST) (envelope-from tanis@gaspode.franken.de) Received: (from tanis@localhost) by gaspode.franken.de (8.11.6/8.11.1) id f8BJQA702856; Tue, 11 Sep 2001 21:26:10 +0200 (CEST) (envelope-from tanis) Date: Tue, 11 Sep 2001 21:26:10 +0200 From: German Tischler To: Srinivas Dharmasanam Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: inw and outw calls Message-ID: <20010911212610.A2817@gaspode.franken.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline User-Agent: Mutt/1.2.5-current-20010403i In-Reply-To: ; from the_srinivas@hotmail.com on Tue, Sep 11, 2001 at 12:05:11PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 11, 2001 at 12:05:11PM -0700, Srinivas Dharmasanam wrote: > Hi, > I have a question regarding the inb/outb() or inw/outw() calls in FreeBSD= =20 > 4.2. >=20 > I have a dual fxp Fast Ethernet NIC that shows up as following with dmesg= : >=20 > fxp1: port 0xcc00-0xcc3f mem=20 > 0xef900000-0xef9fffff,0xefa > ff000-0xefafffff irq 18 at device 12.0 on pci2 > fxp1: Ethernet address 00:30:64:03:03:2a > fxp2: port 0xc800-0xc83f mem=20 > 0xef700000-0xef7fffff,0xefa > fe000-0xefafefff irq 19 at device 13.0 on pci2 > fxp2: Ethernet address 00:30:64:03:03:2b >=20 > Now, I need to write the Watchdog timer ctrl registers (offset 65 and 66)= on=20 > this card. >=20 > For this I'm using outb(port, val) fn call. Can someone please tell me ho= w=20 > to calculate the port no to pass to this outb() function. >=20 > I tried writing to all possible port nos starting from 0xc800 to 0xc83f > and 0xcc00-0xcc3f but it has no apparent effect on the system. >=20 > Please let me know how to translate this port range to the actual outb() = fn=20 > call arguments. >=20 > Thanks a lot in advance. You should probably extend the kernel fxp driver and use=20 bus_space_read and bus_space_write instead of trying to do this in userspace. The driver already has a watchdog routine, perhaps you can add what you need there. --gt --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iQEVAwUBO55lUb7hO6NLB/FvAQHDpgf/YjL+0G/E8aMVq/5FH6J51TzTW/H6XNrS iPEHMLOVa5j1LvjdutmSSglBssNW6ZbyJMcwvBR6bDbQ8M7fjF2QpsH2LOnRw1Zb y+aZqYheGGbChZ1j57uIeWP7kqZGI1RpWOQaBpzSbnco2qBvuo97VYPDJvAZ/tX9 BGVM06hmaLoUpzV+zzEUFR5ZYtJJNJM33E+It3aZUUIc9d3jhsQVVKVMvONs43T6 S0dciOQ20F4odpZMuN61YMQ8q4hzMYqUeBmCU5XwGKbYYL7XsIGbDcxHKnqE86qc MFdleIMgETCLiybxvdM8zcjY0P1Yfq6TQLoOi1pxUuyX2CDLPx6kyg== =m0fL -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message