return -ENODEV;
pci_write_config_dword(pvt->pci_ch[pvt->inject.socket][pvt->inject.channel][0],
- MC_CHANNEL_ERROR_MASK, 0);
+ MC_CHANNEL_ERROR_INJECT, 0);
return 0;
}
if ((rc < 0) || (value >= pvt->sockets))
return -EIO;
- pvt->inject.section = (u32) value;
+ pvt->inject.socket = (u32) value;
return count;
}
u32 read;
int count;
+ debugf0("setting pci %02x:%02x.%x reg=%02x value=%08x\n",
+ dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn),
+ where, val);
+
for (count = 0; count < 10; count++) {
if (count)
msleep (100);
return 0;
}
- debugf0("Error Injection Register 0x%02x: Tried to write 0x%08x, "
- "but read: 0x%08x\n", where, val, read);
+ i7core_printk(KERN_ERR, "Error during set pci %02x:%02x.%x reg=%02x "
+ "write=%08x. Read=%08x\n",
+ dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn),
+ where, val, read);
return -EINVAL;
}
pci_write_config_dword(pvt->pci_noncore[pvt->inject.socket],
MC_CFG_CONTROL, 0x2);
-#if 0
- /* Zeroes error count registers */
- pci_write_config_dword(pvt->pci_mcr[pvt->inject.socket][4],
- MC_TEST_ERR_RCV1, 0);
- pci_write_config_dword(pvt->pci_mcr[pvt->inject.socket][4],
- MC_TEST_ERR_RCV0, 0);
- pvt->ce_count_available[pvt->inject.socket] = 0;
-#endif
-
write_and_test(pvt->pci_ch[pvt->inject.socket][pvt->inject.channel][0],
MC_CHANNEL_ADDR_MATCH, mask);
write_and_test(pvt->pci_ch[pvt->inject.socket][pvt->inject.channel][0],
MC_CHANNEL_ERROR_MASK, pvt->inject.eccmask);
write_and_test(pvt->pci_ch[pvt->inject.socket][pvt->inject.channel][0],
- MC_CHANNEL_ERROR_MASK, injectmask);
+ MC_CHANNEL_ERROR_INJECT, injectmask);
/*
* This is something undocumented, based on my tests
u32 injectmask;
pci_read_config_dword(pvt->pci_ch[pvt->inject.socket][pvt->inject.channel][0],
- MC_CHANNEL_ERROR_MASK, &injectmask);
+ MC_CHANNEL_ERROR_INJECT, &injectmask);
debugf0("Inject error read: 0x%018x\n", injectmask);