]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.29 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Jun 2009 21:41:07 +0000 (14:41 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Jun 2009 21:41:07 +0000 (14:41 -0700)
queue-2.6.29/isdn-fix-dma-alloc-for-hfcpci.patch [new file with mode: 0644]
queue-2.6.29/series
queue-2.6.29/usb-usbtmc-fix-switch-statment.patch [new file with mode: 0644]
queue-2.6.29/x86-add-quirk-for-reboot-stalls-on-a-dell-optiplex-360.patch [new file with mode: 0644]

diff --git a/queue-2.6.29/isdn-fix-dma-alloc-for-hfcpci.patch b/queue-2.6.29/isdn-fix-dma-alloc-for-hfcpci.patch
new file mode 100644 (file)
index 0000000..280ab11
--- /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
+@@ -694,7 +694,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;
index 94947aa80926a34d7078280df1c6eb83faaa1f77..5e02fd93c6d98a2b95dab86e51fa0e8b015960a7 100644 (file)
@@ -10,3 +10,6 @@ atkbd-add-forced-release-quirks-for-four-more-keyboard-models.patch
 atmel_lcdfb-correct-fifo-size-for-some-products.patch
 bonding-fix-multiple-module-load-problem.patch
 char-moxa-prevent-opening-unavailable-ports.patch
+isdn-fix-dma-alloc-for-hfcpci.patch
+usb-usbtmc-fix-switch-statment.patch
+x86-add-quirk-for-reboot-stalls-on-a-dell-optiplex-360.patch
diff --git a/queue-2.6.29/usb-usbtmc-fix-switch-statment.patch b/queue-2.6.29/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.29/x86-add-quirk-for-reboot-stalls-on-a-dell-optiplex-360.patch b/queue-2.6.29/x86-add-quirk-for-reboot-stalls-on-a-dell-optiplex-360.patch
new file mode 100644 (file)
index 0000000..1131ea3
--- /dev/null
@@ -0,0 +1,41 @@
+From 4a4aca641bc4598e77b866804f47c651ec4a764d Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Fri, 5 Jun 2009 12:02:38 +0200
+Subject: x86: Add quirk for reboot stalls on a Dell Optiplex 360
+
+From: Jean Delvare <jdelvare@suse.de>
+
+commit 4a4aca641bc4598e77b866804f47c651ec4a764d upstream.
+
+The Dell Optiplex 360 hangs on reboot, just like the Optiplex 330, so
+the same quirk is needed.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Cc: Steve Conklin <steve.conklin@canonical.com>
+Cc: Leann Ogasawara <leann.ogasawara@canonical.com>
+LKML-Reference: <200906051202.38311.jdelvare@suse.de>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/reboot.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/arch/x86/kernel/reboot.c
++++ b/arch/x86/kernel/reboot.c
+@@ -193,6 +193,15 @@ static struct dmi_system_id __initdata r
+                       DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
+               },
+       },
++      {   /* Handle problems with rebooting on Dell Optiplex 360 with 0T656F */
++              .callback = set_bios_reboot,
++              .ident = "Dell OptiPlex 360",
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
++                      DMI_MATCH(DMI_BOARD_NAME, "0T656F"),
++              },
++      },
+       {       /* Handle problems with rebooting on Dell 2400's */
+               .callback = set_bios_reboot,
+               .ident = "Dell PowerEdge 2400",