summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/man/man4/hatm.48
-rw-r--r--sys/dev/hatm/if_hatm.c6
-rw-r--r--sys/dev/hatm/if_hatm_intr.c2
-rw-r--r--sys/dev/hatm/if_hatmvar.h1
4 files changed, 13 insertions, 4 deletions
diff --git a/share/man/man4/hatm.4 b/share/man/man4/hatm.4
index afe1f2a..d9266c2 100644
--- a/share/man/man4/hatm.4
+++ b/share/man/man4/hatm.4
@@ -201,11 +201,15 @@ Maximum number of active TPDs per connection. This controls the maximum
number of outstanding packet chunks per connection and thus the maximum
delay packets can have because of queueing on the adapter. If set to 0,
a connection can eat up all available TPDs.
+.It Cm hw.hatmN.mbuf_max_pages
+Maximum number of memory pages allocated to small external mbufs.
+This must not be zero and not larger than 65536.
.El
.Sh CAVEATS
When putting a HE155 into a 64-bit 66MHz PCI slot the machine may hang.
-This occures very early in the POST so that even the display does not
-turn on. HE622 cards work just fine in 64-bit slots.
+This occures very early in the POST so that even the display does not turn on.
+The HE155 runs only in 33MHz slots (either 32 or 64-bit).
+HE622 cards work just fine in 64-bit slots.
.Pp
The driver may not work with bounce buffer, because of
.Fn bus_dma_sync
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c
index 24a0488..d2c1222 100644
--- a/sys/dev/hatm/if_hatm.c
+++ b/sys/dev/hatm/if_hatm.c
@@ -329,7 +329,7 @@ static void
hatm_init_smbufs(struct hatm_softc *sc)
{
sc->mbuf_pages = malloc(sizeof(sc->mbuf_pages[0]) *
- HE_CONFIG_MAX_MBUF_PAGES, M_DEVBUF, M_WAITOK);
+ sc->mbuf_max_pages, M_DEVBUF, M_WAITOK);
sc->mbuf_npages = 0;
}
@@ -1388,6 +1388,10 @@ hatm_configure(struct hatm_softc *sc)
kenv_getuint(sc, "tpdmax", &sc->max_tpd,
HE_CONFIG_TPD_MAXCC, 0);
+ /* external mbuf pages */
+ kenv_getuint(sc, "max_mbuf_pages", &sc->mbuf_max_pages,
+ HE_CONFIG_MAX_MBUF_PAGES, 0);
+
return (0);
}
diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c
index b359ecb..088eef4 100644
--- a/sys/dev/hatm/if_hatm_intr.c
+++ b/sys/dev/hatm/if_hatm_intr.c
@@ -175,7 +175,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group)
int err;
u_int i;
- if (sc->mbuf_npages == HE_CONFIG_MAX_MBUF_PAGES)
+ if (sc->mbuf_npages == sc->mbuf_max_pages))
return;
if ((pg = malloc(MBUF_ALLOC_SIZE, M_DEVBUF, M_NOWAIT)) == NULL)
return;
diff --git a/sys/dev/hatm/if_hatmvar.h b/sys/dev/hatm/if_hatmvar.h
index 2f4bfc2..ed1566a 100644
--- a/sys/dev/hatm/if_hatmvar.h
+++ b/sys/dev/hatm/if_hatmvar.h
@@ -422,6 +422,7 @@ struct hatm_softc {
bus_dma_tag_t mbuf_tag;
struct mbuf_page **mbuf_pages;
u_int mbuf_npages;
+ u_int mbuf_max_pages;
struct mbufx_free *mbuf_list[2];
/* mbuf cluster tracking and mapping for group 0 */
OpenPOWER on IntegriCloud