From owner-freebsd-alpha@FreeBSD.ORG Thu Dec 29 08:37:21 2005 Return-Path: X-Original-To: freebsd-alpha@freebsd.org Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54F2416A41F for ; Thu, 29 Dec 2005 08:37:21 +0000 (GMT) (envelope-from noemail4535@yahoo.com) Received: from web30415.mail.mud.yahoo.com (web30415.mail.mud.yahoo.com [68.142.201.238]) by mx1.FreeBSD.org (Postfix) with SMTP id CC1B643D45 for ; Thu, 29 Dec 2005 08:37:20 +0000 (GMT) (envelope-from noemail4535@yahoo.com) Received: (qmail 92813 invoked by uid 60001); 29 Dec 2005 08:37:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Ln8xp0pXaF9l137p1e+fHOh0Rl3V+X0aKEKUJQheRaHPoNUzuX0YLG3C/dnJiYHicGrRdYQbjlcLKhtxhYl3nDH0vG9pVkxTBmkrPgDpTACm0G1WyorCN9aESPID48zWTCpUpTSSQbLfXV/ZDwLO5VtmkzJ5fqEZTySZguXnz/A= ; Message-ID: <20051229083720.92811.qmail@web30415.mail.mud.yahoo.com> Received: from [69.209.236.68] by web30415.mail.mud.yahoo.com via HTTP; Thu, 29 Dec 2005 00:37:20 PST Date: Thu, 29 Dec 2005 00:37:20 -0800 (PST) From: Joe Smit To: freebsd-alpha@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: alignment fault in vx driver on 5.4 X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 08:37:21 -0000 Hello, I've put together an alpha PC164 500mhz system with a 3Com 3C590 etherlink 3, running Freebsd 5.4. I use the vx driver for the 3c590, but this results in a unaligned panic on the first ifconfig. The driver is attempting to write from an unaligned character array, 32 bits at a time. So here's a simple patch that only writes 1 byte at a time. This driver doesn't seem to do dma and is very inefficient as a result - about 30% cpu overhead for 10 mbits/s. I don't think the original code using write_multi_4 was any faster. I guess I'll have to get a newer nic. --- if_vx.c.original Thu Dec 1 01:21:31 2005 +++ if_vx.c Sat Dec 24 13:33:50 2005 @@ -454,13 +454,8 @@ CSR_WRITE_4(sc, VX_W1_TX_PIO_WR_1, len | TX_INDICATE); while (m) { - if (m->m_len > 3) - bus_space_write_multi_4(sc->bst, sc->bsh, - VX_W1_TX_PIO_WR_1, (u_int32_t *)mtod(m, caddr_t), m->m_len / 4); - if (m->m_len & 3) - bus_space_write_multi_1(sc->bst, sc->bsh, - VX_W1_TX_PIO_WR_1, - mtod(m, caddr_t) + (m->m_len & ~3) , m->m_len & 3); + bus_space_write_multi_1(sc->bst, sc->bsh, VX_W1_TX_PIO_WR_1, + mtod(m, caddr_t), m->m_len); m = m_free(m); } while (pad--) __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com