summaryrefslogtreecommitdiff
path: root/drivers/char
AgeCommit message (Collapse)Author
2010-09-25ENGR00131909 OCOTP: fix compile errorHuang Shijie
add the proper header to fix the compile error. Signed-off-by: Huang Shijie <b32955@freescale.com>
2010-09-25ENGR00126721-4 OCOTP: add the Kconfig and MakefileHuang Shijie
add the ocotp module for Kconfig and Makefile. Signed-off-by: Huang Shijie <b32955@freescale.com>
2010-09-25ENGR00126721-1 OCOTP: add the ocotp driverHuang Shijie
Add a new driver for On-Chip OTP controller. The driver will register all the register names of all the banks to /sys/. You can use the following commands to manipulate the OTP banks: read: #cat HW_OCOTP_MAC0 write: #echo 0x11223344 > HW_OCOTP_MAC0 Signed-off-by: Huang Shijie <b32955@freescale.com>
2010-09-25ENGR00126089 RNG driver defines suspend resume even when CONFIG_PM not setAnish Trivedi
Define suspend resume functions only when CONFIG_PM is set Signed-off-by: Anish Trivedi <anish@freescale.com>
2010-09-25ENGR00126057-1 Add RNGB supportAnish Trivedi
Adopt the mainline RNGC driver for RNGB hw Add clock gating on suspend resume Signed-off-by: Anish Trivedi <anish@freescale.com>
2010-09-07ENGR00127171-4 Random: Export add_interrupt_randomness at random.cFrank Li
Fix can build error when build as module Export add_interrupt_randomness at random.c Signed-off-by: Frank Li <Frank.Li@freescale.com>
2010-09-01ENGR00126692-3: Upgrade kernel to 2.6.35Dinh Nguyen
This patch contains changes to /drivers files Contains all checkpatch and copyright fixes. Acked-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
2010-08-13ipmi: fix ACPI detection with regspacingYinghai Lu
commit d9e1b6c45059ccfff647a120769ae86da78dfdc4 upstream. After the commit that changed ipmi_si detecting sequence from SMBIOS/ACPI to ACPI/SMBIOS, | commit 754d453185275951d39792865927ec494fa1ebd8 | Author: Matthew Garrett <mjg@redhat.com> | Date: Wed May 26 14:43:47 2010 -0700 | | ipmi: change device discovery order | | 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. ipmi_si can not be initialized. [ 138.799739] calling init_ipmi_devintf+0x0/0x109 @ 1 [ 138.805050] ipmi device interface [ 138.818131] initcall init_ipmi_devintf+0x0/0x109 returned 0 after 12797 usecs [ 138.822998] calling init_ipmi_si+0x0/0xa90 @ 1 [ 138.840276] IPMI System Interface driver. [ 138.846137] ipmi_si: probing via ACPI [ 138.849225] ipmi_si 00:09: [io 0x0ca2] regsize 1 spacing 1 irq 0 [ 138.864438] ipmi_si: Adding ACPI-specified kcs state machine [ 138.870893] ipmi_si: probing via SMBIOS [ 138.880945] ipmi_si: Adding SMBIOS-specified kcs state machineipmi_si: duplicate interface [ 138.896511] ipmi_si: probing via SPMI [ 138.899861] ipmi_si: Adding SPMI-specified kcs state machineipmi_si: duplicate interface [ 138.917095] ipmi_si: Trying ACPI-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0 [ 138.928658] ipmi_si: Interface detection failed [ 138.953411] initcall init_ipmi_si+0x0/0xa90 returned 0 after 110847 usecs in smbios has DMI/SMBIOS Handle 0x00C5, DMI type 38, 18 bytes IPMI Device Information Interface Type: KCS (Keyboard Control Style) Specification Version: 2.0 I2C Slave Address: 0x00 NV Storage Device: Not Present Base Address: 0x0000000000000CA2 (I/O) Register Spacing: 32-bit Boundaries in DSDT has Device (BMC) { Name (_HID, EisaId ("IPI0001")) Method (_STA, 0, NotSerialized) { If (LEqual (OSN, Zero)) { Return (Zero) } Return (0x0F) } Name (_STR, Unicode ("IPMI_KCS")) Name (_UID, Zero) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0CA2, // Range Minimum 0x0CA2, // Range Maximum 0x00, // Alignment 0x01, // Length ) IO (Decode16, 0x0CA6, // Range Minimum 0x0CA6, // Range Maximum 0x00, // Alignment 0x01, // Length ) }) Method (_IFT, 0, NotSerialized) { Return (One) } Method (_SRV, 0, NotSerialized) { Return (0x0200) } } so the reg spacing should be 4 instead of 1. Try to calculate regspacing for this kind of system. Observed on a Sun Fire X4800. Other OSes work and pass certification. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Matthew Garrett <mjg@redhat.com> Cc: Len Brown <len.brown@intel.com> Cc: Myron Stowe <myron.stowe@hp.com> Cc: Corey Minyard <minyard@acm.org> 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>
2010-08-13Char: nozomi, set tty->driver_data appropriatelyJiri Slaby
commit bf9c1fca9ae9a79ed209e7ab2c10b3862f3f6f72 upstream. Sorry, one more fix, this one depends on the other, so this is rather 2/2. -- tty->driver_data is used all over the code, but never set. This results in oopses like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000130 IP: [<ffffffff814a0040>] mutex_lock+0x10/0x40 ... Pid: 2157, comm: modem-manager Not tainted 2.6.34.1-0.1-desktop #1 2768DR7/2768DR7 RIP: 0010:[<ffffffff814a0040>] [<ffffffff814a0040>] mutex_lock+0x10/0x40 RSP: 0018:ffff88007b16fa50 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000130 RCX: 0000000000000003 RDX: 0000000000000003 RSI: 0000000000000286 RDI: 0000000000000130 RBP: 0000000000001000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000130 R13: 0000000000000001 R14: 0000000000000000 R15: ffff88007b16feb4 ... Call Trace: [<ffffffffa077690d>] ntty_write_room+0x4d/0x90 [nozomi] ... Set tty->driver_data to the computed port in .install to not recompute it in every place where needed. Switch .open to use driver_data too. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13Char: nozomi, fix tty->count countingJiri Slaby
commit ee78bb95b7bea08b7774a02073ea2bb45611a9e1 upstream. Currently ntty_install omits to increment tty count and we get the following warnings: Warning: dev (noz2) tty->count(0) != #fd's(1) in tty_open So to fix that, add one tty->count++ there. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26Merge branch 'for-linus' of ↵Linus Torvalds
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
2010-07-26agp/intel: Use the correct mask to detect i830 aperture size.Tim Gardner
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>
2010-07-26tpm_tis: fix subsequent suspend failuresRajiv Andrade
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>
2010-07-21sysrq,kdb: Use __handle_sysrq() for kdb's sysrq functionJason Wessel
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>
2010-07-01Merge branch 'drm-fixes' of ↵Linus Torvalds
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 ...
2010-06-29ipmi: set schedule_timeout_wait() value back to oneMartin Wilck
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>
2010-06-29ipmi: make sure drivers were registered before unregistering themMatthew Garrett
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>
2010-06-27Merge branch 'for-linus' of ↵Linus Torvalds
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()
2010-06-22Merge commit 'v2.6.35-rc3' into for-linusDmitry Torokhov
2010-06-15agp: add no warn since we have a fallback to vmalloc pathsDave Airlie
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>
2010-06-15agp: drop vmalloc flag.Dave Airlie
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>
2010-06-15TPM: ReadPubEK output struct fixRajiv Andrade
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>
2010-06-09Input: sysrq - fix "stuck" SysRq modeDmitry Torokhov
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>
2010-06-06Revert "tty: fix a little bug in scrup, vt.c"Linus Torvalds
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>
2010-06-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6Linus Torvalds
* 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
2010-06-04ramoops: add HAS_IOMEM dependencyHeiko Carstens
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>
2010-06-04vt_ioctl: return -EFAULT on copy_from_user errorsDan Carpenter
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>
2010-06-04tty: fix a little bug in scrup, vt.cFrank Pan
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>
2010-06-04TTY/n_gsm: potential double lockDan Carpenter
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>
2010-06-03Merge branch 'merge' of ↵Linus Torvalds
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
2010-06-03virtio: console: Fix crash when port is unplugged and blocked for writeAmit Shah
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>
2010-06-03virtio: console: Fix crash when hot-unplugging a port and read is blockedAmit Shah
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>
2010-06-02agp/uninorth: Fix oops caused by flushing too muchPaul Mackerras
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>
2010-06-01Merge branch 'drm-intel-next' of ↵Linus Torvalds
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 ...
2010-05-27drop unused dentry argument to ->fsyncChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-05-27Merge branch 'for-linus' of ↵Linus Torvalds
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 ...
2010-05-27drivers/char/applicom.c: use memdup_userJulia Lawall
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>
2010-05-27drivers/char/ppdev.c: use kasprintfJulia Lawall
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>
2010-05-27char drivers: RAM oops/panic loggerMarco Stornelli
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>
2010-05-27ipmi: handle run_to_completion properly in deliver_recv_msg()Jiri Kosina
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>
2010-05-27ipmi: update driver to use dev_printk and its constructsMyron Stowe
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>
2010-05-27ipmi: convert tracking of the ACPI device pointer to a PNP deviceMyron Stowe
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>
2010-05-27ipmi: change timeout and event poll to one secondCorey Minyard
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>
2010-05-27ipmi: attempt to register multiple SIs of the same typeMatthew Garrett
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>
2010-05-27ipmi: reduce pollingMatthew Garrett
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>
2010-05-27ipmi: reduce polling when interrupts are availableMatthew Garrett
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>
2010-05-27ipmi: change device discovery orderMatthew Garrett
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>
2010-05-27ipmi: only register one si per bmcMatthew Garrett
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>
2010-05-27ipmi: split device discovery and registrationMatthew Garrett
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>
2010-05-27ipmi: change addr_source to an enum rather than stringsMatthew Garrett
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>