If one of the OEM flags becomes set in the flags from the hardware, the
driver could hang if no OEM handler was set. Fix the code to handle this.
This was tested by setting the flags by hand after they were fetched.
Signed-off-by: Corey Minyard <minyard@acm.org>
Ackde-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When the ipmi_si module is loaded on a system without any ipmi device, it
fails with nodev. It would be fine if all resources were freed. A call to
device_unregister() is missing, resulting to a oops when you remove the
ipmi_msghandler.
Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
No other tty driver will print on the console when the open of it fails.
On systems that happen to be configured for both ttyS0 and hvc0 console,
this will keep flooding the console output. This is most likely to
happen with systems booted between with and without hypervisor from the
same filesystem.
Let's just remove it. When it's really needed (i.e. when the open fails
and someone is trying to debug it), noone will see the output anyway. And
init will report the opens failing in due time through the syslog.
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Ryan S. Arnold <rsa@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Kirch of SuSE tracked down a problem where module unloads of the IPMI
driver would occasionally result in Oopses. He tracked that down to a
variable that wasn't always initialized properly in some situations. This
patch initializes that variable. Olaf sent a patch that kzalloc-ed the
data, but this structure is large enough that I would perfer to not do
that. Thanks Olaf!
Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Olaf Kirch <okir@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The last argument of module_param is permissions, not default value.
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix receive tty error handling in synclink_gt driver. Adrian reported
compiler warning for incorrect bit test against char variable. I
determined these and other device specific error bits were incorrectly
defined.
Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The radeon requires a VAP state flush when enabling/disabling
vertex programs on the r200 cards.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Unlike the other tty comment patch this one has code changes. Specifically
it limits the queue size for a tty to 64K characters (128Kbytes) worst case
even if the tty is ignoring tty->throttle. This is because certain drivers
don't honour the throttle value correctly, although it is a useful
safeguard anyway.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Doesn't fix them but does show up some interesting areas that need review
and fixing.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When reading /dev/vcsa while a font with more than 256 characters is
loaded, one of the attribute bits records the 9th bit of the character.
But depending on the console driver (vgacon or fbcon for instance), that's
bit 3 or bit 0. And there is no way for userland to know that, thus no way
for userland to safely grab the screen content. So here is a (tested)
patch:
Add a VT_GETHIFONTMASK ioctl for knowing which bit is the 9th bit for VC
text (vc_hi_font_mask field of the vc_data structure).
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
While testing Moxa C218T/PCI on PowerPC 405EP I found that loading firmware
using the linux kernel driver fails because calculation of the checksum is
not endianess independent in the original code.
After I fixed this I found that uploading firmware in a system with
multiple cards causes a kernel oops. I had a look in the recent moxa
sources and found that they do some kind of locking there. Applying this
lock fixed the problem.
Alan sayeth:
Checksum changes are clearly correct. Other changes is an improvement but
not I think enough to handle malicious firmware attacks. That said such an
attacker has CAP_SYS_RAWIO anyway so that part is irrelevant except for
neatness.
[akpm@osdl.org: cleanups]
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When cdev_add() failed there is no reason to call cdev_del().
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
since only the briQ has a briQ front panel, and the briQ is a CHRP and
is only supported if CONFIG_PPC_CHRP is set.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Three typos in drivers/char/watchdog/Kconfig...
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
A set of tty line discipline cleanup patches were introduced before the
dawn of time, in kernel version 2.4.21. This patch performs that cleanup
for the hvsi driver.
The hvsi driver is used only on IBM pSeries PowerPC boxes. The driver was
originally written by Hollis Blanchard, who has delegated maintainership to
me. So this my first and maybe only patch in this official new role,
because this driver is otherwise bug-free :-)
Alan: "Actually its also a bug fix, tty->ldisc should be locked by refcounting
and the helpers do this for you."
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Under certain rare circumstances, it appears that there can be be a
NULL-pointer deref when a user fiddles with terminal emeulation programs while
outpu is being sent to the console. This patch checks for and avoids a
NULL-pointer deref.
Signed-off-by: Hollis Blanchard <hollisbl@austin.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Seems like the omap-rng driver in the main tree predates the switch from
<asm/hardware/clock.h> to <linux/clk.h> ... now it builds OK.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Add a platform check to the snsc driver init function, to prevent
loading on non-sn2 systems.
Signed-off-by: Greg Edwards <edwardsg@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
The geode hwrng leaks an iomapped resource, if hwrng_register() fails.
This fixes it.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The intel hwrng leaks an iomapped resource, if hwrng_register() failes.
This fixes it.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
A static struct mustn't be exported.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
tpm_atmel changes
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
powerpc-specific video & agp driver changes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
pseries platform changes.
Built for pseries_defconfig
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/char/briq_panel.c:28:22: error: asm/prom.h: No such file or directory
Cc: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
WAN: Converted synclink drivers to use netif_carrier_*() instead
of hdlc_set_carrier().
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fix the start and len variables that should be using the new
resource_size_t.
Signed_off_by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Some machine manufacturers are not sticking to the TCG specifications and
including an ACPI DSDT entry for the TPM which allows PNP discovery of the
device.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Under stress testing I found that the interrupt is not always cleared.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kfree(devname) on the misc_register() failure path. Otherwise it is lost
forever.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- rename EXPORTed gpio vtables from {scx200,pc8736x}_access to _gpio_ops new
name is much closer to the vtable-name struct nsc_gpio_ops, should be
clearer. Also rename the _fops vtable var to _fileops to better
disambiguate it from the gpio vtable.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- pure cosmetics: lose needless newlines.
- rename EXPORTed gpio vtables from {scx200,pc8736x}_access to _gpio_ops new
name is much closer to the vtable-name struct nsc_gpio_ops, should be
clearer. Also rename the _fops vtable var to _fileops to better
disambiguate it from the gpio vtable.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drops gpio_set_high, gpio_set_low from the nsc_gpio_ops vtable. While we
can't drop them from scx200_gpio (or can we?), we dont need them for new users
of the exported vtable; gpio_set(1), gpio_set(0) work fine.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Remove the scx200_gpio's cdev-array & ksalloc, replacing it with a single
static struct cdev, which is sufficient for all the pins.
cdev_put is commented out since kernel wont link properly with it, and its
apparently not needed.
With these patches, this driver continues to work with Chris Boot's
leds_48xx driver.
Signed-off-by Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
this patch is mostly cleanup of scx200_gpio :
- drop #include <linux/config.h>
- s/DEVNAME/DRVNAME/ apparently a convention
- replace variable num_pins with #define MAX_PINS
- s/dev/devid/ to clarify that its a dev_t, not a struct device dev.
- move devid = MKDEV(major,0) into branch where its needed.
2 minor 'changes' :
- reduced MAX_PINS from 64 to 32. Ive never tested other pins, and
theyre all multiplexed with other functions, some of which may be in use
on my soekris 4801, so I dont know what testing should yield.
- +EXPORT_SYMBOL(scx200_access);
This exposes the driver's vtable, which another driver can use along
with #include <linux/nsc_gpio.h>, to manipulate a gpio-pin.
Signed-off-by Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>