From owner-cvs-all@FreeBSD.ORG Tue Mar 8 23:26:46 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E22D16A4CE; Tue, 8 Mar 2005 23:26:46 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2D9643D41; Tue, 8 Mar 2005 23:26:45 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j28NRkH0076372; Tue, 8 Mar 2005 16:27:46 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <422E341E.3090900@samsco.org> Date: Tue, 08 Mar 2005 16:24:14 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050308224756.AA9B95D08@ptavv.es.net> In-Reply-To: <20050308224756.AA9B95D08@ptavv.es.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: src-committers@FreeBSD.org cc: cvs-src@FreeBSD.org cc: cvs-all@FreeBSD.org cc: deischen@FreeBSD.org cc: jeremie@le-hen.org cc: "M. Warner Losh" Subject: Re: cvs commit: src/sys/dev/cardbus cardbus.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 23:26:46 -0000 Kevin Oberman wrote: >>Date: Tue, 08 Mar 2005 15:33:34 -0700 >>From: Scott Long >> >>Kevin Oberman wrote: >> >>>>Date: Tue, 08 Mar 2005 09:35:35 -0700 (MST) >>>>From: "M. Warner Losh" >>>>Sender: owner-cvs-all@freebsd.org >>>> >>>>In message: <20050308072731.GI94451@obiwan.tataz.chchile.org> >>>> Jeremie Le Hen writes: >>>>: > Both laptops are Dell (Inspiron 4150 and Inspiron 8100). >>>>: >>>>: I don't know if it cares, but mine is a Dell Latitute CPx. >>>>: >>>>: dmesg(8) is attached, with cardbus rev 1.48. >>>> >>>>This looks like it is working to me. Is that correct? I tried it >>>>last night on my Sony and got two interesting results. The rl card I >>>>have just worked, and the dc card appeared to work, but locked up the >>>>system completely. I've noticed some anomalies with the lights on the >>>>card (which indicate power issues), which may be the cause of some of >>>>these problems. I'll look into those when I get the chance (maybe >>>>Thursday night unless work is exceptionally non-busy before then). >>> >>> >>>The if_dc issues is with busdma and Scott is aware of it. (Hopefully a >>>fix is coming soon.) In the meantime I have a patch to get dc to work >>>again. It's a kludge, but it at least lives. >>> >>> >>>------------------------------------------------------------------------ >>> >>>--- sys/pci/if_dc.c~ Fri Oct 15 17:53:44 2004 >>>+++ sys/pci/if_dc.c Mon Dec 20 14:22:48 2004 >>>@@ -2151,8 +2151,8 @@ >>> } >>> >>> /* Allocate a busdma tag for mbufs. */ >>> error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, >>>- BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * DC_TX_LIST_CNT, >>>+ BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, >>> DC_TX_LIST_CNT, MCLBYTES, 0, NULL, NULL, &sc->dc_mtag); >>> if (error) { >>> printf("dc%d: failed to allocate busdma tag\n", unit); >> >>I think that this patch is actually the correct thing to do. I also >>believe that the alignment argument should be changed from PAGE_SIZE to >>'1'. Considering that busdma never used to do alignment fixups, this >>change should effectively be a NOP for the driver, and will avoid the >>whole bounce-buffer mess. Care to give this a sanity test? > > > Oops! I sent the wrong diff. Sorry, It was an older one. The current one > is: > --- sys/pci/if_dc.c.orig Thu Mar 3 16:00:57 2005 > +++ sys/pci/if_dc.c Tue Mar 8 14:41:20 2005 > @@ -2147,8 +2147,8 @@ > } > > /* Allocate a busdma tag for mbufs. */ > - error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, > - BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * DC_TX_LIST_CNT, > + error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, > + BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, > DC_TX_LIST_CNT, MCLBYTES, 0, NULL, NULL, &sc->dc_mtag); > if (error) { > printf("dc%d: failed to allocate busdma tag\n", unit); > > I can confirm that this one makes my Xircom card work just fine. It > would be nice to get this committed if it's an acceptable fix. I have no > idea who should do this as if_dc does not show up in MAINTAINERS. I guess > most any committer (Scott...Warner?) can do it. Done, thanks! Scott