PERFORCE change 110166 for review
Sam Leffler
sam at FreeBSD.org
Fri Nov 17 19:02:47 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=110166
Change 110166 by sam at sam_ebb on 2006/11/17 19:02:31
o the physical address of the h/w descriptor passed to
an NPE does include the portid in the low bits; not
sure what goes there
o correct format of NPE_SETRXQOSENTRY msg; the NPE id goes
in bits 20..23, not the portid; this fixes the rx q setup
for npe1
o correct memset on deactivate
With these changes npe1 seems to work fine.
Affected files ...
.. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#23 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#23 (text+ko) ====
@@ -442,7 +442,6 @@
npe_dma_setup(struct npe_softc *sc, struct npedma *dma,
const char *name, int nbuf, int maxseg)
{
- int portid = npeconfig[device_get_unit(sc->sc_dev)].portid;
int error, i;
memset(dma, 0, sizeof(dma));
@@ -515,8 +514,6 @@
"error %u\n", dma->name, i, error);
return error;
}
- /* add port id once */
- npe->ix_neaddr |= portid << 3;
npe->ix_hw = hw;
}
bus_dmamap_sync(dma->buf_tag, dma->buf_map, BUS_DMASYNC_PREWRITE);
@@ -543,7 +540,7 @@
bus_dma_tag_destroy(dma->buf_tag);
if (dma->mtag)
bus_dma_tag_destroy(dma->mtag);
- memset(dma, 0, sizeof(dma));
+ memset(dma, 0, sizeof(*dma));
}
static int
@@ -553,7 +550,6 @@
int unit = device_get_unit(dev);
int error, i;
-
/* load NPE firmware and start it running */
error = ixpnpe_init(sc->sc_npe, "npe_fw", npeconfig[unit].imageid);
if (error != 0)
@@ -1472,10 +1468,10 @@
static int
npe_setrxqosentry(struct npe_softc *sc, int classix, int trafclass, int qid)
{
- int portid = npeconfig[device_get_unit(sc->sc_dev)].portid;
+ int npeid = npeconfig[device_get_unit(sc->sc_dev)].npeid;
uint32_t msg[2];
- msg[0] = (NPE_SETRXQOSENTRY << 24) | (portid << 16) | classix;
+ msg[0] = (NPE_SETRXQOSENTRY << 24) | (npeid << 20) | classix;
msg[1] = (trafclass << 24) | (1 << 23) | (qid << 16) | (qid << 4);
return ixpnpe_sendandrecvmsg(sc->sc_npe, msg, msg);
}
More information about the p4-projects
mailing list