diff --git a/debian.master/changelog b/debian.master/changelog
index f8d90c2..a43058d 100644
--- a/debian.master/changelog
+++ b/debian.master/changelog
@@ -1,4 +1,4 @@
-linux (2.6.32-7.10) lucid; urgency=low
+linux (2.6.32-7.10~lirc1manjo1) lucid; urgency=low

    [ Andy Whitcroft ]

diff --git a/ubuntu/lirc/BOM b/ubuntu/lirc/BOM
new file mode 100644
index 0000000..49158e5
--- /dev/null
+++ b/ubuntu/lirc/BOM
@@ -0,0 +1,3 @@
+Downloaded from: cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc
+Current Version: 2009.12.07
+Comments: 	 Fix up makefiles. Fix source code to point to hearder.
diff --git a/ubuntu/lirc/kcompat.h b/ubuntu/lirc/kcompat.h
index 1ede942..88f3f95 100644
--- a/ubuntu/lirc/kcompat.h
+++ b/ubuntu/lirc/kcompat.h
@@ -1,4 +1,4 @@
-/*      $Id: kcompat.h,v 5.44 2009/03/22 08:45:47 lirc Exp $      */
+/*      $Id: kcompat.h,v 5.45 2009/08/02 11:15:28 lirc Exp $      */

  #ifndef _KCOMPAT_H
  #define _KCOMPAT_H
@@ -399,4 +399,10 @@ static inline unsigned iminor(struct inode *inode)
  }
  #endif

+/****************************** bitops.h **********************************/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
+#define BIT_MASK(nr)            (1UL << ((nr) % BITS_PER_LONG))
+#define BIT_WORD(nr)            ((nr) / BITS_PER_LONG)
+#endif
+
  #endif /* _KCOMPAT_H */
diff --git a/ubuntu/lirc/lirc_bt829/lirc_bt829.c b/ubuntu/lirc/lirc_bt829/lirc_bt829.c
index d16e24c..c1d8630 100644
--- a/ubuntu/lirc/lirc_bt829/lirc_bt829.c
+++ b/ubuntu/lirc/lirc_bt829/lirc_bt829.c
@@ -31,8 +31,8 @@
  #include <linux/pci.h>
  #include <linux/delay.h>

-#include "../kcompat.h"
-#include "../lirc_dev/lirc_dev.h"
+#include "kcompat.h"
+#include "lirc_dev/lirc_dev.h"

  static int poll_main(void);
  static int atir_init_start(void);
diff --git a/ubuntu/lirc/lirc_dev/lirc_dev.c b/ubuntu/lirc/lirc_dev/lirc_dev.c
index 7618c0a..e01cbed 100644
--- a/ubuntu/lirc/lirc_dev/lirc_dev.c
+++ b/ubuntu/lirc/lirc_dev/lirc_dev.c
@@ -61,7 +61,7 @@
  #include <linux/compat.h>
  #endif

-#include "../kcompat.h"
+#include "kcompat.h"

  /* SysFS header */
  #if defined(LIRC_HAVE_SYSFS)
@@ -69,7 +69,7 @@
  #endif

  #include "../lirc.h"
-#include "lirc_dev.h"
+#include "../lirc_dev/lirc_dev.h"

  static int debug;
  #define dprintk(fmt, args...)					\
diff --git a/ubuntu/lirc/lirc_ene0100/lirc_ene0100.c b/ubuntu/lirc/lirc_ene0100/lirc_ene0100.c
index da9519f..719e925 100644
--- a/ubuntu/lirc/lirc_ene0100/lirc_ene0100.c
+++ b/ubuntu/lirc/lirc_ene0100/lirc_ene0100.c
@@ -24,6 +24,7 @@
  #include <linux/pnp.h>
  #include <linux/io.h>
  #include <linux/interrupt.h>
+#include <linux/sched.h>
  #include "lirc_ene0100.h"

  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
@@ -81,7 +82,7 @@ static int ene_hw_irq_status(struct ene_device *dev, int *buffer_pointer)
  	if (dev->hw_revision < ENE_HW_C) {
  		irq_status = ene_hw_read_reg(dev, ENEB_IRQ_STATUS);

-		if (!irq_status & ENEB_IRQ_STATUS_IR)
+		if (!(irq_status & ENEB_IRQ_STATUS_IR))
  			return 0;
  		ene_hw_write_reg(dev, ENEB_IRQ_STATUS,
  				 irq_status & ~ENEB_IRQ_STATUS_IR);
@@ -92,7 +93,7 @@ static int ene_hw_irq_status(struct ene_device *dev, int *buffer_pointer)

  	irq_status = ene_hw_read_reg(dev, ENEC_IRQ);

-	if (!irq_status && ENEC_IRQ_STATUS)
+	if (!(irq_status & ENEC_IRQ_STATUS))
  		return 0;

  	/* original driver does that twice - a workaround ? */
diff --git a/ubuntu/lirc/lirc_i2c/lirc_i2c.c b/ubuntu/lirc/lirc_i2c/lirc_i2c.c
index dca6b51..247c9c6 100644
--- a/ubuntu/lirc/lirc_i2c/lirc_i2c.c
+++ b/ubuntu/lirc/lirc_i2c/lirc_i2c.c
@@ -399,6 +399,7 @@ static struct i2c_driver driver = {
  		.name	= "i2c ir driver",
  	},
  #endif
+	// .id		= I2C_DRIVERID_EXP3, /* FIXME */
  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
  	.attach_adapter	= ir_probe,
  	.detach_client	= ir_remove,
diff --git a/ubuntu/lirc/lirc_igorplugusb/lirc_igorplugusb.c b/ubuntu/lirc/lirc_igorplugusb/lirc_igorplugusb.c
index 6705570..80e9506 100644
--- a/ubuntu/lirc/lirc_igorplugusb/lirc_igorplugusb.c
+++ b/ubuntu/lirc/lirc_igorplugusb/lirc_igorplugusb.c
@@ -363,7 +363,7 @@ static int usb_remote_poll(void *data, struct lirc_buffer *buf)
  			       "[%d]: SET_INFRABUFFER_EMPTY: error %d\n",
  			       ir->devnum, ret);
  		return 0;
-	} else
+	} else if (ret < 0)
  		printk(KERN_WARNING DRIVER_NAME
  		       "[%d]: GET_INFRACODE: error %d\n",
  			ir->devnum, ret);
@@ -562,9 +562,6 @@ static void usb_remote_disconnect(struct usb_device *dev, void *ptr)
  	       "[%d]: usb remote disconnected\n", ir->devnum);

  	lirc_unregister_driver(ir->d->minor);
-
-	lirc_buffer_free(ir->d->rbuf);
-	kfree(ir->d->rbuf);
  	kfree(ir->d);


diff --git a/ubuntu/lirc/lirc_imon/lirc_imon.c b/ubuntu/lirc/lirc_imon/lirc_imon.c
index fcaa45f..0f45bd7 100644
--- a/ubuntu/lirc/lirc_imon/lirc_imon.c
+++ b/ubuntu/lirc/lirc_imon/lirc_imon.c
@@ -2,7 +2,7 @@
   *   lirc_imon.c:  LIRC/VFD/LCD driver for SoundGraph iMON IR/VFD/LCD
   *		   including the iMON PAD model
   *
- *   $Id: lirc_imon.c,v 1.111 2009/09/11 04:56:18 jarodwilson Exp $
+ *   $Id: lirc_imon.c,v 1.113 2009/10/30 04:00:30 jarodwilson Exp $
   *
   *   Copyright(C) 2004  Venky Raju(dev@venky.ws)
   *
@@ -565,7 +565,8 @@ static int display_close(struct inode *inode, struct file *file)
  }

  /**
- * Sends a packet to the device
+ * Sends a packet to the device -- this function must be called
+ * with context->lock held.
   */
  static int send_packet(struct imon_context *context)
  {
@@ -743,7 +744,6 @@ static int send_set_imon_clock(struct imon_context *context,
  		return -ENODEV;
  	}

-
  	for (i = 0; i < IMON_CLOCK_ENABLE_PACKETS; i++) {
  		memcpy(context->usb_tx_buf, clock_enable_pkt[i], 8);
  		retval = send_packet(context);
@@ -755,7 +755,6 @@ static int send_set_imon_clock(struct imon_context *context,
  	}

  	return retval;
-
  }

  /**
@@ -1097,13 +1096,6 @@ static void imon_set_ir_protocol(struct imon_context *context)

  	switch (ir_protocol) {
  	case IMON_IR_PROTOCOL_MCE:
-		/* MCE proto not supported on devices without tx control */
-		if (!context->tx_control) {
-			printk(KERN_INFO "%s: MCE IR protocol not supported on "
-			       "this device, using iMON protocol\n", __func__);
-			context->ir_protocol = IMON_IR_PROTOCOL_IMON;
-			return;
-		}
  		dprintk("Configuring IR receiver for MCE protocol\n");
  		ir_proto_packet[0] = 0x01;
  		context->ir_protocol = IMON_IR_PROTOCOL_MCE;
@@ -1125,11 +1117,18 @@ static void imon_set_ir_protocol(struct imon_context *context)
  		context->ir_protocol = IMON_IR_PROTOCOL_IMON;
  		break;
  	}
-	memcpy(context->usb_tx_buf, &ir_proto_packet,
-	       sizeof(ir_proto_packet));
+
+	memcpy(context->usb_tx_buf, &ir_proto_packet, sizeof(ir_proto_packet));
+
  	retval = send_packet(context);
-	if (retval)
-		printk(KERN_INFO "%s: failed to set remote type\n", __func__);
+	if (retval) {
+		printk(KERN_INFO "%s: failed to set IR protocol, falling back "
+		       "to standard iMON protocol mode\n", __func__);
+		ir_protocol = IMON_IR_PROTOCOL_IMON;
+		context->ir_protocol = IMON_IR_PROTOCOL_IMON;
+	}
+
+	return;
  }


@@ -1152,8 +1151,11 @@ static int ir_open(void *data)
  	context->rx.prev_bit = 0;

  	/* set new IR protocol if it has changed since init or last open */
-	if (ir_protocol != context->ir_protocol)
+	if (ir_protocol != context->ir_protocol) {
+		mutex_lock(&context->lock);
  		imon_set_ir_protocol(context);
+		mutex_unlock(&context->lock);
+	}

  	context->ir_isopen = 1;
  	printk(KERN_INFO MOD_NAME ": IR port opened\n");
diff --git a/ubuntu/lirc/lirc_ite8709/lirc_ite8709.c b/ubuntu/lirc/lirc_ite8709/lirc_ite8709.c
index bcbc2ad..4e0f766 100644
--- a/ubuntu/lirc/lirc_ite8709/lirc_ite8709.c
+++ b/ubuntu/lirc/lirc_ite8709/lirc_ite8709.c
@@ -21,6 +21,9 @@

  #include <linux/version.h>
  #include <linux/module.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
  #include <linux/pnp.h>
  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
  #include <asm/io.h>
diff --git a/ubuntu/lirc/lirc_mceusb/lirc_mceusb.c b/ubuntu/lirc/lirc_mceusb/lirc_mceusb.c
index 0851769..4a0c771 100644
--- a/ubuntu/lirc/lirc_mceusb/lirc_mceusb.c
+++ b/ubuntu/lirc/lirc_mceusb/lirc_mceusb.c
@@ -10,14 +10,9 @@
   * Copyright (c) 2003-2004 Dan Conti <dconti@acm.wwu.edu>
   *
   * Original lirc_mceusb driver deprecated in favor of this driver, which
- * supports the 1st-gen device now too. Transmitting on the 1st-gen device
- * only functions on port #2 at the moment.
- *
- * Support for 1st-gen device added June 2009,
- * by Jarod Wilson <jarod@wilsonet.com>
- *
- * Initial transmission support for 1st-gen device added August 2009,
- * by Patrick Calhoun <phineas@ou.edu>
+ * supports the 1st-gen device now too. Transmit and receive support for
+ * the 1st-gen device added June-September 2009,
+ * by Jarod Wilson <jarod@wilsonet.com> and Patrick Calhoun <phineas@ou.edu>
   *
   * Derived from ATI USB driver by Paul Miller and the original
   * MCE USB driver by Dan Conti ((and now including chunks of the latter
@@ -164,6 +159,8 @@ static struct usb_device_id mceusb_dev_table[] = {
  	{ USB_DEVICE(VENDOR_SMK, 0x0322) },
  	/* bundled with Hauppauge PVR-150 */
  	{ USB_DEVICE(VENDOR_SMK, 0x0334) },
+	/* SMK eHome Infrared Transceiver */
+	{ USB_DEVICE(VENDOR_SMK, 0x0338) },
  	/* Tatung eHome Infrared Transceiver */
  	{ USB_DEVICE(VENDOR_TATUNG, 0x9150) },
  	/* Shuttle eHome Infrared Transceiver */
@@ -237,6 +234,7 @@ static struct usb_device_id microsoft_gen1_list[] = {
  };

  static struct usb_device_id transmitter_mask_list[] = {
+	{ USB_DEVICE(VENDOR_MICROSOFT, 0x006d) },
  	{ USB_DEVICE(VENDOR_SMK, 0x031d) },
  	{ USB_DEVICE(VENDOR_SMK, 0x0322) },
  	{ USB_DEVICE(VENDOR_SMK, 0x0334) },
@@ -904,20 +902,20 @@ static int mceusb_gen1_init(struct mceusb_dev *ir)
  	dprintk("%s - data[0] = %d, data[1] = %d\n",
  		__func__, data[0], data[1]);

-	/* set feature */
+	/* set feature: bit rate 38400 bps */
  	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
  			      USB_REQ_SET_FEATURE, USB_TYPE_VENDOR,
  			      0xc04e, 0x0000, NULL, 0, HZ * 3);

  	dprintk("%s - ret = %d\n", __func__, ret);

-	/* strange: bRequest == 4 */
+	/* bRequest 4: set char length to 8 bits */
  	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
  			      4, USB_TYPE_VENDOR,
  			      0x0808, 0x0000, NULL, 0, HZ * 3);
  	dprintk("%s - retB = %d\n", __func__, ret);

-	/* strange: bRequest == 2 */
+	/* bRequest 2: set handshaking to use DTR/DSR */
  	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
  			      2, USB_TYPE_VENDOR,
  			      0x0000, 0x0100, NULL, 0, HZ * 3);
diff --git a/ubuntu/lirc/lirc_serial/lirc_serial.c b/ubuntu/lirc/lirc_serial/lirc_serial.c
index 9b25e38..e506658 100644
--- a/ubuntu/lirc/lirc_serial/lirc_serial.c
+++ b/ubuntu/lirc/lirc_serial/lirc_serial.c
@@ -62,6 +62,15 @@

  #include <linux/autoconf.h>

+#if defined(CONFIG_SERIAL) || defined(CONFIG_SERIAL_8250)
+#warning "******************************************"
+#warning " Your serial port driver is compiled into "
+#warning " the kernel. You will have to release the "
+#warning " port you want to use for LIRC with:      "
+#warning "    setserial /dev/ttySx uart none	"
+#warning "******************************************"
+#endif
+
  #include <linux/module.h>
  #include <linux/errno.h>
  #include <linux/signal.h>
diff --git a/ubuntu/lirc/lirc_sir/lirc_sir.c b/ubuntu/lirc/lirc_sir/lirc_sir.c
index ac91ec7..becaff7 100644
--- a/ubuntu/lirc/lirc_sir/lirc_sir.c
+++ b/ubuntu/lirc/lirc_sir/lirc_sir.c
@@ -46,6 +46,16 @@
  #endif

  #include <linux/autoconf.h>
+#if !defined(CONFIG_SERIAL_MODULE)
+#if !defined(LIRC_ON_SA1100)
+#warning "******************************************"
+#warning " Your serial port driver is compiled into "
+#warning " the kernel. You will have to release the "
+#warning " port you want to use for LIRC with:      "
+#warning "    setserial /dev/ttySx uart none        "
+#warning "******************************************"
+#endif
+#endif

  #include <linux/sched.h>
  #include <linux/errno.h>
@@ -423,7 +433,7 @@ static int lirc_ioctl(struct inode *node, struct file *filep, unsigned int cmd,
  	case LIRC_SET_SEND_DUTY_CYCLE:
  		retval = get_user(ivalue, (unsigned int *) arg);
  		if (retval)
-			return reetval;
+			return retval;
  		if (ivalue <= 0 || ivalue > 100)
  			return -EINVAL;
  		/* (ivalue/100)*(1000000/freq) */
