fixed interrupt problem with BCM driver on multicore machines

This commit is contained in:
aiju 2011-04-24 17:23:17 +02:00
parent abf197c323
commit b267359b69

View file

@ -22,7 +22,7 @@
typedef struct Ctlr Ctlr;
struct Ctlr {
Lock txlock;
Lock txlock, imlock;
Ctlr *link;
Pcidev *pdev;
ulong *nic, *status;
@ -404,6 +404,7 @@ bcminterrupt(Ureg*, void *arg)
edev = arg;
ctlr = edev->ctlr;
ilock(&ctlr->imlock);
dummyread(csr32(ctlr, InterruptMailbox));
csr32(ctlr, InterruptMailbox) = 1;
status = ctlr->status[0];
@ -416,6 +417,7 @@ bcminterrupt(Ureg*, void *arg)
bcmtransclean(edev);
bcmtransmit(edev);
csr32(ctlr, InterruptMailbox) = tag << 24;
iunlock(&ctlr->imlock);
}
static void
@ -664,5 +666,5 @@ bcmpnp(Ether* edev)
void
etherbcmlink(void)
{
addethercard("BCM57xx", bcmpnp);
addethercard("BCM5755", bcmpnp);
}