]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .30 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Jun 2009 21:13:28 +0000 (14:13 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Jun 2009 21:13:28 +0000 (14:13 -0700)
12 files changed:
queue-2.6.30/dvb-lgdt3305-fix-64bit-division-in-function-lgdt3305_set_if.patch [new file with mode: 0644]
queue-2.6.30/isdn-fix-dma-alloc-for-hfcpci.patch [new file with mode: 0644]
queue-2.6.30/jfs-fix-regression-preventing-coalescing-of-extents.patch [new file with mode: 0644]
queue-2.6.30/serial-bfin_5xx-add-missing-spin_lock-init.patch [new file with mode: 0644]
queue-2.6.30/series
queue-2.6.30/spi-takes-size-of-a-pointer-to-determine-the-size-of-the-pointed-to-type.patch [new file with mode: 0644]
queue-2.6.30/sym53c8xx-ratelimit-parity-errors.patch [new file with mode: 0644]
queue-2.6.30/usb-usbtmc-fix-switch-statment.patch [new file with mode: 0644]
queue-2.6.30/v4l-i2c-modules-must-be-linked-before-the-v4l2-drivers.patch [new file with mode: 0644]
queue-2.6.30/v4l-ivtv-cx18-fix-regression-class-controls-are-no-longer-seen.patch [new file with mode: 0644]
queue-2.6.30/v4l-pvrusb2-fix-hardware-scaling-when-used-with-cx25840.patch [new file with mode: 0644]
queue-2.6.30/v4l-pvrusb2-re-fix-hardware-scaling-on-video-standard-change.patch [new file with mode: 0644]

diff --git a/queue-2.6.30/dvb-lgdt3305-fix-64bit-division-in-function-lgdt3305_set_if.patch b/queue-2.6.30/dvb-lgdt3305-fix-64bit-division-in-function-lgdt3305_set_if.patch
new file mode 100644 (file)
index 0000000..58bf3db
--- /dev/null
@@ -0,0 +1,59 @@
+From mkrufky@linuxtv.org  Mon Jun 29 13:53:42 2009
+From: Michael Krufky <mkrufky@linuxtv.org>
+Date: Thu, 25 Jun 2009 12:58:00 -0400
+Subject: DVB: lgdt3305: fix 64bit division in function lgdt3305_set_if
+To: stable@kernel.org
+Message-ID: <4A43AC98.80803@linuxtv.org>
+
+From: Michael Krufky <mkrufky@kernellabs.com>
+
+(cherry picked from commit 511da457340d3b30336f7a6731bad9bbe3ffaf08)
+
+Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/dvb/frontends/lgdt3305.c |   17 +++--------------
+ 1 file changed, 3 insertions(+), 14 deletions(-)
+
+--- a/drivers/media/dvb/frontends/lgdt3305.c
++++ b/drivers/media/dvb/frontends/lgdt3305.c
+@@ -19,6 +19,7 @@
+  *
+  */
++#include <asm/div64.h>
+ #include <linux/dvb/frontend.h>
+ #include "dvb_math.h"
+ #include "lgdt3305.h"
+@@ -496,27 +497,15 @@ static int lgdt3305_set_if(struct lgdt33
+       nco = if_freq_khz / 10;
+-#define LGDT3305_64BIT_DIVISION_ENABLED 0
+-      /* FIXME: 64bit division disabled to avoid linking error:
+-       * WARNING: "__udivdi3" [lgdt3305.ko] undefined!
+-       */
+       switch (param->u.vsb.modulation) {
+       case VSB_8:
+-#if LGDT3305_64BIT_DIVISION_ENABLED
+               nco <<= 24;
+-              nco /= 625;
+-#else
+-              nco *= ((1 << 24) / 625);
+-#endif
++              do_div(nco, 625);
+               break;
+       case QAM_64:
+       case QAM_256:
+-#if LGDT3305_64BIT_DIVISION_ENABLED
+               nco <<= 28;
+-              nco /= 625;
+-#else
+-              nco *= ((1 << 28) / 625);
+-#endif
++              do_div(nco, 625);
+               break;
+       default:
+               return -EINVAL;
diff --git a/queue-2.6.30/isdn-fix-dma-alloc-for-hfcpci.patch b/queue-2.6.30/isdn-fix-dma-alloc-for-hfcpci.patch
new file mode 100644 (file)
index 0000000..35f8444
--- /dev/null
@@ -0,0 +1,103 @@
+From 8a745b9d91962991ce87a649a4dc3af3206c2c8b Mon Sep 17 00:00:00 2001
+From: Karsten Keil <keil@b1-systems.de>
+Date: Tue, 2 Jun 2009 14:57:35 +0200
+Subject: ISDN: Fix DMA alloc for hfcpci
+
+From: Karsten Keil <keil@b1-systems.de>
+
+commit 8a745b9d91962991ce87a649a4dc3af3206c2c8b upstream.
+
+Replace wrong code with correct DMA API functions.
+
+Signed-off-by: Karsten Keil <keil@b1-systems.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/isdn/hisax/hfc_pci.c |   41 ++++++++++++++++++++++++++++++-----------
+ drivers/isdn/hisax/hisax.h   |    2 +-
+ 2 files changed, 31 insertions(+), 12 deletions(-)
+
+--- a/drivers/isdn/hisax/hfc_pci.c
++++ b/drivers/isdn/hisax/hfc_pci.c
+@@ -82,8 +82,9 @@ release_io_hfcpci(struct IsdnCardState *
+       Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2);
+       pci_write_config_word(cs->hw.hfcpci.dev, PCI_COMMAND, 0);       /* disable memory mapped ports + busmaster */
+       del_timer(&cs->hw.hfcpci.timer);
+-      kfree(cs->hw.hfcpci.share_start);
+-      cs->hw.hfcpci.share_start = NULL;
++      pci_free_consistent(cs->hw.hfcpci.dev, 0x8000,
++              cs->hw.hfcpci.fifos, cs->hw.hfcpci.dma);
++      cs->hw.hfcpci.fifos = NULL;
+       iounmap((void *)cs->hw.hfcpci.pci_io);
+ }
+@@ -1663,8 +1664,19 @@ setup_hfcpci(struct IsdnCard *card)
+                                            dev_hfcpci);
+               i++;
+               if (tmp_hfcpci) {
++                      dma_addr_t      dma_mask = DMA_BIT_MASK(32) & ~0x7fffUL;
+                       if (pci_enable_device(tmp_hfcpci))
+                               continue;
++                      if (pci_set_dma_mask(tmp_hfcpci, dma_mask)) {
++                              printk(KERN_WARNING
++                                      "HiSax hfc_pci: No suitable DMA available.\n");
++                              continue;
++                      }
++                      if (pci_set_consistent_dma_mask(tmp_hfcpci, dma_mask)) {
++                              printk(KERN_WARNING
++                                      "HiSax hfc_pci: No suitable consistent DMA available.\n");
++                              continue;
++                      }
+                       pci_set_master(tmp_hfcpci);
+                       if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->resource[ 0].start & PCI_BASE_ADDRESS_IO_MASK)))
+                               continue;
+@@ -1693,22 +1705,29 @@ setup_hfcpci(struct IsdnCard *card)
+               printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n");
+               return (0);
+       }
++
+       /* Allocate memory for FIFOS */
+-      /* Because the HFC-PCI needs a 32K physical alignment, we */
+-      /* need to allocate the double mem and align the address */
+-      if (!(cs->hw.hfcpci.share_start = kmalloc(65536, GFP_KERNEL))) {
+-              printk(KERN_WARNING "HFC-PCI: Error allocating memory for FIFO!\n");
++      cs->hw.hfcpci.fifos = pci_alloc_consistent(cs->hw.hfcpci.dev,
++                                      0x8000, &cs->hw.hfcpci.dma);
++      if (!cs->hw.hfcpci.fifos) {
++              printk(KERN_WARNING "HFC-PCI: Error allocating FIFO memory!\n");
++              return 0;
++      }
++      if (cs->hw.hfcpci.dma & 0x7fff) {
++              printk(KERN_WARNING
++                  "HFC-PCI: Error DMA memory not on 32K boundary (%lx)\n",
++                  (u_long)cs->hw.hfcpci.dma);
++              pci_free_consistent(cs->hw.hfcpci.dev, 0x8000,
++                      cs->hw.hfcpci.fifos, cs->hw.hfcpci.dma);
+               return 0;
+       }
+-      cs->hw.hfcpci.fifos = (void *)
+-          (((ulong) cs->hw.hfcpci.share_start) & ~0x7FFF) + 0x8000;
+-      pci_write_config_dword(cs->hw.hfcpci.dev, 0x80, (u_int) virt_to_bus(cs->hw.hfcpci.fifos));
++      pci_write_config_dword(cs->hw.hfcpci.dev, 0x80, (u32)cs->hw.hfcpci.dma);
+       cs->hw.hfcpci.pci_io = ioremap((ulong) cs->hw.hfcpci.pci_io, 256);
+       printk(KERN_INFO
+-             "HFC-PCI: defined at mem %p fifo %p(%#x) IRQ %d HZ %d\n",
++             "HFC-PCI: defined at mem %p fifo %p(%lx) IRQ %d HZ %d\n",
+              cs->hw.hfcpci.pci_io,
+              cs->hw.hfcpci.fifos,
+-             (u_int) virt_to_bus(cs->hw.hfcpci.fifos),
++             (u_long)cs->hw.hfcpci.dma,
+              cs->irq, HZ);
+       spin_lock_irqsave(&cs->lock, flags);
+--- a/drivers/isdn/hisax/hisax.h
++++ b/drivers/isdn/hisax/hisax.h
+@@ -703,7 +703,7 @@ struct hfcPCI_hw {
+         int nt_timer;
+         struct pci_dev *dev;
+         unsigned char *pci_io; /* start of PCI IO memory */
+-        void *share_start; /* shared memory for Fifos start */
++      dma_addr_t dma; /* dma handle for Fifos */
+         void *fifos; /* FIFO memory */ 
+         int last_bfifo_cnt[2]; /* marker saving last b-fifo frame count */
+       struct timer_list timer;
diff --git a/queue-2.6.30/jfs-fix-regression-preventing-coalescing-of-extents.patch b/queue-2.6.30/jfs-fix-regression-preventing-coalescing-of-extents.patch
new file mode 100644 (file)
index 0000000..8d3e136
--- /dev/null
@@ -0,0 +1,37 @@
+From f7c52fd17a7dda42fc9e88c2b2678403419bfe63 Mon Sep 17 00:00:00 2001
+From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
+Date: Tue, 16 Jun 2009 13:43:22 -0500
+Subject: jfs: fix regression preventing coalescing of extents
+
+From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
+
+commit f7c52fd17a7dda42fc9e88c2b2678403419bfe63 upstream.
+
+Commit fec1878fe952b994125a3be7c94b1322db586f3b caused a regression in
+which contiguous blocks being allocated to the end of an extent were
+getting a new extent created.  This typically results in files entirely
+made up of 1-block extents even though the blocks are contiguous on
+disk.
+
+Apparently grub doesn't handle a jfs file being fragmented into too many
+extents, since it refuses to boot a kernel from jfs that was created by
+the 2.6.30 kernel.
+
+Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
+Reported-by: Alex <alevkovich@tut.by>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/jfs/jfs_extent.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/jfs/jfs_extent.c
++++ b/fs/jfs/jfs_extent.c
+@@ -391,6 +391,7 @@ int extHint(struct inode *ip, s64 offset
+               }
+               XADaddress(xp, xaddr);
+               XADlength(xp, xlen);
++              XADoffset(xp, prev);
+               /*
+                * only preserve the abnr flag within the xad flags
+                * of the returned hint.
diff --git a/queue-2.6.30/serial-bfin_5xx-add-missing-spin_lock-init.patch b/queue-2.6.30/serial-bfin_5xx-add-missing-spin_lock-init.patch
new file mode 100644 (file)
index 0000000..fd4ef13
--- /dev/null
@@ -0,0 +1,32 @@
+From 9c529a3d76dffae943868ebad07b042d15764712 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 22 Jun 2009 18:37:24 +0100
+Subject: serial: bfin_5xx: add missing spin_lock init
+
+From: Mike Frysinger <vapier@gentoo.org>
+
+commit 9c529a3d76dffae943868ebad07b042d15764712 upstream.
+
+The Blackfin serial driver never initialized the spin_lock that is part of
+the serial core structure, but we never noticed because spin_lock's are
+rarely enabled on UP systems.  Yeah lockdep and friends.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/bfin_5xx.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/serial/bfin_5xx.c
++++ b/drivers/serial/bfin_5xx.c
+@@ -1058,6 +1058,7 @@ static void __init bfin_serial_init_port
+       bfin_serial_hw_init();
+       for (i = 0; i < nr_active_ports; i++) {
++              spin_lock_init(&bfin_serial_ports[i].port.lock);
+               bfin_serial_ports[i].port.uartclk   = get_sclk();
+               bfin_serial_ports[i].port.fifosize  = BFIN_UART_TX_FIFO_SIZE;
+               bfin_serial_ports[i].port.ops       = &bfin_serial_pops;
index 185ea4d7586175aa11a1ae20526e7c4aca0cc94d..e11862b81a983b8de18eed99bbbfd3f09abee7ac 100644 (file)
@@ -26,3 +26,14 @@ serial-refactor-async_-flags.patch
 rocket-fix-test_bit-parameters.patch
 epca-fix-test_bit-parameters.patch
 x86-detect-use-of-extended-apic-id-for-amd-cpus.patch
+usb-usbtmc-fix-switch-statment.patch
+dvb-lgdt3305-fix-64bit-division-in-function-lgdt3305_set_if.patch
+v4l-ivtv-cx18-fix-regression-class-controls-are-no-longer-seen.patch
+v4l-pvrusb2-fix-hardware-scaling-when-used-with-cx25840.patch
+v4l-pvrusb2-re-fix-hardware-scaling-on-video-standard-change.patch
+v4l-i2c-modules-must-be-linked-before-the-v4l2-drivers.patch
+sym53c8xx-ratelimit-parity-errors.patch
+isdn-fix-dma-alloc-for-hfcpci.patch
+jfs-fix-regression-preventing-coalescing-of-extents.patch
+spi-takes-size-of-a-pointer-to-determine-the-size-of-the-pointed-to-type.patch
+serial-bfin_5xx-add-missing-spin_lock-init.patch
diff --git a/queue-2.6.30/spi-takes-size-of-a-pointer-to-determine-the-size-of-the-pointed-to-type.patch b/queue-2.6.30/spi-takes-size-of-a-pointer-to-determine-the-size-of-the-pointed-to-type.patch
new file mode 100644 (file)
index 0000000..4b7efc4
--- /dev/null
@@ -0,0 +1,44 @@
+From 021415468c889979117b1a07b96f7e36de33e995 Mon Sep 17 00:00:00 2001
+From: Roel Kluin <roel.kluin@gmail.com>
+Date: Tue, 16 Jun 2009 15:31:15 -0700
+Subject: spi: takes size of a pointer to determine the size of the pointed-to type
+
+From: Roel Kluin <roel.kluin@gmail.com>
+
+commit 021415468c889979117b1a07b96f7e36de33e995 upstream.
+
+Do not take the size of a pointer to determine the size of the pointed-to
+type.
+
+Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
+Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
+Cc: David Brownell <david-b@pacbell.net>
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Kumar Gala <galak@gate.crashing.org>
+Acked-by: Grant Likely <grant.likely@secretlab.ca>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/spi/spi_mpc83xx.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/spi/spi_mpc83xx.c
++++ b/drivers/spi/spi_mpc83xx.c
+@@ -711,12 +711,12 @@ static int of_mpc83xx_spi_get_chipselect
+               return 0;
+       }
+-      pinfo->gpios = kmalloc(ngpios * sizeof(pinfo->gpios), GFP_KERNEL);
++      pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL);
+       if (!pinfo->gpios)
+               return -ENOMEM;
+-      memset(pinfo->gpios, -1, ngpios * sizeof(pinfo->gpios));
++      memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios));
+-      pinfo->alow_flags = kzalloc(ngpios * sizeof(pinfo->alow_flags),
++      pinfo->alow_flags = kzalloc(ngpios * sizeof(*pinfo->alow_flags),
+                                   GFP_KERNEL);
+       if (!pinfo->alow_flags) {
+               ret = -ENOMEM;
diff --git a/queue-2.6.30/sym53c8xx-ratelimit-parity-errors.patch b/queue-2.6.30/sym53c8xx-ratelimit-parity-errors.patch
new file mode 100644 (file)
index 0000000..fd8dc8c
--- /dev/null
@@ -0,0 +1,34 @@
+From 75be63bcf73ebdd1fdc1d49f6bf2d1326a1ba7de Mon Sep 17 00:00:00 2001
+From: John Stoffel <john@stoffel.org>
+Date: Fri, 19 Jun 2009 16:08:58 -0400
+Subject: sym53c8xx: ratelimit parity errors
+
+From: John Stoffel <john@stoffel.org>
+
+commit 75be63bcf73ebdd1fdc1d49f6bf2d1326a1ba7de upstream.
+
+This makes a huge difference when you have a serial console on bootup to limit
+these messages to a sane number.
+
+Signed-off-by: John Stoffel <john@stoffel.org>
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/sym53c8xx_2/sym_hipd.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
++++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
+@@ -2312,8 +2312,9 @@ static void sym_int_par (struct sym_hcb 
+       int phase       = cmd & 7;
+       struct sym_ccb *cp      = sym_ccb_from_dsa(np, dsa);
+-      printf("%s: SCSI parity error detected: SCR1=%d DBC=%x SBCL=%x\n",
+-              sym_name(np), hsts, dbc, sbcl);
++      if (printk_ratelimit())
++              printf("%s: SCSI parity error detected: SCR1=%d DBC=%x SBCL=%x\n",
++                      sym_name(np), hsts, dbc, sbcl);
+       /*
+        *  Check that the chip is connected to the SCSI BUS.
diff --git a/queue-2.6.30/usb-usbtmc-fix-switch-statment.patch b/queue-2.6.30/usb-usbtmc-fix-switch-statment.patch
new file mode 100644 (file)
index 0000000..6d428db
--- /dev/null
@@ -0,0 +1,53 @@
+From a92b63e7e4c185b4dd9e87762e2cb716e54482d0 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 15 Jun 2009 13:13:05 -0700
+Subject: USB: usbtmc: fix switch statment
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit a92b63e7e4c185b4dd9e87762e2cb716e54482d0 upstream.
+
+Steve Holland pointed out that we forgot to call break; in the switch
+statment.  This probably resolves a lot of the bug reports I've gotten
+for the driver lately.
+
+Stupid me...
+
+Reported-by: Steve Holland <sdh4@iastate.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/usbtmc.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/usb/class/usbtmc.c
++++ b/drivers/usb/class/usbtmc.c
+@@ -927,21 +927,27 @@ static long usbtmc_ioctl(struct file *fi
+       switch (cmd) {
+       case USBTMC_IOCTL_CLEAR_OUT_HALT:
+               retval = usbtmc_ioctl_clear_out_halt(data);
++              break;
+       case USBTMC_IOCTL_CLEAR_IN_HALT:
+               retval = usbtmc_ioctl_clear_in_halt(data);
++              break;
+       case USBTMC_IOCTL_INDICATOR_PULSE:
+               retval = usbtmc_ioctl_indicator_pulse(data);
++              break;
+       case USBTMC_IOCTL_CLEAR:
+               retval = usbtmc_ioctl_clear(data);
++              break;
+       case USBTMC_IOCTL_ABORT_BULK_OUT:
+               retval = usbtmc_ioctl_abort_bulk_out(data);
++              break;
+       case USBTMC_IOCTL_ABORT_BULK_IN:
+               retval = usbtmc_ioctl_abort_bulk_in(data);
++              break;
+       }
+       mutex_unlock(&data->io_mutex);
diff --git a/queue-2.6.30/v4l-i2c-modules-must-be-linked-before-the-v4l2-drivers.patch b/queue-2.6.30/v4l-i2c-modules-must-be-linked-before-the-v4l2-drivers.patch
new file mode 100644 (file)
index 0000000..552dc11
--- /dev/null
@@ -0,0 +1,199 @@
+From mkrufky@linuxtv.org  Mon Jun 29 13:55:57 2009
+From: Hans Verkuil <hverkuil@xs4all.nl>
+Date: Thu, 25 Jun 2009 12:58:28 -0400
+Subject: V4L: i2c modules must be linked before the v4l2 drivers
+To: stable@kernel.org
+Message-ID: <4A43ACB4.5010608@linuxtv.org>
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+
+(backported from commit df59f0b3df3cc35fa03ea395f5106d1625e3726a)
+
+Please note that this patch attached has been BACKPORTED to fit kernel
+2.6.30.y
+
+Since i2c autoprobing is no longer supported by v4l2 we need to make sure
+that the i2c modules are linked before the v4l2 modules. The v4l2 modules
+now rely on the presence of the i2c modules, so these must have initialized
+themselves before the v4l2 modules.
+
+The exception is the ir-kbd-i2c module, which is the only one still using
+autoprobing. This one should be loaded at the end of the v4l2 module. Loading
+it earlier actually causes problems with tveeprom. Once ir-kbd-i2c is no
+longer autoprobing, then it has to move up as well.
+
+This is only an issue when everything is compiled into the kernel.
+
+Thanks to Marcus Swoboda for reporting this and Udo Steinberg for testing
+this patch.
+
+Tested-by: Udo A. Steinberg <udo@hypervisor.org>
+Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/Makefile         |   77 ++++++++++++++++++-----------------
+ drivers/media/video/saa7134/Makefile |    3 -
+ 2 files changed, 42 insertions(+), 38 deletions(-)
+
+--- a/drivers/media/video/Makefile
++++ b/drivers/media/video/Makefile
+@@ -12,6 +12,8 @@ omap2cam-objs        :=      omap24xxcam.o omap24xxc
+ videodev-objs :=      v4l2-dev.o v4l2-ioctl.o v4l2-device.o
++# V4L2 core modules
++
+ obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
+ ifeq ($(CONFIG_COMPAT),y)
+   obj-$(CONFIG_VIDEO_DEV) += v4l2-compat-ioctl32.o
+@@ -23,21 +25,15 @@ ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y)
+   obj-$(CONFIG_VIDEO_DEV) += v4l1-compat.o
+ endif
+-obj-$(CONFIG_VIDEO_TUNER) += tuner.o
++# All i2c modules must come first:
+-obj-$(CONFIG_VIDEO_BT848) += bt8xx/
+-obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
++obj-$(CONFIG_VIDEO_TUNER) += tuner.o
+ obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
+ obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
+ obj-$(CONFIG_VIDEO_TDA9875) += tda9875.o
+-
+ obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
+ obj-$(CONFIG_VIDEO_SAA5246A) += saa5246a.o
+ obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o
+-obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
+-obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
+-obj-$(CONFIG_VIDEO_W9966) += w9966.o
+-
+ obj-$(CONFIG_VIDEO_TDA9840) += tda9840.o
+ obj-$(CONFIG_VIDEO_TEA6415C) += tea6415c.o
+ obj-$(CONFIG_VIDEO_TEA6420) += tea6420.o
+@@ -54,11 +50,40 @@ obj-$(CONFIG_VIDEO_BT819) += bt819.o
+ obj-$(CONFIG_VIDEO_BT856) += bt856.o
+ obj-$(CONFIG_VIDEO_BT866) += bt866.o
+ obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
++obj-$(CONFIG_VIDEO_VINO) += indycam.o
++obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
++obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
++obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
++obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
++obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
++obj-$(CONFIG_VIDEO_M52790) += m52790.o
++obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
++obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
++obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
++obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
++obj-$(CONFIG_VIDEO_CX25840) += cx25840/
++obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
++obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
++obj-$(CONFIG_VIDEO_OV7670)    += ov7670.o
++obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
++obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
+-obj-$(CONFIG_VIDEO_ZORAN) += zoran/
++obj-$(CONFIG_SOC_CAMERA_MT9M001)      += mt9m001.o
++obj-$(CONFIG_SOC_CAMERA_MT9M111)      += mt9m111.o
++obj-$(CONFIG_SOC_CAMERA_MT9T031)      += mt9t031.o
++obj-$(CONFIG_SOC_CAMERA_MT9V022)      += mt9v022.o
++obj-$(CONFIG_SOC_CAMERA_OV772X)               += ov772x.o
++obj-$(CONFIG_SOC_CAMERA_TW9910)               += tw9910.o
++# And now the v4l2 drivers:
++
++obj-$(CONFIG_VIDEO_BT848) += bt8xx/
++obj-$(CONFIG_VIDEO_ZORAN) += zoran/
++obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
++obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
++obj-$(CONFIG_VIDEO_W9966) += w9966.o
+ obj-$(CONFIG_VIDEO_PMS) += pms.o
+-obj-$(CONFIG_VIDEO_VINO) += vino.o indycam.o
++obj-$(CONFIG_VIDEO_VINO) += vino.o
+ obj-$(CONFIG_VIDEO_STRADIS) += stradis.o
+ obj-$(CONFIG_VIDEO_CPIA) += cpia.o
+ obj-$(CONFIG_VIDEO_CPIA_PP) += cpia_pp.o
+@@ -69,17 +94,7 @@ obj-$(CONFIG_VIDEO_CX88) += cx88/
+ obj-$(CONFIG_VIDEO_EM28XX) += em28xx/
+ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/
+ obj-$(CONFIG_VIDEO_USBVISION) += usbvision/
+-obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
+-obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
+ obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/
+-obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
+-obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
+-obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
+-obj-$(CONFIG_VIDEO_M52790) += m52790.o
+-obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
+-obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
+-obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
+-obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
+ obj-$(CONFIG_VIDEO_OVCAMCHIP) += ovcamchip/
+ obj-$(CONFIG_VIDEO_CPIA2) += cpia2/
+ obj-$(CONFIG_VIDEO_MXB) += mxb.o
+@@ -92,19 +107,12 @@ obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += vid
+ obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o
+ obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o
+ obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
+-obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
+ obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o
+-obj-$(CONFIG_VIDEO_CX25840) += cx25840/
+-obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
+-obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
+ obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
+ obj-$(CONFIG_VIDEO_CAFE_CCIC) += cafe_ccic.o
+-obj-$(CONFIG_VIDEO_OV7670)    += ov7670.o
+-
+-obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
+ obj-$(CONFIG_USB_DABUSB)        += dabusb.o
+ obj-$(CONFIG_USB_OV511)         += ov511.o
+@@ -134,24 +142,21 @@ obj-$(CONFIG_VIDEO_CX18) += cx18/
+ obj-$(CONFIG_VIDEO_VIVI) += vivi.o
+ obj-$(CONFIG_VIDEO_CX23885) += cx23885/
++obj-$(CONFIG_VIDEO_OMAP2)             += omap2cam.o
++obj-$(CONFIG_SOC_CAMERA)              += soc_camera.o
++obj-$(CONFIG_SOC_CAMERA_PLATFORM)     += soc_camera_platform.o
++# soc-camera host drivers have to be linked after camera drivers
+ obj-$(CONFIG_VIDEO_MX1)                       += mx1_camera.o
+ obj-$(CONFIG_VIDEO_MX3)                       += mx3_camera.o
+ obj-$(CONFIG_VIDEO_PXA27x)            += pxa_camera.o
+ obj-$(CONFIG_VIDEO_SH_MOBILE_CEU)     += sh_mobile_ceu_camera.o
+-obj-$(CONFIG_VIDEO_OMAP2)             += omap2cam.o
+-obj-$(CONFIG_SOC_CAMERA)              += soc_camera.o
+-obj-$(CONFIG_SOC_CAMERA_MT9M001)      += mt9m001.o
+-obj-$(CONFIG_SOC_CAMERA_MT9M111)      += mt9m111.o
+-obj-$(CONFIG_SOC_CAMERA_MT9T031)      += mt9t031.o
+-obj-$(CONFIG_SOC_CAMERA_MT9V022)      += mt9v022.o
+-obj-$(CONFIG_SOC_CAMERA_OV772X)               += ov772x.o
+-obj-$(CONFIG_SOC_CAMERA_PLATFORM)     += soc_camera_platform.o
+-obj-$(CONFIG_SOC_CAMERA_TW9910)               += tw9910.o
+ obj-$(CONFIG_VIDEO_AU0828) += au0828/
+ obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/
++obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
++
+ EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
+ EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ EXTRA_CFLAGS += -Idrivers/media/common/tuners
+--- a/drivers/media/video/saa7134/Makefile
++++ b/drivers/media/video/saa7134/Makefile
+@@ -3,8 +3,7 @@ saa7134-objs :=        saa7134-cards.o saa7134-
+               saa7134-ts.o saa7134-tvaudio.o saa7134-vbi.o    \
+               saa7134-video.o saa7134-input.o
+-obj-$(CONFIG_VIDEO_SAA7134) +=  saa7134.o saa7134-empress.o \
+-                              saa6752hs.o
++obj-$(CONFIG_VIDEO_SAA7134) +=  saa6752hs.o saa7134.o saa7134-empress.o
+ obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o
diff --git a/queue-2.6.30/v4l-ivtv-cx18-fix-regression-class-controls-are-no-longer-seen.patch b/queue-2.6.30/v4l-ivtv-cx18-fix-regression-class-controls-are-no-longer-seen.patch
new file mode 100644 (file)
index 0000000..637701e
--- /dev/null
@@ -0,0 +1,62 @@
+From mkrufky@linuxtv.org  Mon Jun 29 13:54:06 2009
+From: Hans Verkuil <hverkuil@xs4all.nl>
+Date: Thu, 25 Jun 2009 12:58:06 -0400
+Subject: V4L: ivtv/cx18: fix regression: class controls are no longer seen
+To: stable@kernel.org
+Message-ID: <4A43AC9E.4080905@linuxtv.org>
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+
+(cherry picked from commit c6711c3e6d4976716633047c0f6bbd953d6831fb)
+
+A previous change (v4l2-common: remove v4l2_ctrl_query_fill_std) broke
+the handling of class controls in VIDIOC_QUERYCTRL. The MPEG class control
+was broken for all drivers that use the cx2341x module and the USER class
+control was broken for ivtv and cx18.
+
+This change adds back proper class control support.
+
+Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/cx18/cx18-controls.c |    2 ++
+ drivers/media/video/cx2341x.c            |    2 ++
+ drivers/media/video/ivtv/ivtv-controls.c |    2 ++
+ 3 files changed, 6 insertions(+)
+
+--- a/drivers/media/video/cx18/cx18-controls.c
++++ b/drivers/media/video/cx18/cx18-controls.c
+@@ -61,6 +61,8 @@ int cx18_queryctrl(struct file *file, vo
+       switch (qctrl->id) {
+       /* Standard V4L2 controls */
++      case V4L2_CID_USER_CLASS:
++              return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0);
+       case V4L2_CID_BRIGHTNESS:
+       case V4L2_CID_HUE:
+       case V4L2_CID_SATURATION:
+--- a/drivers/media/video/cx2341x.c
++++ b/drivers/media/video/cx2341x.c
+@@ -500,6 +500,8 @@ int cx2341x_ctrl_query(const struct cx23
+       int err;
+       switch (qctrl->id) {
++      case V4L2_CID_MPEG_CLASS:
++              return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0);
+       case V4L2_CID_MPEG_STREAM_TYPE:
+               return v4l2_ctrl_query_fill(qctrl,
+                               V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
+--- a/drivers/media/video/ivtv/ivtv-controls.c
++++ b/drivers/media/video/ivtv/ivtv-controls.c
+@@ -60,6 +60,8 @@ int ivtv_queryctrl(struct file *file, vo
+       switch (qctrl->id) {
+       /* Standard V4L2 controls */
++      case V4L2_CID_USER_CLASS:
++              return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0);
+       case V4L2_CID_BRIGHTNESS:
+       case V4L2_CID_HUE:
+       case V4L2_CID_SATURATION:
diff --git a/queue-2.6.30/v4l-pvrusb2-fix-hardware-scaling-when-used-with-cx25840.patch b/queue-2.6.30/v4l-pvrusb2-fix-hardware-scaling-when-used-with-cx25840.patch
new file mode 100644 (file)
index 0000000..4c99d9b
--- /dev/null
@@ -0,0 +1,138 @@
+From mkrufky@linuxtv.org  Mon Jun 29 13:54:32 2009
+From: Mike Isely <isely@pobox.com>
+From: Michael Krufky <mkrufky@linuxtv.org>
+Date: Thu, 25 Jun 2009 12:58:11 -0400
+Subject: V4L: pvrusb2: Fix hardware scaling when used with cx25840
+To: stable@kernel.org
+Message-ID: <4A43ACA3.9070003@linuxtv.org>
+
+
+From: Mike Isely <isely@pobox.com>
+
+(cherry picked from commit e17d787c513f41f59969247062561fff6340f211)
+
+The cx25840 module requires that its VBI initialization entry point be
+called in order for hardware-scaled video capture to work properly -
+even if we don't care about VBI.  Making this behavior even more
+subtle is that if the capture resolution is set to 720x480 - which is
+the default that the pvrusb2 driver sets up - then the cx25840
+bypasses the hardware scaler.  Therefore this problem does not
+manifest itself until some other resolution, e.g. 640x480, is tried.
+MythTV typically defaults to 640x480 or 480x480, which means that
+things break whenever the driver is used with MythTV.
+
+This all has been known for a while (since at least Nov 2006), but
+recent changes in the pvrusb2 driver (specifically in regards to
+sub-device support) caused this to break again.  VBI initialization
+must happen *after* the chip's firmware is loaded, not before.  With
+this fix, 24xxx devices work correctly again.
+
+A related fix that is part of this changeset is that now we
+re-initialize VBI any time after we issue a reset to the cx25840
+driver.  Issuing a chip reset erases the state that the VBI setup
+previously did.  Until the HVR-1950 came along this subtlety went
+unnoticed, because the pvrusb2 driver previously never issued such a
+reset.  But with the HVR-1950 we have to do that reset in order to
+correctly transition from digital back to analog mode - and since the
+HVR-1950 always starts in digital mode (required for the DVB side to
+initialize correctly) then this device has never had a chance to work
+correctly in analog mode!  Analog capture on the HVR-1950 has been
+broken this *ENTIRE* time.  I had missed it until now because I've
+usually been testing at the default 720x480 resolution which does not
+require scaling...  What fun.  By re-initializing VBI after a cx25840
+chip reset, correct behavior is restored.
+
+Signed-off-by: Mike Isely <isely@pobox.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/pvrusb2/pvrusb2-hdw.c |   55 ++++++++++++++++--------------
+ 1 file changed, 31 insertions(+), 24 deletions(-)
+
+--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
++++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+@@ -1978,6 +1978,34 @@ static unsigned int pvr2_copy_i2c_addr_l
+ }
++static void pvr2_hdw_cx25840_vbi_hack(struct pvr2_hdw *hdw)
++{
++      /*
++        Mike Isely <isely@pobox.com> 19-Nov-2006 - This bit of nuttiness
++        for cx25840 causes that module to correctly set up its video
++        scaling.  This is really a problem in the cx25840 module itself,
++        but we work around it here.  The problem has not been seen in
++        ivtv because there VBI is supported and set up.  We don't do VBI
++        here (at least not yet) and thus we never attempted to even set
++        it up.
++      */
++      struct v4l2_format fmt;
++      if (hdw->decoder_client_id != PVR2_CLIENT_ID_CX25840) {
++              /* We're not using a cx25840 so don't enable the hack */
++              return;
++      }
++
++      pvr2_trace(PVR2_TRACE_INIT,
++                 "Module ID %u:"
++                 " Executing cx25840 VBI hack",
++                 hdw->decoder_client_id);
++      memset(&fmt, 0, sizeof(fmt));
++      fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
++      v4l2_device_call_all(&hdw->v4l2_dev, hdw->decoder_client_id,
++                           video, s_fmt, &fmt);
++}
++
++
+ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
+                               const struct pvr2_device_client_desc *cd)
+ {
+@@ -2069,30 +2097,6 @@ static int pvr2_hdw_load_subdev(struct p
+       /* client-specific setup... */
+       switch (mid) {
+       case PVR2_CLIENT_ID_CX25840:
+-              hdw->decoder_client_id = mid;
+-              {
+-                      /*
+-                        Mike Isely <isely@pobox.com> 19-Nov-2006 - This
+-                        bit of nuttiness for cx25840 causes that module
+-                        to correctly set up its video scaling.  This is
+-                        really a problem in the cx25840 module itself,
+-                        but we work around it here.  The problem has not
+-                        been seen in ivtv because there VBI is supported
+-                        and set up.  We don't do VBI here (at least not
+-                        yet) and thus we never attempted to even set it
+-                        up.
+-                      */
+-                      struct v4l2_format fmt;
+-                      pvr2_trace(PVR2_TRACE_INIT,
+-                                 "Module ID %u:"
+-                                 " Executing cx25840 VBI hack",
+-                                 mid);
+-                      memset(&fmt, 0, sizeof(fmt));
+-                      fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
+-                      v4l2_device_call_all(&hdw->v4l2_dev, mid,
+-                                           video, s_fmt, &fmt);
+-              }
+-              break;
+       case PVR2_CLIENT_ID_SAA7115:
+               hdw->decoder_client_id = mid;
+               break;
+@@ -2193,6 +2197,8 @@ static void pvr2_hdw_setup_low(struct pv
+               cptr->info->set_value(cptr,~0,cptr->info->default_value);
+       }
++      pvr2_hdw_cx25840_vbi_hack(hdw);
++
+       /* Set up special default values for the television and radio
+          frequencies here.  It's not really important what these defaults
+          are, but I set them to something usable in the Chicago area just
+@@ -4066,6 +4072,7 @@ int pvr2_hdw_cmd_decoder_reset(struct pv
+       if (hdw->decoder_client_id) {
+               v4l2_device_call_all(&hdw->v4l2_dev, hdw->decoder_client_id,
+                                    core, reset, 0);
++              pvr2_hdw_cx25840_vbi_hack(hdw);
+               return 0;
+       }
+       pvr2_trace(PVR2_TRACE_INIT,
diff --git a/queue-2.6.30/v4l-pvrusb2-re-fix-hardware-scaling-on-video-standard-change.patch b/queue-2.6.30/v4l-pvrusb2-re-fix-hardware-scaling-on-video-standard-change.patch
new file mode 100644 (file)
index 0000000..6ca0415
--- /dev/null
@@ -0,0 +1,45 @@
+From mkrufky@linuxtv.org  Mon Jun 29 13:55:28 2009
+From: Mike Isely <isely@pobox.com>
+Date: Thu, 25 Jun 2009 12:58:15 -0400
+Subject: V4L: pvrusb2: Re-fix hardware scaling on video standard change
+To: stable@kernel.org
+Message-ID: <4A43ACA7.7010409@linuxtv.org>
+
+
+From: Mike Isely <isely@pobox.com>
+
+(cherry picked from commit a6862da2f3c7ce3ec6644958bc8937b630b9e2c1)
+
+The cx25840 module's VBI initialization logic uses the current video
+standard as part of its internal algorithm.  This therefore means that
+we probably need to make sure that the correct video standard has been
+set before initializing VBI.  (Normally we would not care about VBI,
+but as described in an earlier changeset, VBI must be initialized
+correctly on the cx25840 in order for the chip's hardware scaler to
+operate correctly.)
+
+It's kind of messy to force the video standard to be set before
+initializing VBI (mainly because we can't know what the app really
+wants that early in the initialization process).  So this patch does
+the next best thing: VBI is re-initialized after any point where the
+video standard has been set.
+
+Signed-off-by: Mike Isely <isely@pobox.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/pvrusb2/pvrusb2-hdw.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
++++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+@@ -2950,6 +2950,7 @@ static void pvr2_subdev_update(struct pv
+                       vs = hdw->std_mask_cur;
+                       v4l2_device_call_all(&hdw->v4l2_dev, 0,
+                                            core, s_std, vs);
++                      pvr2_hdw_cx25840_vbi_hack(hdw);
+               }
+               hdw->tuner_signal_stale = !0;
+               hdw->cropcap_stale = !0;