summaryrefslogtreecommitdiffstats
path: root/drivers/char
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into for-nextJiri Kosina2010-08-046-18/+44
|\
| * Merge branch 'for-linus' of ↵Linus Torvalds2010-07-261-5/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: add pipe A force quirks to i915 driver drm/i915: Fix panel fitting regression since 734b4157 drm/i915: fix deadlock in fb teardown drm/i915: don't free non-existent compressed llb on ILK+ agp/intel: Use the correct mask to detect i830 aperture size. drm/i915: disable FBC when more than one pipe is active drm/i915: Use the correct scanout alignment for fbcon. drm/i915: make sure eDP panel is turned on drm/i915: add PANEL_UNLOCK_REGS definition drm/i915: Make G4X-style PLL search more permissive drm/i915: Clear any existing dither mode prior to enabling spatial dithering drm/i915: handle shared framebuffers when flipping drm/i915: Explosion following OOM in do_execbuffer. gpu/drm/i915: Add a blacklist to omit modeset on LID open
| | * agp/intel: Use the correct mask to detect i830 aperture size.Tim Gardner2010-07-261-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: https://bugs.launchpad.net/bugs/597075 commit f1befe71fa7a79ab733011b045639d8d809924ad introduced a regression when detecting aperture size of some i915 adapters, e.g., those on the Intel Q35 chipset. The original report: https://bugzilla.kernel.org/show_bug.cgi?id=15733 The regression report: https://bugzilla.kernel.org/show_bug.cgi?id=16294 According to the specification found at http://intellinuxgraphics.org/VOL_1_graphics_core.pdf, the PCI config space register I830_GMCH_CTRL is a mirror of GMCH Graphics Control. The correct macro for isolating the aperture size bits is therefore I830_GMCH_GMS_MASK along with the attendant changes to the case statement. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Tested-by: Kees Cook <kees.cook@canonical.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Eric Anholt <eric@anholt.net> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| * | tpm_tis: fix subsequent suspend failuresRajiv Andrade2010-07-261-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix subsequent suspends by issuing tpm_continue_selftest during resume. Otherwise, the tpm chip seems to be not fully initialized and will reject the save state command during suspend, thus preventing the whole system to suspend. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16256 Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Cc: James Morris <jmorris@namei.org> Cc: Debora Velarde <debora@linux.vnet.ibm.com> Cc: David Safford <safford@watson.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Morris <jmorris@namei.org>
| * | sysrq,kdb: Use __handle_sysrq() for kdb's sysrq functionJason Wessel2010-07-211-1/+1
| |/ | | | | | | | | | | | | | | The kdb code should not toggle the sysrq state in case an end user wants to try and resume the normal kernel execution. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Merge branch 'drm-fixes' of ↵Linus Torvalds2010-07-011-4/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (27 commits) drm/radeon/kms: remove rv100 bios connector quirk drm/radeon/kms/pm: fix power state indexing on igp chips in dynpm mode DRM / radeon / KMS: Fix hibernation regression related to radeon PM (was: Re: [Regression, post-2.6.34] Hibernation broken on machines with radeon/KMS and r300) drm/radeon/kms/igp: fix possible divide by 0 in bandwidth code (v2) drm/radeon: add quirk to make HP nx6125 laptop resume. drm/radeon/kms: add some missing regs to evergreen gpu init drm/radeon/kms: fix typos in evergreen command checker drm/radeon/kms: avoid oops on mac r4xx cards fb: fix colliding defines for fb flags. drm/radeon/kms: Force HDP_NONSURF to maximum size drm/radeon/kms: disable frac fb dividers for rs6xx drm/radeon/kms: don't read attempt to read bios from VRAM on unposted GPU. drm/radeon/kms: fix typo in evergreen_gpu_init drm/radeon/kms: return ret in cursor_set failure path drm/ttm: non pooled page allocation should have GFP_USER set drm/radeon/r100/r200: fix calculation of compressed cube maps drm/radeon/r200: handle more hw tex coord types drm/radeon/kms: CS checker texture fixes for r1xx/r2xx/r3xx drm/radeon: add fake RN50 table for powerpc drm/fb: Fix video= mode computation ...
| | * agp: add no warn since we have a fallback to vmalloc pathsDave Airlie2010-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | also drop the NORETRY we can probably nearly always satisfy order 1 allocs now, and again the vmalloc path is there. Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * agp: drop vmalloc flag.Dave Airlie2010-06-151-3/+1
| | | | | | | | | | | | | | | | | | | | | Since the code that was too ugly to live is upstream, we can use it now, instead of rolling our own. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | ipmi: set schedule_timeout_wait() value back to oneMartin Wilck2010-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a regression introduced by ae74e823cb7d ("ipmi: add parameter to limit CPU usage in kipmid"). Some systems were seeing CPU usage go up dramatically with the recent changes to try to reduce timer usage in the IPMI driver. This was traced down to schedule_timeout_interruptible(1) being changed to schedule_timeout_interruptbile(0). Revert that part of the change. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16147 Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Cc: <stable@kernel.org> [2.6.34.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | ipmi: make sure drivers were registered before unregistering themMatthew Garrett2010-06-291-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ipmi code will never register a PCI or Open Firmware driver if a hardcoded device is provided by the user by providing device addresses via the module parameters. This can cause us to attempt to unregister a driver that was never registered, resulting in an oops. Keep track of registration in order to avoid this. Fixes a post-2.6.34 regression. Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | Merge branch 'for-linus' of ↵Linus Torvalds2010-06-271-2/+6
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: MAINTAINERS - Add an entry for the input MT protocol Input: wacom - fix serial number handling on Cintiq 21UX2 Input: fixup X86_MRST selects Input: sysrq - fix "stuck" SysRq mode Input: ad7877 - fix spi word size to 16 bit Input: pcf8574_keypad - fix off by one in pcf8574_kp_irq_handler()
| | * \ Merge commit 'v2.6.35-rc3' into for-linusDmitry Torokhov2010-06-226-16/+60
| | |\ \ | | | |/
| | * | Input: sysrq - fix "stuck" SysRq modeDmitry Torokhov2010-06-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shoud fix the problem with SysRq mode staying half-way enabled and interfereing with normal PrtScrn operation after user presses ALT for the first time. Reported-and-tested-by: Éric Piel <E.A.B.Piel@tudelft.nl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | | TPM: ReadPubEK output struct fixRajiv Andrade2010-06-151-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a missing element of the ReadPubEK command output, that prevents future overflow of this buffer when copying the TPM output result into it. Prevents a kernel panic in case the user tries to read the pubek from sysfs. Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
* | | synclink: use ARRAY_SIZEKulikov Vasiliy2010-07-201-1/+1
|/ / | | | | | | | | | | | | | | Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x). Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Revert "tty: fix a little bug in scrup, vt.c"Linus Torvalds2010-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 962400e8fd29981a7b166e463dd143b6ac6a3e76, which was entirely bogus. The code used to multiply the character offset by "vc->vc_cols", and that's actually correct, because 'd' itself is an 'unsigned short'. So the pointer arithmetic already takes the size of a VGA character into account. Changing it to use vc_size_row (which is just "vc_cols" shifted up to take the size of the character into account) ends up multiplying with the VGA character size twice. This got reported as bugs for various other subsystems, because what it actually results in is writing the 16-bit vc_video_erase_char pattern (usually 0x0720: 0x07 is the default attribute, 0x20 is ASCII space) into some random other allocation. So Markus ended up reporting this as a ext4 bug, while to Torsten Kaiser it looked like a problem with KMS or libata. Jeff Chua saw it in different places. And finally - Justin Mattock had slab poisoning enabled, and saw it as a slab poison overwritten. And bisected and reverted this to verify the buggy commit. Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com> Reported-by: Jeff Chua <jeff.chua.linux@gmail.com> Reported-by: Justin P. Mattock <justinmattock@gmail.com> Reported-bisected-and-tested-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Dave Airlie <airlied@redhat.com> Cc: Frank Pan <frankpzh@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6Linus Torvalds2010-06-043-6/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: add support for various Titan PCI cards vt_ioctl: return -EFAULT on copy_from_user errors serial: altera_uart: Proper section for altera_uart_remove tty: fix a little bug in scrup, vt.c altera_uart: Simplify altera_uart_console_putc altera_uart: Don't take spinlock in already protected functions TTY/n_gsm: potential double lock serial: bfin_5xx: fix typo in IER check serial: bfin_5xx: IRDA is not affected by anomaly 05000230 serial_cs: add and sort IDs for serial and modem cards msm_serial: fix serial on trout
| * | vt_ioctl: return -EFAULT on copy_from_user errorsDan Carpenter2010-06-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | copy_from_user() returns the number of bytes remaining but we want to return a negative error code here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | tty: fix a little bug in scrup, vt.cFrank Pan2010-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code uses vc->vc_cols instead of vc->vc_size_row by mistake, it will cause half of the region which is going to clear remain uncleared. The issue happens in background consoles, so it's hard to observe. Frank Pan Signed-off-by: Frank Pan <frankpzh@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | TTY/n_gsm: potential double lockDan Carpenter2010-06-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In gsm_dlci_data_kick() we call gsm_dlci_data_sweep() with the "gsm->tx_lock" held so we can't lock it again inside gsm_dlci_data_sweep(). I removed that lock from and added one to gsmld_write_wakeup() instead. The sweep function is only called from those two places. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | ramoops: add HAS_IOMEM dependencyHeiko Carstens2010-06-041-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver fails to compile on s390: drivers/char/ramoops.c: In function 'ramoops_init': drivers/char/ramoops.c:122: error: implicit declaration of function 'ioremap' Since we won't make use of the driver anyway on s390 just let it depend on HAS_IOMEM. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'merge' of ↵Linus Torvalds2010-06-031-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/macio: Fix probing of macio devices by using the right of match table agp/uninorth: Fix oops caused by flushing too much powerpc/pasemi: Update MAINTAINERS file powerpc/cell: Fix integer constant warning powerpc/kprobes: Remove resume_execution() in kprobes powerpc/macio: Don't dereference pointer before null check
| * | agp/uninorth: Fix oops caused by flushing too muchPaul Mackerras2010-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a sporadic oops at boot on G5 Power Macs. The table_end variable has the address of the last byte of the table. Adding on PAGE_SIZE means we flush too much, and if the page after the table is not mapped for any reason, the kernel will oops. Instead we add on 1 because flush_dcache_range() interprets its second argument as the first byte past the range to be flushed. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | | virtio: console: Fix crash when port is unplugged and blocked for writeAmit Shah2010-06-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a program that has a virtio port opened and blocked for a write operation, a port hot-unplug event will later led to a crash when SIGTERM was sent to the program. Fix that. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | | virtio: console: Fix crash when hot-unplugging a port and read is blockedAmit Shah2010-06-031-3/+7
|/ / | | | | | | | | | | | | | | | | When removing a port we don't check if a program was blocked for read. This leads to a crash when SIGTERM is sent to the program after hot-unplugging the port. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge branch 'drm-intel-next' of ↵Linus Torvalds2010-06-011-7/+39
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (41 commits) drm/i915: add HAS_BSD check to i915_getparam drm/i915: Honor sync polarity from VBT panel timing descriptors drm/i915: Unmask interrupt for render engine on Sandybridge drm/i915: Fix PIPE_CONTROL command on Sandybridge drm/i915: Fix up address spaces in slow_kernel_write() drm/i915: Use non-atomic kmap for slow copy paths drm/i915: Avoid moving from CPU domain during pwrite drm/i915: Cleanup after failed initialization of ringbuffers drm/i915: Reject bind_to_gtt() early if object > aperture drm/i915: Check error code whilst moving buffer to GTT domain. drm/i915: Remove spurious warning "Failure to install fence" drm/i915: Rebind bo if currently bound with incorrect alignment. drm/i915: Include pitch in set_base debug statement. drm/i915: Only print "nothing to do" debug message as required. drm/i915: Propagate error from unbinding an unfenceable object. drm/i915: Avoid nesting of domain changes when setting display plane drm/i915: Hold the spinlock whilst resetting unpin_work along error path drm/i915: Only print an message if there was an error drm/i915: Clean up leftover bits from hws move to ring structure. drm/i915: Add CxSR support on Pineview DDR3 ...
| * agp/intel: Restrict GTT mapping to valid range on i915 and i945Chris Wilson2010-05-261-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | References: Bug 15733 - Crash when accessing nonexistent GTT entries in i915 https://bugzilla.kernel.org/show_bug.cgi?id=15733 On G33 and above, the size of the GTT space is determined by the GMCH control register. Prior to this revision, the size is determined by the size of the aperture. So we must careful to map and fill the appropriate range depending on chipset. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
* | drop unused dentry argument to ->fsyncChristoph Hellwig2010-05-271-2/+1
| | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'for-linus' of ↵Linus Torvalds2010-05-271-26/+35
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (24 commits) m68k: amiga - RTC platform device conversion m68k: amiga - Parallel port platform device conversion m68k: amiga - Serial port platform device conversion m68k: amiga - Mouse platform device conversion m68k: amiga - Keyboard platform device conversion m68k: amiga - Amiga Gayle IDE platform device conversion m68k: amiga - A4000T SCSI platform device conversion m68k/scsi: a3000 - Do not use legacy Scsi_Host.base m68k: amiga - A3000 SCSI platform device conversion m68k/scsi: gvp11 - Do not use legacy Scsi_Host.base m68k: amiga - GVP Series II SCSI zorro_driver conversion m68k/scsi: a2091 - Do not use legacy Scsi_Host.base m68k: amiga - A2091/A590 SCSI zorro_driver conversion m68k/scsi: mvme147 - Kill obsolete HOSTS_C logic m68k/scsi: a3000 - Kill a3000_scsiregs typedef m68k/scsi: gvp11 - Kill gvp11_scsiregs typedef m68k/scsi: a2091 - Kill a2091_scsiregs typedef m68k/scsi: gvp11 - Extract check_wd33c93() m68k/scsi: a3000 - Kill static global a3000_host m68k/scsi: mvme147 - Kill static global mvme147_host ...
| * | m68k: amiga - Serial port platform device conversionGeert Uytterhoeven2010-05-261-26/+35
| |/ | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* | drivers/char/applicom.c: use memdup_userJulia Lawall2010-05-271-8/+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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | drivers/char/ppdev.c: use kasprintfJulia Lawall2010-05-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | char drivers: RAM oops/panic loggerMarco Stornelli2010-05-273-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ramoops, like mtdoops, can log oops/panic information but in RAM. It can be used with persistent RAM for systems without flash support. In addition, for this systems, with this driver, it's no more needed add to the kernel the mtd subsystem with advantage in footprint. It can be used in a very easy way with persistent RAM for systems without flash support. For these systems, with this driver, it is no longer required to cinlude mtd subsystem with an advantage in footprint. In addition, you can save flash space and store this information only in RAM. Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Cc: Simon Kagstrom <simon.kagstrom@netinsight.net> Cc: David Woodhouse <David.Woodhouse@intel.com> Cc; Anders Grafstrom <anders.grafstrom@netinsight.net> Cc: Yuasa Yoichi <yuasa@linux-mips.org> Cc: Jamie Lokier <jamie@shareable.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: handle run_to_completion properly in deliver_recv_msg()Jiri Kosina2010-05-271-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | If run_to_completion flag is set, it means that we are running in a single-threaded mode, and thus no locks are held. This fixes a deadlock when IPMI notifier is being called during panic. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Corey Minyard <minyard@acm.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: update driver to use dev_printk and its constructsMyron Stowe2010-05-272-127/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update core IPMI driver printk()'s with dev_printk(), and its constructs, to provide additional device topology information. An example of the additional device topology for a PNP device - ipmi_si 00:02: probing via ACPI ipmi_si 00:02: [io 0x0ca2-0x0ca3] regsize 1 spacing 1 irq 0 ipmi_si 00:02: Found new BMC (man_id: 0x00000b, prod_id: 0x0000, ... ipmi_si 00:02: IPMI kcs interface initialized and for a PCI device - ipmi_si 0000:01:04.6: probing via PCI ipmi_si 0000:01:04.6: PCI INT A -> GSI 21 (level, low) -> IRQ 21 ipmi_si 0000:01:04.6: [mem 0xf1ef0000-0xf1ef00ff] regsize 1 spaci... ipmi_si 0000:01:04.6: IPMI kcs interface initialized [minyard@acm.org: rework to fix rejects, extended it a bit] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Myron Stowe <myron.stowe@hp.com> Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Zhao Yakui <yakui.zhao@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: convert tracking of the ACPI device pointer to a PNP deviceMyron Stowe2010-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert PNP patch (git 9e368fa011d4e0aa050db348d69514900520e40b) to maintain a pointer to a PNP device, 'pnp_dev', instead of the ACPI device, 'acpi_dev', that is currently being tracked with PNP based IPMI device discovery. Signed-off-by: Myron Stowe <myron.stowe@hp.com> Acked-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Corey Minyard <minyard@acm.org> Cc: Len Brown <lenb@kernel.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: change timeout and event poll to one secondCorey Minyard2010-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | The timeouts in IPMI are in the 1-5 second range in message handling, so a 1 second timeout is a reasonable thing to do. This should help with reducing power consumption on idle systems. Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: attempt to register multiple SIs of the same typeMatthew Garrett2010-05-271-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Some odd systems may have multiple BMCs, and we want to be able to support them. Let's make the assumption that if a system legitimately has multiple BMCs then each BMC's SI will be of the same type, and also that we won't see multiple SIs of the same type unless we have multiple BMCs. If these hold true then we should register all SIs of the same type. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: reduce pollingMatthew Garrett2010-05-271-7/+13
| | | | | | | | | | | | | | | | | | | | We can reasonably alter the poll rate depending on whether we're performing a transaction or merely waiting for an event. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: reduce polling when interrupts are availableMatthew Garrett2010-05-271-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're not currently in the middle of a transaction, and if we have interrupts, there's no real reason to poll the controller more frequently than the core IPMI code does. Set the interrupt_disabled flag appropriately as the interrupt state changes, and make the timeout code reset itself only if the transaction is incomplete or we have no interrupts. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: change device discovery orderMatthew Garrett2010-05-271-11/+12
| | | | | | | | | | | | | | | | | | | | | | The ipmi spec provides an ordering for si discovery. Change the driver to match, with the exception of preferring smbios to SPMI as HPs (at least) contain accurate information in the former but not the latter. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: only register one si per bmcMatthew Garrett2010-05-271-2/+27
| | | | | | | | | | | | | | | | | | | | | | Only register one si per bmc. Use any user-provided devices first, followed by the first device with an irq, followed by the first device discovered. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: split device discovery and registrationMatthew Garrett2010-05-271-46/+84
| | | | | | | | | | | | | | | | | | | | | | | | The ipmi spec indicates that we should only make use of one si per bmc, so separate device discovery and registration to make that possible. [thenzl@redhat.com: fix mutex use] Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ipmi: change addr_source to an enum rather than stringsMatthew Garrett2010-05-271-19/+25
| | | | | | | | | | | | | | | | | | | | Switch from a char* to an enum to identify the address source of SIs, making it easier to handle them appropriately during registration. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | drivers/char/vt.c: use memdup_userJulia Lawall2010-05-271-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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'drm-linus' of ↵Linus Torvalds2010-05-261-10/+18
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: agp: amd64, fix pci reference leaks drm/edid: Allow non-fatal checksum errors in CEA blocks drm/radeon/kms: suppress a build warning (unused variable) drm: Fixes linux-next & linux-2.6 checkstack warnings: nouveau: fix acpi_lid_open undefined drm/radeon/kms: release AGP bridge at suspend
| * agp: amd64, fix pci reference leaksJiri Slaby2010-05-261-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | Stanse found pci reference leaks in uli_agp_init and nforce3_agp_init initialization functions. The PCI devices are bridges, so it's not critical, but still worth fixing. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2010-05-251-0/+17
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (103 commits) ARM: 6141/1: Add audio support part in arch/arm/mach-w90x900 ARM: 5939/1: ARM: Add option CMDLINE_FORCE to force usage of the in-kernel cmdline ARM: 6140/1: silence a bogus sparse warning in unwind.c ARM: mach-at91: duplicated include ARM: arch/arm/nwfpe/fpsr.h: Checkpatch cleanup ARM: arch/arm/mach-shark/pci.c: Checkpatch cleanup ARM: arch/arm/nwfpe/ChangeLog: Checkpatch cleanup ARM: arch/arm/mach-sa1100/leds.c: Checkpatch cleanup ARM: arch/arm/mach-h720x/common.h: Checkpatch cleanup ARM: arch/arm/mach-footbridge/ebsa285-pci.c: Checkpatch cleanup ARM: arch/arm/mach-clps711x/Makefile.boot: Checkpatch cleanup ARM: arch/arm/boot/bootp/bootp.lds: Checkpatch cleanup ARM: SPEAR6xx: remove duplicated #include ARM: s3c6400_defconfig: Add NAND driver ARM: s3c6400_defconfig: enable sound as modules ARM: s3c6400_defconfig: enable power management ARM: s5pv210_defconfig: Update s5pv210_defconfig to v2.6.34 ARM: s5pc110_defconfig: Update s5pc110_defconfig to v2.6.34 ARM: s5p6442_defconfig: Update s5p6442_defconfig to v2.6.34 ARM: s5p6440_defconfig: Update s5p6440_defconfig to v2.6.34 ...
| * | ARM: 6137/1: nomadik hwrng: Add clock supportSrinidhi Kasagar2010-05-201-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the clock support to the Nomadik RNG driver Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com> Acked-by: Linus walleij <linus.walleij@stericsson.com> Acked-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | drivers: misc: pass miscdevice pointer via file private dataSamu Onkalo2010-05-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For misc devices, inode->i_cdev doesn't point to the device drivers own data. Link between file operations and device driver internal data is lost. Pass pointer to misc device struct via file private data for driver open function use. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud