1
0
Fork 0
Commit Graph

13845 Commits (d54b5caa832caa3715a458115b6ea79ad17c4f31)

Author SHA1 Message Date
Michael Hanselmann cab267c65f [PATCH] powermac backlight fixes
Fix a erroneous calculation of the legacy brightness values as reported by
Paul Collins.  Additionally, it moves the calculation of the negative value
in the radeonfb driver after the value check.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Paul Collins <paul@briny.ondioline.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:06 -07:00
Corey Minyard 96febe9fb7 [PATCH] IPMI: watchdog handle panic properly
Modify the watchdog timeout in IPMI to only do things at panic/reboot time if
the watchdog timer was already running.  Some BIOSes do not disable the
watchdog timer at startup, and this led to a reboot a while later if the new
OS running didn't start monitoring the watchdog, even if the watchdog was not
running before.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:06 -07:00
Corey Minyard 1a245866f8 [PATCH] IPMI: remove high res timer code
There was some old high-res-timer code in the IPMI driver that is dead.
Remove it.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Corey Minyard 409035e088 [PATCH] IPMI: tidy msghandler timer
Tidy up the timer usage in the IPMI driver.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Alan Cox 4ac4360b95 [PATCH] istallion: cleanups
Turned out to be rather a monster

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Alan Cox effc8b704b [PATCH] stallion: fix recent SMP locking cleanup
Works better on SMP if...

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Paul Fulghum 33b37a33c2 [PATCH] remove active field from tty buffer structure
Remove 'active' field from tty buffer structure.  This was added in 2.6.16
as part of a patch to make the new tty buffering SMP safe.  This field is
unnecessary with the more intelligently written flush_to_ldisc that adds
receive_room handling.

Removing this field reverts to simpler logic where the tail buffer is
always the 'active' buffer, which should not be freed by flush_to_ldisc.
(active == buffer being filled with new data)

The result is simpler, smaller, and faster tty buffer code.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Paul Fulghum 2c3bb20f46 [PATCH] add receive_room flow control to flush_to_ldisc
Flush data serially to line discipline in blocks no larger than
tty->receive_room to avoid losing data if line discipline is busy (such as
N_TTY operating at high speed on heavily loaded system) or does not accept
data in large blocks (such as N_MOUSE).

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Paul Fulghum 817d6d3bce [PATCH] remove TTY_DONT_FLIP
Remove TTY_DONT_FLIP tty flag.  This flag was introduced in 2.1.X kernels
to prevent the N_TTY line discipline functions read_chan() and
n_tty_receive_buf() from running at the same time.  2.2.15 introduced
tty->read_lock to protect access to the N_TTY read buffer, which is the
only state requiring protection between these two functions.

The current TTY_DONT_FLIP implementation is broken for SMP, and is not
universally honored by drivers that send data directly to the line
discipline receive_buf function.

Because TTY_DONT_FLIP is not necessary, is broken in implementation, and is
not universally honored, it is removed.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Atsushi Nemoto e0ac4761fa [PATCH] RTC: add rtc-rs5c348 driver
Add an SPI driver for the Ricoh RS5C348 RTC chip.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:04 -07:00
Christoph Hellwig f5e54d6e53 [PATCH] mark address_space_operations const
Same as with already do with the file operations: keep them in .rodata and
prevents people from doing runtime patching.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:04 -07:00
Dave Jones adf8a28715 [AGPGART] Make AGP depend on PCI
Fixes possible compile error in amd64 with pci=n
pointed out by Adrian Bunk.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-28 13:38:43 -04:00
Vladimir Lebedev 49fee981fa ACPI: fix battery on HP NX6125
EC problem was cause of both battery and AC issues.
http://bugzilla.kernel.org/show_bug.cgi?id=6455

Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 12:44:45 -04:00
Bartlomiej Swiercz f831335d42 ACPI: additional blacklist entry for ThinkPad R40e
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:34:19 -04:00
Andreas Mohr b488f02156 ACPI: restore comment justifying 'extra' P_LVLx access
While trying to look for superfluous I/O accesses that can be optimized
away, I stumbled upon this ACPI sleep I/O access and couldn't figure out
why the hell this dummy op was necessary.
After more than one hour of internet research, I had collected a sufficient
number of documents (among those very old kernel versions) that finally
told me what this dummy read was about: STPCLK# doesn't get asserted in time
on (some) chipsets, which is why we need to have a dummy I/O read to delay
further instruction processing until the CPU is fully stopped.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:27:02 -04:00
Dominik Brodowski c4a001b1ea ACPI: C-States: only demote on current bus mastering activity
Only if bus master activity is going on at the present, we should avoid
entering C3-type sleep, as it might be a faulty transition.  As long as the
bm_activity bitmask was based on the number of calls to the ACPI idle
function, looking at previous moments made sense.  Now, with it being based on
what happened this jiffy, looking at this jiffy should be sufficient.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:14:50 -04:00
Dominik Brodowski c5ab81ca01 ACPI: C-States: bm_activity improvements
Do not assume there was bus mastering activity if the idle handler didn't get
called, as there's only reason to not enter C3-type sleep if there is bus
master activity going on.  Only for the "promotion" into C3-type sleep bus
mastering activity is taken into account, and there only current bus mastering
activity, and not pure guessing should lead to the decision on whether to
enter C3-type sleep or not.

Also, as bm_activity is a jiffy-based bitmask (bit 0: bus mastering activity
during this juffy, bit 31: bus mastering activity 31 jiffies ago), fix the
setting of bit 0, as it might be called multiple times within one jiffy.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:14:42 -04:00
Dominik Brodowski a3c6598f92 ACPI: C-States: accounting of sleep states
Track the actual time spent in C-States (C2 upwards, we can't determine this
for C1), not only the number of invocations.  This is especially useful for
dynamic ticks / "tickless systems", but is also of interest on normal systems,
as any interrupt activity leads to C-States being exited, not only the timer
interrupt.

The time is being measured in PM timer ticks, so an increase by one equals 279
nanoseconds.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:14:31 -04:00
Bob Moore 967440e3be ACPI: ACPICA 20060623
Implemented a new acpi_spinlock type for the OSL lock
interfaces.  This allows the type to be customized to
the host OS for improved efficiency (since a spinlock is
usually a very small object.)

Implemented support for "ignored" bits in the ACPI
registers.  According to the ACPI specification, these
bits should be preserved when writing the registers via
a read/modify/write cycle. There are 3 bits preserved
in this manner: PM1_CONTROL[0] (SCI_EN), PM1_CONTROL[9],
and PM1_STATUS[11].
http://bugzilla.kernel.org/show_bug.cgi?id=3691

Implemented the initial deployment of new OSL mutex
interfaces.  Since some host operating systems have
separate mutex and semaphore objects, this feature was
requested. The base code now uses mutexes (and the new
mutex interfaces) wherever a binary semaphore was used
previously. However, for the current release, the mutex
interfaces are defined as macros to map them to the
existing semaphore interfaces.

Fixed several problems with the support for the control
method SyncLevel parameter. The SyncLevel now works
according to the ACPI specification and in concert with the
Mutex SyncLevel parameter, since the current SyncLevel is
a property of the executing thread. Mutual exclusion for
control methods is now implemented with a mutex instead
of a semaphore.

Fixed three instances of the use of the C shift operator
in the bitfield support code (exfldio.c) to avoid the use
of a shift value larger than the target data width. The
behavior of C compilers is undefined in this case and can
cause unpredictable results, and therefore the case must
be detected and avoided.  (Fiodor Suietov)

Added an info message whenever an SSDT or OEM table
is loaded dynamically via the Load() or LoadTable()
ASL operators. This should improve debugging capability
since it will show exactly what tables have been loaded
(beyond the tables present in the RSDT/XSDT.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:11:38 -04:00
Kristen Accardi 95b38b3f45 ACPIPHP: prevent duplicate slot numbers when no _SUN
Dock bridges generally do not implement _SUN, yet show up as ejectable
slots.  If you have more than one ejectable slot that does not implement
SUN, with the current code you will get duplicate slot numbers.  So, if
there is no _SUN, use the current count of the number of slots found
instead.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:09:54 -04:00
Len Brown 2b85e1307f ACPI: static-ize handle_hotplug_event_func()
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:08:46 -04:00
Kristen Accardi 4e8662bbd6 ACPIPHP: use ACPI dock driver
Modify the acpiphp driver to use the ACPI dock driver for dock
notifications.  Only load the acpiphp driver if we find we have pci dock
devices.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:08:06 -04:00
Kristen Accardi a5e1b94008 ACPI: dock driver
Create a driver which lives in the acpi subsystem to handle dock events.
This driver is not an "ACPI" driver, because acpi drivers require that the
object be present when the driver is loaded.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:07:16 -04:00
Paul Mackerras 649e857972 [POWERPC] Make sure we select CONFIG_NEW_LEDS if ADB_PMU_LED is set
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-06-28 15:19:04 +10:00
Eric Sesterhenn 0a3a6d69b7 Input: db9 - fix potential buffer overrun
Fixes Coverity #id 483

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-27 23:42:33 -04:00
Dmitry Torokhov f8b4c46c0c Input: atkbd - fix hardware autorepeat
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-27 23:42:17 -04:00
Linus Torvalds a39727f212 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  [netdrvr] Remove long-unused bits from Becker template drivers
  [netdrvr] natsemi: minor cleanups
  [netdrvr] natsemi: Separate out media initialization code
  [PATCH] WAN: update info page for a bunch of my drivers
  [PATCH] drivers/net/hamradio/dmascc.c: fix section mismatch
  [PATCH] Fix phy id for LXT971A/LXT972A
  [PATCH] DM9000 - minor code cleanups
  [PATCH] DM9000 - do no re-init spin lock
  [PATCH] DM9000 - check for MAC left in by bootloader
  [PATCH] DM9000 - better checks for platform resources
2006-06-27 19:15:50 -07:00
Linus Torvalds 936813a880 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  [MTD] NAND: Select chip before checking write protect status
  [MTD] CORE mtdchar.c: fix off-by-one error in lseek()
  [MTD] NAND: Fix typo in mtd/nand/ts7250.c
  [JFFS2][XATTR] coexistence between xattr and write buffering support.
  [JFFS2][XATTR] Fix wrong copyright
  [JFFS2][XATTR] Re-define xd->refcnt as atomic_t
  [JFFS2][XATTR] Fix memory leak with jffs2_xattr_ref
  [JFFS2][XATTR] rid unnecessary writing of delete marker.
  [JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL.
  [JFFS2][XATTR] using 'delete marker' for xdatum/xref deletion
  [MTD] Fix off-by-one error in physmap.c
  [MTD] Remove unused 'nr_banks' variable from ixp2000 map driver
  [MTD NAND] s3c2412 support in s3c2410.c
  [MTD] Initialize 'writesize'
  [MTD] NAND: ndfc fix address offset thinko
  [MTD] NAND: S3C2410 convert prinks to dev_*()s
  [MTD] NAND: Missing fixups
2006-06-27 19:13:56 -07:00
Linus Torvalds 03529d9f66 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] ata_piix: add ICH6/7/8 to Kconfig
  [PATCH] sata_sil: disable hotplug interrupts on two ATI IXPs
  [PATCH] libata: cosmetic updates
  [PATCH] ata: add some NVIDIA chipset IDs
  [PATCH] libata reduce timeouts
  [PATCH] libata: implement ata_port_max_devices()
  [PATCH] libata: make two functions global
  [PATCH] libata: update ata_do_simple_cmd()
  [PATCH] libata: move ata_do_simple_cmd() below ata_exec_internal()
  [PATCH] libata: clear EH action on device detach
  [PATCH] libata: implement and use ata_deh_dev_action()
  [PATCH] libata: move ata_eh_clear_action() upward
  [PATCH] libata.h needs scatterlist.h
  [libata] sata_vsc: partially revert a PCI ID-related commit
  [libata] Bump versions
2006-06-27 19:07:21 -07:00
Johannes Berg 70c3967d4f [POWERPC] Convert powermac ide blink to new led infrastructure
This patch removes the old pmac ide led blink code and
adds generic LED subsystem support for the LED.

It maintains backward compatibility with the old
BLK_DEV_IDE_PMAC_BLINK Kconfig option which now
simply selects the new code and influences the
default trigger.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-06-28 11:51:12 +10:00
Daniel Ritz d6fcb3b9cf [PATCH] i2c-i801.c: don't pci_disable_device() after it was just enabled
Commit 02dd7ae289 ("[PATCH] i2c-i801:
Merge setup function") has a missing return 0 in the _probe() function.
This means the error path is always executed and pci_disable_device() is
called even when the device just got successfully enabled.

Having the SMBus device disabled makes some systems (eg.
Fujitsu-Siemens Lifebook E8010) hang hard during power-off.

Intead of reverting the whole commit this patch fixes it up:
- don't ever call pci_disable_device(), also not in the _remove() function
  to avoid hangs
- fix missing pci_release_region() in error path

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 18:36:39 -07:00
Greg Ungerer 0e702ab38b [PATCH] m68knommu: FEC driver event/irq fixes
Collection of fixes for the ColdFire FEC ethernet driver:

. reworked event setting so that it occurs after the MII setup.
  roucaries bastien <roucaries.bastien@gmail.com>
. Do not read cbd_sc in memory for each bit we test. Once per buffer is enough.
. Overrun errors must increase `rx_fifo_errors', not `rx_crc_errors'
. No need for a special value to activate rx or tx.  Only write access matters.
. Simplify parameter of eth_copy_and_sum : `data' has already the right value.
. Some spelling fixes.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 18:30:14 -07:00
Willson Callan 83901fc1c7 [PATCH] m68knommu: FEC driver set different priority/level on each IRQ
Set different irq priority levels for each IRQ requested.
According to the Freescale ColdFire documentation each separate IRQ
must have its own unique priority/level combination.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 18:26:37 -07:00
Matt Waddel 6b2652936b [PATCH] m68knommu: FEC driver support for the ColdFire 523x CPU family
Add support for the FEC module in the ColdFire 532x CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 18:26:37 -07:00
Philippe De Muyter 677177c531 [PATCH] m68knommu: avoid fec driver hang when link disappears
Avoid requesting a `Graceful Transmit Stop' when link has disappeared,
because that request cannot complete without link.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 18:26:37 -07:00
Linus Torvalds 12e56b601f Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (26 commits)
  V4L/DVB (4263): Fix warning when compiling on 64 bit machines
  V4L/DVB (4261): Included required header for in-kernel compilation
  V4L/DVB (4260): Stradis.c: make 2 functions static
  V4L/DVB (4259): Pass an explicit log prefix to cx2341x_log_status
  V4L/DVB (4257): Fix 64-bit compile warnings.
  V4L/DVB (4255): Tda9887 default TOP value is 0x10
  V4L/DVB (4254): Remove obsoleted tuner_debug option.
  V4L/DVB (4253): IVTV VBI format description too long.
  V4L/DVB (4252): Remove duplicate 'tda9887' in info messages.
  V4L/DVB (4245): Reduce the amount of pvrusb2-sourced noise going into the system log
  V4L/DVB (4244): Implement use of cx2341x module in pvrusb2 driver
  V4L/DVB (4243): Exploit new V4L control features in pvrusb2
  V4L/DVB (4242): Don't suspend encoder when changing its attributes (in pvrusb2)
  V4L/DVB (4241): Fix faulty encoder error recovery in pvrusb2
  V4L/DVB (4240): Various V4L control enhancements in pvrusb2
  V4L/DVB (4239): Handle boolean controls in pvrusb2
  V4L/DVB (4238): Make sure flags field is initialized when quering a control in pvrusb2
  V4L/DVB (4237): Move LOG_STATUS bracketing to a different part of the pvrusb2 driver
  V4L/DVB (4236): Rearrange things in pvrusb2 driver in preparation for using cx2341x module
  V4L/DVB (4235): Increase the maximum number of controls that pvrusb2-sysfs.c can handle.
  ...
2006-06-27 18:22:13 -07:00
Karsten Keil ca6f8792bd [PATCH] i4l fix DLE masking in isdn_tty_try_read
DLE masking was non-functional since the new tty handling.

Found by Peter Evertz <leo2@pec.homeip.net>

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 18:00:36 -07:00
Adrian Bunk 775d584c63 [PATCH] drivers/message/i2o/iop.c: unexport i2o_msg_nop()
It's available in a header as a static inline - there's no need to export it.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:48 -07:00
Adrian Bunk 456229a91d [PATCH] drivers/char/ipmi/ipmi_msghandler.c: make proc_ipmi_root static
Make struct proc_ipmi_root static.

Besides this, tremove removes an unused #ifdef CONFIG_PROC_FS from
include/linux/ipmi.h.

Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:48 -07:00
Jesper Juhl 8f76078037 [PATCH] Remove redundant NULL checks before [kv]free - in drivers/
Remove redundant NULL chck before kfree + tiny CodingStyle cleanup for
drivers/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:48 -07:00
Siddha, Suresh B 5c45bf279d [PATCH] sched: mc/smt power savings sched policy
sysfs entries 'sched_mc_power_savings' and 'sched_smt_power_savings' in
/sys/devices/system/cpu/ control the MC/SMT power savings policy for the
scheduler.

Based on the values (1-enable, 0-disable) for these controls, sched groups
cpu power will be determined for different domains.  When power savings
policy is enabled and under light load conditions, scheduler will minimize
the physical packages/cpu cores carrying the load and thus conserving
power(with a perf impact based on the workload characteristics...  see OLS
2005 CMP kernel scheduler paper for more details..)

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Con Kolivas <kernel@kolivas.org>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:45 -07:00
Jim Cromie 7a8e2a5ea4 [PATCH] chardev: GPIO for SCx200 & PC-8736x: add proper Kconfig, Makefile entries
Replace the temp makefile hacks with proper CONFIG entries, which are also
added to Kconfig.

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>
2006-06-27 17:32:43 -07:00
Jim Cromie 23916a8e3d [PATCH] chardev: GPIO for SCx200 & PC-8736x: display pin values in/out in gpio_dump
Add current pin settings to gpio_dump() output.  This adds the last 'word' to
the syslog lines, which displays the input and output values that the pin is
set to.

  pc8736x_gpio.0: io00: 0x0044 TS OD PUE  EDGE LO DEBOUNCE        io:1/1

The 2 values may differ for a number of reasons:
1- the pin output circuitry is diaabled, (as the above 'TS' indicates)
2- it needs a pullup resistor to drive the attached circuit,
3- the external circuit needs a pullup so the open-drain has something
   to pull-down
4- the pin is wired to Vcc or Ground

It might be appropriate to add a WARN for 2,3,4, since they could
damage the chip and/or circuit, esp if misconfig goes unnoticed.

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>
2006-06-27 17:32:43 -07:00
Jim Cromie ec312310e4 [PATCH] gpio-patchset-fixups: include linux/io.h
Hmm.  Im somewhat ambivalent about this patch, since with it, driver wont
build for vanilla 17 or older.

Its also only 1/2 of your suggestion - when I tried it, I was building against
vanilla 17, and asm/uaccess.h cause compilation failure.  Looking back, Im
perplexed as to why linux/io.h didnt cause same failure ?!?

use linux/io.h rather than asm/io.h

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>
2006-06-27 17:32:43 -07:00
Jim Cromie 8bcf6135c3 [PATCH] chardev: GPIO for SCx200 & PC-8736x: replace spinlocks w mutexes
Replace spinlocks guarding gpio config ops with mutexes.  This is a me-too
patch, and is justifiable insofar as mutexes have stricter semantics and
better debugging support, so are preferred where they are applicable.

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>
2006-06-27 17:32:43 -07:00
Jim Cromie 6cad56fd88 [PATCH] chardev: GPIO for SCx200 & PC-8736x: fix gpio_current, use shadow regs
Add a working gpio_current() to pc8736x_gpio.c (the previous implementation
just threw a dev_warn), and fix gpio_change() to use gpio_current() rather
than the incorrect (and temporary) gpio_get().  Initialize shadow-regs so this
all works.

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>
2006-06-27 17:32:43 -07:00
Jim Cromie f31000e573 [PATCH] chardev: GPIO for SCx200 & PC-8736x: use dev_dbg in common module
Use of dev_dbg() and friends is considered good practice.  dev_dbg() needs a
struct device *devp, but nsc_gpio is only a helper module, so it doesnt
have/need its own.  To provide devp to the user-modules (scx200 & pc8736x
_gpio), we add it to the vtable, and set it during init.

Also squeeze nsc_gpio_dump()'s format a little.

[  199.259879]  pc8736x_gpio.0: io09: 0x0044 TS OD PUE  EDGE LO DEBOUNCE

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>
2006-06-27 17:32:43 -07:00
Jim Cromie 58b087cda1 [PATCH] chardev: GPIO for SCx200 & PC-8736x: add platform_device for use w dev_dbg
Adds platform-device to (just introduced) driver, and uses it to replace many
printks with dev_dbg() etc.  This could trivially be merged into previous
patch, but this way matches better with the corresponding patch that does the
same change to scx200_gpio.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:43 -07:00
Jim Cromie 681a3e7dab [PATCH] chardev: GPIO for SCx200 & PC-8736x: add new pc8736x_gpio module
Add the brand new pc8736x_gpio driver.  This is mostly based upon
scx200_gpio.c, but the platform_dev is treated separately, since its fairly
big too.

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>
2006-06-27 17:32:43 -07:00
Jim Cromie 0e41ef3c51 [PATCH] chardev: GPIO for SCx200 & PC-8736x: migrate gpio_dump to common module
Since the meaning of config-bits is the same for scx200 and pc8736x _gpios, we
can share a function to deliver this to user.  Since it is called via the
vtable, its also completely replaceable.  For now, we keep using printk...

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>
2006-06-27 17:32:43 -07:00
Jim Cromie 1a66fdf083 [PATCH] chardev: GPIO for SCx200 & PC-8736x: migrate file-ops to common module
Now that the read(), write() file-ops are dispatching gpio-ops via the vtable,
they are generic, and can be moved 'verbatim' to the nsc_gpio common-support
module.  After the move, various symbols are renamed to update 'scx200_' to
'nsc_', and headers are adjusted accordingly.

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>
2006-06-27 17:32:43 -07:00
Jim Cromie 1ca5df0a4c [PATCH] chardev: GPIO for SCx200 & PC-8736x: add empty common-module
Add the nsc_gpio common-support module as an empty shell.  Next patch starts
the migration of the common gpio support routines.

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>
2006-06-27 17:32:42 -07:00
Jim Cromie c3dc8071ee [PATCH] chardev: GPIO for SCx200 & PC-8736x: dispatch via vtable
Now actually call the gpio operations thru the 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>
2006-06-27 17:32:42 -07:00
Jim Cromie fe3a168a2c [PATCH] chardev: GPIO for SCx200 & PC-8736x: add gpio-ops vtable
Abstract the gpio operations into a new nsc_gpio_ops 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>
2006-06-27 17:32:42 -07:00
Jim Cromie 9550a339e1 [PATCH] chardev: GPIO for SCx200 & PC-8736x: add 'v' command to device-file
Add a new driver command: 'v' which calls gpio_dump() on the pin.  The output
goes to the log, like all other INFO messages in the original driver.  Giving
the user control over the feedback they 'need' is construed to be a
user-friendly feature, and allows us (later) to dial down many INFO messages
to DEBUG log-level.

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>
2006-06-27 17:32:42 -07:00
Jim Cromie 979b5ec3a7 [PATCH] chardev: GPIO for SCx200 & PC-8736x: add platforn_device for use w dev_dbg
Add a platform-device to scx200_gpio, and use its struct device dev member
(ie: devp) in dev_dbg() once.

There are 2 alternatives here (Im soliciting guidance/commentary):

- use isa_device, if/when its added to the kernel.

- alter scx200.c to EXPORT_GPL its private devp so that both scx200_gpio,
  and the (to be added) nsc_gpio module can use it.  Since the available devp
  is in 'grandparent', this seems like too much 'action at a distance'.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:42 -07:00
Jim Cromie 7d7f212661 [PATCH] chardev: GPIO for SCx200 & PC-8736x: modernize driver init to 2.6 api
Adopt many modern 2.6 coding practices, ala LDD3, chapter 3.  Changes are
limited to initialization calls from module init, ie: cdev_init, cdev_add,
*_chrdev_region, mkdev.

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>
2006-06-27 17:32:42 -07:00
Jim Cromie 62c83cde92 [PATCH] chardev: GPIO for SCx200 & PC-8736x: whitespace pre-clean
GPIO SUPPORT FOR SCx200 & PC8736x

The patch-set reworks the 2.4 vintage scx200_gpio driver for modern 2.6, and
refactors GPIO support to reuse it in a new driver for the GPIO on PC-8736x
chips.  Its handy for the Soekris.com net-4801, which has both chips.

These patches have been seen recently on Kernel-Mentors, and then
Kernel-Newbies ML, where Jesper Juhl kindly reviewed it.  His feedback has
been incorporated.  Thanks Jesper !

Its also gone to soekris-tech@soekris.com for possible testing by linux folks,
I've gotten 1 promise so far.  Theyre mostly BSD folk over there, but we'll
see..

Device-file & Sysfs

The driver preserves the existing device-file interface, including the
write/cmd set, but adds v to 'view' the pin-settings & configs by inducing,
via gpio_dump(), a dev_info() call.  Its a fairly crappy way to get status,
but it sticks to the syslog approach, conservatively.

Allowing users to voluntarily trigger logging is good, it gives them a
familiar way to confirm their app's control & use of the pins, and I've thus
reduced the pin-mode-updates from dev_info to dev_dbg.

I've recently bolted on a proto sysfs interface for both new drivers.  Im not
including those patches here; they (the patch + doc-pre-patch) are still quite
raw (and unreviewed on KNML), and since they 'invent' a convention for GPIO, a
proper vetting is needed.  Since this patchset is much bigger than my previous
ones, Id like to keep things simpler, and address it 1st, before bolting on
more stuff.

The driver-split

The Geode CPU and the PC-87366 Super-IO chip have GPIO units which share a
common pin-architecture (same pin features, with same bits controlling), but
with different addressing mechanics and port organizations.

The vintage driver expresses the pin capabilities with pin-mode commands
[OoPpTt],etc that change the pin configurations, and since the 2 chips share
pin-arch, we can reuse the read(), write() commands, once the implementation
is suitably adjusted.

The patchset adds a vtable: struct nsc_gpio_ops, to abstract the existing gpio
operations, then adjusts fileops.write() code to invoke operations via that
vtable.  Driver specific open()s set private_data to the vtable so its
available for use by write().

The vtable gets the gpio_dump() too, since its user-friendly, and (could be
construed as) part of the current device-file interface.  To support use of
dev_dbg() in write() & _dump(), the vtable gets a dev ptr too, set by both
scx200 & pc8736x _gpio drivers.

heres how the pins are presented in syslog:

[ 1890.176223]  scx200_gpio.0: io00: 0x0044 TS OD PUE  EDGE LO DEBOUNCE
[ 1890.287223]  scx200_gpio.0: io01: 0x0003 OE PP PUD  EDGE LO

nsc_gpio.c: new file is new home of several file-ops methods, which are
modified to get their vtable from filp->private_data, and use it where needed.

scx200_gpio.c: keeps some of its existing gpio routines, but now wires them up
via the vtable (they're invoked by nsc_gpio.c:nsc_gpio_write() thru this
vtable).  A driver-spcific open() initializes filp->private_data with the
vtable.

Once the split is clean, and the scx200_gpio driver is working, we copy and
modify the function and variable names, and rework the access-method bodies
for the different addressing scheme.

Heres a working overview of the patchset:

# series file for GPIO

# Spring Cleaning
gpio-scx/patch.preclean        # scripts/Lindent fixes, editor-ctrl comments

# API Modernization

gpio-scx/patch.api26        # what I learned from LDD3
gpio-scx/patch.platform-dev-2    # get pdev, support for dev_dbg()
gpio-scx/patch.unsigned-minor    # fix to match std practice

# Debuggability

gpio-scx/patch.dump-diet    # shrink gpio_dump()
gpio-scx/patch.viewpins        # add new 'command' to call dump()
gpio-scx/patch.init-refactor    # pull shadow-register init to sub

# Access-Abstraction (add vtable)

gpio-scx/patch.access-vtable    # introduce nsg_gpio_ops vtable, w dump
gpio-scx/patch.vtable-calls    # add & use the vtable in scx200_gpio
gpio-scx/patch.nscgpio-shell    # add empty driver for common-fops

# move code under abstraction
gpio-scx/patch.migrate-fops    # move file-ops methods from scx200_gpio
gpio-scx/patch.common-dump    # mv scx200.c:scx200_gpio_dump() to nsc_gpio.c
gpio-scx/patch.add-pc8736x-gpio    # add new driver, like old, w chip adapt
# gpio-scx/patch.add-DEBUG    # enable all dev_dbg()s

# Cleanups

# finish printk -> dev_dbg() etc
gpio-scx/patch.pdev-pc8736x    # new drvr needs pdev too,
gpio-scx/patch.devdbg-nscgpio    # add device to 'vtable', use in dev_dbg()

# gpio-scx/patch.pin-config-view    # another 'c' 'command'
# gpio-scx/quiet-getset        # take out excess dbg stuff (pretty quiet
now)
gpio-scx/patch.shadow-current    # imitate scx200_gpio's shadow regs in
pc87*

# post KMentors-post patches ..

gpio-scx/patch.mutexes        # use mutexes for config-locks
gpio-scx/patch.viewpins-values    # extend dump to obsolete separate 'c' cmd

gpio-scx/patch.kconfig        # add stuff for kbuild

# TBC
# combine api26 with pdev, which is just one step.
# merge c&v commands to single do-all-fn
# delay viewpins, dump-diet should also un-ifdef it too.

diff.sys-gpio-rollup-1

This patch:

Removed editor format-control comments, and used scripts/Lindent to clean up
whitespace, then deleted the bogus chunks :-(

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>
2006-06-27 17:32:42 -07:00
Chandra Seetharaman 74b85f3790 [PATCH] cpu hotplug: make cpu_notifier related notifier blocks __cpuinit only
Make notifier_blocks associated with cpu_notifier as __cpuinitdata.

__cpuinitdata makes sure that the data is init time only unless
CONFIG_HOTPLUG_CPU is defined.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:41 -07:00
Chandra Seetharaman 65edc68c34 [PATCH] cpu hotplug: make [un]register_cpu_notifier init time only
CPUs come online only at init time (unless CONFIG_HOTPLUG_CPU is defined).
So, cpu_notifier functionality need to be available only at init time.

This patch makes register_cpu_notifier() available only at init time, unless
CONFIG_HOTPLUG_CPU is defined.

This patch exports register_cpu_notifier() and unregister_cpu_notifier() only
if CONFIG_HOTPLUG_CPU is defined.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:41 -07:00
Chandra Seetharaman 9c7b216d23 [PATCH] cpu hotplug: revert init patch submitted for 2.6.17
In 2.6.17, there was a problem with cpu_notifiers and XFS.  I provided a
band-aid solution to solve that problem.  In the process, i undid all the
changes you both were making to ensure that these notifiers were available
only at init time (unless CONFIG_HOTPLUG_CPU is defined).

We deferred the real fix to 2.6.18.  Here is a set of patches that fixes the
XFS problem cleanly and makes the cpu notifiers available only at init time
(unless CONFIG_HOTPLUG_CPU is defined).

If CONFIG_HOTPLUG_CPU is defined then cpu notifiers are available at run
time.

This patch reverts the notifier_call changes made in 2.6.17

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:40 -07:00
Sonny Rao 6ac12dfe9c [PATCH] rtc: fix idr locking
We need to serialize access to the global rtc_idr even in this error path.

Signed-off-by: Sonny Rao <sonny@burdell.org>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:40 -07:00
Alan Cox b65b5b59f9 [PATCH] stallion clean up
There are two locking sets involved.  One locks the board mappings and the
other is the tty open/close locking.  The low level code was clearly
designed to be ported to OS's with spin locks already so pretty much comes
out in the wash

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:40 -07:00
akpm@osdl.org 33979734cd [PATCH] IPMI: use schedule in kthread
Corey Minyard <minyard@acm.org>

The kthread used to speed up polling for IPMI was using udelay in its
busy-wait polling loop when the lower-level state machine told it to do a
short delay.  This just used CPU and didn't help scheduling, thus causing
bad problems with other tasks.  Call schedule() instead.

Signed-off-by: Corey Minyard <minyard@acm.org>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:40 -07:00
Paul Fulghum 283fef59d6 [PATCH] tty: fix TCSBRK comment
Fix TCSBRK comment to prevent confusion or accidental removal.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:39 -07:00
Atsushi Nemoto 0ca0666490 [PATCH] RTC: Add a comment for ENOIOCTLCMD in ds1553_rtc_ioctl
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:39 -07:00
Ingo Molnar 34af946a22 [PATCH] spin/rwlock init cleanups
locking init cleanups:

 - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK()
 - convert rwlocks in a similar manner

this patch was generated automatically.

Motivation:

 - cleanliness
 - lockdep needs control of lock initialization, which the open-coded
   variants do not give
 - it's also useful for -rt and for lock debugging in general

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:39 -07:00
Randy Dunlap b3c681e091 [PATCH] update two drivers for poison.h
Update two drivers to use poison.h.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:38 -07:00
Randy Dunlap c9cf55285e [PATCH] add poison.h and patch primary users
Localize poison values into one header file for better documentation and
easier/quicker debugging and so that the same values won't be used for
multiple purposes.

Use these constants in core arch., mm, driver, and fs code.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:38 -07:00
KAMEZAWA Hiroyuki 76b67ed9dc [PATCH] node hotplug: register cpu: remove node struct
With Goto-san's patch, we can add new pgdat/node at runtime.  I'm now
considering node-hot-add with cpu + memory on ACPI.

I found acpi container, which describes node, could evaluate cpu before
memory. This means cpu-hot-add occurs before memory hot add.

In most part, cpu-hot-add doesn't depend on node hot add.  But register_cpu(),
which creates symbolic link from node to cpu, requires that node should be
onlined before register_cpu().  When a node is onlined, its pgdat should be
there.

This patch-set holds off creating symbolic link from node to cpu
until node is onlined.

This removes node arguments from register_cpu().

Now, register_cpu() requires 'struct node' as its argument.  But the array of
struct node is now unified in driver/base/node.c now (By Goto's node hotplug
patch).  We can get struct node in generic way.  So, this argument is not
necessary now.

This patch also guarantees add cpu under node only when node is onlined.  It
is necessary for node-hot-add vs.  cpu-hot-add patch following this.

Moreover, register_cpu calculates cpu->node_id by cpu_to_node() without regard
to its 'struct node *root' argument.  This patch removes it.

Also modify callers of register_cpu()/unregister_cpu, whose args are changed
by register-cpu-remove-node-struct patch.

[Brice.Goglin@ens-lyon.org: fix it]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:37 -07:00
Yasunori Goto 0fc44159bf [PATCH] Register sysfs file for hotplugged new node
When new node becomes enable by hot-add, new sysfs file must be created for
new node.  So, if new node is enabled by add_memory(), register_one_node() is
called to create it.  In addition, I386's arch_register_node() and a part of
register_nodes() of powerpc are consolidated to register_one_node() as a
generic_code().

This is tested by Tiger4(IPF) with node hot-plug emulation.

Signed-off-by: Keiichiro Tokunaga <tokuanga.keiich@jp.fujitsu.com>
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:36 -07:00
Yasunori Goto 1e3590e2e4 [PATCH] pgdat allocation for new node add (get node id by acpi)
This is to find node id from acpi's handle of memory_device in DSDT.  _PXM for
the new node can be found by acpi_get_pxm() by using new memory's handle.  So,
node id can be found by pxm_to_nid_map[].

  This patch becomes simpler than v2 of node hot-add patch.
  Because old add_memory() function doesn't have node id parameter.
  So, kernel must find its handle by physical address via DSDT again.
  But, v3 just give node id to add_memory() now.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:36 -07:00
Yasunori Goto bc02af93dd [PATCH] pgdat allocation for new node add (specify node id)
Change the name of old add_memory() to arch_add_memory.  And use node id to
get pgdat for the node at NODE_DATA().

Note: Powerpc's old add_memory() is defined as __devinit. However,
      add_memory() is usually called only after bootup.
      I suppose it may be redundant. But, I'm not well known about powerpc.
      So, I keep it. (But, __meminit is better at least.)

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:35 -07:00
Yasunori Goto dd56a8e36f [PATCH] Catch notification of memory add event of ACPI via container driver. (avoid redundant call add_memory)
When acpi_memory_device_init() is called at boottime to register struct
memory acpi_memory_device, acpi_bus_add() are called via
acpi_driver_attach().

But it also calls ops->start() function.  It is called even if the memory
blocks are initialized at early boottime.  In this case add_memory() return
-EEXIST, and the memory blocks becomes INVALID state even if it is normal.

This is patch to avoid calling add_memory() for already available memory.

[akpm@osdl.org: coding cleanups]
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:35 -07:00
Yasunori Goto 1f425994f9 [PATCH] Catch notification of memory add event of ACPI via container driver. (register start func for memory device)
This is a patch to call add_memroy() when notify reaches for new node's add
event.

When new node is added, notify of ACPI reaches container device which means
the node.

Container device driver calls acpi_bus_scan() to find and add belonging
devices (which means cpu, memory and so on).  Its function calls add and
start function of belonging devices's driver.

Howevever, current memory hotplug driver just register add function to
create sysfs file for its memory.  But, acpi_memory_enable_device() is not
called because it is considered just the case that notify reaches memory
device directly.  So, if notify reaches container device nothing can call
add_memory().

This is a patch to create start function which calls add_memory().
add_memory() can be called by this when notify reaches container device.

[akpm@osdl.org: coding cleanups]
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:35 -07:00
KAMEZAWA Hiroyuki 9ac023989e [PATCH] acpi memory hotplug cannot manage _CRS with plural resoureces
Current acpi memory hotplug just looks into the first entry of resources in
_CRS.  But, _CRS can contain plural resources.  So, if _CRS contains plural
resoureces, acpi memory hot add cannot add all memory.

With this patch, acpi memory hotplug can deal with Memory Device, whose
_CRS contains plural resources.

Tested on ia64 memory hotplug test envrionment (not emulation, uses alpha
version firmware which supports dynamic reconfiguration of NUMA.)

Note: Microsoft's Windows Server 2003 requires big (>4G)resoureces to be
      divided into small (<4G) resources. looks crazy, but not invalid.
      (See http://www.microsoft.com/whdc/system/pnppwr/hotadd/hotaddmem.mspx)
      For this reason, a firmware vendor who supports Windows writes plural
      resources in a _CRS even if they are contiguous.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:35 -07:00
Kyle McMartin 67a061a191 [PARISC] Add os_id_to_string helper
Add a helper to asm/pdc.h to translate OS_ID values to strings
and use it in the pdc_stable driver.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27 23:28:43 +00:00
Kyle McMartin ec1fdc24c2 [PARISC] OS_ID_LINUX == 0x0006
We were assigned an OS_ID of 0x0006. Consistently use OS_ID_LINUX
instead of using the magic number. Also update the OS_ID_ defines in
asm/pdc.h to reflect this.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27 23:28:42 +00:00
Thibaut Varene b0e8bfca2f [PARISC] Reduce data footprint in pdc_stable.c
No code change - reduce data footprint.

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27 23:28:39 +00:00
Thibaut Varene 3f9edb53f7 [PARISC] pdc_stable version 0.30
pdc_stable v0.30:

This patch introduces 3 more files to the /sys/firmware/stable tree:
- diagnostic, which contains a cryptic hex string
- osdep1, a 16 bytes os-dependent storage area always available
- osdep2, another os-dependent storage area which existence/size depends
on hversion.

This patch also adds code to setup the "Linux" signature in stable
storage. That is to say that starting with this patch, the kernel will
now sign its OSID (0x0006, thx LaMont) in Stable Storage upon boot,
whether pdc_stable is enabled or not.

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27 23:28:38 +00:00
Thibaut Varene 8ffaeaf42e [PARISC] PDC_CHASSIS is implemented on all machines
This patch removes a limitation of the original code, so that CHASSIS
codes can be sent to all machines. On machines with a LCD panel, this
code displays "INI" during bootup, "RUN" when the system is booted and
running, "FLT" when a panic occurs, etc.

This part of the code can be enabled/disabled through CONFIG_PDC_CHASSIS

This patch also adds minimalistic support for Chassis warnings, through
a proc entry '/proc/chassis', which will reflect the warnings status (PSU
or fans failure when they happen, NVRAM battery level and temperature
thresholds overflows).

This part of the code can be enabled/disabled through CONFIG_PDC_CHASSIS_WARN

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27 23:28:37 +00:00
Kyle McMartin 692086e0b3 [PARISC] Test ioc_needs_fdc variable instead of open coding
Some debugging code in sba_iommu.c should be testing ioc_needs_fdc,
not directly testing boot_cpu_data.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27 23:28:35 +00:00
Grant Grundler 40d78de1ac [PARISC] Fix gcc 4.1 warnings in sba_iommu.c
Clean up gcc 4.1 warnings noted by Joel Soete.
Kyle McMartin gets kudos for pointing out the issues.
Matthew Wilcox noticed sba_iommu was using open coded versions
of (read|write)X.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-06-27 23:28:34 +00:00
Thomas Gleixner 6a93096195 [MTD] NAND: Select chip before checking write protect status
The other way round works not really well with boards which have a
static NAND chipselect.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-27 23:24:09 +01:00
Herbert Valerio Riedel 1887f517e3 [MTD] CORE mtdchar.c: fix off-by-one error in lseek()
Allow lseek(mtdchar_fd, 0, SEEK_END) to succeed, which currently fails
with EINVAL.

lseek(fd, 0, SEEK_END) should result into the same fileposition as
lseek(fd, 0, SEEK_SET) + read(fd, buf, length(fd))

Furthermore, lseek(fd, 0, SEEK_CUR) should return the current file position,
which in case of an encountered EOF should not result in EINVAL

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-27 23:22:07 +01:00
Petr Stetiar 0e4ced59de [MTD] NAND: Fix typo in mtd/nand/ts7250.c
I was unable to compile ts7250.c after your refactor commit,
it's a typo probably.

-- ynezz

From: Petr Stetiar <ynezz@true.cz>
Signed-off-by: Thomas Gleixner  <tglx@linutronix.de>
2006-06-27 23:20:48 +01:00
Dmitry Torokhov e7374e4800 Input: fix resetting name, phys and uniq when unregistering device
It should be done before calling class_device_unregister() because
it will destroy the device and free memory if there are no other
references to the device.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 14:05:06 -07:00
Greg Kroah-Hartman 2427ddd8fa [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:24:00 -07:00
Greg Kroah-Hartman b60ba8343b [PATCH] 64bit resource: change pnp core to use resource_size_t
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:24:00 -07:00
Greg Kroah-Hartman e31dd6e452 [PATCH] 64bit resource: change pci core and arch code to use resource_size_t
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:24:00 -07:00
Greg Kroah-Hartman e29419fffc [PATCH] 64bit resource: fix up printks for resources in misc drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:59 -07:00
Greg Kroah-Hartman 490ab72af6 [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:59 -07:00
Greg Kroah-Hartman 228aef63d9 [PATCH] 64bit resource: fix up printks for resources in video drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:59 -07:00
Greg Kroah-Hartman 08f46de9a0 [PATCH] 64bit resource: fix up printks for resources in ide drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:59 -07:00
Greg Kroah-Hartman 176dfc633b [PATCH] 64bit resource: fix up printks for resources in mtd drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:58 -07:00
Greg Kroah-Hartman 1396a8c3f7 [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:58 -07:00
Greg Kroah-Hartman 7c7459d1f9 [PATCH] 64bit resource: fix up printks for resources in networks drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:58 -07:00
Greg Kroah-Hartman 740e518efc [PATCH] 64bit resource: C99 changes for struct resource declarations
Based on an original patch from Ralf Baechle <ralf@linux-mips.org> and
Vivek Goyal <vgoyal@in.ibm.com>.  This is needed in order to prepare for
changing the size of resources.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:58 -07:00
Sascha Hauer 6d4f8224d4 [MTD] Fix off-by-one error in physmap.c
This patch fixes a simple off-by-one error in the mtd physmap driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-27 14:38:15 +01:00
Lennert Buytenhek ce5b0968b1 [MTD] Remove unused 'nr_banks' variable from ixp2000 map driver
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-27 14:36:20 +01:00
Ben Dooks 2c06a08217 [MTD NAND] s3c2412 support in s3c2410.c
Add support for both the S3C2412 and S3C2412 Samsung SoCs to
the increasingly mis-named s3c2410.c driver.

This currently only supports SLC ECCs, and a chip on nFCE0.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-27 14:35:46 +01:00
Frank de Lange 9000195bb7 Input: wistron - add mapping for Wistron MS 2111
Wistron MS 2111 (aka Medion 'Titanium' MD 9783, aka ALDI PC,
aka Fujitsu-Siemens AMILO D7800, aka ...) has 5 extra buttons,
map them. Unfortunately we only have DMI data for the Medion
box.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-27 01:48:24 -04:00
Andrew Morton 5e7d881811 ACPI: asus_acpi_init: propagate correct return value
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 01:07:16 -04:00
Thomas Renninger e8406b4485 [ACPI] Print error message if remove/install notify handler fails
Signed-off-by: Thomas Renniger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:56:56 -04:00
Patrick Mochel d550d98d33 ACPI: delete tracing macros from drivers/acpi/*.c
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:41:40 -04:00
Thomas Renninger d7fa2589bb Pull bugzilla-5737 into release branch 2006-06-27 00:06:37 -04:00
Len Brown 6468463abd ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:01:06 -04:00
Len Brown cece929697 ACPI: un-export ACPI_WARNING() -- use printk(KERN_WARNING...)
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:00:54 -04:00
Jae-hyeon Park 64dedfb8fd ACPI: Device [kobj-name] is not power manageable
print kobj name in this message.
lenb changed to use printk.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:00:40 -04:00
Bjorn Helgaas 9e7e2c0475 ACPI: acpi_os_wait_semaphore(): silence complaint
The ASL Acquire operator (17.5.1 in ACPI 3.0 spec) is allowed to time out
and return True without acquiring the semaphore.  There's no indication in
the spec that this is an actual error, so this message should be
debug-only, as the message for successful acquisition is.

This used to be an ACPI_DEBUG_PRINT, but it was mis-classified as
ACPI_DB_ERROR rather than ACPI_DB_MUTEX, so it got swept up in Thomas'
recent patch to enable ACPI error messages even without CONFIG_ACPI_DEBUG.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:00:21 -04:00
Thomas Renninger be63c925a1 ACPI: Export symbols for ACPI_ERROR/EXCEPTION/WARNING macros
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-26 23:59:51 -04:00
Thomas Renninger a6fc67202e ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-26 23:58:43 -04:00
Jeff Garzik 1f1bd5fc32 [netdrvr] Remove long-unused bits from Becker template drivers
Symbols such as PCI_USES_IO, PCI_ADDR0, etc. originated from Donald
Becker's net driver template, but have been long unused.  Remove.

In a few drivers, this allows the further eliminate of the pci_flags (or
just plain flags) member in the template driver probe structure.

Most of this logic is simply open-coded in most drivers, since it never
changes.

Made a few other cleanups while I was in there, too:
* constify, __devinitdata several PCI ID tables
* replace table terminating entries such as "{0,}," and "{NULL},"
  with a more-clean "{ }".

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 23:47:50 -04:00
Mauro Carvalho Chehab c78059f0a9 V4L/DVB (4263): Fix warning when compiling on 64 bit machines
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:43 -03:00
Mauro Carvalho Chehab ce4260c39d V4L/DVB (4261): Included required header for in-kernel compilation
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:42 -03:00
Adrian Bunk b9553d7b0c V4L/DVB (4260): Stradis.c: make 2 functions static
This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:41 -03:00
Hans Verkuil 99eb44fe94 V4L/DVB (4259): Pass an explicit log prefix to cx2341x_log_status
A card number is not unique enough. Instead, let the caller specify the
prefix of the status messages.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:40 -03:00
Hans Verkuil 4d6b5aee9d V4L/DVB (4257): Fix 64-bit compile warnings.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:39 -03:00
Hans Verkuil f5b0142ad6 V4L/DVB (4255): Tda9887 default TOP value is 0x10
For most tuners the default TOP value is 0x10, regardless of TV norm.
So revert earlier change that sets the TOP value to 0x14 for PAL/SECAM.
This is incorrect.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:38 -03:00
Hans Verkuil 1b58841aa7 V4L/DVB (4254): Remove obsoleted tuner_debug option.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:37 -03:00
Hans Verkuil 995235118e V4L/DVB (4253): IVTV VBI format description too long.
Format description was cut off. It's been shortened.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:35 -03:00
Hans Verkuil 343f92c293 V4L/DVB (4252): Remove duplicate 'tda9887' in info messages.
Remove the duplicate '(tda9887)' in these messages:
tda9887 8-0043 (tda9887): tda988[5/6/7] found @ 0x43 (tuner)
The same string is already printed as the prefix in this line.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:34 -03:00
Mike Isely 0885ba1d5e V4L/DVB (4245): Reduce the amount of pvrusb2-sourced noise going into the system log
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:33 -03:00
Mike Isely b30d244176 V4L/DVB (4244): Implement use of cx2341x module in pvrusb2 driver
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:32 -03:00
Mike Isely 1d9f8461f1 V4L/DVB (4243): Exploit new V4L control features in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:31 -03:00
Mike Isely b46cfa805e V4L/DVB (4242): Don't suspend encoder when changing its attributes (in pvrusb2)
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:30 -03:00
Mike Isely eb8e0ee4f5 V4L/DVB (4241): Fix faulty encoder error recovery in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:29 -03:00
Mike Isely a761f4311b V4L/DVB (4240): Various V4L control enhancements in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:28 -03:00
Mike Isely 332139635a V4L/DVB (4239): Handle boolean controls in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:27 -03:00
Mike Isely 077203a7d4 V4L/DVB (4238): Make sure flags field is initialized when quering a control in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:25 -03:00
Mike Isely 4f1a3e5bc4 V4L/DVB (4237): Move LOG_STATUS bracketing to a different part of the pvrusb2 driver
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:24 -03:00
Mike Isely c05c0462da V4L/DVB (4236): Rearrange things in pvrusb2 driver in preparation for using cx2341x module
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:23 -03:00
Mike Isely 3948199e8a V4L/DVB (4235): Increase the maximum number of controls that pvrusb2-sysfs.c can handle.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:22 -03:00
Mike Isely 039c430f89 V4L/DVB (4234): Clean up long-standing video format handling mess in pvrusb2-v4l2.c
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:21 -03:00
Mike Isely 4588677121 V4L/DVB (4233): Don't print empty enum values in pvrusb2-sysfs.c
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:19 -03:00
Mike Isely eacbe7c51f V4L/DVB (4232): Rearrange things in pvrusb2-encoder in preparation for use of cx2341x module
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:18 -03:00
Mike Isely b2bbaa9394 V4L/DVB (4231): Include some extra headers that we need.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:17 -03:00
Michael Krufky 4656fb6371 V4L/DVB (4229): Cx88-blackbird: implement VIDIOC_LOG_STATUS
implemented VIDIOC_LOG_STATUS in the cx88-blackbird driver
to show the status of i2c clients and the cx23416 mpeg encoder.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:16 -03:00
Mike Isely d855497edb V4L/DVB (4228a): pvrusb2 to kernel 2.6.18
Implement V4L2 driver for the Hauppauge PVR USB2 TV tuner.

The Hauppauge PVR USB2 is a USB connected TV tuner with an embedded
cx23416 hardware MPEG2 encoder.  There are two major variants of this
device; this driver handles both.  Any V4L2 application which
understands MPEG2 video stream data should be able to work with this
device.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27 00:17:15 -03:00
Jeff Garzik a2b524b2ec [netdrvr] natsemi: minor cleanups
* make eeprom size a variable, prepping for future patch
* eliminate unused PCI_xxx stuff left over from Becker driver template
* convert a few #defines to enum
* mark PCI table const, __devinitdata
* don't bother with named constant for PCI device id

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:48:38 -04:00
Jeff Garzik 5a40f09baa [netdrvr] natsemi: Separate out media initialization code
This makes it easier to merge an upcoming patch, and overall makes the
code a bit more clean.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:24:03 -04:00
Krzysztof Halasa 467c432a4d [PATCH] WAN: update info page for a bunch of my drivers
Updates generic HDLC info page address, I should have done it
long time ago.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:03:24 -04:00
Adrian Bunk e2fdbc039a [PATCH] drivers/net/hamradio/dmascc.c: fix section mismatch
dev_setup() is using the __initdata variables ax25_broadcast and
ax25_test.

Since the only caller of dev_setup() (setup_adapter()) is already
__init, the solution is to make dev_setup() __init, too.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:03:24 -04:00
Uwe Zeisberger 600991b003 [PATCH] Fix phy id for LXT971A/LXT972A
From: Uwe Zeisberger <Uwe_Zeisberger@digi.com>

The phy ids used are taken from an driver that used a right shift of 4 to chop
off the revision number.  This driver does not shift, so the id and mask
values are wrong and must be left shifted by 4 to actually detect the chips.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Acked-by: Andy Fleming <afleming@freescale.com>

[akpm: this is a previously-nacked patch, but the problem is real]
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:03:07 -04:00
Ben Dooks 5d22a312b7 [PATCH] DM9000 - minor code cleanups
Ensure the driver's module owner field is
initialised for when this is being built and
loaded as a module.

Also change make the dm9000_tx_done function
static, as it is not exported elsewhere.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:01:53 -04:00
Ben Dooks 19af5a8b2b [PATCH] DM9000 - do no re-init spin lock
The DM9000 initialisation sequence for the
hardware re-initialise the board spin-lock,
which is in my view wrong.

This patch removes the extra spin lock
initialisation

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:01:53 -04:00
Ben Dooks 5b55dda6f4 [PATCH] DM9000 - check for MAC left in by bootloader
The DM9000 driver does not deal with the case
where there is no serial EEPROM to store the
configuration, and the bootloader has placed
an MAC address into the device already.

If there is no valid MAC in the EEPROM, read
the one already in the chip and check to see
if that one is valid.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:01:53 -04:00
Ben Dooks b4ed03ff12 [PATCH] DM9000 - better checks for platform resources
The current DM9000 driver cannot cope if it
is given more than 3 resources (for example, if
it is being passed an wake-up irq that it is
not using yet).

Check that we have been given at-least one IRQ
resource.

Also fix the minor type-casting for the case
of 2 resources.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 22:01:53 -04:00
Auke Kok 2154cfa6ba [PATCH] ata_piix: add ICH6/7/8 to Kconfig
Ata_piix's Kconfig entry still refers only to ICH5, while it supports ICH6
through 8. This creates confusion with people who are looking to see
if their newer SATA enabled motherboards are supported. The
following patch makes this clear.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 21:02:37 -04:00
Tejun Heo 201ce85946 [PATCH] sata_sil: disable hotplug interrupts on two ATI IXPs
Some SATA controllers embedded in ATI IXPs seem to have broken
SATA_IRQ bit in their bmdma2 registers which is always stuck at 1.
This makes the driver believe that there has been a hotplug event and
freeze the port whenever there's an interrupt thus failing all
commands.

This patch disables SATA_IRQ for those controllers.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 21:02:36 -04:00
Tejun Heo 88574551b4 [PATCH] libata: cosmetic updates
Cosmetic updates in libata-core.c.

* trim trailing whitespaces
* break lines which are over 80 column
* kill unnecessary braces
* make indentation consistent

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 21:01:21 -04:00
Randy Dunlap 353dcf7c89 [PATCH] ata: add some NVIDIA chipset IDs
From: Randy Dunlap <randy.dunlap@oracle.com>

Add some nVidia chipset ID's support.

http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=b407680553280f9999a20706d5ab2a3be65312c1;hp=ce4cb48010ab2cca537432b5ccb47d4b1fb489e5

Snagged from lkml.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:28 -04:00
Andrew Morton a8601e5f6b [PATCH] libata reduce timeouts
From: Andrew Morton <akpm@osdl.org>

Provide a module parameter to override the default 30-second-per-device SATA
probing timeout.

Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:28 -04:00
Tejun Heo 77b08fb56a [PATCH] libata: make two functions global
Make ata_do_simple_cmd() and ata_flush_cache() global.  These will be
used from libata-eh.c.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:27 -04:00
Tejun Heo 977e6b9f3a [PATCH] libata: update ata_do_simple_cmd()
* the function has always returned AC_ERR_* masks not -errno but its
  return type was int.  Make return type unsigned int.

* don't print error message automatically.  it's the caller's
  responsibility.

* add header comment

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:27 -04:00
Tejun Heo e58eb58396 [PATCH] libata: move ata_do_simple_cmd() below ata_exec_internal()
Move ata_do_simple_cmd() below ata_exec_internal() for consistency.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:27 -04:00
Tejun Heo beb07c1a56 [PATCH] libata: clear EH action on device detach
Clear related EH action on device detach such that new device doesn't
receive EH actions scheduled for the old one.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:27 -04:00
Tejun Heo 64f65ca6e7 [PATCH] libata: implement and use ata_deh_dev_action()
Implement and use ata_eh_dev_action() which returns EH action mask for
a device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:27 -04:00
Tejun Heo af181c2d76 [PATCH] libata: move ata_eh_clear_action() upward
Move ata_eh_clear_action() upward.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:59:27 -04:00
Jeff Garzik 438bc9c3de [libata] sata_vsc: partially revert a PCI ID-related commit
Partially revert 74d0a988d3aa359b6b8a8536c8cb92cce02ca5d5:

	[PATCH] PCI: Move various PCI IDs to header file

libata policy is to avoid use of named PCI device ID constants.
These are often single-use constants, which have little value over
direct numeric constants save for constant include/linux/pci_ids.h
patching/merging headaches.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:52:17 -04:00
Jeff Garzik 8676ce07d3 [libata] Bump versions
Update major version for libata, and several drivers.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-26 20:41:33 -04:00
Linus Torvalds f6e6e88373 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3657/1: S3C24XX: Documentation update of Overview.txt
  [ARM] Update mach-types
  [ARM] 3656/1: S3C2412: Add S3C2412 and S3C2413 documenation
  [ARM] 3654/1: add ajeco 1arm sbc support
  [ARM] fix drivers/mfd/ucb1x00-core.c IRQ probing bug
  [ARM] 3651/1: S3C24XX: Make arch list more detailed
  [ARM] 3650/1: S3C2412: Update s3c2410_defconfig
  [ARM] 3649/1: S3C24XX: Fix capitalisation of CPU on SMDK2440
  [ARM] 3612/1: make pci bus optional for ixp4xx platform
  [ARM] Remove MODE_(SVC|IRQ|FIQ|USR) and DEFAULT_FIQ
  [ARM] Remove save_lr/restore_pc macros
  [ARM] Remove partial non-v6 binutils compatibility
  [ARM] Remove LOADREGS macro
  [ARM] Remove RETINSTR macro
2006-06-26 15:01:05 -07:00
Linus Torvalds ba262e4a4d Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] 8250_pnp: add support for other Wacom tablets
2006-06-26 15:00:33 -07:00
mark gross a09ab7e2fc [PATCH] type-oh bug in tlclk.c
Mark Bellon found a bug in my tlclk driver.  Thanks!

I botch the register mask for store_received_ref_clk3a.

See http://download.intel.com/design/network/manuals/30412001.pdf
tables 124 and 136 for details.

Signed-off-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 14:12:02 -07:00
Linus Torvalds da206c9e68 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  typo fixes
  Clean up 'inline is not at beginning' warnings for usb storage
  Storage class should be first
  i386: Trivial typo fixes
  ixj: make ixj_set_tone_off() static
  spelling fixes
  fix paniced->panicked typos
  Spelling fixes for Documentation/atomic_ops.txt
  move acknowledgment for Mark Adler to CREDITS
  remove the bouncing email address of David Campbell
2006-06-26 13:33:14 -07:00
Karsten Keil 916d15445f [PATCH] fix processing of the last byte in isdn_readbchan_tty()
The changes in the tty handling contain a bug while accessing
the last byte in the skb. Since special sequence for control of
DTMF and FAX via ttyI* devices handled via this path, these services
do not work anymore.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 12:41:54 -07:00
Greg Kroah-Hartman 890fbae281 [PATCH] devfs: Last little devfs cleanups throughout the kernel tree.
Just removes a few unused #defines and fixes some comments due to
devfs now being gone.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:09 -07:00
Greg Kroah-Hartman 331b831983 [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV
I've always found this flag confusing.  Now that devfs is no longer around, it
has been renamed, and the documentation for when this flag should be used has
been updated.

Also fixes all drivers that use this flag.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:09 -07:00
Greg Kroah-Hartman f4eaa37017 [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed
Also fixes all drivers that set this field.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:09 -07:00
Greg Kroah-Hartman 5e483075a1 [PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed
Also fixes all drivers that set this field.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:08 -07:00
Greg Kroah-Hartman ce7b0f46bb [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed
And remove the now unneeded number field.
Also fixes all drivers that set these fields.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:08 -07:00
Greg Kroah-Hartman 96192ff1a9 [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed
Also fixes all drivers that set this field.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:08 -07:00
Greg Kroah-Hartman ff23eca3e8 [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree
Also fixes up all files that #include it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:08 -07:00
Greg Kroah-Hartman 8ab5e4c15b [PATCH] devfs: Remove devfs_remove() function from the kernel tree
Removes the devfs_remove() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:07 -07:00
Greg Kroah-Hartman 7c69ef7974 [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree
Removes the devfs_mk_cdev() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:07 -07:00
Greg Kroah-Hartman 1a715c5cf9 [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree
Removes the devfs_mk_bdev() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:06 -07:00
Greg Kroah-Hartman 95dc112a57 [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree
Removes the devfs_mk_dir() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:06 -07:00
Greg Kroah-Hartman 0e6c62da7c [PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree
Removes the devfs_register_tape() and devfs_unregister_tape() functions
and all callers of them.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:06 -07:00
Greg Kroah-Hartman 94f6c59dcf [PATCH] devfs: Remove devfs support from the ide subsystem.
Also removes the ide drive devfs_name field as it's no longer needed

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:06 -07:00
Greg Kroah-Hartman aa4148cfc7 [PATCH] devfs: Remove devfs support from the serial subsystem
Also fixes all serial drivers.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:05 -07:00
Eric Sesterhenn 5fd571cbc1 [PATCH] Array overrun in drivers/infiniband/core/cma.c
This was spotted by coverity #id 1300.  Since the array has only four
elements, we should just use those four.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 11:57:28 -07:00
Linus Torvalds 09c0dc6862 Revert "[PATCH] kthread: update loop.c to use kthread"
This reverts commit c7b2eff059.

Hugh Dickins explains:

 "It seems too little tested: "losetup -d /dev/loop0" fails with
  EINVAL because nothing sets lo_thread; but even when you patch
  loop_thread() to set lo->lo_thread = current, it can't survive
  more than a few dozen iterations of the loop below (with a tmpfs
  mounted on /tst):

	j=0
	cp /dev/zero /tst
	while :
	do
	    let j=j+1
	    echo "Doing pass $j"
	    losetup /dev/loop0 /tst/zero
	    mkfs -t ext2 -b 1024 /dev/loop0 >/dev/null 2>&1
	    mount -t ext2 /dev/loop0 /mnt
	    umount /mnt
	    losetup -d /dev/loop0
	done

  it collapses with failed ioctl then BUG_ON(!bio).

  I think the original lo_done completion was more subtle and safe
  than the kthread conversion has allowed for."

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 11:55:42 -07:00
Linus Torvalds 2a2ed2db35 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
  kbuild: trivial fixes in Makefile
  kbuild: adding symbols in Kconfig and defconfig to TAGS
  kbuild: replace abort() with exit(1)
  kbuild: support for %.symtypes files
  kbuild: fix silentoldconfig recursion
  kbuild: add option for stripping modules while installing them
  kbuild: kill some false positives from modpost
  kbuild: export-symbol usage report generator
  kbuild: fix make -rR breakage
  kbuild: append -dirty for updated but uncommited changes
  kbuild: append git revision for all untagged commits
  kbuild: fix module.symvers parsing in modpost
  kbuild: ignore make's built-in rules & variables
  kbuild: bugfix with initramfs
  kbuild: modpost build fix
  kbuild: check license compatibility when building modules
  kbuild: export-type enhancement to modpost.c
  kbuild: add dependency on kernel.release to the package targets
  kbuild: `make kernelrelease' speedup
  kconfig: KCONFIG_OVERWRITECONFIG
  ...
2006-06-26 11:05:15 -07:00
Linus Torvalds 972d19e837 Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] tcrypt: Forbid tcrypt from being built-in
  [CRYPTO] aes: Add wrappers for assembly routines
  [CRYPTO] tcrypt: Speed benchmark support for digest algorithms
  [CRYPTO] tcrypt: Return -EAGAIN from module_init()
  [CRYPTO] api: Allow replacement when registering new algorithms
  [CRYPTO] api: Removed const from cra_name/cra_driver_name
  [CRYPTO] api: Added cra_init/cra_exit
  [CRYPTO] api: Fixed incorrect passing of context instead of tfm
  [CRYPTO] padlock: Rearrange context structure to reduce code size
  [CRYPTO] all: Pass tfm instead of ctx to algorithms
  [CRYPTO] digest: Remove unnecessary zeroing during init
  [CRYPTO] aes-i586: Get rid of useless function wrappers
  [CRYPTO] digest: Add alignment handling
  [CRYPTO] khazad: Use 32-bit reads on key
2006-06-26 11:03:29 -07:00
Linus Torvalds cdf4f383a4 Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* master.kernel.org:/pub/scm/linux/kernel/git/dtor/input:
  Input: iforce - remove some pointless casts
  Input: psmouse - add support for Intellimouse 4.0
  Input: atkbd - fix HANGEUL/HANJA keys
  Input: fix misspelling of Hangeul key
  Input: via-pmu - add input device support
  Input: rearrange exports
  Input: fix formatting to better follow CodingStyle
  Input: reset name, phys and uniq when unregistering
  Input: return correct size when reading modalias attribute
  Input: change my e-mail address in MAINTAINERS file
  Input: fix potential overflows in driver/input/keyboard
  Input: fix potential overflows in driver/input/touchscreen
  Input: fix potential overflows in driver/input/joystick
  Input: fix potential overflows in driver/input/mouse
  Input: fix accuracy of fixp-arith.h
  Input: iforce - use ENOSPC instead of ENOMEM
  Input: constify drivers/char/keyboard.c
2006-06-26 11:01:58 -07:00
Linus Torvalds 5f2f444136 Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (4227): Update this driver for recent header file movement.
  V4L/DVB (4223): Add V4L2_CID_MPEG_STREAM_VBI_FMT control
  V4L/DVB (4222): Always switch tuner mode when calling VIDIOC_S_FREQUENCY.
  V4L/DVB (4221): Add HM12 YUV format define.
  V4L/DVB (4219): Av7110: analog sound output of DVB-C rev 2.3
  V4L/DVB (4217): Fix a misplaced closing bracket/else, which caused swzigzag not to be called
  V4L/DVB (4215): Make VIDEO_CX88_BLACKBIRD a separate build option
  V4L/DVB (4214): Make VIDEO_CX2341X a selectable build option
  V4L/DVB (4213): Cx88: cleanups
  V4L/DVB (4211): Fix an Oops for all fe that have get_frontend_algo == NULL
2006-06-26 10:54:02 -07:00
Linus Torvalds 81a07d7588 Merge branch 'x86-64'
* x86-64: (83 commits)
  [PATCH] x86_64: x86_64 stack usage debugging
  [PATCH] x86_64: (resend) x86_64 stack overflow debugging
  [PATCH] x86_64: msi_apic.c build fix
  [PATCH] x86_64: i386/x86-64 Add nmi watchdog support for new Intel CPUs
  [PATCH] x86_64: Avoid broadcasting NMI IPIs
  [PATCH] x86_64: fix apic error on bootup
  [PATCH] x86_64: enlarge window for stack growth
  [PATCH] x86_64: Minor string functions optimizations
  [PATCH] x86_64: Move export symbols to their C functions
  [PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
  [PATCH] x86_64: Fix modular pc speaker
  [PATCH] x86_64: remove sys32_ni_syscall()
  [PATCH] x86_64: Do not use -ffunction-sections for modules
  [PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
  [PATCH] x86_64: adjust kstack_depth_to_print default
  [PATCH] i386/x86-64: adjust /proc/interrupts column headings
  [PATCH] x86_64: Fix race in cpu_local_* on preemptible kernels
  [PATCH] x86_64: Fix fast check in safe_smp_processor_id
  [PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
  [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
  ...

Manual resolve of trivial conflict in arch/i386/kernel/Makefile
2006-06-26 10:51:09 -07:00
Christian Kujau a4cffb6444 [PATCH] x86_64: msi_apic.c build fix
CC      drivers/pci/msi-apic.o
In file included from include/asm/msi.h:11,
                  from drivers/pci/msi.h:71,
                  from drivers/pci/msi-apic.c:8:
include/asm/smp.h:103: error: syntax error before '->' token

akpm: nasty.  It appears to be

  static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)

conflicting with include/asm-x86_64/mach_apic.h's

  #define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)

And I don't know which patch in rc4-mm1 triggered this.

Fixing this in the .c file seems wrong.

Including asm/smp.h instead of linux/smp.h seems wrong too.  Need that
.config.

Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 10:48:22 -07:00
Andi Kleen 495ab9c045 [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
During some profiling I noticed that default_idle causes a lot of
memory traffic. I think that is caused by the atomic operations
to clear/set the polling flag in thread_info. There is actually
no reason to make this atomic - only the idle thread does it
to itself, other CPUs only read it. So I moved it into ti->status.

Converted i386/x86-64/ia64 for now because that was the easiest
way to fix ACPI which also manipulates these flags in its idle
function.

Cc: Nick Piggin <npiggin@novell.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 10:48:21 -07:00
Andi Kleen a813ce432f [PATCH] x86_64: Rename IOMMU option, fix help and mark option embedded.
- Rename the GART_IOMMU option to IOMMU to make clear it's not
   just for AMD
 - Rewrite the help text to better emphatise this fact
 - Make it an embedded option because too many people get it wrong.

To my astonishment I discovered the aacraid driver tests this
symbol directly. This looks quite broken to me - it's an internal
implementation detail of the PCI DMA API. Can the maintainer
please clarify what this test was intended to do?

Cc: linux-scsi@vger.kernel.org
Cc: alan@redhat.com
Cc: markh@osdl.org
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 10:48:17 -07:00
Andi Kleen a32073bffc [PATCH] x86_64: Clean and enhance up K8 northbridge access code
- Factor out the duplicated access/cache code into a single file
   * Shared between i386/x86-64.
 - Share flush code between AGP and IOMMU
   * Fix a bug: AGP didn't wait for end of flush before
 - Drop 8 northbridges limit and allocate dynamically
 - Add lock to serialize AGP and IOMMU GART flushes
 - Add PCI ID for next AMD northbridge
 - Random related cleanups

The old K8 NUMA discovery code is unchanged. New systems
should all use SRAT for this.

Cc: "Navin Boppuri" <navin.boppuri@newisys.com>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 10:48:15 -07:00
Linus Torvalds 8871e73fdb Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Add iomap interfaces.
  [OPENPROM]: Rewrite driver to use in-kernel device tree.
  [OPENPROMFS]: Rewrite using in-kernel device tree and seq_file.
  [SPARC]: Add unique device_node IDs and a ".node" property.
  [SPARC]: Add of_set_property() interface.
  [SPARC64]: Export auxio_register to modules.
  [SPARC64]: Add missing interfaces to dma-mapping.h
  [SPARC64]: Export _PAGE_IE to modules.
  [SPARC64]: Allow floppy driver to build modular.
  [SPARC]: Export x_bus_type to modules.
  [RIOWATCHDOG]: Fix the build.
  [CPWATCHDOG]: Fix the build.
  [PARPORT] sunbpp: Fix typo.
  [MTD] sun_uflash: Port to new EBUS device layer.
2006-06-26 10:08:32 -07:00
Linus Torvalds 61a46dc9d1 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  [IOAT]: Do not dereference THIS_MODULE directly to set unsafe.
  [NETROM]: Fix possible null pointer dereference.
  [NET] netpoll: break recursive loop in netpoll rx path
  [NET] netpoll: don't spin forever sending to stopped queues
  [IRDA]: add some IBM think pads
  [ATM]: atm/mpc.c warning fix
  [NET]: skb_find_text ignores to argument
  [NET]: make net/core/dev.c:netdev_nit static
  [NET]: Fix GSO problems in dev_hard_start_xmit()
  [NET]: Fix CHECKSUM_HW GSO problems.
  [TIPC]: Fix incorrect correction to discovery timer frequency computation.
  [TIPC]: Get rid of dynamically allocated arrays in broadcast code.
  [TIPC]: Fixed link switchover bugs
  [TIPC]: Enhanced & cleaned up system messages; fixed 2 obscure memory leaks.
  [TIPC]: First phase of assert() cleanup
  [TIPC]: Disallow config operations that aren't supported in certain modes.
  [TIPC]: Fixed memory leak in tipc_link_send() when destination is unreachable
  [TIPC]: Added missing warning for out-of-memory condition
  [TIPC]: Withdrawing all names from nameless port now returns success, not error
  [TIPC]: Optimized argument validation done by connect().
  ...
2006-06-26 10:08:13 -07:00
Jesper Juhl f274afc993 Clean up 'inline is not at beginning' warnings for usb storage
Usually we don't care much about 'gcc -W' warnings, but some of us do build
kernels that way to look for problems, and then the fewer warnings we have
to wade through the better. Especially when they are very easy and
non-intrusive to clean up. Which is the case for the following warnings
spewed by drivers/usb/storage/usb.h :

  drivers/usb/storage/usb.h:163: warning: `inline' is not at beginning of
+declaration
  drivers/usb/storage/usb.h:166: warning: `inline' is not at beginning of
+declaration

There's also some precedence for cleaning up these warnings. I've had
a few patches merged in the past that remove exactly this class of
warnings.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-26 19:01:01 +02:00
Adrian Bunk 0538195424 [PATCH] drivers/md/md.c: make code static
Make needlessly global code static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:40 -07:00
NeilBrown f655675b3f [PATCH] md: Allow the write_mostly flag to be set via sysfs
It appears in /sys/mdX/md/dev-YYY/state
and can be set or cleared by writing 'writemostly' or '-writemostly'
respectively.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:40 -07:00
NeilBrown a94213b1fa [PATCH] md: Allow resync_start to be set and queried via sysfs
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:40 -07:00
NeilBrown d4dbd0250e [PATCH] md: Allow raid 'layout' to be read and set via sysfs
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
NeilBrown 45dc2de1e5 [PATCH] md: Allow rdev state to be set via sysfs
The md/dev-XXX/state file can now be written:

 "faulty" simulates an error on the device
 "remove" removes the device from the array (if it is not busy)

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
NeilBrown 9e653b6342 [PATCH] md: Set/get state of array via sysfs
This allows the state of an md/array to be directly controlled via sysfs and
adds the ability to stop and array without tearing it down.

Array states/settings:

 clear
     No devices, no size, no level
     Equivalent to STOP_ARRAY ioctl
 inactive
     May have some settings, but array is not active
        all IO results in error
     When written, doesn't tear down array, but just stops it
 suspended (not supported yet)
     All IO requests will block. The array can be reconfigured.
     Writing this, if accepted, will block until array is quiescent
 readonly
     no resync can happen.  no superblocks get written.
     write requests fail
 read-auto
     like readonly, but behaves like 'clean' on a write request.

 clean - no pending writes, but otherwise active.
     When written to inactive array, starts without resync
     If a write request arrives then
       if metadata is known, mark 'dirty' and switch to 'active'.
       if not known, block and switch to write-pending
     If written to an active array that has pending writes, then fails.
 active
     fully active: IO and resync can be happening.
     When written to inactive array, starts with resync

 write-pending (not supported yet)
     clean, but writes are blocked waiting for 'active' to be written.

 active-idle
     like active, but no writes have been seen for a while (100msec).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
NeilBrown 4254376914 [PATCH] md: Don't write dirty/clean update to spares - leave them alone
- record the 'event' count on each individual device (they
  might sometimes be slightly different now)
- add a new value for 'sb_dirty': '3' means that the super
  block only needs to be updated to record a clean<->dirty
  transition.
- Prefer odd event numbers for dirty states and even numbers
  for clean states
- Using all the above, don't update the superblock on
  a spare device if the update is just doing a clean-dirty
  transition.  To accomodate this, a transition from
  dirty back to clean might now decrement the events counter
  if nothing else has changed.

The net effect of this is that spare drives will not see any IO requests
during normal running of the array, so they can go to sleep if that is what
they want to do.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
NeilBrown 07d84d109d [PATCH] md: Allow re-add to work on array without bitmaps
When an array has a bitmap, a device can be removed and re-added and only
blocks changes since the removal (as recorded in the bitmap) will be resynced.

It should be possible to do a similar thing to arrays without bitmaps.  i.e.
if a device is removed and re-added and *no* changes have been made in the
interim, then the add should not require a resync.

This patch allows that option.  This means that when assembling an array one
device at a time (e.g.  during device discovery) the array can be enabled
read-only as soon as enough devices are available, but extra devices can still
be added without causing a resync.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
NeilBrown 3285edf152 [PATCH] md: Fix bug that stops raid5 resync from happening
As data_disks is *less* than raid_disks, the current test here is obviously
wrong.  And as the difference is already available in conf->max_degraded, it
makes much more sense to use that.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
akpm@osdl.org b3cc9ec76b [PATCH] md: Fix Kconfig error
RAID5 recently changed to RAID456

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
Justin Piszcz 4d2554d045 [PATCH] md: md Kconfig speeling feex
I was experimenting with Linux SW raid today and found a spelling error when
reading the help menus...  (and fly spell found more).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
NeilBrown 8838832830 [PATCH] md: Calculate correct array size for raid10 in new offset mode
The size calculation made assumtion which the new offset mode didn't
follow.  This gets the size right in all cases.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:39 -07:00
NeilBrown ce25c31bdd [PATCH] md: Change md/bitmap file handling to use bmap to file blocks-fix
Fix problems with new bmap based access to bitmap files.

1/ When not using a file based bitmap, attach a NULL list of buffers
   to each page so the common free_buffer routine can cope.
2/ Use submit_bh to read as well as write, rather than vfs_read.
   This makes read and write more symetric.
3/ sync the file before reading, to ensure that the page cache has no
   dirty pages that might get written out later.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown d785a06a0b [PATCH] md/bitmap: change md/bitmap file handling to use bmap to file blocks
If md is asked to store a bitmap in a file, it tries to hold onto the page
cache pages for that file, manipulate them directly, and call a cocktail of
operations to write the file out.  I don't believe this is a supportable
approach.

This patch changes the approach to use the same approach as swap files.  i.e.
bmap is used to enumerate all the block address of parts of the file and we
write directly to those blocks of the device.

swapfile only uses parts of the file that provide a full pages at contiguous
addresses.  We don't have that luxury so we have to cope with pages that are
non-contiguous in storage.  To handle this we attach buffers to each page, and
store the addresses in those buffers.

With this approach the pagecache may contain data which is inconsistent with
what is on disk.  To alleviate the problems this can cause, md invalidates the
pagecache when releasing the file.  If the file is to be examined while the
array is active (a non-critical but occasionally useful function), O_DIRECT io
must be used.  And new version of mdadm will have support for this.

This approach simplifies a lot of code:
 - we no longer need to keep a list of pages which we need to wait for,
   as the b_endio function can keep track of how many outstanding
   writes there are.  This saves a mempool.
 - -EAGAIN returns from write_page are no longer possible (not sure if
    they ever were actually).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown acc55e2201 [PATCH] md/bitmap: tidy up i_writecount handling in md/bitmap
md/bitmap modifies i_writecount of a bitmap file to make sure that no-one else
writes to it.  The reverting of the change is sometimes done twice, and there
is one error path where it is omitted.

This patch tidies that up.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown 0cdd02cabd [PATCH] md/bitmap: remove dead code from md/bitmap
bitmap_active is never called, and the BITMAP_ACTIVE flag is never users or
tested, so discard them both.

Also remove some out-of-date 'todo' comments.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown a647e4bc5c [PATCH] md/bitmap: remove unnecessary page reference manipulations from md/bitmap code
md/bitmap gets a collection of pages representing the bitmap when it
initialises the bitmap, and puts all the references when discarding the
bitmap.

It also occasionally takes extra references without any good reason, and
sometimes drops them ...  though it doesn't always drop them, which can result
in a memory leak.

This patch removes the unnecessary 'get_page' calls, and the corresponding
'put_page' calls.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown e16b68b6e4 [PATCH] md/bitmap: use set_bit etc for bitmap page attributes
In particular, this means that we use 4 bits per page instead of a whole
unsigned long.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown ec7a3197f4 [PATCH] md/bitmap: cleaner separation of page attribute handlers in md/bitmap
md/bitmap has some attributes per-page.  Handling of these attributes in
largely abstracted in set_page_attr and clear_page_attr.  However
get_page_attr exposes the format used to store them.  So prior to changing
that format, introduce test_page_attr instead of get_page_attr, and make
appropriate usage changes.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown 0b79ccf0cd [PATCH] md/bitmap: remove bitmap writeback daemon
md/bitmap currently has a separate thread to wait for writes to the bitmap
file to complete (as we cannot get a callback on that action).

However this isn't needed as bitmap_unplug is called from process context and
waits for the writeback thread to do it's work.  The same result can be
achieved by doing the waiting directly in bitmap_unplug.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown d7375ab324 [PATCH] md/bitmap: fix online removal of file-backed bitmaps
When "mdadm --grow /dev/mdX --bitmap=none" is used to remove a filebacked
bitmap, the bitmap was disconnected from the array, but the file wasn't closed
(until the array was stopped).

The file also wasn't closed if adding the bitmap file failed.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
NeilBrown 52c03291a8 [PATCH] md: split reshape portion of raid5 sync_request into a separate function
... as raid5 sync_request is WAY too big.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
Adrian Bunk 5e56341d02 [PATCH] md: make md_print_devices() static
This patch makes the needlessly global md_print_devices() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
NeilBrown c93983bf51 [PATCH] md: support stripe/offset mode in raid10
The "industry standard" DDF format allows for a stripe/offset layout where
data is duplicated on different stripes.  e.g.

  A  B  C  D
  D  A  B  C
  E  F  G  H
  H  E  F  G

(columns are drives, rows are stripes, LETTERS are chunks of data).

This is similar to raid10's 'far' mode, but not quite the same.  So enhance
'far' mode with a 'far/offset' option which follows the layout of DDFs
stripe/offset.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
NeilBrown 7c7546ccf6 [PATCH] md: allow a linear array to have drives added while active
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
NeilBrown 5fd6c1dce0 [PATCH] md: allow checkpoint of recovery with version-1 superblock
For a while we have had checkpointing of resync.  The version-1 superblock
allows recovery to be checkpointed as well, and this patch implements that.

Due to early carelessness we need to add a feature flag to signal that the
recovery_offset field is in use, otherwise older kernels would assume that a
partially recovered array is in fact fully recovered.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
NeilBrown a8a55c387d [PATCH] md: remove nuisance message at shutdown
At shutdown, we switch all arrays to read-only, which creates a message for
every instantiated array, even those which aren't actually active.

So remove the message for non-active arrays.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
NeilBrown 16a53ecc35 [PATCH] md: merge raid5 and raid6 code
There is a lot of commonality between raid5.c and raid6main.c.  This patches
merges both into one module called raid456.  This saves a lot of code, and
paves the way for online raid5->raid6 migrations.

There is still duplication, e.g.  between handle_stripe5 and handle_stripe6.
This will probably be cleaned up later.

Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
NeilBrown 16f17b39f3 [PATCH] md: increase the delay before marking metadata clean, and make it configurable
When a md array has been idle (no writes) for 20msecs it is marked as 'clean'.
 This delay turns out to be too short for some real workloads.  So increase it
to 200msec (the time to update the metadata should be a tiny fraction of that)
and make it sysfs-configurable.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:37 -07:00
NeilBrown 9443a1d1f7 [PATCH] md: remove useless ioctl warning
This warning was slightly useful back in 2.2 days, but is more an annoyance
now.  It makes it awkward to add new ioctls (that we we are likely to do that
in the current climate, but it is possible).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
NeilBrown 8932c2e0dc [PATCH] md: remove arbitrary limit on chunk size
The largest chunk size the code can support without substantial surgery is
2^30 bytes, so make that the limit instead of an arbitrary 4Meg.  Some day,
the 'chunksize' should change to a sector-shift instead of a byte-count.  Then
no limit would be needed.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
NeilBrown c70810b327 [PATCH] md: reformat code in raid1_end_write_request to avoid goto
A recent change made this goto unnecessary, so reformat the code to make it
clearer what is happening.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
Alasdair G Kergon 72d9486169 [PATCH] dm: improve error message consistency
Tidy device-mapper error messages to include context information
automatically.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
Alasdair G Kergon 5c6bd75d06 [PATCH] dm: prevent removal if open
If you misuse the device-mapper interface (or there's a bug in your userspace
tools) it's possible to end up with 'unlinked' mapped devices that cannot be
removed until you reboot (along with uninterruptible processes).

This patch prevents you from removing a device that is still open.

It introduces dm_lock_for_deletion() which is called when a device is about to
be removed to ensure that nothing has it open and nothing further can open it.
 It uses a private open_count for this which also lets us remove one of the
problematic bdget_disk() calls elsewhere.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
David Teigland c2ade42dd3 [PATCH] dm: create error table
Add a library function dm_create_error_table() to create a table that rejects
any I/O sent to a device with EIO.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
Alasdair G Kergon 17b2f66f2a [PATCH] dm: add exports
Move definitions of core device-mapper functions for manipulating mapped
devices and their tables to <linux/device-mapper.h> advertising their
availability for use elsewhere in the kernel.

Protect the contents of device-mapper.h with ifdef __KERNEL__.  And throw
in a few formatting clean-ups and extra comments.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
Alasdair G Kergon 2b06cfff12 [PATCH] dm: consolidate creation functions
Merge dm_create() and dm_create_with_minor() by introducing the special value
DM_ANY_MINOR to request the allocation of the next available minor number.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
David Teigland 814d68629b [PATCH] dm table split_args: handle no input
Return sense if dm_split_args is called with a NULL input parameter.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:36 -07:00
Jonathan Brassow ce503f59ae [PATCH] dm kcopyd: error accumulation fix
kcopyd should accumulate errors - otherwise I/O failures may be ignored
unintentionally.

And invert 'success' (used in a future patch), using a more intuitive
!(read_err || write_err).

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Alasdair G Kergon 8a835f11bc [PATCH] dm mirror log: sync_count fix
When a mirror is reduced in size, clear the part of the bitmap that is no
longer used.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Alasdair G Kergon 29121bd0b0 [PATCH] dm mirror log: bitset_size fix
Fix the 'sizeof' in the region log bitmap size calculation: it's uint32_t, not
unsigned long - this breaks on some archs.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Alasdair G Kergon b7cca195c4 [PATCH] dm mirror log: refactor context
Refactor the code that creates the core and disk log contexts to avoid the
repeated allocation of clean_bits introduced by the last patch.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Kevin Corry 702ca6f0be [PATCH] dm mirror log: sector size fix
On-disk logs for dm-mirror devices are currently hard-coded to use 512 byte
hard-sector-sizes.  This patch fixes dm-log so it will work with devices with
non-512-byte hard-sector-sizes.

To maintain full compatibility, instead of moving the clean-bits bitset to a
bitset, and enlarges the disk-header buffer to encompass both the header and
the bitset.  The I/O routines for the bitset are removed, and the I/O routines
for the disk-header now also read/write the bitset.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Milan Broz 143535396c [PATCH] dm table: get_target: fix last index
The table is indexed from 0, so an index equal to t->num_targets should be
rejected.

(There is no code in the current tree that would exercise this bug.)

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Neil Brown e4c8b3ba34 [PATCH] dm: mirror sector offset fix
The device-mapper core does not perform any remapping of bios before passing
them to the targets.  If a particular mapping begins part-way into a device,
targets obtain the sector relative to the start of the mapping by subtracting
ti->begin.

The dm-raid1 target didn't do this everywhere: this patch fixes it, taking
care to subtract ti->begin exactly once for each bio.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Jeff Mahoney f0b0411536 [PATCH] dm: fix block device initialisation
In alloc_dev(), we register the device with the block layer and then continue
to initialize the device.  But register_disk() makes the device available to
be opened before we have completed initialising it.

This patch moves the final bits of the initialization above the disk
registration.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Jeff Mahoney 10da4f795f [PATCH] dm: add module ref counting
The reference counting on dm-mod is zero if no mapped devices are open.  This
is incorrect, and can lead to an oops if the module is unloaded while mapped
devices exist.

This patch claims a reference to the module whenever a device is created, and
drops it again when the device is freed.

Devices must be removed before dm-mod is unloaded.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Jeff Mahoney 7ec75f2547 [PATCH] dm: fix mapped device ref counting
To avoid races, _minor_lock must be held while changing mapped device
reference counts.

There are a few paths where a mapped_device pointer is returned before a
reference is taken.  This patch fixes them.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:35 -07:00
Jeff Mahoney fba9f90e56 [PATCH] dm: add DMF_FREEING
There is a chicken and egg problem between the block layer and dm in which the
gendisk associated with a mapping keeps a reference-less pointer to the
mapped_device.

This patch uses a new flag DMF_FREEING to indicate when the mapped_device is
no longer valid.  This is checked to prevent any attempt to open the device
from succeeding while the device is being destroyed.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00
Jeff Mahoney f32c10b099 [PATCH] dm: change minor_lock to spinlock
While removing a device, another another thread might attempt to resurrect it.

This patch replaces the _minor_lock mutex with a spinlock and uses
atomic_dec_and_lock() to serialize reference counting in dm_put().

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00
Jeff Mahoney 62f75c2f32 [PATCH] dm: move idr_pre_get
idr_pre_get() can sleep while allocating memory.

The next patch will change _minor_lock into a spinlock, so this patch moves
idr_pre_get() outside the lock in preparation.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00
Jeff Mahoney ba61fdd17d [PATCH] dm: fix idr minor allocation
One part of the system can attempt to use a mapped device before another has
finished initialising it or while it is being freed.

This patch introduces a place holder value, MINOR_ALLOCED, to mark the minor
as allocated but in a state where it can't be used, such as mid-allocation or
mid-free.  At the end of the initialization, it replaces the place holder with
the pointer to the mapped_device, making it available to the rest of the dm
subsystem.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00
Alasdair G Kergon c51c275249 [PATCH] dm snapshot: unify chunk_size
Persistent snapshots currently store a private copy of the chunk size.
Userspace also supplies the chunk size when loading a snapshot.  Ensure
consistency by only storing the chunk_size in one place instead of two.

Currently the two sizes will differ if the chunk size supplied by userspace
does not match the chunk size an existing snapshot actually uses.  Amongst
other problems, this causes an incorrect 'percentage full' to be reported.

The patch ensures consistency by only storing the chunk_size in one place,
removing it from struct pstore.  Some initialisation is delayed until the
correct chunk_size is known.  If read_header() discovers that the wrong chunk
size was supplied, the 'area' buffer (which the header already got read into)
is reinitialised to the correct size.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00
Antonino A. Daplas b877a96409 [PATCH] VT binding: Make sticon support binding
Do not mark sticon_startup() as __init

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00
Antonino A. Daplas 2aea875da2 [PATCH] VT binding: Make promcon support binding
Do not mark promcon_startup() and promcon_init_unimap() as __init

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00
Antonino A. Daplas e86bb8acc0 [PATCH] VT binding: Make newport_con support binding
- move register ioremap from newport_startup() to newport_console_init()
- fonts are freed multiple times, do it only once

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:34 -07:00