rpms/kernel/F-9 kernel.spec, 1.734, 1.735 linux-2.6-firewire-git-update.patch, 1.14, 1.15 linux-2.6-lirc.patch, 1.9, 1.10

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Tue Aug 5 15:06:48 UTC 2008


Author: jwilson

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10908

Modified Files:
	kernel.spec linux-2.6-firewire-git-update.patch 
	linux-2.6-lirc.patch 
Log Message:
* Tue Aug 05 2008 Jarod Wilson <jwilson at redhat.com> 2.6.26.1-8
- updated firewire stack w/bugfixes and iso timestamp support
- updated lirc drivers w/new device support



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.734
retrieving revision 1.735
diff -u -r1.734 -r1.735
--- kernel.spec	5 Aug 2008 04:50:38 -0000	1.734
+++ kernel.spec	5 Aug 2008 15:06:18 -0000	1.735
@@ -646,6 +646,7 @@
 Patch2030: linux-2.6-net-tulip-interrupt.patch
 
 # linux1394 git patches
+Patch2200: linux-2.6-firewire-git-update.patch
 
 # make USB EHCI driver respect "nousb" parameter
 Patch2300: linux-2.6-usb-ehci-hcd-respect-nousb.patch
@@ -1168,7 +1169,7 @@
 #ApplyPatch linux-2.6-ext4-stable-queue.patch
 
 # linux1394 git patches
-#ApplyPatch linux-2.6-firewire-git-update.patch
+ApplyPatch linux-2.6-firewire-git-update.patch
 #C=$(wc -l $RPM_SOURCE_DIR/linux-2.6-firewire-git-pending.patch | awk '{print $1}')
 #if [ "$C" -gt 10 ]; then
 #ApplyPatch linux-2.6-firewire-git-pending.patch
@@ -1772,6 +1773,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Tue Aug 05 2008 Jarod Wilson <jwilson at redhat.com> 2.6.26.1-8
+- updated firewire stack w/bugfixes and iso timestamp support
+- updated lirc drivers w/new device support
+
 * Tue Aug 05 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.1-7
 - Drop already-merged patches, fix up PS3 bootloader patch.
 

linux-2.6-firewire-git-update.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.14 -r 1.15 linux-2.6-firewire-git-update.patch
Index: linux-2.6-firewire-git-update.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/linux-2.6-firewire-git-update.patch,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- linux-2.6-firewire-git-update.patch	17 Apr 2008 18:47:51 -0000	1.14
+++ linux-2.6-firewire-git-update.patch	5 Aug 2008 15:06:18 -0000	1.15
@@ -1,76 +1,113 @@
-git diff in linux1394-2.6.git vs. v2.6.25-rc9, April 12, 2008
-
- drivers/firewire/Kconfig          |    5 +
- drivers/firewire/fw-card.c        |   52 +-----
- drivers/firewire/fw-cdev.c        |   13 +-
- drivers/firewire/fw-device.c      |  263 +++++++++++++++++++++-----
- drivers/firewire/fw-device.h      |   38 +++-
- drivers/firewire/fw-iso.c         |    5 -
- drivers/firewire/fw-ohci.c        |  383 ++++++++++++++++++++++++++++++-------
- drivers/firewire/fw-ohci.h        |    2 +
- drivers/firewire/fw-sbp2.c        |  150 +++++++--------
- drivers/firewire/fw-topology.c    |   22 ++-
- drivers/firewire/fw-topology.h    |   11 +-
- drivers/firewire/fw-transaction.c |   75 ++++----
- drivers/firewire/fw-transaction.h |   17 +-
- drivers/ieee1394/csr.c            |    6 +-
- drivers/ieee1394/dv1394.c         |    4 +-
- drivers/ieee1394/highlevel.c      |    6 +-
- drivers/ieee1394/ieee1394_core.c  |    2 +-
- drivers/ieee1394/nodemgr.c        |    6 +-
- drivers/ieee1394/ohci1394.c       |  229 +++++++++++-----------
- drivers/ieee1394/pcilynx.c        |   15 +-
- drivers/ieee1394/raw1394.c        |    2 -
- drivers/ieee1394/sbp2.c           |   11 +-
- drivers/ieee1394/video1394.c      |    4 +-
- 23 files changed, 859 insertions(+), 462 deletions(-)
+ drivers/firewire/Kconfig          |    9 ++-
+ drivers/firewire/fw-card.c        |   92 ++++++++++--------------
+ drivers/firewire/fw-cdev.c        |   29 +++++---
+ drivers/firewire/fw-device.c      |   42 ++---------
+ drivers/firewire/fw-device.h      |    1 -
+ drivers/firewire/fw-ohci.c        |  111 +++++++++++++++--------------
+ drivers/firewire/fw-sbp2.c        |   71 +++++++++----------
+ drivers/firewire/fw-topology.c    |   24 ++++++-
+ drivers/firewire/fw-transaction.c |  141 +++++++++++++++++++++++--------------
+ drivers/firewire/fw-transaction.h |   52 +++++++++++---
+ drivers/ieee1394/csr1212.c        |   34 ++++++---
+ drivers/ieee1394/dma.c            |    2 +-
+ drivers/ieee1394/eth1394.c        |    2 +-
+ drivers/ieee1394/highlevel.c      |    4 +-
+ drivers/ieee1394/highlevel.h      |   13 +++-
+ drivers/ieee1394/raw1394.c        |   20 ++++--
+ drivers/ieee1394/sbp2.c           |   22 +++++-
+ drivers/ieee1394/sbp2.h           |    1 +
+ drivers/ieee1394/video1394.c      |    2 +
+ drivers/scsi/sd.c                 |    5 ++
+ include/linux/pci_ids.h           |    1 +
+ include/scsi/scsi_device.h        |    1 +
+ 22 files changed, 401 insertions(+), 278 deletions(-)
 
 diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig
-index 25bdc2d..fb4d391 100644
+index 76f2671..fa6d6ab 100644
 --- a/drivers/firewire/Kconfig
 +++ b/drivers/firewire/Kconfig
-@@ -54,6 +54,11 @@ config FIREWIRE_OHCI
- 	  directive, use "install modulename /bin/true" for the modules to be
- 	  blacklisted.
- 
-+config FIREWIRE_OHCI_DEBUG
-+	bool
-+	depends on FIREWIRE_OHCI
-+	default y
-+
- config FIREWIRE_SBP2
- 	tristate "Support for storage devices (SBP-2 protocol driver)"
- 	depends on FIREWIRE && SCSI
+@@ -16,8 +16,13 @@ config FIREWIRE
+ 	  enable the new stack.
+ 
+ 	  To compile this driver as a module, say M here: the module will be
+-	  called firewire-core.  It functionally replaces ieee1394, raw1394,
+-	  and video1394.
++	  called firewire-core.
++
++	  This module functionally replaces ieee1394, raw1394, and video1394.
++	  To access it from application programs, you generally need at least
++	  libraw1394 version 2.  IIDC/DCAM applications also need libdc1394
++	  version 2.  No libraries are required to access storage devices
++	  through the firewire-sbp2 driver.
+ 
+ config FIREWIRE_OHCI
+ 	tristate "OHCI-1394 controllers"
 diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
-index a034627..102e809 100644
+index 5b4c0d9..94cf070 100644
 --- a/drivers/firewire/fw-card.c
 +++ b/drivers/firewire/fw-card.c
-@@ -167,7 +167,6 @@ fw_core_add_descriptor(struct fw_descriptor *desc)
- 
- 	return 0;
- }
--EXPORT_SYMBOL(fw_core_add_descriptor);
- 
- void
- fw_core_remove_descriptor(struct fw_descriptor *desc)
-@@ -182,7 +181,6 @@ fw_core_remove_descriptor(struct fw_descriptor *desc)
- 
- 	mutex_unlock(&card_mutex);
- }
--EXPORT_SYMBOL(fw_core_remove_descriptor);
+@@ -16,12 +16,15 @@
+  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  */
  
- static const char gap_count_table[] = {
+-#include <linux/module.h>
+-#include <linux/errno.h>
++#include <linux/completion.h>
++#include <linux/crc-itu-t.h>
+ #include <linux/delay.h>
+ #include <linux/device.h>
++#include <linux/errno.h>
++#include <linux/kref.h>
++#include <linux/module.h>
+ #include <linux/mutex.h>
+-#include <linux/crc-itu-t.h>
++
+ #include "fw-transaction.h"
+ #include "fw-topology.h"
+ #include "fw-device.h"
+@@ -186,39 +189,16 @@ static const char gap_count_table[] = {
  	63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40
-@@ -220,7 +218,7 @@ fw_card_bm_work(struct work_struct *work)
- 	struct bm_data bmd;
+ };
+ 
+-struct bm_data {
+-	struct fw_transaction t;
+-	struct {
+-		__be32 arg;
+-		__be32 data;
+-	} lock;
+-	u32 old;
+-	int rcode;
+-	struct completion done;
+-};
+-
+-static void
+-complete_bm_lock(struct fw_card *card, int rcode,
+-		 void *payload, size_t length, void *data)
+-{
+-	struct bm_data *bmd = data;
+-
+-	if (rcode == RCODE_COMPLETE)
+-		bmd->old = be32_to_cpu(*(__be32 *) payload);
+-	bmd->rcode = rcode;
+-	complete(&bmd->done);
+-}
+-
+ static void
+ fw_card_bm_work(struct work_struct *work)
+ {
+ 	struct fw_card *card = container_of(work, struct fw_card, work.work);
+ 	struct fw_device *root_device;
+ 	struct fw_node *root_node, *local_node;
+-	struct bm_data bmd;
  	unsigned long flags;
- 	int root_id, new_root_id, irm_id, gap_count, generation, grace;
--	int do_reset = 0;
-+	bool do_reset = false;
+-	int root_id, new_root_id, irm_id, gap_count, generation, grace;
++	int root_id, new_root_id, irm_id, gap_count, generation, grace, rcode;
+ 	bool do_reset = false;
++	__be32 lock_data[2];
  
  	spin_lock_irqsave(&card->lock, flags);
  	local_node = card->local_node;
-@@ -240,7 +238,7 @@ fw_card_bm_work(struct work_struct *work)
+@@ -238,7 +218,7 @@ fw_card_bm_work(struct work_struct *work)
  	root_id = root_node->node_id;
  	grace = time_after(jiffies, card->reset_jiffies + DIV_ROUND_UP(HZ, 10));
  
@@ -79,2013 +116,1040 @@
  	    (card->bm_generation != generation && grace)) {
  		/*
  		 * This first step is to figure out who is IRM and
-@@ -331,7 +329,7 @@ fw_card_bm_work(struct work_struct *work)
- 		 */
- 		spin_unlock_irqrestore(&card->lock, flags);
- 		goto out;
--	} else if (root_device->config_rom[2] & BIB_CMC) {
-+	} else if (root_device->cmc) {
- 		/*
- 		 * FIXME: I suppose we should set the cmstr bit in the
- 		 * STATE_CLEAR register of this node, as described in
-@@ -360,14 +358,14 @@ fw_card_bm_work(struct work_struct *work)
- 		gap_count = 63;
+@@ -260,33 +240,28 @@ fw_card_bm_work(struct work_struct *work)
+ 			goto pick_me;
+ 		}
[...3725 lines suppressed...]
+ 	/* These request have different format. */
+ 	case RAW1394_IOC_ISO_RECV_PACKETS32:
+@@ -2984,7 +2994,7 @@ static const struct file_operations raw1394_fops = {
+ 	.read = raw1394_read,
+ 	.write = raw1394_write,
+ 	.mmap = raw1394_mmap,
+-	.ioctl = raw1394_ioctl,
++	.unlocked_ioctl = raw1394_ioctl,
+ #ifdef CONFIG_COMPAT
+ 	.compat_ioctl = raw1394_compat_ioctl,
+ #endif
 diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
-index f53f72d..16b9d0a 100644
+index a5ceff2..9cbf315 100644
 --- a/drivers/ieee1394/sbp2.c
 +++ b/drivers/ieee1394/sbp2.c
-@@ -615,7 +615,7 @@ static struct sbp2_command_info *sbp2util_allocate_command_orb(
- 		cmd->Current_SCpnt = Current_SCpnt;
- 		list_add_tail(&cmd->list, &lu->cmd_orb_inuse);
- 	} else
--		SBP2_ERR("%s: no orbs available", __FUNCTION__);
-+		SBP2_ERR("%s: no orbs available", __func__);
- 	spin_unlock_irqrestore(&lu->cmd_orb_lock, flags);
- 	return cmd;
- }
-@@ -1294,7 +1294,7 @@ static int sbp2_set_busy_timeout(struct sbp2_lu *lu)
- 
- 	data = cpu_to_be32(SBP2_BUSY_TIMEOUT_VALUE);
- 	if (hpsb_node_write(lu->ne, SBP2_BUSY_TIMEOUT_ADDRESS, &data, 4))
--		SBP2_ERR("%s error", __FUNCTION__);
-+		SBP2_ERR("%s error", __func__);
+@@ -186,6 +186,11 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
+  * - delay inquiry
+  *   Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry.
+  *
++ * - power condition
++ *   Set the power condition field in the START STOP UNIT commands sent by
++ *   sd_mod on suspend, resume, and shutdown (if manage_start_stop is on).
++ *   Some disks need this to spin down or to resume properly.
++ *
+  * - override internal blacklist
+  *   Instead of adding to the built-in blacklist, use only the workarounds
+  *   specified in the module load parameter.
+@@ -199,6 +204,8 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0"
+ 	", skip mode page 8 = "   __stringify(SBP2_WORKAROUND_MODE_SENSE_8)
+ 	", fix capacity = "       __stringify(SBP2_WORKAROUND_FIX_CAPACITY)
+ 	", delay inquiry = "      __stringify(SBP2_WORKAROUND_DELAY_INQUIRY)
++	", set power condition in start stop unit = "
++				  __stringify(SBP2_WORKAROUND_POWER_CONDITION)
+ 	", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE)
+ 	", or a combination)");
+ 
+@@ -359,18 +366,25 @@ static const struct {
+ 		.firmware_revision	= 0x002800,
+ 		.model_id		= 0x001010,
+ 		.workarounds		= SBP2_WORKAROUND_INQUIRY_36 |
+-					  SBP2_WORKAROUND_MODE_SENSE_8,
++					  SBP2_WORKAROUND_MODE_SENSE_8 |
++					  SBP2_WORKAROUND_POWER_CONDITION,
+ 	},
+ 	/* DViCO Momobay FX-3A with TSB42AA9A bridge */ {
+ 		.firmware_revision	= 0x002800,
+ 		.model_id		= 0x000000,
+-		.workarounds		= SBP2_WORKAROUND_DELAY_INQUIRY,
++		.workarounds		= SBP2_WORKAROUND_DELAY_INQUIRY |
++					  SBP2_WORKAROUND_POWER_CONDITION,
+ 	},
+ 	/* Initio bridges, actually only needed for some older ones */ {
+ 		.firmware_revision	= 0x000200,
+ 		.model_id		= SBP2_ROM_VALUE_WILDCARD,
+ 		.workarounds		= SBP2_WORKAROUND_INQUIRY_36,
+ 	},
++	/* PL-3507 bridge with Prolific firmware */ {
++		.firmware_revision	= 0x012800,
++		.model_id		= SBP2_ROM_VALUE_WILDCARD,
++		.workarounds		= SBP2_WORKAROUND_POWER_CONDITION,
++	},
+ 	/* Symbios bridge */ {
+ 		.firmware_revision	= 0xa0b800,
+ 		.model_id		= SBP2_ROM_VALUE_WILDCARD,
+@@ -1995,6 +2009,8 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev)
+ 
+ 	sdev->use_10_for_rw = 1;
+ 
++	if (sbp2_exclusive_login)
++		sdev->manage_start_stop = 1;
+ 	if (sdev->type == TYPE_ROM)
+ 		sdev->use_10_for_ms = 1;
+ 	if (sdev->type == TYPE_DISK &&
+@@ -2002,6 +2018,8 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev)
+ 		sdev->skip_ms_page_8 = 1;
+ 	if (lu->workarounds & SBP2_WORKAROUND_FIX_CAPACITY)
+ 		sdev->fix_capacity = 1;
++	if (lu->workarounds & SBP2_WORKAROUND_POWER_CONDITION)
++		sdev->start_stop_pwr_cond = 1;
+ 	if (lu->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS)
+ 		blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512);
  	return 0;
- }
- 
-@@ -1985,11 +1985,8 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev)
- 	lu->sdev = sdev;
- 	sdev->allow_restart = 1;
- 
--	/*
--	 * Update the dma alignment (minimum alignment requirements for
--	 * start and end of DMA transfers) to be a sector
--	 */
--	blk_queue_update_dma_alignment(sdev->request_queue, 511);
-+	/* SBP-2 requires quadlet alignment of the data buffers. */
-+	blk_queue_update_dma_alignment(sdev->request_queue, 4 - 1);
+diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h
+index 80d8e09..875428b 100644
+--- a/drivers/ieee1394/sbp2.h
++++ b/drivers/ieee1394/sbp2.h
+@@ -345,6 +345,7 @@ enum sbp2lu_state_types {
+ #define SBP2_WORKAROUND_FIX_CAPACITY	0x8
+ #define SBP2_WORKAROUND_DELAY_INQUIRY	0x10
+ #define SBP2_INQUIRY_DELAY		12
++#define SBP2_WORKAROUND_POWER_CONDITION	0x20
+ #define SBP2_WORKAROUND_OVERRIDE	0x100
  
- 	if (lu->workarounds & SBP2_WORKAROUND_INQUIRY_36)
- 		sdev->inquiry_len = 36;
+ #endif /* SBP2_H */
 diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
-index bd28adf..e03024e 100644
+index e24772d..069b9f6 100644
 --- a/drivers/ieee1394/video1394.c
 +++ b/drivers/ieee1394/video1394.c
-@@ -1315,8 +1315,7 @@ static struct ieee1394_device_id video1394_id_table[] = {
- MODULE_DEVICE_TABLE(ieee1394, video1394_id_table);
- 
- static struct hpsb_protocol_driver video1394_driver = {
--	.name		= VIDEO1394_DRIVER_NAME,
--	.id_table	= video1394_id_table,
-+	.name = VIDEO1394_DRIVER_NAME,
- };
- 
- 
-@@ -1504,7 +1503,6 @@ static int __init video1394_init_module (void)
+@@ -1503,6 +1503,8 @@ static int __init video1394_init_module (void)
+ {
+ 	int ret;
  
++	hpsb_init_highlevel(&video1394_highlevel);
++
  	cdev_init(&video1394_cdev, &video1394_fops);
  	video1394_cdev.owner = THIS_MODULE;
--	kobject_set_name(&video1394_cdev.kobj, VIDEO1394_DRIVER_NAME);
  	ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16);
- 	if (ret) {
- 		PRINT_G(KERN_ERR, "video1394: unable to get minor device block");
+diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
+index 01cefbb..d53312c 100644
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -1124,6 +1124,8 @@ sd_spinup_disk(struct scsi_disk *sdkp)
+ 				cmd[1] = 1;	/* Return immediately */
+ 				memset((void *) &cmd[2], 0, 8);
+ 				cmd[4] = 1;	/* Start spin cycle */
++				if (sdkp->device->start_stop_pwr_cond)
++					cmd[4] |= 1 << 4;
+ 				scsi_execute_req(sdkp->device, cmd, DMA_NONE,
+ 						 NULL, 0, &sshdr,
+ 						 SD_TIMEOUT, SD_MAX_RETRIES);
+@@ -1790,6 +1792,9 @@ static int sd_start_stop_device(struct scsi_disk *sdkp, int start)
+ 	if (start)
+ 		cmd[4] |= 1;	/* START */
+ 
++	if (sdp->start_stop_pwr_cond)
++		cmd[4] |= start ? 1 << 4 : 3 << 4;	/* Active or Standby */
++
+ 	if (!scsi_device_online(sdp))
+ 		return -ENODEV;
+ 
+diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
+index 6595382..720d675 100644
+--- a/include/linux/pci_ids.h
++++ b/include/linux/pci_ids.h
+@@ -748,6 +748,7 @@
+ #define PCI_VENDOR_ID_TI		0x104c
+ #define PCI_DEVICE_ID_TI_TVP4020	0x3d07
+ #define PCI_DEVICE_ID_TI_4450		0x8011
++#define PCI_DEVICE_ID_TI_TSB43AB22	0x8023
+ #define PCI_DEVICE_ID_TI_XX21_XX11	0x8031
+ #define PCI_DEVICE_ID_TI_XX21_XX11_FM	0x8033
+ #define PCI_DEVICE_ID_TI_XX21_XX11_SD	0x8034
+diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
+index f6a9fe0..00b7876 100644
+--- a/include/scsi/scsi_device.h
++++ b/include/scsi/scsi_device.h
+@@ -134,6 +134,7 @@ struct scsi_device {
+ 	unsigned no_start_on_add:1;	/* do not issue start on add */
+ 	unsigned allow_restart:1; /* issue START_UNIT in error handler */
+ 	unsigned manage_start_stop:1;	/* Let HLD (sd) manage start/stop */
++	unsigned start_stop_pwr_cond:1;	/* Set power cond. in START_STOP_UNIT */
+ 	unsigned no_uld_attach:1; /* disable connecting to upper level drivers */
+ 	unsigned select_no_atn:1;
+ 	unsigned fix_capacity:1;	/* READ_CAPACITY is too high by 1 */

linux-2.6-lirc.patch:

Index: linux-2.6-lirc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/linux-2.6-lirc.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- linux-2.6-lirc.patch	4 Aug 2008 22:20:04 -0000	1.9
+++ linux-2.6-lirc.patch	5 Aug 2008 15:06:18 -0000	1.10
@@ -14,11 +14,11 @@
  drivers/input/lirc/lirc_dev.h         |  264 ++++++
  drivers/input/lirc/lirc_i2c.c         |  668 +++++++++++++++
  drivers/input/lirc/lirc_igorplugusb.c |  624 ++++++++++++++
- drivers/input/lirc/lirc_imon.c        | 1165 +++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_imon.c        | 1248 ++++++++++++++++++++++++++++
  drivers/input/lirc/lirc_it87.c        | 1012 +++++++++++++++++++++++
  drivers/input/lirc/lirc_it87.h        |  116 +++
  drivers/input/lirc/lirc_mceusb.c      |  890 ++++++++++++++++++++
- drivers/input/lirc/lirc_mceusb2.c     | 1058 ++++++++++++++++++++++++
+ drivers/input/lirc/lirc_mceusb2.c     | 1060 ++++++++++++++++++++++++
  drivers/input/lirc/lirc_parallel.c    |  745 +++++++++++++++++
  drivers/input/lirc/lirc_parallel.h    |   26 +
  drivers/input/lirc/lirc_pvr150.c      | 1431 +++++++++++++++++++++++++++++++++
@@ -27,7 +27,7 @@
  drivers/input/lirc/lirc_sir.c         | 1323 ++++++++++++++++++++++++++++++
  drivers/input/lirc/lirc_streamzap.c   |  810 +++++++++++++++++++
  drivers/input/lirc/lirc_ttusbir.c     |  393 +++++++++
- 29 files changed, 17481 insertions(+), 0 deletions(-)
+ 29 files changed, 17566 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
 index 5f9d860..747633c 100644
@@ -3919,7 +3919,7 @@
 +#endif
 diff --git a/drivers/input/lirc/lirc_dev.c b/drivers/input/lirc/lirc_dev.c
 new file mode 100644
-index 0000000..1d5706f
+index 0000000..93ac8de
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_dev.c
 @@ -0,0 +1,827 @@
@@ -3964,7 +3964,7 @@
 +#include <linux/completion.h>
 +#include <linux/uaccess.h>
 +#include <linux/errno.h>
-+#include <asm/semaphore.h>
++#include <linux/semaphore.h>
 +#define __KERNEL_SYSCALLS__
 +#include <linux/unistd.h>
 +#include <linux/kthread.h>
@@ -5022,7 +5022,7 @@
 +#endif
 diff --git a/drivers/input/lirc/lirc_i2c.c b/drivers/input/lirc/lirc_i2c.c
 new file mode 100644
-index 0000000..6e47d53
+index 0000000..3d107f6
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_i2c.c
 @@ -0,0 +1,668 @@
@@ -5082,7 +5082,7 @@
 +#include <linux/i2c.h>
 +#include <linux/i2c-algo-bit.h>
 +
-+#include <asm/semaphore.h>
++#include <linux/semaphore.h>
 +
 +#include "kcompat.h"
 +#include "lirc_dev.h"
@@ -6326,10 +6326,10 @@
 + */
 diff --git a/drivers/input/lirc/lirc_imon.c b/drivers/input/lirc/lirc_imon.c
 new file mode 100644
-index 0000000..9bf63b4
+index 0000000..776c742
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_imon.c
-@@ -0,0 +1,1165 @@
+@@ -0,0 +1,1248 @@
 +/*
 + *   lirc_imon.c:  LIRC plugin/VFD driver for Ahanix/Soundgraph IMON IR/VFD
 + *
@@ -6376,7 +6376,9 @@
 + *
 + */
 +#include <linux/version.h>
-+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
 +
 +#include <linux/autoconf.h>
 +
@@ -6429,7 +6431,11 @@
 +static int vfd_open(struct inode *inode, struct file *file);
 +static int vfd_close(struct inode *inode, struct file *file);
 +static ssize_t vfd_write(struct file *file, const char *buf,
-+				size_t n_bytes, loff_t *pos);
++			 size_t n_bytes, loff_t *pos);
++
++/* LCD file_operations override function prototypes */
++static ssize_t lcd_write(struct file *file, const char *buf,
++			 size_t n_bytes, loff_t *pos);
 +
 +/* LIRC plugin function prototypes */
 +static int ir_open(void *data);
@@ -6492,11 +6498,16 @@
 +
 +/* USB Device ID for IMON USB Control Board */
 +static struct usb_device_id imon_usb_id_table[] = {
-+	{ USB_DEVICE(0x0aa8, 0xffda) },		/* IR & VFD    */
-+	{ USB_DEVICE(0x0aa8, 0x8001) },		/* IR only     */
-+	{ USB_DEVICE(0x15c2, 0xffda) },		/* IR & VFD    */
-+	{ USB_DEVICE(0x15c2, 0xffdc) },		/* IR & VFD    */
-+	{ USB_DEVICE(0x04e8, 0xff30) },		/* ext IR only */
++	/* IMON USB Control Board (IR & VFD) */
++	{ USB_DEVICE(0x0aa8, 0xffda) },
++	/* IMON USB Control Board (IR only) */
++	{ USB_DEVICE(0x0aa8, 0x8001) },
++	/* IMON USB Control Board (IR & VFD) */
++	{ USB_DEVICE(0x15c2, 0xffda) },
++	/* IMON USB Control Board (IR & VFD) */
++	{ USB_DEVICE(0x15c2, 0xffdc) },
++	/* IMON USB Control Board (ext IR only) */
++	{ USB_DEVICE(0x04e8, 0xff30) },
 +	{}
 +};
 +
@@ -6534,6 +6545,9 @@
 +
 +static int debug;
 +
++/* lcd or vfd? */
++static int is_lcd;
++
 +
 +/* ------------------------------------------------------------
 + *		     M O D U L E   C O D E
@@ -6546,6 +6560,9 @@
 +MODULE_DEVICE_TABLE(usb, imon_usb_id_table);
 +module_param(debug, int, 0);
 +MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes(default: no)");
++module_param(is_lcd, int, 0);
++MODULE_PARM_DESC(is_lcd, "The device is an LCD: 0=no (it's a VFD), "
++		 "1=yes (default: no)");
 +
 +static inline void delete_context(struct imon_context *context)
 +{
@@ -6853,7 +6870,10 @@
 +		goto exit;
 +	}
 +
-+	copy_from_user(context->tx.data_buf, buf, n_bytes);
++	if (copy_from_user(context->tx.data_buf, buf, n_bytes)) {
++		retval = -EFAULT;
++		goto exit;
++	}
 +
 +	/* Pad with spaces */
 +	for (i = n_bytes; i < 32; ++i)
@@ -6898,6 +6918,63 @@
 +}
 +
 +/**
++ * Writes data to the LCD.  The iMON OEM LCD screen excepts 8-byte
++ * packets. We accept data as 16 hexadecimal digits, followed by a
++ * newline (to make it easy to drive the device from a command-line
++ * -- even though the actual binary data is a bit complicated).
++ *
++ * The device itself is not a "traditional" text-mode display. It's
++ * actually a 16x96 pixel bitmap display. That means if you want to
++ * display text, you've got to have your own "font" and translate the
++ * text into bitmaps for display. This is really flexible (you can
++ * display whatever diacritics you need, and so on), but it's also
++ * a lot more complicated than most LCDs...
++ */
++static ssize_t lcd_write(struct file *file, const char *buf,
++			 size_t n_bytes, loff_t *pos)
++{
++	int retval = SUCCESS;
++	struct imon_context *context;
++
++	context = (struct imon_context *) file->private_data;
++	if (!context) {
++		err("%s: no context for device", __FUNCTION__);
++		return -ENODEV;
++	}
++
++	LOCK_CONTEXT;
++
++	if (!context->dev_present) {
++		err("%s: no iMON device present", __FUNCTION__);
++		retval = -ENODEV;
++		goto exit;
++	}
++
++	if (n_bytes != 8) {
++		err("%s: invalid payload size: %d (expecting 8)",
++		  __FUNCTION__, (int) n_bytes);
++		retval = -EINVAL;
++		goto exit;
++	}
++
++	if (copy_from_user(context->usb_tx_buf, buf, 8)) {
++		retval = -EFAULT;
++		goto exit;
++	}
++
++	retval = send_packet(context);
++	if (retval != SUCCESS) {
++		err("%s: send packet failed!", __FUNCTION__);
++		goto exit;
++	} else if (debug) {
++		info("%s: write %d bytes to LCD", __FUNCTION__, (int) n_bytes);
++	}
++exit:
++	UNLOCK_CONTEXT;
++	return (retval == SUCCESS) ? n_bytes : retval;
++}
++
++/**
 + * Callback function for USB core API: transmit data
 + */
 +static void usb_tx_callback(struct urb *urb)
@@ -7198,6 +7275,12 @@
 +
 +	info("%s: found IMON device", __FUNCTION__);
 +
++	/*
++	 * If it's the LCD, as opposed to the VFD, we just need to replace
++	 * the "write" file op.
++	 */
++	if (is_lcd)
++		vfd_fops.write = &lcd_write;
 +
 +	dev = usb_get_dev(interface_to_usbdev(interface));
 +	iface_desc = interface->cur_altsetting;
@@ -7358,27 +7441,6 @@
 +		info("%s: Registered iMON plugin(minor:%d)",
 +		     __FUNCTION__, lirc_minor);
 +
-+alloc_status_switch:
-+
-+	switch (alloc_status) {
-+	case 7:
-+		if (vfd_ep_found)
-+			usb_free_urb(tx_urb);
-+	case 6:
-+		usb_free_urb(rx_urb);
-+	case 5:
-+		lirc_buffer_free(rbuf);
-+	case 4:
-+		kfree(rbuf);
-+	case 3:
-+		kfree(plugin);
-+	case 2:
-+		kfree(context);
-+		context = NULL;
-+	case 1:
-+		retval = -ENOMEM;
-+	}
-+
 +	/* Needed while unregistering! */
 +	plugin->minor = lirc_minor;
 +
@@ -7420,7 +7482,28 @@
 +
 +	UNLOCK_CONTEXT;
 +
-+ exit:
++alloc_status_switch:
++
++	switch (alloc_status) {
++	case 7:
++		if (vfd_ep_found)
++			usb_free_urb(tx_urb);
++	case 6:
++		usb_free_urb(rx_urb);
++	case 5:
++		lirc_buffer_free(rbuf);
++	case 4:
++		kfree(rbuf);
++	case 3:
++		kfree(plugin);
++	case 2:
++		kfree(context);
++		context = NULL;
++	case 1:
++		retval = -ENOMEM;
++	}
++
++exit:
 +	return retval;
 +}
 +
@@ -9533,10 +9616,10 @@
 +EXPORT_NO_SYMBOLS;
 diff --git a/drivers/input/lirc/lirc_mceusb2.c b/drivers/input/lirc/lirc_mceusb2.c
 new file mode 100644
-index 0000000..9e927a4
+index 0000000..2f78da8
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_mceusb2.c
-@@ -0,0 +1,1058 @@
+@@ -0,0 +1,1060 @@
 +/*
 + * LIRC driver for Philips eHome USB Infrared Transceiver
 + * and the Microsoft MCE 2005 Remote Control
@@ -9671,6 +9754,8 @@
 +	{ USB_DEVICE(VENDOR_PHILIPS, 0x060c) },
 +	/* Philips SRM5100 */
 +	{ USB_DEVICE(VENDOR_PHILIPS, 0x060d) },
++	/* Philips Infrared Transceiver - Omaura */
++	{ USB_DEVICE(VENDOR_PHILIPS, 0x060f) },
 +	/* SMK/Toshiba G83C0004D410 */
 +	{ USB_DEVICE(VENDOR_SMK, 0x031d) },
 +	/* SMK eHome Infrared Transceiver (Sony VAIO) */
@@ -11380,7 +11465,7 @@
 +#endif
 diff --git a/drivers/input/lirc/lirc_pvr150.c b/drivers/input/lirc/lirc_pvr150.c
 new file mode 100644
-index 0000000..bef6eb4
+index 0000000..fed5720
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_pvr150.c
 @@ -0,0 +1,1431 @@
@@ -11445,7 +11530,7 @@
 +#include <linux/firmware.h>
 +#include <linux/vmalloc.h>
 +
-+#include <asm/semaphore.h>
++#include <linux/semaphore.h>
 +#include <linux/kthread.h>
 +
 +#include "kcompat.h"




More information about the fedora-extras-commits mailing list