From 23f8381c2b7a86719e1466483f7cb705848d3380 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 9 Feb 2000 02:12:33 +0000 Subject: [PATCH] Modified debugging --- comedi/drivers/dt2801.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/comedi/drivers/dt2801.c b/comedi/drivers/dt2801.c index 5837ba18..322516ac 100644 --- a/comedi/drivers/dt2801.c +++ b/comedi/drivers/dt2801.c @@ -237,8 +237,7 @@ static int dt2801_writecmd(comedi_device * dev, int command) stat = inb_p(dev->iobase+DT2801_STATUS); if (stat & DT_S_COMPOSITE_ERROR) { - printk("dt2801: composite-error in dt2801_writecmd()\n"); - return -EIO; + printk("dt2801: composite-error in dt2801_writecmd(), ignoring\n"); } if (!(stat & DT_S_READY)) { printk("dt2801: !ready in dt2801_writecmd(), ignoring\n"); @@ -255,13 +254,26 @@ static int dt2801_reset(comedi_device *dev) printk("dt2801: resetting board...\n"); + printk("fingerprint: 0x%02x 0x%02x\n",inb_p(dev->iobase),inb_p(dev->iobase+1)); + printk("dt2801: stop\n"); - dt2801_writecmd(dev,DT_C_STOP); - printk("dt2801: reading dummy\n"); - dt2801_readdata(dev,&board_code); + outb_p(DT_C_STOP, dev->iobase+DT2801_CMD); + //dt2801_writecmd(dev,DT_C_STOP); + + dt2801_wait_for_ready(dev); + + //printk("dt2801: reading dummy\n"); + //dt2801_readdata(dev,&board_code); printk("dt2801: reset\n"); - dt2801_writecmd(dev,DT_C_RESET); + outb_p(DT_C_RESET, dev->iobase+DT2801_CMD); + //dt2801_writecmd(dev,DT_C_RESET); + + for(i=10000;i>0;i--){ + if(!(inb_p(dev->iobase+DT2801_STATUS)&READY_BIT)) + break; + } + printk("dt2801: reset ready wait timeout %d\n",i); printk("dt2801: reading code\n"); dt2801_readdata(dev,&board_code); -- 2.26.2