Index: include/linux/comedi.h
===================================================================
RCS file: /cvs/comedi/comedi/include/linux/comedi.h,v
retrieving revision 1.52
diff -r1.52 comedi.h
245a246,247
> 	INSN_CONFIG_GPCT_ARM = 1004, // Arm the counter
> 	INSN_CONFIG_GPCT_DISARM = 1005, // Disarm the counter
Index: comedi/drivers/ni_660x.c
===================================================================
RCS file: /cvs/comedi/comedi/comedi/drivers/ni_660x.c,v
retrieving revision 1.12
diff -r1.12 ni_660x.c
1074,1083c1074,1075
< 		if ( (insn->data[2] > insn->data[1]) && (insn->data[1] > 0 ) )
< 		{
< 			(ni_660x_gpct_config[subdev_channel]).data[0] = insn->data[1];
< 			(ni_660x_gpct_config[subdev_channel]).data[1] = insn->data[2];
< 		}else
< 		{
< 			DPRINTK("%d \t %d\n",insn->data[1],insn->data[2]);
< 			DPRINTK("NI_660x: INSN_CONFIG: PTG: Problem with Pulse params\n");
< 			return -EINVAL;
< 		}
---
> 		(ni_660x_gpct_config[subdev_channel]).data[0] = insn->data[1];
> 		(ni_660x_gpct_config[subdev_channel]).data[1] = insn->data[2];
1107c1099
< 		writew(SourceSelectTimebase1,devpriv->mite->daq_io_addr
---
> 		writew(SourceSelectTimebase3,devpriv->mite->daq_io_addr
1121,1123c1113,1115
< 		// Arm the counter and tell it to count down
< 		writew(Arm|UpDownDown,devpriv->mite->daq_io_addr + GPCT_OFFSET[chipset]
< 			+ registerData[GxCommandRegister(counter_channel)].offset);
---
> 		// Tell the counter to count down
> 		writew(UpDownDown,devpriv->mite->daq_io_addr + GPCT_OFFSET[chipset]
> 		       + registerData[GxCommandRegister(counter_channel)].offset);
1167a1160,1183
> 	case INSN_CONFIG_GPCT_ARM:
> 		switch(ni_660x_gpct_config[subdev_channel].App)
> 			{
> 			case PulseTrainGeneration:
> 				// Check if period > pulsewidth and parameters are > 0
> 				if ( ((ni_660x_gpct_config[subdev_channel]).data[1] <= (ni_660x_gpct_config[subdev_channel]).data[0]) ||
> 				     ((ni_660x_gpct_config[subdev_channel]).data[0] == 0) )
> 					{
> 						DPRINTK("NI_660x: INSN_CONFIG: PTG: Problem with Pulse params\n");
> 						DPRINTK("%d \t %d\n",(ni_660x_gpct_config[subdev_channel]).data[0],
> 							(ni_660x_gpct_config[subdev_channel]).data[1]);
> 						return -EINVAL;
> 					}
> 				break;
> 			default:
> 				break;
> 			}
> 		writew(Arm,devpriv->mite->daq_io_addr + GPCT_OFFSET[chipset] + registerData[GxCommandRegister(counter_channel)].offset);
> 		break;
> 	case INSN_CONFIG_GPCT_DISARM:
> 		writew(Disarm,
> 		       devpriv->mite->daq_io_addr + GPCT_OFFSET[chipset] + registerData[
> 				GxCommandRegister(counter_channel)].offset);
> 		break;
