Date: Thu, 29 Dec 2005 00:37:20 -0800 (PST) From: Joe Smit <noemail4535@yahoo.com> To: freebsd-alpha@freebsd.org Subject: alignment fault in vx driver on 5.4 Message-ID: <20051229083720.92811.qmail@web30415.mail.mud.yahoo.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051229083720.92811.qmail>