aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ti
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2011-03-11 22:32:17 +0000
committerMarius Strobl <marius@FreeBSD.org>2011-03-11 22:32:17 +0000
commita1d090d4286800bedc2d38767c5bc8a7e4c5cb21 (patch)
tree3de345b161e463d7a57eb7b04a4e274096d1c775 /sys/dev/ti
parent006aaeeadf8d2b0539a0c3f672bd9e1c230cbc33 (diff)
downloadsrc-a1d090d4286800bedc2d38767c5bc8a7e4c5cb21.tar.gz
src-a1d090d4286800bedc2d38767c5bc8a7e4c5cb21.zip
- Allocate the DMA memory shared between the host and the controller as
coherent. - Constify the ti_devs table. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=219547
Diffstat (limited to 'sys/dev/ti')
-rw-r--r--sys/dev/ti/if_ti.c11
-rw-r--r--sys/dev/ti/if_tireg.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 7eeee36fe271..846856555c41 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -145,7 +145,7 @@ typedef enum {
* Various supported device vendors/types and their names.
*/
-static struct ti_type ti_devs[] = {
+static const struct ti_type const ti_devs[] = {
{ ALT_VENDORID, ALT_DEVICEID_ACENIC,
"Alteon AceNIC 1000baseSX Gigabit Ethernet" },
{ ALT_VENDORID, ALT_DEVICEID_ACENIC_COPPER,
@@ -1118,7 +1118,8 @@ ti_alloc_jumbo_mem(sc)
if (bus_dmamem_alloc(sc->ti_jumbo_dmat,
(void**)&sc->ti_cdata.ti_jumbo_buf,
- BUS_DMA_NOWAIT, &sc->ti_jumbo_dmamap) != 0) {
+ BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
+ &sc->ti_jumbo_dmamap) != 0) {
device_printf(sc->ti_dev, "Failed to allocate jumbo memory\n");
return (ENOBUFS);
}
@@ -2252,7 +2253,7 @@ static int
ti_probe(dev)
device_t dev;
{
- struct ti_type *t;
+ const struct ti_type *t;
t = ti_devs;
@@ -2389,7 +2390,8 @@ ti_attach(dev)
}
if (bus_dmamem_alloc(sc->ti_rdata_dmat, (void**)&sc->ti_rdata,
- BUS_DMA_NOWAIT, &sc->ti_rdata_dmamap) != 0) {
+ BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
+ &sc->ti_rdata_dmamap) != 0) {
device_printf(dev, "Failed to allocate rdata memory\n");
error = ENOMEM;
goto fail;
@@ -2487,7 +2489,6 @@ ti_attach(dev)
ifp->if_start = ti_start;
ifp->if_init = ti_init;
ifp->if_baudrate = 1000000000;
- ifp->if_mtu = ETHERMTU;
ifp->if_snd.ifq_maxlen = TI_TX_RING_CNT - 1;
/* Set up ifmedia support. */
diff --git a/sys/dev/ti/if_tireg.h b/sys/dev/ti/if_tireg.h
index 070a70af5ab9..22259b5ca08e 100644
--- a/sys/dev/ti/if_tireg.h
+++ b/sys/dev/ti/if_tireg.h
@@ -967,7 +967,7 @@ struct ti_chain_data {
struct ti_type {
u_int16_t ti_vid;
u_int16_t ti_did;
- char *ti_name;
+ const char *ti_name;
};
#define TI_HWREV_TIGON 0x01