Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2005 14:36:35 -0800
From:      "Kevin Oberman" <oberman@es.net>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        maksim.yevmenkin@savvis.net
Subject:   Re: device pcic and card 
Message-ID:  <20050124223635.37BA35D04@ptavv.es.net>
In-Reply-To: Your message of "Sat, 22 Jan 2005 17:05:52 MST." <20050122.170552.61536829.imp@bsdimp.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multipart MIME message.

--==_Exmh_20635243320
Content-Type: text/plain; charset=us-ascii

> Date: Sat, 22 Jan 2005 17:05:52 -0700 (MST)
> From: "M. Warner Losh" <imp@bsdimp.com>
> Sender: owner-freebsd-current@freebsd.org
> 
> In message: <41DC2EAD.8070403@savvis.net>
>             Maksim Yevmenkin <maksim.yevmenkin@savvis.net> writes:
> : i heard Warner said something about removing pcic and card (aka oldcard) 
> : support from -current. has it happened? after cvsup'ing (yesterday) i no 
> : longer can configure kernel with pcic and card.
> : 
> : i can not use newcard on my tecra 8100 :( when i insert serial pc-card 
> : my laptop hangs :( i can insert ethernet card (3com) but i can not 
> : remove it :( same story - laptop hangs hard.
> 
> Hangs hard?  That's unfortunate.  I'd love to help figure things out,
> but my tecra 8100 is working great...

What kind of card? There is a known problem with busdma and some
interfaces including if_dc. (I have a Xircom that uses this driver, but
I have seen reports of the problem on several others.)

I have a work-around from scottl for if_dc, and another from Takashi
Naguchi with a one-line change in busdma_machdep.c that fixed his
problem. (Note: These are hacks and not real fixes.) I will attach them. 

I can only vouch that the if_dc.c patch prevents the hang. I have not tried 
the second nor have I tried using the Ethernet portion of the Xircom. I only 
use it for the modem.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634


--==_Exmh_20635243320
Content-Type: text/plain ; name="if_dc.diff"
Content-Description: if_dc.diff
Content-Disposition: attachment; filename="if_dc.diff"

--- if_dc.c~	Fri Oct 15 17:53:44 2004
+++ 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,
+	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);

--==_Exmh_20635243320--
CContent-Type: text/plain ; name="if_dc.diff"; charset=us-ascii
Content-Description: if_dc.diff
Content-Disposition: attachment; filename="if_dc.diff"

--- if_dc.c~	Fri Oct 15 17:53:44 2004
+++ 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,
+	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);

--==_Exmh_20635243320--
ontent-Type: text/plain ; name="busdma_machdep.diff"
Content-Description: busdma_machdep.diff
Content-Disposition: attachment; filename="busdma_machdep.diff"

src/sys/i386/i386/busdma_machdep.c
--- busdma_machdep.c.1.59.2.3   Tue Dec 28 21:46:05 2004
+++ busdma_machdep.c    Wed Dec 29 00:05:20 2004

@@ -1018,7 +1018,6 @@
                bpage->busaddr = pmap_kextract(bpage->vaddr);
                mtx_lock(&bounce_lock);
                STAILQ_INSERT_TAIL(&bz->bounce_page_list, bpage, links);
-               total_bpages++;
                bz->total_bpages++;
                bz->free_bpages++;
                mtx_unlock(&bounce_lock);

--==_Exmh_20635243320--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050124223635.37BA35D04>