From owner-freebsd-mobile Wed Jan 10 0:34:54 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from mta06-svc.ntlworld.com (mta06-svc.ntlworld.com [62.253.162.46]) by hub.freebsd.org (Postfix) with ESMTP id 008FE37B400; Wed, 10 Jan 2001 00:34:37 -0800 (PST) Received: from dmlb.org ([62.253.135.85]) by mta06-svc.ntlworld.com (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP id <20010110083432.JWSV1735.mta06-svc.ntlworld.com@dmlb.org>; Wed, 10 Jan 2001 08:34:32 +0000 Received: from dmlb by dmlb.org with local (Exim 3.03 #1) id 14GGiF-000FjN-00; Wed, 10 Jan 2001 08:34:31 +0000 Content-Length: 1898 Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 10 Jan 2001 08:34:31 -0000 (GMT) From: Duncan Barclay To: mobile@freebsd.org, onoe@freebsd.org Subject: memory mapped io for Aironet driver. Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello all Can someone with an aironet card running -current see if this patch to /sys/dev/awi/if_awi_pccard.c works? This should enable memory mapped operation. Duncan Index: if_awi_pccard.c =================================================================== RCS file: /steer/ncvs/src/sys/dev/awi/if_awi_pccard.c,v retrieving revision 1.5 diff -u -r1.5 if_awi_pccard.c --- if_awi_pccard.c 2000/10/15 14:18:05 1.5 +++ if_awi_pccard.c 2001/01/10 08:31:17 @@ -139,19 +139,19 @@ } psc->sc_mem_rid = 0; -#if 1 - /* - * XXX: awi needs to access memory with 8bit, - * but pccardd apparently maps memory with MDF_16BITS flag. - * So memory mapped access is disabled and use IO port instead. - */ - psc->sc_mem_res = 0; -#else psc->sc_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &psc->sc_mem_rid, 0, ~0, 0x8000, RF_ACTIVE); -#endif if (psc->sc_mem_res) { + error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->dev), + sc->dev, sc->cm_rid, 0, NULL); + if (error) + device_printf("awi_pccard_attach: adjusting memory offse t failed\n"); + error = CARD_SET_RES_FLAGS(device_get_parent(sc->dev), sc->dev, + SYS_RES_MEMORY, sc->cm_rid, 2); + if (error) + device_printf("awi_pccard_attach: setting 8bit memory fa iled\n"); sc->sc_chip.sc_memt = rman_get_bustag(psc->sc_mem_res); + sc->sc_chip.sc_memh = rman_get_bushandle(psc->sc_mem_res); am79c930_chip_init(&sc->sc_chip, 1); } else --- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message