#include "io.h"
#include "../port/error.h"
#include "../port/netif.h"
-#include "etherif.h"
+#include "../port/etherif.h"
/*
* // comments note conflicts with 82563-style drivers,
Block **tb;
uchar ra[Eaddrlen];
- uchar mta[128];
+ u32int mta[128];
ulong stats[nelem(stattab)];
uint speeds[3];
} Ctlr;
/* tweakable paramaters */
enum {
- Rbsz = 12*1024,
+ Mtu = 12*1024,
Nrd = 256,
Ntd = 256,
Nrb = 256,
c->reg[Fctrl] |= Bam;
c->reg[Rxcsum] |= Ipcs;
- c->reg[Srrctl] = (c->rbsz + 1023)/1024;
+ c->reg[Srrctl] = c->rbsz / 1024;
c->reg[Mhadd] = c->rbsz << 16;
c->reg[Hlreg0] |= Jumboen;
b->checksum = r->cksum;
}
// r->status = 0;
- etheriq(e, b, 1);
+ etheriq(e, b);
c->rdfree--;
rdh = Next(rdh, m);
goto loop1; /* UGH */
free(c);
continue;
}
+ pcienable(p);
c->p = p;
c->io = io;
c->reg = (u32int*)mem;
c->regmsi = (u32int*)memmsi;
- c->rbsz = Rbsz;
+ c->rbsz = ROUND(Mtu, 1024);
if(reset(c)){
print("i82598: can't reset\n");
free(c);
e->irq = c->p->intl;
e->tbdf = c->p->tbdf;
e->mbps = 10000;
- e->maxmtu = c->rbsz;
+ e->maxmtu = Mtu;
e->arg = e;
e->attach = attach;
e->ctl = ctl;
e->ifstat = ifstat;
- e->interrupt = interrupt;
e->multicast = multicast;
e->promiscuous = promiscuous;
e->shutdown = shutdown;
e->transmit = transmit;
+ intrenable(e->irq, interrupt, e, e->tbdf, e->name);
+
return 0;
}