Commit Graph

6238 Commits (0e56822d30184d0da35a6ecc51f38c4ceb457a80)

Author SHA1 Message Date
Alasdair G Kergon 0e56822d30 [PATCH] device-mapper: mirror log bitset fix
The linux bitset operators (test_bit, set_bit etc) work on arrays of "unsigned
long".  dm-log uses such bitsets but treats them as arrays of uint32_t, only
allocating and zeroing a multiple of 4 bytes (as 'clean_bits' is a uint32_t).

The patch below fixes this problem.

The problem is specific to 64-bit big endian machines such as s390x or ppc-64
and can prevent pvmove terminating.

In the simplest case, if "region_count" were (say) 30, then
bitset_size (below) would be 4 and bitset_uint32_count would be 1.
Thus the memory for this butset, after allocation and zeroing would
be
   0 0 0 0 X X X X
On a bigendian 64bit machine, bit 0 for this bitset is in the 8th
byte! (and every bit that dm-log would use would be in the X area).

   0 0 0 0 X X X X
                 ^
                 here

which hasn't been cleared properly.

As the dm-raid1 code only syncs and counts regions which have a 0 in the
'sync_bits' bitset, and only finishes when it has counted high enough, a large
number of 1's among those 'X's will cause the sync to not complete.

It is worth noting that the code uses the same bitsets for in-memory and
on-disk logs.  As these bitsets are host-endian and host-sized, this means
that they cannot safely be moved between computers with

Signed-off-by: Neil Brown <neilb@suse.de>
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>
2005-11-22 09:14:31 -08:00
Alasdair G Kergon c4cc66351a [PATCH] device-mapper: list_versions fix
In some circumstances the LIST_VERSIONS output is truncated because the size
calculation forgets about a 'uint32_t' in each structure - but the inclusion
of the whole of ALIGN_MASK frequently compensates for the omission.

This is a quick workaround to use an upper bound.  (The code ought to be fixed
to supply the actual size.)

Running 'dmsetup targets' may demonstrate the problem: when I run it, the last
line comes out as 'erro' instead of 'error'.  Consequently, 'lvcreate --type
error' doesn't work.

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>
2005-11-22 09:14:31 -08:00
Kiyoshi Ueda b6fcc80d03 [PATCH] device-mapper dm-ioctl: missing put in table load error case
An error path in table_load() forgets to release a table that won't now be
referenced.

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>
2005-11-22 09:14:30 -08:00
Dave Jones 6c52f1377d [PATCH] dell_rbu driver depends on x86[64]
This driver only appears on IA32 & EM64T boxes.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:44 -08:00
Matthew Dobson 79e448bf2d [PATCH] Fix a bug in scsi_get_command
scsi_get_command() attempts to write into a structure that may not have
been successfully allocated.  Move this write inside the if statement that
ensures we won't panic the kernel with a NULL pointer dereference.

Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:44 -08:00
Grant Coady e738cf6d03 [PATCH] cpufreq: silence cpufreq for UP
drivers/cpufreq/cpufreq.c: In function `cpufreq_remove_dev':
drivers/cpufreq/cpufreq.c:696: warning: unused variable `cpu_sys_dev'

Signed-off-by: Grant Coady <gcoady@gmail.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:44 -08:00
Antonino A. Daplas 5ef897c71a [PATCH] vgacon: Fix usage of stale height value on vc initialization
Reported by: Wayne E. Harlan

"[1.] One line summary of the problem:
When the kernel option "vga=1" is used, additional tty's (alt+control+Fx
with x=2,3,4,5, etc) do not provide the full 50 lines of output.  The first
one does have 50 lines, however.

[2.] Full description of the problem/report:
These addtitional tty's show only 39 lines plus the top pixel of the 40-th
line.  The remaining lines are black and not shown.  Kernel version
2.6.13.4 does not show this problem."

This bug is caused by using a stale font height value on vgacon_init.

Booting with vga=1 gives an 80x50 screen with an 8x8 font.  Somewhere
during the initialization, the font was changed to 8x9 and the first
vc was correctly resized to 80x44.  However, the rest of the vc's were
not allocated yet, and when they were subsequently initialized, they
still used a font height of 8 (instead of 9) causing the mentioned bug.

Fix by saving the new font height to vga_video_font_height.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:43 -08:00
Antonino A. Daplas b4627dea03 [PATCH] fbcon: Console Rotation - Fix wrong shift calculation
The shift value (amount to shift the bitmap so first pixel starts at
origin(0,0)) is incorrect.  This causes corrupted characters or a kernel crash
if fontwidth is not divisible by 8 at 270 degrees, or fontheight not divisible
by 8 at 180 degrees.

Report and part of the fix contributed by Knut Petersen.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:43 -08:00
Hugh Dickins f57e88a8d8 [PATCH] unpaged: ZERO_PAGE in VM_UNPAGED
It's strange enough to be looking out for anonymous pages in VM_UNPAGED areas,
let's not insert the ZERO_PAGE there - though whether it would matter will
depend on what we decide about ZERO_PAGE refcounting.

But whereas do_anonymous_page may (exceptionally) be called on a VM_UNPAGED
area, do_no_page should never be: just BUG_ON.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:42 -08:00
Richard Knutsson 18317ab0ca [PATCH] net: Fix compiler-error on dgrs.c when !CONFIG_PCI
drivers/net/dgrs.c: In function `dgrs_init_module':
drivers/net/dgrs.c:1598: `dgrs_pci_driver' undeclared (first use in this function)

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:41 -08:00
Linus Torvalds 989e4d6cbc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/scjody/ieee1394 2005-11-21 19:04:44 -08:00
Linus Torvalds 5ea8051a23 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-11-21 19:00:43 -08:00
Russell King c889b89619 [SERIAL] imx: Fix missed platform_driver_unregister
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 17:05:21 +00:00
Dave Jones e7e37ee9c5 Merge ../linus/ 2005-11-21 06:56:52 -08:00
Dave Jones c243f1f1f6 [AGPGART] Support VIA P4M800CE bridge.
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-21 06:53:16 -08:00
Dmitry Torokhov db93a82fa9 [PATCH] Fix an OOPS is CinergyT2
Fix an OOPS is CinergyT2 driver when registering IR remote

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-20 14:06:28 -08:00
Dmitry Torokhov d4892279d7 Fix missing initialization in ir-kbd-gpio.c
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:57:02 -05:00
Dmitry Torokhov d271d1c221 Fix an OOPS when initializing IR remote on saa7134
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:56:54 -05:00
Dmitry Torokhov 9e50afd0cb Input: make serio and gameport more swsusp friendly
kseriod and kgameportd used to process all pending events before
checking for freeze condition. This may cause swsusp to time out
while stopping tasks when resuming. Switch to process events one
by one to check freeze status more often.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:56:43 -05:00
Dmitry Torokhov bd0ef2356c Input: handle failures in input_register_device()
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:56:31 -05:00
Dmitry Torokhov e597f0c80d Input: uinput - don't use "interruptible" in FF code
If thread that submitted FF request gets interrupted somehow it
will release request structure and ioctl handler will work with
freed memory. TO prevent that from happening switch to using
wait_for_completion instead of wait_for_completion_interruptible.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:51:43 -05:00
Dmitry Torokhov 59c7c0377e Input: uinput - add UI_SET_SWBIT ioctl
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:51:33 -05:00
Dmitry Torokhov 29506415a0 Input: uinput - convert to dynalloc allocation
Also introduce proper locking when creating/deleting device.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:51:22 -05:00
Miloslav Trmac e753b650e1 Input: wistron - disable wifi/bluetooth on suspend
Try to save battery power by disabling wifi and bluetooth on suspend.

Signed-off-by: Miloslav Trmac <mitr@volny.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:51:05 -05:00
Dmitry Torokhov a5b0cc80bc Input: wistron - add PM support
Register wistron-bios as a platform device, restore WIFI and
Bluetooth state upon resume.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:50:58 -05:00
Dmitry Torokhov 22a397e2c1 Input: wistron - convert to dynamic input_dev allocation
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:50:46 -05:00
Bernhard Rosenkraenzer 84b256a663 Input: wistron - add support for Acer Aspire 1500 notebooks
Also fix a potential issue with some notebooks:

The current code assumes the response to bios_wifi_get_default_setting is
either 1 (disabled) or 3 (enabled), or wifi isn't supported.  The BIOS
response appears to be a bit field w/ 0x1 indicating hardware presence, 0x2
indicating actiation status, and the other 6 bits being unknown/reserved --
with the patch, these 6 bits are ignored.

Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:50:37 -05:00
Andrew Morton e9fb028ea2 Input: wistron - disable for x86_64
On x86_64:

{standard input}:233: Error: suffix or operands invalid for `push'
{standard input}:233: Error: suffix or operands invalid for `pop'

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:50:21 -05:00
Dmitry Torokhov 5fc1468029 Input: add Wistron driver
A driver for laptop buttons using an x86 BIOS interface that is
apparently used on quite a few laptops and seems to be originating
from Wistron.

This driver currently "knows" only about Fujitsu-Siemens Amilo Pro V2000
(i.e. it can detect the laptop using DMI and it contains the
keycode->key meaning mapping for this laptop) and Xeron SonicPro X 155G
(probably can't be reliably autodetected, requires a module parameter),
adding other laptops should be easy.

In addition to reporting button presses to the input layer the driver
also allows enabling/disabling the embedded wireless NIC (using the
"Wifi" button); this is done using the same BIOS interface, so it seems
only logical to keep the implementation together.  Any flexibility
possibly gained by allowing users to remap the function of the "Wifi"
button is IMHO not worth it when weighted against the necessity to run
an user-space daemon to convert button presses to wifi state changes.

Signed-off-by: Miloslav Trmac <mitr@volny.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:50:06 -05:00
Dmitry Torokhov 0d4c859734 Input: atkbd - speed up setting leds/repeat state
Changing led state is pretty slow operation; when there are multiple
requests coming at a high rate they may interfere with normal typing.
Try optimize (skip) changing hardware state when multiple requests
are coming back-to-back.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:49:42 -05:00
Linus Torvalds 44779149e9 Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 2005-11-19 16:31:03 -08:00
Linus Torvalds 8ee3f40267 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-11-19 15:25:23 -08:00
Linus Torvalds 3b762d321a Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Manual fixups to ARM ixp4xxx by hand.
2005-11-19 15:24:42 -08:00
Linus Torvalds 29ac878a71 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-19 15:21:51 -08:00
Bartlomiej Zolnierkiewicz 17514e8a6f [PATCH] ide: add missing __init tags to device drivers
Also remove bogus comments for idefloppy_init() and idetape_init().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 22:24:35 +01:00
Bartlomiej Zolnierkiewicz e07bc70964 [PATCH] ide: remove dead code from flagged_taskfile()
flagged_taskfile() is called from execute_drive_cmd()
(the only user) only if args->tf_out_flags.all != 0.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 22:17:55 +01:00
Bartlomiej Zolnierkiewicz c0bc113373 [PATCH] ide: remove dead DEBUG_TASKFILE code
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 22:04:10 +01:00
Bartlomiej Zolnierkiewicz 071ffcc0f7 [PATCH] ide: remove unused ide_action_t:ide_next
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 22:01:35 +01:00
Aurelien Jarno 14351f8e57 [PATCH] sis5513: enable ATA133 for the SiS965 southbridge
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 21:43:45 +01:00
Mathias Kretschmer 4f1d774aad [PATCH] via82cxxx: add VIA VT6410 IDE support
From: Mathias Kretschmer <posting@blx4.net>

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 21:32:38 +01:00
Russell King 832f4ede79 [SERIAL] Remove unused variable in sa1100.c
Since the spinlock was removed from sa1100_start_tx(), the "flags"
variable becomes redundant.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19 11:26:17 +00:00
Russell King b63d4f0fb8 [SERIAL] Fix status reporting with PL011 serial driver
The receiver status register reports latched error conditions, which
must be cleared by writing to it.  However, the data register reports
unlatched conditions which are associated with the current character.
Use the data register to interpret error status rather than the RSR.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19 11:10:35 +00:00
Linus Torvalds b286e39207 Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 2005-11-18 15:58:38 -08:00
Linus Torvalds 9b152d53b7 Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2005-11-18 14:33:03 -08:00
Linus Torvalds 62ae144f56 Merge branch 'parisc' of master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2005-11-18 14:25:40 -08:00
Roland Dreier eabc77935d IB/umad: make sure write()s have sufficient data
Make sure that userspace passes in enough data when sending a MAD.  We
always copy at least sizeof (struct ib_user_mad) + IB_MGMT_RMPP_HDR
bytes from userspace, so anything less is definitely invalid.  Also,
if the length is less than this limit, it's possible for the second
copy_from_user() to get a negative length and trigger a BUG().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2005-11-18 14:18:26 -08:00
James Bottomley 6593178dd4 [PATCH] ide: fix ide_toggle_bounce() to not try to bounce if we have an IOMMU
The following patch fixes a crash caused by attempting to bounce buffer
when an IDE CD-ROM is used on a machine with an IO-MMU. [At least, this
patch fixes things so I can use my IDE CD-ROM behind an ns87415 on a 
HP PA-RISC workstation.]

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-18 23:13:33 +01:00
Ralf Baechle c37ea218cb [PATCH] ide: make comment match reality
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-18 23:11:24 +01:00
Michael S. Tsirkin 48fd0d1fdd IB/mthca: Safer max_send_sge/max_recv_sge calculation
Calculation of QP capabilities still isn't exactly right in mthca:
max_send_sge/max_recv_sge fields returned in create_qp can exceed the
handware supported limits.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2005-11-18 14:11:17 -08:00
Amit Gud 1e39dead2b [PATCH] cs5520: fix return value of cs5520_init_one()
From: Amit Gud <amitg@calsoftinc.com>

Patch follows from the suggestions by AC and Felipe W Damasio for fixing the
return codes from IDE drivers.

[ bart: fix coding style while at it ]

Signed-off-by: Amit Gud <gud@eth.net>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-18 23:03:19 +01:00