update the old warhorse with a few msi-x registers. Reference: /n/atom/patch/applied/i63msixbits Date: Sat Mar 22 04:44:21 CET 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/nix/k10/ether82563.c Sat Mar 22 04:44:05 2014 +++ /sys/src/nix/k10/ether82563.c Sat Mar 22 04:44:05 2014 @@ -31,7 +31,7 @@ Fla = 0x001c, /* Flash Access */ Mdic = 0x0020, /* MDI Control */ Fcal = 0x0028, /* Flow Control Address Low */ - Fcah = 0x002C, /* Flow Control Address High */ + Fcah = 0x002c, /* Flow Control Address High */ Fct = 0x0030, /* Flow Control Type */ Kumctrlsta = 0x0034, /* Kumeran Control and Status Register */ Connsw = 0x0034, /* copper / fiber switch control; 82575/82576 */ @@ -39,19 +39,22 @@ Fcttv = 0x0170, /* Flow Control Transmit Timer Value */ Txcw = 0x0178, /* Transmit Configuration Word */ Rxcw = 0x0180, /* Receive Configuration Word */ - Ledctl = 0x0E00, /* LED control */ + Ledctl = 0x0e00, /* LED control */ Pba = 0x1000, /* Packet Buffer Allocation */ Pbs = 0x1008, /* Packet Buffer Size */ /* Interrupt */ - Icr = 0x00C0, /* Interrupt Cause Read */ + Icr = 0x00c0, /* Interrupt Cause Read */ Itr = 0x00c4, /* Interrupt Throttling Rate */ - Ics = 0x00C8, /* Interrupt Cause Set */ - Ims = 0x00D0, /* Interrupt Mask Set/Read */ - Imc = 0x00D8, /* Interrupt mask Clear */ - Iam = 0x00E0, /* Interrupt acknowledge Auto Mask */ + Ics = 0x00c8, /* Interrupt Cause Set */ + Ims = 0x00d0, /* Interrupt Mask Set/Read */ + Imc = 0x00d8, /* Interrupt mask Clear */ + Iam = 0x00e0, /* Interrupt acknowledge Auto Mask */ + Ivar = 0x00e4, /* Ivar: interrupt allocation */ Eitr = 0x1680, /* Extended itr; 82575/6 80 only */ + P3gio = 0x5b00, /* */ + Pbaclr = 0x5b68, /* clear msi-x pba */ /* Receive */ @@ -143,6 +146,9 @@ Internalphy = 0<<22, /* " internal phy (copper) */ Sgmii = 2<<22, /* " sgmii */ Serdes = 3<<22, /* " serdes */ + Eiame = 1<<24, /* extended auto mask enable */ + Iame = 1<<27, /* auto mask enable */ + Pbasup = 1<<31, /* msi-x pba support */ }; enum { @@ -2048,11 +2054,11 @@ print("%s: can't map %#P\n", cname(ctlr), ctlr->port); return -1; } + pcisetbme(p); if(i82563reset(ctlr)){ vunmap(ctlr->nic, p->mem[0].size); return -1; } - pcisetbme(ctlr->pcidev); return 0; }