]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[S390] kretprobe_trampoline_holder() in wrong section.
Heiko Carstens [Mon, 5 Feb 2007 20:17:32 +0000 (21:17 +0100)]
[S390] kretprobe_trampoline_holder() in wrong section.

kretprobe_trampoline_holder() is in kprobes section but used to
register a kprobe in arch_init_kprobes(). Hence register_kprobe()
and therefore arch_init_kprobes() will fail.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Fix kprobes breakpoint handling.
Heiko Carstens [Mon, 5 Feb 2007 20:17:29 +0000 (21:17 +0100)]
[S390] Fix kprobes breakpoint handling.

In case of an illegal op the die notifier gets called with DIE_TRAP
instead of DIE_BPT first.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Update maintainers file.
Martin Schwidefsky [Mon, 5 Feb 2007 20:17:27 +0000 (21:17 +0100)]
[S390] Update maintainers file.

Use the new linux-s390@vger.kernel.org mailing list instead of
linux-390@vm.marist.edu.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] dasd: fix unconditional reserve handling.
Horst Hummel [Mon, 5 Feb 2007 20:17:24 +0000 (21:17 +0100)]
[S390] dasd: fix unconditional reserve handling.

The reserve/release IOCTLs sometimes do not work. If second system
does a 'steal lock' the pending unit check (Format 3 Msg F) is
delivered. Since ERP is disabled for reserve/release, the IOCTL call
fails. We have to allow basic ERP (retries) for reserve/release IOCTLs.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Remove dasd_ccw_log function.
Horst Hummel [Mon, 5 Feb 2007 20:17:22 +0000 (21:17 +0100)]
[S390] Remove dasd_ccw_log function.

Logging of relevant information is already done by disciplines
dump_sense function.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Small barrier() and cpu_relax() cleanup.
Heiko Carstens [Mon, 5 Feb 2007 20:17:20 +0000 (21:17 +0100)]
[S390] Small barrier() and cpu_relax() cleanup.

cpu_relax() has barrier() semantics hence there is no need to use both
of them in conjunction in sclp_sync_wait(). Also change cpu_relax()
so it's more obvious that it has barrier semantics.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Use device_{create,remove}_bin_file.
Cornelia Huck [Mon, 5 Feb 2007 20:17:18 +0000 (21:17 +0100)]
[S390] cio: Use device_{create,remove}_bin_file.

Create/remove the channel measurement binary files with
device_{create,remove}_bin_file instead of sysfs_{create,remove}_bin_file.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] sclp: don't call local_bh_disable/_local_bh_enable if in_interrupt()
Heiko Carstens [Mon, 5 Feb 2007 20:17:16 +0000 (21:17 +0100)]
[S390] sclp: don't call local_bh_disable/_local_bh_enable if in_interrupt()

local_bh_disable/_local_bh_enable must not be called if in_irq() is
true. Besides that if in_interrupt() is true bottom halves are
disabled anyway.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Show loaded DCSS segments under /proc/iomem.
Gerald Schaefer [Mon, 5 Feb 2007 20:17:11 +0000 (21:17 +0100)]
[S390] Show loaded DCSS segments under /proc/iomem.

Currently loaded DCSS segments are now listed in /proc/iomem with
their name followed by a trailing "(DCSS)".

Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Restart path verification after unsolicited interrupt.
Cornelia Huck [Mon, 5 Feb 2007 20:17:09 +0000 (21:17 +0100)]
[S390] cio: Restart path verification after unsolicited interrupt.

If we try to start path verification when an unsolicited interrupt
is already pending, stctl shows status pending and we delay path
verification again. We need to check for the doverify bit when the
unsolicited interrupt comes in and then do path verification.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Fix FCP dump feature detection.
Heiko Carstens [Mon, 5 Feb 2007 20:17:07 +0000 (21:17 +0100)]
[S390] Fix FCP dump feature detection.

FCP dump feature detection works only if the sclp command in head.S
was succesful. Since the sclp command is skipped if diag260 works,
we don't have any dump feature detection anymore.
Bug was introduced with d57de5a36791cb1b7285649c62f183b0d3505f7d.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] dasd: fix bug in dasd initialization cleanup
Stefan Weinhuber [Mon, 5 Feb 2007 20:17:04 +0000 (21:17 +0100)]
[S390] dasd: fix bug in dasd initialization cleanup

The initialization of the dasd_eer code is one of the last steps of the
dasd driver initialization. When initialization fails in one of the
earlier steps, the dasd_exit function is called to clean up what has been
done so far. So the dasd_eer_exit function may be called, although the
dasd_eer_init function wasn't called before and dasd_eer_exit tries to
unregister a misc device that wasn't registered, which results in a BUG.

Make sure that dasd_eer_exit can be called without initialization. Use a
dynamically allocated struct miscdevice instead of a static one, so we
only try to unregister the device if it exists and was actually registered.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] sclp: invalid handling of temporary 'not operational' status
Peter Oberparleiter [Mon, 5 Feb 2007 20:17:00 +0000 (21:17 +0100)]
[S390] sclp: invalid handling of temporary 'not operational' status

Requests are aborted when the sclp interface reports 'not operational'
even though they may still be active at the sclp, leading to concurrent
writes to request memory by both the kernel and the sclp interface.
Do not abort requests for which the sclp interface reports not
operational status during request retry.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>5A
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Simplify virt_to_phys.
Heiko Carstens [Mon, 5 Feb 2007 20:16:58 +0000 (21:16 +0100)]
[S390] Simplify virt_to_phys.

No need to use lrag in 64 bit addressing mode since lra will do the
same.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Remove check for ssd in chpids_show().
Cornelia Huck [Mon, 5 Feb 2007 20:16:56 +0000 (21:16 +0100)]
[S390] cio: Remove check for ssd in chpids_show().

Since ssd_info is now available before the subchannel is registered,
we don't need to check whether it is available.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cpcmd with vmalloc addresses.
Christian Borntraeger [Mon, 5 Feb 2007 20:16:54 +0000 (21:16 +0100)]
[S390] cpcmd with vmalloc addresses.

Change the bounce buffer logic of cpcmd. diag8 needs _real_ memory below
2GB. Therefore vmalloced data does not work. As the data might cross a
page boundary, we cannot use virt_to_page either. The solution is to use
virt_to_page only in the check for a bounce buffer.

There was a redundant check for response==NULL. response < 2GB contains
this check as well.

I also removed the rlen==0 check, since rlen=0 and response!=NULL would
be a caller bug and response==NULL is already checked.

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Remove pointless/unreliable kernel messages.
Heiko Carstens [Mon, 5 Feb 2007 20:16:52 +0000 (21:16 +0100)]
[S390] Remove pointless/unreliable kernel messages.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Check the return value of kthread_run().
Akinobu Mita [Mon, 5 Feb 2007 20:16:49 +0000 (21:16 +0100)]
[S390] Check the return value of kthread_run().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Get rid of a lot of sparse warnings.
Heiko Carstens [Mon, 5 Feb 2007 20:16:47 +0000 (21:16 +0100)]
[S390] Get rid of a lot of sparse warnings.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Move init_irq_proc to the other irq related functions.
Heiko Carstens [Mon, 5 Feb 2007 20:16:44 +0000 (21:16 +0100)]
[S390] Move init_irq_proc to the other irq related functions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[IA64] add newline to PAL-code warning message
Horms [Mon, 5 Feb 2007 01:17:38 +0000 (10:17 +0900)]
[IA64] add newline to PAL-code warning message

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] kexec: Remove inline declaration of efi_get_pal_addr()
Horms [Mon, 5 Feb 2007 01:16:20 +0000 (10:16 +0900)]
[IA64] kexec: Remove inline declaration of efi_get_pal_addr()

Remove the Remove inline declaration of efi_get_pal_addr() as it is
declared in linux/efi.h.

Signed-Off-By: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] kexec: Minor enhancement to includes in crash.c
Horms [Mon, 5 Feb 2007 01:17:22 +0000 (10:17 +0900)]
[IA64] kexec: Minor enhancement to includes in crash.c

linux/uaccess.h was being included, but it seems that
really the following includes are needed.

asm/page.h: for __va() and PAGE_SHIFT
asm/uaccess.h: for copy_to_user()

I guess that linux/uaccess.h pulls in both asm/page.h and asm/uaccess.h.
I notices this while backporting the code to xen's linux-2.6.16.33,
which does not have linux/uaccess.h. I'm posting it as I think it is a
correct, though somewhat cosmetic fix.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] kexec: typo in the saved_max_pfn description in contig.c
Horms [Mon, 5 Feb 2007 02:05:29 +0000 (11:05 +0900)]
[IA64] kexec: typo in the saved_max_pfn description in contig.c

Fix a typo in the saved_max_pfn description in contig.c

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Zero size /proc/vmcore on ia64
Horms [Mon, 5 Feb 2007 01:59:03 +0000 (10:59 +0900)]
[IA64] Zero size /proc/vmcore on ia64

Set saved_max_pfn when discontig memory is in use.

This sets up saved_max_pfn when disctontig memory is in use.
This mirrors the code for contig memory.

This patch does not entirely solve the problem of making vmcore work,
however it does appear to be neccessary. Please consider applying.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] kexec: Fix CONFIG_SMP=n compilation
Magnus Damm [Mon, 5 Feb 2007 06:43:42 +0000 (15:43 +0900)]
[IA64] kexec: Fix CONFIG_SMP=n compilation

Kexec support for 2.6.20 on ia64 does not build properly using a config
made up by CONFIG_SMP=n and CONFIG_HOTPLUG_CPU=n:

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Jay Lan <jlan@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoUSB HID: handle multi-interface devices for Apple macbook pro properly
Soeren Sonnenburg [Mon, 5 Feb 2007 09:06:01 +0000 (10:06 +0100)]
USB HID: handle multi-interface devices for Apple macbook pro properly

Some HID devices by Apple have both keyboard and mouse interfaces; the
keyboard interface is handled by usbhid, but the mouse (really
touchpad) interface must be handled by the separate 'appletouch'
driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
interfaces, therefore a new quirk flag to ignore only the mouse
interface is required.

Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG
Jiri Kosina [Tue, 30 Jan 2007 15:02:24 +0000 (16:02 +0100)]
HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG

CONFIG_INPUT_DEBUG is non-existent option, so remove anything depending
on it.

Also, as we have new CONFIG_HID_DEBUG, this should be used on places
where ifdef DEBUG was used before.

Suggested by Adrian Bunk.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoUSB HID: fix bogus comment in hid_get_class_descriptor()
Jiri Kosina [Fri, 26 Jan 2007 11:58:24 +0000 (12:58 +0100)]
USB HID: fix bogus comment in hid_get_class_descriptor()

The comment in hid_get_class_descriptor() says a very obvious thing
and is also violating codingstyle. Just remove it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoUSB HID: remove hid_find_field_by_usage()
Jiri Kosina [Fri, 26 Jan 2007 11:56:16 +0000 (12:56 +0100)]
USB HID: remove hid_find_field_by_usage()

The unused hid_find_field_by_usage() function has been commented out for
a pretty long time. Remove it completely.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: API - fix leftovers of hidinput API in USB HID
Jiri Kosina [Wed, 24 Jan 2007 10:54:19 +0000 (11:54 +0100)]
HID: API - fix leftovers of hidinput API in USB HID

hidinput_{open,close}() functions do not belong to usbhid, but
to the generic HID layer. Move them, and fix hooks in struct
hid_device, so that now the callbacks are done to transport-specific
_open() functions, but not input_open() functions.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: hid debug from hid-debug.h to hid layer
Jiri Kosina [Thu, 25 Jan 2007 10:43:31 +0000 (11:43 +0100)]
HID: hid debug from hid-debug.h to hid layer

hid-debug.h contains a lot of code, and should not therefore
be a header.

This patch moves the code to generic hid layer as .c source, and
introduces CONFIG_HID_DEBUG to conditionally compile it, instead
of playing with #define DEBUG and including hid-debug.h.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agohid: force feedback driver for PantherLord USB/PS2 2in1 Adapter
Anssi Hannula [Thu, 11 Jan 2007 14:51:18 +0000 (16:51 +0200)]
hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter

Add a force feedback driver for PantherLord USB/PS2 2in1 Adapter,
0810:0001. The device identifies itself as "Twin USB Joystick".

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agohid: quirk for multi-input devices with unneeded output reports
Anssi Hannula [Thu, 11 Jan 2007 14:51:17 +0000 (16:51 +0200)]
hid: quirk for multi-input devices with unneeded output reports

Add new quirk HID_QUIRK_SKIP_OUTPUT_REPORTS to skip output reports
when enumerating reports on a hid-input device. Add this quirk and
HID_QUIRK_MULTI_INPUT to 0810:0001.

PantherLord Twin USB Joystick, 0810:0001 has separate input reports
for 2 distinct game controllers in the same interface, so it needs
HID_QUIRK_MULTI_INPUT. However, the device also contains one output
report per controller which is used to control the force feedback
function, and we do not want those to appear as separate input
devices as well. The simplest approach seems to be to add a quirk to
skip output reports on 0810:0001, and allow the force feedback
driver to handle those.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agohid: allow force feedback for multi-input devices
Anssi Hannula [Thu, 11 Jan 2007 14:51:16 +0000 (16:51 +0200)]
hid: allow force feedback for multi-input devices

Allow hid devices with HID_QUIRK_MULTI_INPUT to have force feedback.
This was previously disabled because there were not any force
feedback drivers for such devices. This will change with my upcoming
patch.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoIB/ehca: Remove obsolete prototypes
Hoang-Nam Nguyen [Tue, 23 Jan 2007 23:14:18 +0000 (00:14 +0100)]
IB/ehca: Remove obsolete prototypes

Remove prototypes for functions that don't exist.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/ehca: Remove use of do_mmap()
Hoang-Nam Nguyen [Tue, 23 Jan 2007 23:13:35 +0000 (00:13 +0100)]
IB/ehca: Remove use of do_mmap()

This patch removes do_mmap() from ehca:
 - Call remap_pfn_range() for hardware register block
 - Use vm_insert_page() to register memory allocated for completion
   queues and queue pairs
 - The actual mmap() call/trigger is now controlled by user space,
   ie. libehca

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoRDMA/addr: Handle ethernet neighbour updates during route resolution
Steve Wise [Wed, 24 Jan 2007 01:03:17 +0000 (19:03 -0600)]
RDMA/addr: Handle ethernet neighbour updates during route resolution

The iWARP connection manager uses the ib_addr services to do route
resolution (neighbour discovery in the IP world).  The ib_addr
netevent callback routine, however, currently only acts on InfiniBand
neighbour updates.  It needs to act on ethernet neighbour updates as
well.

This patch just removes filtering on device type altogether and will
trigger on any neighour updates where the nud_type is valid.  This
simplifies the code some.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB: Make sure struct ib_user_mad.data is aligned
Jason Gunthorpe [Fri, 19 Jan 2007 18:58:49 +0000 (11:58 -0700)]
IB: Make sure struct ib_user_mad.data is aligned

Make the untyped data region in ib_user_mad have type u64 so that it
gets aligned properly.  This avoids alignment faults in ib_umad when
casting the data field to an rmpp_mad and accessing the 64-bit tid
field on architectures like ia64.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/srp: Don't wait for response when QP is in error state.
Ishai Rabinovitz [Tue, 16 Jan 2007 15:26:22 +0000 (17:26 +0200)]
IB/srp: Don't wait for response when QP is in error state.

When there is a call to send_tsk_mgmt SRP posts a send and waits for 5
seconds to get a response.

When the QP is in the error state it is obvious that there will be no
response so it is quite useless to wait.  In fact, the timeout causes
SRP to wait a long time to reconnect when a QP error occurs. (Each
abort and each reset_device calls send_tsk_mgmt, which waits for the
timeout).  The following patch solves this problem by identifying the
failure and returning an immediate error code.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB: Return qp pointer as part of ib_wc
Michael S. Tsirkin [Sun, 31 Dec 2006 19:09:42 +0000 (21:09 +0200)]
IB: Return qp pointer as part of ib_wc

struct ib_wc currently only includes the local QP number: this matches
the IB spec, but seems mostly useless. The following patch replaces
this with the pointer to qp itself, and updates all low level drivers
and all users.

This has the following advantages:
- Ability to get a per-qp context through wc->qp->qp_context
- Existing drivers already have the qp pointer ready in poll cq, so
  this change actually saves a tiny bit (extra memory read) on data path
  (for ehca it would actually be expensive to find the QP pointer when
  polling a CQ, but ehca does not support SRQ so we can leave wc->qp as
  NULL for ehca)
- Users that need the QP number can still get it through wc->qp->qp_num

Use case:

In IPoIB connected mode code, I have a common CQ shared by multiple
QPs.  To track connection usage, I need a way to get at some per-QP
context upon the completion, and I would like to avoid allocating
context object per work request just to stick a QP pointer into it.
With this code, I can just use wc->qp->qp_context.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB: Include <linux/kref.h> explicitly in <rdma/ib_verbs.h>
Michael S. Tsirkin [Sun, 4 Feb 2007 22:11:55 +0000 (14:11 -0800)]
IB: Include <linux/kref.h> explicitly in <rdma/ib_verbs.h>

<rdma/ib_verbs.h> uses struct kref, so it should include <linux/kref.h>
explicitly to avoid hidden include dependencies.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agommc: tifm: replace kmap with page_address
Pierre Ossman [Sat, 3 Feb 2007 12:36:41 +0000 (13:36 +0100)]
mmc: tifm: replace kmap with page_address

Since we actively avoid highmem, calling kmap_atomic() instead
of page_address() is effectively only obfuscation.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: sdhci: fix voltage ocr
Pierre Ossman [Fri, 2 Feb 2007 21:41:41 +0000 (22:41 +0100)]
mmc: sdhci: fix voltage ocr

Some bad if-clauses caused the driver to just report the highest
supported voltage, not all.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: sdhci: replace kmap with page_address
Pierre Ossman [Fri, 2 Feb 2007 17:27:42 +0000 (18:27 +0100)]
mmc: sdhci: replace kmap with page_address

Since we actively avoid highmem, calling kmap_atomic() instead
of page_address() is effectively only obfuscation.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: wbsd: replace kmap with page_address
Pierre Ossman [Wed, 31 Jan 2007 17:20:48 +0000 (18:20 +0100)]
mmc: wbsd: replace kmap with page_address

Since we actively avoid highmem, calling kmap_atomic() instead
of page_address() is effectively only obfuscation.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: handle pci_enable_device() return value in sdhci
Pierre Ossman [Tue, 30 Jan 2007 06:55:15 +0000 (07:55 +0100)]
mmc: handle pci_enable_device() return value in sdhci

Make sure we report back any errors from pci_enable_device().

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: Proper unclaim in mmc_block
Pierre Ossman [Tue, 30 Jan 2007 06:48:04 +0000 (07:48 +0100)]
mmc: Proper unclaim in mmc_block

Make sure we release the claim on the host even on failure.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: change wbsd mailing list
Pierre Ossman [Sat, 27 Jan 2007 12:18:26 +0000 (13:18 +0100)]
mmc: change wbsd mailing list

The wbsd-devel list has been shut down. Refer people to
LKML instead.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: Graceful fallback for fancy features
Pierre Ossman [Sun, 7 Jan 2007 15:59:06 +0000 (16:59 +0100)]
mmc: Graceful fallback for fancy features

MMC high-speed, wide bus support and SD high-speed
are functions that aren't critical for correct
operation of the card. As such, they shouldn't mark
the card as bad or dead when there is a failure
activating these features.

This is needed in particular on some really stupid
hardware (e.g. Winbond's) where not all data transfer
commands are supported.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: Handle wbsd's stupid command list
Pierre Ossman [Tue, 21 Nov 2006 16:45:37 +0000 (17:45 +0100)]
mmc: Handle wbsd's stupid command list

The wbsd hardware is so incredibly brain damaged that it has an internal
list of commands that result in data transfers. The result being that
commands that aren't on this list aren't supported.

Instead of locking up, waiting for a data interrupt that will never come,
we try to fail a bit more gracefully.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: Allow host drivers to specify max block count
Pierre Ossman [Tue, 21 Nov 2006 16:55:45 +0000 (17:55 +0100)]
mmc: Allow host drivers to specify max block count

Many controllers have an upper limit on the number of blocks that can be
transferred in one request. Allow the host drivers to specify this and make
sure we avoid hitting this limit.

Also change the max_sectors field to avoid confusion. This makes it map
less directly to the block layer limits, but as they didn't apply directly
on MMC cards anyway, this isn't a great loss.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: Allow host drivers to specify a max block size
Pierre Ossman [Tue, 21 Nov 2006 16:54:23 +0000 (17:54 +0100)]
mmc: Allow host drivers to specify a max block size

Most controllers have an upper limit on the block size. Allow the host
drivers to specify this and make sure we avoid hitting this limit.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_sd: add suspend and resume functionality
Alex Dubov [Sun, 10 Dec 2006 14:55:38 +0000 (01:55 +1100)]
tifm_sd: add suspend and resume functionality

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_core: add suspend/resume infrastructure for tifm devices
Alex Dubov [Sun, 10 Dec 2006 14:55:37 +0000 (01:55 +1100)]
tifm_core: add suspend/resume infrastructure for tifm devices

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_7xx1: prettify
Alex Dubov [Sun, 10 Dec 2006 14:55:36 +0000 (01:55 +1100)]
tifm_7xx1: prettify

Fix some spaces and tabs. No semantic changes are introduced.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_7xx1: recognize device 0xac8f as supported
Alex Dubov [Sun, 10 Dec 2006 14:55:35 +0000 (01:55 +1100)]
tifm_7xx1: recognize device 0xac8f as supported

This patch also adds symbolic defines for supported pci ids.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_7xx1: switch from workqueue to kthread
Alex Dubov [Mon, 18 Dec 2006 03:20:06 +0000 (14:20 +1100)]
tifm_7xx1: switch from workqueue to kthread

As there's only one work item (media_switcher) to handle and it's effectively
serialized with itself, I found it more convenient to use kthread instead of
workqueue. This also allows for a working implementation of suspend/resume,
which were totally broken in the past version.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_7xx1: Merge media insert and media remove functions
Alex Dubov [Sun, 10 Dec 2006 14:55:33 +0000 (01:55 +1100)]
tifm_7xx1: Merge media insert and media remove functions

Hardware does not say whether card was inserted or removed when reporting
socket events. Moreover, during suspend, media can be removed or switched
to some other card type without notification. Therefore, for each socket
in the change set the following is performed:
1. If there's active device in the socket it's unregistered
2. Media detection is performed
3. If detection recognizes supportable media, new device is registered

This patch also alters some macros and variable names to enhance clarity.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_7xx1: simplify eject function
Alex Dubov [Sun, 10 Dec 2006 14:55:32 +0000 (01:55 +1100)]
tifm_7xx1: simplify eject function

Eject function can take advantage of the socket_id field instead of explicit
pointer comparison.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agoAdd dummy_signal_irq function to save check in ISR
Alex Dubov [Sun, 10 Dec 2006 14:55:31 +0000 (01:55 +1100)]
Add dummy_signal_irq function to save check in ISR

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agoRemove unused return value from signal_irq callback
Alex Dubov [Sun, 10 Dec 2006 14:55:30 +0000 (01:55 +1100)]
Remove unused return value from signal_irq callback

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_sd: prettify
Alex Dubov [Fri, 8 Dec 2006 05:50:52 +0000 (16:50 +1100)]
tifm_sd: prettify

This patch introduces no semantic changes - it is here for estetic purposes.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_sd: restructure initialization, removal and command handling
Alex Dubov [Fri, 8 Dec 2006 05:50:51 +0000 (16:50 +1100)]
tifm_sd: restructure initialization, removal and command handling

In order to support correct suspend and resume several changes were needed:
1. Switch from work_struct to tasklet for command handling. When device
suspend is called workqueues are already frozen and can not be used.
2. Separate host initialization code from driver's probe and don't rely
on interrupts for host initialization. This, in turn, addresses two
problems:
 a) Resume needs to re-initialize the host, but can not assume that
    device interrupts were already re-armed.
 b) Previously, probe will return successfully before really knowing
    the state of the host, as host interrupts were not armed in time.
    Now it uses polling to determine the real host state before returning.
3. Separate termination code from driver's remove. Termination may be caused
by resume, if media changed type or became unavailable during suspend.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_sd: fix hardware timeout setup
Alex Dubov [Fri, 8 Dec 2006 05:50:50 +0000 (16:50 +1100)]
tifm_sd: fix hardware timeout setup

The register access order when setting hardware timeout was incorrect and
causing problems (wrong timeout intervals). This is now fixed.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_sd: Switch software timeout handler from work_struct to timer
Alex Dubov [Fri, 8 Dec 2006 05:50:49 +0000 (16:50 +1100)]
tifm_sd: Switch software timeout handler from work_struct to timer

Two changes are introduced to software timeout handler in order to simplify
its management:
1. The implementation is switched from work_struct to timer
2. Previously, software timeout was rearmed with each interrupt. Now,
current request must complete entirely within timeout interval.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_sd: use kmap_atomic instead of kmap for PIO data buffer
Alex Dubov [Fri, 8 Dec 2006 05:50:48 +0000 (16:50 +1100)]
tifm_sd: use kmap_atomic instead of kmap for PIO data buffer

Data buffer for PIO transfer used to be mapped in advance with kmap.
Abolish it in favor of on-demand kmap_atomic.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agotifm_sd: alter order of the states in the command handler
Alex Dubov [Fri, 8 Dec 2006 05:50:47 +0000 (16:50 +1100)]
tifm_sd: alter order of the states in the command handler

Previously, stop command was issued right after BRS (block received/sent)
event. Stop command completion event could interfere with the card busy
event, causing miscount of the written blocks.
This patch ensures that stop command issued as last action for a
particular command, after DMA sompletion event and written block
count verification.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: Add support for SDHC cards
Philip Langdale [Thu, 4 Jan 2007 14:57:32 +0000 (06:57 -0800)]
mmc: Add support for SDHC cards

Thanks to the generous donation of an SDHC card by John Gilmore, and
the surprisingly enlightened decision by the SD Card Association to
publish useful specs, I've been able to bash out support for SDHC. The
changes are not too profound:

i) Add a card flag indicating the card uses block level addressing and
check it in the block driver. As we never took advantage of byte-level
addressing, this simply involves skipping the block -> byte
translation when sending commands.

ii) The layout of the CSD is changed - a set of fields are discarded
to make space for a larger C_SIZE. We did not reference any of the
discarded fields except those related to the C_SIZE.

iii) Read and write timeouts are fixed values and not calculated from
CSD values.

iv) Before invoking SEND_APP_OP_COND, we must invoke the new
SEND_IF_COND to inform the card we support SDHC.

Signed-off-by: Philipl Langdale <philipl@overt.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: Power quirk for ENE controllers
Darren Salt [Sat, 27 Jan 2007 14:32:31 +0000 (15:32 +0100)]
mmc: Power quirk for ENE controllers

Support for these devices was broken for 2.6.18-rc1 and later by commit
146ad66eac836c0b976c98f428d73e1f6a75270d, which added voltage level support.

This restores the previous behaviour for these devices by ensuring that when
the voltage is changed, only one write to set the voltage is performed.

It may be that both writes are needed if the voltage is being changed between
two non-zero values or that it's safe to ensure that only one write is done
if the hardware only supports one voltage; I don't know whether either is the
case nor can I test since I have only the one SD reader (1524:0550), and it
supports just the one voltage.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: let host be parent of cards
Pierre Ossman [Sun, 14 Jan 2007 00:41:45 +0000 (01:41 +0100)]
mmc: let host be parent of cards

Change the parent of cards to be a specific host (a class
device), not the physical controller. This is particularly
useful when the hardware has multiple slots, meaning
multiple hosts.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: replace host->card_busy
Pierre Ossman [Tue, 26 Dec 2006 14:11:23 +0000 (15:11 +0100)]
mmc: replace host->card_busy

As card_busy was only used to indicate if the host was exclusively
claimed and not really used to identify a particular card, replacing
it with just a boolean makes things a lot more easily understandable.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: au1xmmc: return errors for unknown response types
Manuel Lauss [Thu, 25 Jan 2007 09:27:41 +0000 (10:27 +0100)]
mmc: au1xmmc: return errors for unknown response types

au1xmmc: return error when encountering unhandled/unknown response type.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: au1xmmc: implement proper ro switch detection
Manuel Lauss [Thu, 25 Jan 2007 09:29:24 +0000 (10:29 +0100)]
mmc: au1xmmc: implement proper ro switch detection

au1xmmc: implement proper R/O switch detection.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agoLinux 2.6.20 v2.6.20
Linus Torvalds [Sun, 4 Feb 2007 18:44:54 +0000 (10:44 -0800)]
Linux 2.6.20

17 years ago[PATCH] EFI x86: pass firmware call parameters on the stack
Frédéric Riss [Tue, 30 Jan 2007 20:41:17 +0000 (21:41 +0100)]
[PATCH] EFI x86: pass firmware call parameters on the stack

When calling into the EFI firmware, the parameters need to be passed on
the stack. The recent change to use -mregparm=3 breaks x86 EFI support.
This patch is needed to allow the new Intel-based Macs to suspend to ram
(efi.get_time is called during the suspend phase).

Signed-off-by: Frederic Riss <frederic.riss@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] fix rtl8150
Al Viro [Sun, 4 Feb 2007 03:02:17 +0000 (03:02 +0000)]
[PATCH] fix rtl8150

That code doesn't do what its author apparently thought it would do...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Sat, 3 Feb 2007 19:26:39 +0000 (11:26 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] sd: udev accessing an uninitialized scsi_disk field results in a crash
  [SCSI] st: A MTIOCTOP/MTWEOF within the early warning will cause the file number to be incorrect
  [SCSI] qla4xxx: bug fixes
  [SCSI] Fix scsi_add_device() for async scanning

17 years ago[PATCH] x86-64: define dma noncoherent API functions
Jeff Garzik [Sat, 3 Feb 2007 09:14:03 +0000 (01:14 -0800)]
[PATCH] x86-64: define dma noncoherent API functions

x86-64 is missing these:

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Altix: more ACPI PRT support
John Keller [Sat, 3 Feb 2007 09:14:02 +0000 (01:14 -0800)]
[PATCH] Altix: more ACPI PRT support

The SN Altix platform does not conform to the IOSAPIC IRQ routing model.
Add code in acpi_unregister_gsi() to check if (acpi_irq_model ==
ACPI_IRQ_MODEL_PLATFORM) and return.

Due to an oversight, this code was not added previously when
similar code was added to acpi_register_gsi().

http://marc.theaimsgroup.com/?l=linux-acpi&m=116680983430121&w=2

Signed-off-by: John Keller <jpk@sgi.com>
Acked-by: Len Brown <lenb@kernel.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] revert blockdev direct io back to 2.6.19 version
Andrew Morton [Sat, 3 Feb 2007 09:14:01 +0000 (01:14 -0800)]
[PATCH] revert blockdev direct io back to 2.6.19 version

Andrew Vasquez is reporting as-iosched oopses and a 65% throughput
slowdown due to the recent special-casing of direct-io against
blockdevs.  We don't know why either of these things are occurring.

The patch minimally reverts us back to the 2.6.19 code for a 2.6.20
release.

Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Ken Chen <kenchen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] alpha: fix epoll syscall enumerations
Mike Frysinger [Sat, 3 Feb 2007 09:13:55 +0000 (01:13 -0800)]
[PATCH] alpha: fix epoll syscall enumerations

We went and named them __NR_sys_foo instead of __NR_foo.

It may be too late to change this, but we can at least add the proper names
now.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] net/smc911x: match up spin lock/unlock
Peter Korsgaard [Sat, 3 Feb 2007 09:13:50 +0000 (01:13 -0800)]
[PATCH] net/smc911x: match up spin lock/unlock

smc911x_phy_configure's error handling unconditionally unlocks the
spinlock even if it wasn't locked. Patch fixes it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kexec: Avoid migration of already disabled irqs (ia64)
Magnus Damm [Sat, 3 Feb 2007 09:13:48 +0000 (01:13 -0800)]
[PATCH] kexec: Avoid migration of already disabled irqs (ia64)

This patch fixes up ia64 kexec support for HP rx2620 hardware.  It does
this by skipping migration of already disabled irqs.  This is most likely a
problem on other ia64 platforms as well, but I've only been able to
reproduce it on one machine so far.

The full story is that handle_bad_irq() gets invoked before starting the
new kernel without this patch.  This seems to happen when fixup_irqs()
calls generic_handle_irq() on already migrated (and disabled) irqs.  So by
avoiding migration of disabled irqs we stay away of handle_bad_irq().

The code has been tested on three different ia64 machines, all with good
results.  It is possible to trigger the same bug by offlining a processor
using echo 0 > /sys/devices/system/cpu/cpuX/online.

More detailed information is available in the following mail thread:
http://lists.osdl.org/pipermail/fastboot/2007-January/thread.html#5774

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Zou, Nanhai <nanhai.zou@intel.com>
Acked-by: Jay Lan <jlan@sgi.com>
Acked-by: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] aio: fix buggy put_ioctx call in aio_complete - v2
Ken Chen [Sat, 3 Feb 2007 09:13:45 +0000 (01:13 -0800)]
[PATCH] aio: fix buggy put_ioctx call in aio_complete - v2

An AIO bug was reported that sleeping function is being called in softirq
context:

BUG: warning at kernel/mutex.c:132/__mutex_lock_common()
Call Trace:
     [<a000000100577b00>] __mutex_lock_slowpath+0x640/0x6c0
     [<a000000100577ba0>] mutex_lock+0x20/0x40
     [<a0000001000a25b0>] flush_workqueue+0xb0/0x1a0
     [<a00000010018c0c0>] __put_ioctx+0xc0/0x240
     [<a00000010018d470>] aio_complete+0x2f0/0x420
     [<a00000010019cc80>] finished_one_bio+0x200/0x2a0
     [<a00000010019d1c0>] dio_bio_complete+0x1c0/0x200
     [<a00000010019d260>] dio_bio_end_aio+0x60/0x80
     [<a00000010014acd0>] bio_endio+0x110/0x1c0
     [<a0000001002770e0>] __end_that_request_first+0x180/0xba0
     [<a000000100277b90>] end_that_request_chunk+0x30/0x60
     [<a0000002073c0c70>] scsi_end_request+0x50/0x300 [scsi_mod]
     [<a0000002073c1240>] scsi_io_completion+0x200/0x8a0 [scsi_mod]
     [<a0000002074729b0>] sd_rw_intr+0x330/0x860 [sd_mod]
     [<a0000002073b3ac0>] scsi_finish_command+0x100/0x1c0 [scsi_mod]
     [<a0000002073c2910>] scsi_softirq_done+0x230/0x300 [scsi_mod]
     [<a000000100277d20>] blk_done_softirq+0x160/0x1c0
     [<a000000100083e00>] __do_softirq+0x200/0x240
     [<a000000100083eb0>] do_softirq+0x70/0xc0

See report: http://marc.theaimsgroup.com/?l=linux-kernel&m=116599593200888&w=2

flush_workqueue() is not allowed to be called in the softirq context.
However, aio_complete() called from I/O interrupt can potentially call
put_ioctx with last ref count on ioctx and triggers bug.  It is simply
incorrect to perform ioctx freeing from aio_complete.

The bug is trigger-able from a race between io_destroy() and aio_complete().
A possible scenario:

cpu0                               cpu1
io_destroy                         aio_complete
  wait_for_all_aios {                __aio_put_req
     ...                                 ctx->reqs_active--;
     if (!ctx->reqs_active)
        return;
  }
  ...
  put_ioctx(ioctx)

                                     put_ioctx(ctx);
                                        __put_ioctx
                                          bam! Bug trigger!

The real problem is that the condition check of ctx->reqs_active in
wait_for_all_aios() is incorrect that access to reqs_active is not
being properly protected by spin lock.

This patch adds that protective spin lock, and at the same time removes
all duplicate ref counting for each kiocb as reqs_active is already used
as a ref count for each active ioctx.  This also ensures that buggy call
to flush_workqueue() in softirq context is eliminated.

Signed-off-by: "Ken Chen" <kenchen@google.com>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Suparna Bhattacharya <suparna@in.ibm.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: <stable@kernel.org>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[NETFILTER]: nf_conntrack_h323: fix compile error with CONFIG_IPV6=m, CONFIG_NF_CONNT...
Adrian Bunk [Sat, 3 Feb 2007 03:33:52 +0000 (19:33 -0800)]
[NETFILTER]: nf_conntrack_h323: fix compile error with CONFIG_IPV6=m, CONFIG_NF_CONNTRACK_H323=y

Fix this by letting NF_CONNTRACK_H323 depend on (IPV6 || IPV6=n).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: ctnetlink: fix compile failure with NF_CONNTRACK_MARK=n
Patrick McHardy [Sat, 3 Feb 2007 03:33:11 +0000 (19:33 -0800)]
[NETFILTER]: ctnetlink: fix compile failure with NF_CONNTRACK_MARK=n

  CC      net/netfilter/nf_conntrack_netlink.o
net/netfilter/nf_conntrack_netlink.c: In function 'ctnetlink_conntrack_event':
net/netfilter/nf_conntrack_netlink.c:392: error: 'struct nf_conn' has no member named 'mark'
make[3]: *** [net/netfilter/nf_conntrack_netlink.o] Error 1

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCSI] sd: udev accessing an uninitialized scsi_disk field results in a crash
Nagendra Singh Tomar [Fri, 2 Feb 2007 12:04:56 +0000 (17:34 +0530)]
[SCSI] sd: udev accessing an uninitialized scsi_disk field results in a crash

sd_probe() calls class_device_add() even before initializing the
sdkp->device variable. class_device_add() eventually results in the user mode
udev program to be called. udev program can read the the allow_restart
attribute of the newly created scsi device. This is resulting in a crash as
the show function for allow_restart (i.e sd_show_allow_restart) returns the
attribute value by reading the sdkp->device->allow_restart variable. As the
sdkp->device is not initialized before calling the user mode hotplug helper,
this results in a crash.
The patch below solves it by calling class_device_add() only after the
necessary fields in the scsi_disk structure are initialized properly.

Signed-off-by: Nagendra Singh Tomar <nagendra_tomar@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 2 Feb 2007 17:14:48 +0000 (09:14 -0800)]
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:
  libata: Initialize nbytes for internal sg commands
  libata: Fix ata_busy_wait() kernel docs
  pata_via: Correct missing comments
  pata_atiixp: propogate cable detection hack from drivers/ide to the new driver
  ahci/pata_jmicron: fix JMicron quirk

17 years agolibata: Initialize nbytes for internal sg commands
Brian King [Tue, 30 Jan 2007 17:32:26 +0000 (11:32 -0600)]
libata: Initialize nbytes for internal sg commands

Some LLDDs, like ipr, use nbytes and pad_len to determine
the total data transfer length of a command. Make sure
nbytes gets initialized for internally generated commands.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: Fix ata_busy_wait() kernel docs
Alan [Wed, 31 Jan 2007 17:47:24 +0000 (17:47 +0000)]
libata: Fix ata_busy_wait() kernel docs

> Looks like you should use ata_busy_wait() here, rather than reproducing
> the same code again.

It waits in 10uS chunks while 1uS chunks were used in the workaround.
Could indeed do that once I know the fix is right. While I'm at it the
ata_busy_wait kerneldoc is borked so here's a fix

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_via: Correct missing comments
Alan [Wed, 31 Jan 2007 17:14:38 +0000 (17:14 +0000)]
pata_via: Correct missing comments

The 8237S was added to the chipsets but not to the comments. Fix this

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_atiixp: propogate cable detection hack from drivers/ide to the new driver
Alan [Wed, 31 Jan 2007 17:10:46 +0000 (17:10 +0000)]
pata_atiixp: propogate cable detection hack from drivers/ide to the new driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci/pata_jmicron: fix JMicron quirk
Tejun Heo [Fri, 2 Feb 2007 05:51:09 +0000 (14:51 +0900)]
ahci/pata_jmicron: fix JMicron quirk

For all JMicrons except for 361 and 368, AHCI mode enable bits in the
Control(1) should be set.  This used to be done in both ahci and
pata_jmicron but while moving programming to PCI quirk, it was removed
from ahci part while still left in pata_jmicron.

The implemented JMicron PCI quirk was incorrect in that it didn't
program AHCI mode enable bits.  If pata_jmicron is loaded first and
programs those bits, the ahci ports work; otherwise, ahci device
detection fails miserably.

This patch makes JMicron PCI quirk clear SATA IDE mode bits and set
AHCI mode bits and remove the respective part from pata_jmicron.
Tested on JMB361, 363 and 368.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 2 Feb 2007 16:13:23 +0000 (08:13 -0800)]
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:
  spidernet : fix memory leak in spider_net_stop
  e100: fix napi ifdefs removing needed code
  netxen patches

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/bnx2-2.6
Linus Torvalds [Fri, 2 Feb 2007 16:10:58 +0000 (08:10 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/bnx2-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/bnx2-2.6:
  [BNX2]: PHY workaround for 5709 A0.

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 2 Feb 2007 16:10:30 +0000 (08:10 -0800)]
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:
  [NET_SCHED]: act_ipt: fix regression in ipt action

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 2 Feb 2007 16:10:17 +0000 (08:10 -0800)]
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:
  [SPARC32]: Fix over-optimization by GCC near ip_fast_csum.

17 years ago[PATCH] MAINTAINERS: ufs entry
Evgeniy Dushistov [Fri, 2 Feb 2007 08:36:34 +0000 (11:36 +0300)]
[PATCH] MAINTAINERS: ufs entry

Mark ufs file system as maintainable, and add me as maintainer,
to help people find appropriate person to assign bugs.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRevert "[PATCH] fix typo in geode_configre()@cyrix.c"
Linus Torvalds [Fri, 2 Feb 2007 16:07:42 +0000 (08:07 -0800)]
Revert "[PATCH] fix typo in geode_configre()@cyrix.c"

This reverts commit e4f0ae0ea63caceff37a13f281a72652b7ea71ba.

It's not wrong, but it's not right either, and everybody seems to agree
that the right fix is probably to do the ccr3 write after the ccr4 one
(and that we also should clean it up a bit).  And after that we need to
really validate that all the bits that we write to ccr4 actually do
work.

The old 2.6.19 code was insane, and basically didn't change ccr4 at all
(even though it certainly looks like it was the *intent* to do so).  So
let's revert the change that may fix things, just because it's not what
was actually ever tested when the code was written, even if it _was_ the
intent.

There's a discussion on http://lkml.org/lkml/2007/1/9/63 that was
started by the patch that now gets reverted, and that discussion may
well contain the proper long-term fix.

Suggested-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>