summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6Linus Torvalds2010-08-095-13/+17
|\ | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: tx493xide: use min_t() macro instead of min() drivers/ide: Use memdup_user via82cxxx: fix typo for VT6415 PCIE PATA IDE Host Controller support. ide-cd: Do not access completed requests in the irq handler
| * tx493xide: use min_t() macro instead of min()Atsushi Nemoto2010-08-092-2/+2
| | | | | | | | | | | | | | | | | | | | This fixes a warning ("comparison of distinct pointer types lacks a cast") introduced by the commit 040f6b4f14adb2ca5babb84e9fb2ebc6661e0be2 ("tx493xide: use ->pio_mode value to determine pair device speed"). Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
| * drivers/ide: Use memdup_userJulia Lawall2010-08-091-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use memdup_user when user data is immediately copied into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
| * via82cxxx: fix typo for VT6415 PCIE PATA IDE Host Controller support.Yann Dirson2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this fix, init of the via82cxxx driver causes a oops with a stack resembling the one below, and the boot blocks between init of USB devices and launch of init (was easy to bisect by booting with init=/bin/sh). Pid: 279, comm: work_for_cpu Not tainted 2.6.34.1-00003-ga42ea77 #2 Call Trace: [<ffffffff81045691>] ? warn_slowpath_common+0x76/0x8c [<ffffffff810456f9>] ? warn_slowpath_fmt+0x40/0x45 [<ffffffff812eb5a1>] ? printk+0x40/0x47 [<ffffffff8108e1fd>] ? enable_irq+0x3e/0x64 [<ffffffffa0003900>] ? ide_probe_port+0x55c/0x589 [ide_core] [<ffffffffa0003f22>] ? ide_host_register+0x273/0x628 [ide_core] [<ffffffffa00083e3>] ? ide_pci_init_two+0x4da/0x5c5 [ide_core] [<ffffffff8106117e>] ? up+0xe/0x36 [<ffffffff81045d7e>] ? release_console_sem+0x17e/0x1ae [<ffffffff812d945b>] ? klist_iter_exit+0x14/0x1e [<ffffffff8120ed23>] ? bus_find_device+0x75/0x83 [<ffffffffa0022832>] ? via_init_one+0x269/0x28a [via82cxxx] [<ffffffffa00223a2>] ? init_chipset_via82cxxx+0x0/0x1ea [via82cxxx] [<ffffffff81059f25>] ? do_work_for_cpu+0x0/0x1b [<ffffffff81190c65>] ? local_pci_probe+0x12/0x16 [<ffffffff81059f30>] ? do_work_for_cpu+0xb/0x1b [<ffffffff8105d0dd>] ? kthread+0x75/0x7d [<ffffffff810097e4>] ? kernel_thread_helper+0x4/0x10 [<ffffffff8105d068>] ? kthread+0x0/0x7d [<ffffffff810097e0>] ? kernel_thread_helper+0x0/0x10 ---[ end trace 89c8cb70379b5bda ]--- The typo was introduced in a354ae8747d0687093ce244e76b15b6174d2f098, and affects 2.6.33-rc4 and later. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide-cd: Do not access completed requests in the irq handlerBorislav Petkov2010-08-091-3/+11
| | | | | | | | | | | | | | | | | | | | ide_cd_error_cmd() can complete an erroneous request with leftover buffers. Signal this with its return value so that the request is not accessed after its completion in the irq handler and we oops. Cc: <stable@kernel.org> # 32.x 33.x 34.x Signed-off-by: Borislav Petkov <bp@alien8.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'rs485fix' of git://www.jni.nu/crisLinus Torvalds2010-08-091-0/+11
|\ \ | | | | | | | | | | | | * 'rs485fix' of git://www.jni.nu/cris: CRIS: ioctl for getting RS485 information
| * | CRIS: ioctl for getting RS485 informationClaudio Scordino2010-08-091-0/+11
| | | | | | | | | | | | | | | | | | | | | Add ioctl to CRIS serial driver to get RS485 data from user-space. Signed-off-by: Claudio Scordino <claudio@evidence.eu.com> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* | | Merge branch 'merge' of ↵Linus Torvalds2010-08-091-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: fix build with make 3.82 Revert "Input: appletouch - fix integer overflow issue" memblock: Fix memblock_is_region_reserved() to return a boolean powerpc: Trim defconfigs powerpc: fix i8042 module build error sound/soc: mpc5200_psc_ac97: Use gpio pins for cold reset powerpc/5200: add mpc5200_psc_ac97_gpio_reset
| * | | Revert "Input: appletouch - fix integer overflow issue"Benjamin Herrenschmidt2010-08-091-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 04b4b88cca0ebe3813b4b6f014fb6a0db380b137. While the original problem only caused a slight disturbance on the edge of the touchpad, the commit above to "fix" it completely breaks operation on some other models such as mine. We'll sort this out separately, revert the patch for now. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | | Merge branch 'next' of ↵Linus Torvalds2010-08-0916-364/+3174
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (30 commits) DMAENGINE: at_hdmac: locking fixlet DMAENGINE: pch_dma: kill another usage of __raw_{read|write}l dma: dmatest: fix potential sign bug ioat2: catch and recover from broken vtd configurations v6 DMAENGINE: add runtime slave control to COH 901 318 v3 DMAENGINE: add runtime slave config to DMA40 v3 DMAENGINE: generic slave channel control v3 dmaengine: Driver for Topcliff PCH DMA controller intel_mid: Add Mrst & Mfld DMA Drivers drivers/dma: Eliminate a NULL pointer dereference dma/timb_dma: compile warning on 32 bit DMAENGINE: ste_dma40: support older silicon DMAENGINE: ste_dma40: support disabling physical channels DMAENGINE: ste_dma40: no disabled phy channels on ux500 DMAENGINE: ste_dma40: fix suspend bug DMAENGINE: ste_dma40: add DB8500 memcpy channels DMAENGINE: ste_dma40: no flow control on memcpy DMAENGINE: ste_dma40: arch updates for LCLA and LCPA DMAENGINE: ste_dma40: allocate LCLA dynamically DMAENGINE: ste_dma40: no premature stop ... Fix up trivial conflicts in arch/arm/mach-ux500/devices-db8500.c
| * | | DMAENGINE: at_hdmac: locking fixletYong Wang2010-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | atc_chain_complete shall be called with atchan->lock held and bh disabled. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | DMAENGINE: pch_dma: kill another usage of __raw_{read|write}lYong Wang2010-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use {read|write}l instead of __raw_{read|write}l since PCH DMA controller is PCI device. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | dma: dmatest: fix potential sign bugKulikov Vasiliy2010-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'cnt' is unsigned, so this code may become wrong in future as dmatest_add_threads() can return error code: cnt = dmatest_add_threads(dtc, DMA_MEMCPY); thread_count += cnt > 0 ? cnt : 0; ^^^^^^^ Now it can return only -EINVAL if and only if second argument of dmatest_add_threads() is not one of DMA_MEMCPY, DMA_XOR, DMA_PQ. So, now it is not wrong but may become wrong in future. The semantic patch that finds this problem (many false-positive results): (http://coccinelle.lip6.fr/) // <smpl> @ r1 @ identifier f; @@ int f(...) { ... } @@ identifier r1.f; type T; unsigned T x; @@ *x = f(...) ... *x > 0 Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | ioat2: catch and recover from broken vtd configurations v6Dan Williams2010-08-044-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some platforms (MacPro3,1) the BIOS assigns the ioatdma device to the incorrect iommu causing faults when the driver initializes. Add a quirk to catch this misconfiguration and try falling back to untranslated operation (which works in the MacPro3,1 case). Assuming there are other platforms with misconfigured iommus teach the ioatdma driver to treat initialization failures as non-fatal (just fail the driver load and emit a warning instead of triggering a BUG_ON). This can be classified as a boot regression since 2.6.32 on affected platforms since the ioatdma module did not autoload prior to that kernel. Cc: <stable@kernel.org> Acked-by: David Woodhouse <David.Woodhouse@intel.com> Reported-by: Chris Li <lkml@chrisli.org> Tested-by: Chris Li <lkml@chrisli.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | DMAENGINE: add runtime slave control to COH 901 318 v3Linus Walleij2010-08-041-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the DMA engine driver for the COH 901 318 used in the U300 platform with the generic runtime slave control command. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | DMAENGINE: add runtime slave config to DMA40 v3Linus Walleij2010-08-041-4/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the DMA engine driver for the DMA40 used in the U8500 platform with the generic runtime slave configuration interface. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | dmaengine: Driver for Topcliff PCH DMA controllerYong Wang2010-08-043-0/+965
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Topcliff PCH is the platform controller hub that is going to be used in Intel's upcoming general embedded platforms. This adds the driver for Topcliff PCH DMA controller. The DMA channels are strictly for device to host or host to device transfers and cannot be used for generic memcpy. Signed-off-by: Yong Wang <yong.y.wang@intel.com> [kill GFP_ATOMIC, kill __raw_{read|write}l, locking fixlet] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | intel_mid: Add Mrst & Mfld DMA DriversVinod Koul2010-07-274-0/+1417
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add DMA drivers for DMA controllers in Langwell chipset of Intel(R) Moorestown platform and DMA controllers in Penwell of Intel(R) Medfield platfrom This patch adds support for Moorestown DMAC1 and DMAC2 controllers. It also add support for Medfiled GP DMA and DMAC1 controllers. These controllers supports memory to peripheral and peripheral to memory transfers. It support only single block transfers. This driver is based on Kernel DMA engine Anyone who wishes to use this controller should use DMA engine APIs This controller exposes DMA_SLAVE capabilities and notifies the client drivers of DMA transaction completion Config option required to be enabled CONFIG_INTEL_MID_DMAC=y Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | Merge branch 'timb' into dmaengineDan Williams2010-07-011-4/+4
| |\ \ \
| | * | | drivers/dma: Eliminate a NULL pointer dereferenceJulia Lawall2010-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If td_desc is NULL, just skip both kfrees. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * | | dma/timb_dma: compile warning on 32 bitDan Carpenter2010-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This silences a compile warning on 32 bit systems: drivers/dma/timb_dma.c:203: warning: cast to pointer from integer of different size Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: support older siliconLinus Walleij2010-06-221-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure the DMA40 driver will also work on the oldest silicon revisions that have the on-chip memory on another location in the DB8500 and also requires explicit suspend before starting or resuming a logical channel. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> [added parenthesis to the definition of U8500_DMA_LCPA_BASE_ED] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: support disabling physical channelsJonas Aaberg2010-06-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to disable physical channels. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: fix suspend bugJonas Aaberg2010-06-221-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug when suspending channels: first make the checks, then suspend the channel, not the other way around. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: allocate LCLA dynamicallyLinus Walleij2010-06-223-102/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to allocating LCLA in memory instead of having a fixed address. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: no premature stopJonas Aaberg2010-06-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct bug that could cause paused channels to stop. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: interrupts only on dstJonas Aaberg2010-06-222-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't want interrupts when the source is done, only when the destination is done and everything is complete at the recieveing end of a transfer. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: avoid doing unnessecary suspendJonas Aaberg2010-06-221-32/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid doing unnessecary suspend when modifying logical channels. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: lock fixJonas Aaberg2010-06-221-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix up some locking issues found by enabling lock debugging. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: deny ops on non-alloc channelsJonas Aaberg2010-06-221-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added checks to deny operating on none-allocated channels. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: various cosmetic clean-upsJonas Aaberg2010-06-222-67/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up some extra newlines, removes some code duplication and moves the code to comply better with checkpatch. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: improve allocation error handlingJonas Aaberg2010-06-221-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Better error handling when channel allocation fails. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: use kmem cacheJonas Aaberg2010-06-221-34/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use kmem cache instead of own cache, reducing code duplication and bug sources. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: moved freeing of client owned descPer Friden2010-06-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixed typo and moved freeing of client owned desc to free_dma. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: only write phy channel config first timeLinus Walleij2010-06-222-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only need to write the configuration to a physical channel if it is free, else it is already written. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | | DMAENGINE: ste_dma40: fixed lli_max=1 issuePer Friden2010-06-221-33/+29
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed lli_max=1 issue in case of full lcla, currently this case is not properly handled. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | | | drivers/char/vt.c:vc_do_resize(): local var `end' should be unsigned longqiaochong2010-08-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According include/linux/console_struct.h,vc_scr_end is unsigned long. struct vc_data { unsigned short vc_num; /* Console number */ unsigned int vc_cols; /* [#] Console size */ unsigned int vc_rows; unsigned int vc_size_row; /* Bytes per row */ unsigned int vc_scan_lines; /* # of scan lines */ unsigned long vc_origin; /* [!] Start of real screen */ unsigned long vc_scr_end; /* [!] End of real screen */ unsigned long vc_visible_origin; /* [!] Top of visible window */ unsigned int vc_top, vc_bottom; /* Scrolling region */ const struct consw *vc_sw; unsigned short *vc_screenbuf; ... } Signed-off-by: qiaochong <qiaochong@loongson.cn> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | drivers/char/vt.c: fix vc->vc_origin on take_over_console()qiaochong2010-08-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel will die on some platform when switch from vga mode to framebuffer mode. The reason of this bug is that bind_con_driver reset vc->vc_origin to (unsigned long)vc->vc_screenbuf. On vgacon vc->vc_origin is not releated to vc->vc_screenbuf,if set vc->vc_origin to vc->vc_screenbuf,kernel will die on vc_do_resize. static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty, struct vc_data *vc, unsigned int cols, unsigned int lines) { unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0; unsigned int old_cols, old_rows, old_row_size, old_screen_size; unsigned int new_cols, new_rows, new_row_size, new_screen_size; unsigned int end, user; ... end = (old_rows > new_rows) ? old_origin + (old_row_size * new_rows) : vc->vc_scr_end; ... /* here for a test from vgacon to framebuffer: old_origin=0x810814a0,end=0xb00b8fa0,vc->vc_origin=0x810814a0 the code bellow will copy memory from 0x810814a0 to 0xb00b8fa0, this will cover kernel code,kernel died here. */ while (old_origin < end) { scr_memcpyw((unsigned short *) new_origin, (unsigned short *) old_origin, rlth); if (rrem) scr_memsetw((void *)(new_origin + rlth), vc->vc_video_erase_char, rrem); old_origin += old_row_size; new_origin += new_row_size; } ... } [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: qiaochong <qiaochong@loongson.cn> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | hwmon: f71882fg: add support for the Fintek F71808EGiel van Schijndel2010-08-092-11/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow device probing to recognise the Fintek F71808E. Sysfs interface: * Fan/pwm control is the same as for F71889FG * Temperature and voltage sensor handling is largely the same as for the F71889FG - Has one temperature sensor less (doesn't have temp3) - Misses one voltage sensor (doesn't have V6, thus in6_input refers to what in7_input refers for F71889FG) For the purpose of the sysfs interface fxxxx_in_temp_attr[] is split up such that it can largely be reused. Signed-off-by: Giel van Schijndel <me@mortis.eu> Cc: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | drivers/hwmon/coretemp.c: remove unneeded #ifdef CONFIG_HOTPLUG_CPUAndrew Morton2010-08-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | register_hotcpu_notifier() is designed to make these ifdefs unnecessary. Cc: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | hwmon: coretemp: documentation update and cleanupChen Gong2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update coretemp supported CPU TjMax lists and some cleanup work. Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | hwmon: coretemp: enable coretemp device add operation failureChen Gong2010-08-091-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one coretemp device can't be added, it should allow subsequent adding operation because every new-added device will create a new sysfs group, not an additional sensor sys entry. Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | hwmon: coretemp: update hotplug condition checkChen Gong2010-08-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two errors in hotplug. One is for hotplug notifier. The other is unnecessary driver unregister. Because even none of online cpus supports coretemp, we can't assume new onlined cpu doesn't support it either. If related driver is unregistered there we have no chance to use coretemp from then on. Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | hwmon: add support for JEDEC JC 42.4 compliant temperature sensorsGuenter Roeck2010-08-093-0/+605
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | hwmon: driver for SMM665 Six-Channel Active DC Output Controller/MonitorGuenter Roeck2010-08-093-0/+759
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver adds support for the monitoring features of the Summit Microelectronics SMM665 Six-Channel Active DC Output Controller/Monitor. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | hmc6352: add driver for the HMC6352 compassKalhan Trisal2010-08-093-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver will report the heading values in degrees to the sysfs interface. The values returned are headings . e.g. 245.6 Alan: Cleanups requested now all folded in and a sysfs description to keep Andrew happy. The sysfs description now resembles hwmon. Signed-off-by: Kalhan Trisal <kalhan.trisal@intel.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | drivers/hwmon/hdaps.c: add Lenovo Thinkpad T400 to the whitelistRitesh Raj Sarraf2010-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Lenovo Thinkpad T400. I have done the testing on my laptop. The hdaps module detects the device and the hdapsd daemon is able to [un]park the disk. Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org> Cc: Frank Seidel <frank@f-seidel.de> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | edd: fix possible memory leak in edd_init() error pathAxel Lin2010-08-091-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error may happen at any iteration of the for loop, this patch properly unregisters already registed edd_devices in error path. [akpm@linux-foundation.org: remove unneeded NULL test] Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | s390: remove WARN_ON for misc_deregister() failuresAkinobu Mita2010-08-093-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous change added WARN_ON() in misc_deregister(). So it is not necessary to WARN_ON() misc_deregister() failure by callers. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | char: add WARN_ON() in misc_deregister()Akinobu Mita2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | misc_deregister() returns an error only when it attempts to unregister the device that is not registered. This is the driver's bug. Most of the drivers don't check the return value of misc_deregister(). (It is not bad thing because most of kernel *_unregister() API always succeed and do not return value) So it is better to indicate the error by WARN_ON() in misc_deregister(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>