From owner-freebsd-current@FreeBSD.ORG Wed Mar 23 19:37:19 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E761E16A509 for ; Wed, 23 Mar 2005 19:37:19 +0000 (GMT) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4144D43D5A for ; Wed, 23 Mar 2005 19:37:19 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 18177 invoked from network); 23 Mar 2005 19:37:19 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 23 Mar 2005 19:37:18 -0000 Received: from [10.50.41.231] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j2NJavaj063392; Wed, 23 Mar 2005 14:37:09 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: "wsk" Date: Wed, 23 Mar 2005 14:38:32 -0500 User-Agent: KMail/1.6.2 References: <57062.211.96.21.195.1106558752.squirrel@webmail.catholic.org> <200502031304.41476.jhb@FreeBSD.org> <64443.211.96.21.195.1107594076.squirrel@webmail.catholic.org> In-Reply-To: <64443.211.96.21.195.1107594076.squirrel@webmail.catholic.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200503231438.32937.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: current@FreeBSD.org Subject: Re: Rocketport uPCI ioaddr mapping failed under FreeBSD-5.3&CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2005 19:37:20 -0000 On Saturday 05 February 2005 04:01 am, wsk wrote: > > On Monday 24 January 2005 04:25 am, wsk wrote: > >> hi,folks: > >> > >> after installed RocketPort uPCI card into my box;it > >> dumps the follow eror msgs: > >> > >> rp0: port 0xde00-0xdeff,0xdd80-0xddff mem > >> 0xfcedff80-0xfcedffff > >> irq 19 at device 10.0 on pci2 > >> rp0: failed: rid 0x10 is memory, requested 4 > >> rp0: ioaddr mapping failed for RocketPort(PCI). > >> device_attach: rp0 attach returned 6 > > > > Looks like you need to change the driver to map its io addresses from a > > different BAR for this chip ID since BAR 0 is memory, not I/O. I'm not > > sure > > this driver will work with this card, btw, but you can try changing this > > line > > in the attach function of sys/dev/rp/rp_pci.c: > > > > ctlp->io_rid[0] = 0x10; > > > > to use either '0x14' or '0x18' rather than '0x10' and see if it >works. > > It must use '0x18' . or the driver can't map the ports: > here'is my boot mesgs by set '0x14' > Feb 5 16:21:20 wsk kernel: rp0: port > 0xde00-0xdeff,0xdd80-0xddff mem 0xfcedff80-0xfcedffff irq 19 at device > 10.0 on pci2 > Feb 5 16:21:20 wsk kernel: RocketPort0 (Version 3.02) 0 ports. > and after set '0x18'. the boot mesgs: > Feb 5 16:47:59 wsk kernel: rp0: port > 0xde00-0xdeff,0xdd80-0xddff mem 0xfcedff80-0xfcedffff irq 19 at device > 10.0 on pci2 > Feb 5 16:47:59 wsk kernel: RocketPort0 (Version 3.02) 8 ports. > and thanks again Can you try this patch below and verify it works? If so, I'd like to commit it. Thanks! Index: rp_pci.c =================================================================== RCS file: /usr/cvs/src/sys/dev/rp/rp_pci.c,v retrieving revision 1.9 diff -u -r1.9 rp_pci.c --- rp_pci.c 21 Jun 2004 13:02:25 -0000 1.9 +++ rp_pci.c 23 Mar 2005 19:37:43 -0000 @@ -67,6 +67,7 @@ #define RP_DEVICE_ID_4J 0x0007 #define RP_DEVICE_ID_6M 0x000C #define RP_DEVICE_ID_4M 0x000D +#define RP_DEVICE_ID_UPCI_8O 0x0805 /************************************************************************** MUDBAC remapped for PCI @@ -177,7 +178,14 @@ ctlp->bus_ctlp = NULL; - ctlp->io_rid[0] = 0x10; + switch (pci_get_devid(dev)) { + case RP_DEVICE_ID_UPCI_8O: + ctlp->io_rid[0] = PCIR_BAR(2); + break; + default: + ctlp->io_rid[0] = PCIR_BAR(0); + break; + } ctlp->io[0] = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &ctlp->io_rid[0], RF_ACTIVE); if(ctlp->io[0] == NULL) { -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org