unsigned char init_done; /* object is ready flag */
};
-#define PEXOR_DMA_MAXPOLLS 10000000
-#define PEXOR_DMA_POLLDELAY 0
+//#define PEXOR_DMA_MAXPOLLS 10000000
+// JAM 2016: introduced again polling delay to make it independent of host hardware speed...
+#define PEXOR_DMA_MAXPOLLS 100000
+/** polling delay for each cycle in ns for dma complete bit*/
+#define PEXOR_DMA_POLLDELAY 20
+
#define PEXOR_MEMWRITE_SIZE 128
#define UDELAY_TIME 1
char* buf)
{
return snprintf(buf, PAGE_SIZE,
- "*** This is PEXOR driver version %s build on %s at %s \n\t",
- PEXORVERSION, __DATE__, __TIME__);
+ "*** This is PEXOR TRBnet driver for HADES, version %s by %s, build on %s at %s \n\t",
+ PEXORVERSION, PEXORAUTHOR, __DATE__, __TIME__);
}
void test_pci(struct pci_dev* dev)
status = -201;
goto OUT_IOCTL;
}
+
+ // JAM2016: try some slight waitstate before rereading the status
+ if (PEXOR_DMA_POLLDELAY)
+ ndelay(PEXOR_DMA_POLLDELAY);
+
}
/* sync current sg-entry back to CPU */
if (loops == PEXOR_DMA_MAXPOLLS) {
pexor_msg(KERN_ERR
"ERROR> wait_dma_complete: polling longer than %d cycles "
- "(udelay %d mus) for dma complete! Status: 0x%08x\n",
+ "(ndelay %d nanos) for dma complete! Status: 0x%08x\n",
PEXOR_DMA_MAXPOLLS, PEXOR_DMA_POLLDELAY,
(unsigned int)dmastat);
/* reset DMA */
/* ---------------------------------------------------------------------- */
MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Joern Adamczewski-Musch / Ludwig Maier");
+MODULE_AUTHOR(PEXORAUTHOR);
MODULE_DESCRIPTION("pexor device driver for HADES TRBNet");
-MODULE_VERSION("2.0.1");
+MODULE_VERSION(PEXORVERSION);
MODULE_DEVICE_TABLE(pci, ids);
module_init(pexor_init);